Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to add custom compiler settings?
How to add custom compiler settings? [message #1322401] Tue, 29 April 2014 21:04 Go to next message
Dimitry Polivaev is currently offline Dimitry PolivaevFriend
Messages: 5
Registered: July 2009
Junior Member
I want to add an option to XText compiler page of my DSL. Depending on this option the DSLJvmModelInferrer should either generate java code optimized for debugging or java code which executes faster. Instead of adding my own property and preference pages I would like to extend implementation of org.eclipse.xtext.builder.preferences.BuilderPreferencePage and org.eclipse.xtext.builder.preferences.BuilderConfigurationBlock. Unfortunately the method which I would like to override is private. And some helper methods e.g. for creating check box button I want to add are protected in the class hierarchy of BuilderConfigurationBlock.

So if I just copy this whole class and modify it I have risk that my code becomes not compatible with the future XText releases. I have the same risk if I overwrite BuilderPreferencePage.createPreferenceContent(Composite, IPreferencePageContainer) in a subclass and just add my check box to the controls created there. And in the last case I would not be able to use the helper methods for creating the check box.

And if I give up and do not try to integrate my check box with the existing compiler property page then first the compiler options are split between different pages and second I have to repeat implementation of the project specific configuration vs. workspace specific configuration.

So I just do not know what solution would be the best and I would like to ask your opinions about it.

Regards,
Dimitry Polivaev
Re: How to add custom compiler settings? [message #1449257 is a reply to message #1322401] Tue, 21 October 2014 05:10 Go to previous message
Markus Duft is currently offline Markus DuftFriend
Messages: 148
Registered: February 2013
Senior Member
Hey.

Did you find out how to do it? I need that too...

Cheers,
Markus
Previous Topic:Custom ResourceDescriptionStrategy - works in Unit Test but not runtime eclipse?
Next Topic:Only read specific data types with MWE Reader
Goto Forum:
  


Current Time: Tue Sep 24 16:50:34 GMT 2024

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

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

Back to the top