Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » not-xtext builder for my dsl ?
not-xtext builder for my dsl ? [message #848195] Wed, 18 April 2012 02:35 Go to next message
Eliott Gentil is currently offline Eliott GentilFriend
Messages: 2
Registered: April 2012
Junior Member
Hi,

I have an existing 3rd part compiler for a language. I used xtext to make a DSL for this language and have a working editor with colors, errors and warnings.

Now I want to use my compiler to build the project. I read all the docs I could find, but I am still not sure that this is the good way to do it, can you please confirm ?

-in GenerateMyDsl.mwe2, comment the line :
fragment = builder.BuilderIntegrationFragment {}

-in mydsl.ui project, in plugin.xml, remove:
   <extension
         point="org.eclipse.xtext.builder.participant">
      <participant
            class="...ExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant">
      </participant>
   </extension>
   <extension
            point="org.eclipse.ui.preferencePages">
        <page
            category="..."
            class="...ExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
            id="..."
            name="Compiler">
            <keywordReference id="..."/>
        </page>
    </extension>
    <extension
            point="org.eclipse.ui.propertyPages">
        <page
            category="..."
            class="..."
            id="..."
            name="Compiler">
            <keywordReference id="..."/>
            <enabledWhen>
	            <adapt type="org.eclipse.core.resources.IProject"/>
			</enabledWhen>
	        <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
        </page>
    </extension>
and replace it with anything I could find in the eclipse documentation about how to add a builder for not-xtext projects.

Is that ok ?

Thx,
Eliott.


[Updated on: Wed, 18 April 2012 02:36]

Report message to a moderator

Re: not-xtext builder for my dsl ? [message #848459 is a reply to message #848195] Wed, 18 April 2012 08:39 Go to previous messageGo to next message
Holger Schill is currently offline Holger SchillFriend
Messages: 75
Registered: July 2009
Member
Hi Eliott,

as I understood you do not have the Xtext nature on the projects you
would like to build? So what kind of listener or BuilderParticipant do
you want to use instead?

The BuilderIntegration binds special Implementation to make the index
accessable that gets constructed for projects that have the Xtext
nature. What do you want to achive? Is it a constraint that you have to
avoid the xtext nature in your project?

Cheers,

Holger


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: not-xtext builder for my dsl ? [message #848651 is a reply to message #848459] Wed, 18 April 2012 13:00 Go to previous messageGo to next message
Eliott Gentil is currently offline Eliott GentilFriend
Messages: 2
Registered: April 2012
Junior Member
Hi,

my project will have the xtext nature, because I will use the xtext generated editor (for colors, errors, warnings, typing help, ...) but i will not use the xtext builder (because my file will be build by a 3rd part compiler which is already existing).

Since xtent registers things for the builder, I want to remove everything hta is not needed for th editor/warning/error/... and do the build with the existing builder.

Thanks you,
Eliott.
Re: not-xtext builder for my dsl ? [message #848660 is a reply to message #848651] Wed, 18 April 2012 13:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14716
Registered: July 2009
Senior Member
Hi,

you can remove the Builder Participant Registration by removing
fragment = generator.GeneratorFragment from the workflow
(dont forget to merge plugin.xml and plugin.xml_gen)
or by simply removing the builder participant registration
from the plugin.xml


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: not-xtext builder for my dsl ? [message #849004 is a reply to message #848660] Wed, 18 April 2012 19:50 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
But leave the BuilderIntegrationFragment in place. Otherwise
cross-references depending on the index will no longer be resolvable and
you'll experience strangest errors.

Am 18.04.12 15:09, schrieb Christian Dietrich:
> Hi,
>
> you can remove the Builder Participant Registration by removing
> fragment = generator.GeneratorFragment from the workflow
> (dont forget to merge plugin.xml and plugin.xml_gen)
> or by simply removing the builder participant registration
> from the plugin.xml


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
Previous Topic:Postprocessing set field
Next Topic:xtext project from existing ecore model don´t generate the grammar well
Goto Forum:
  


Current Time: Mon Sep 23 10:26:52 GMT 2024

Powered by FUDForum. Page generated in 0.03876 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top