I'm using a custom DSL with Xtext grammar. In my workspace there are several projects, one of them is the development relevant project, another one is for testing purposes.
In the testing project there are a lot (> 5000) of files of my DSL, required for JUnit tests.
When the Xtext nature is added to this project, rebuilding it takes a long time, so I removed it. It's not important to me in the project anyways. But now everytime I open one of the files, Xtext asks me to add the nature to this project.
Can I disable this dialog, for a specific project or in general?
Thanks for answers!
I believe, the NatureAddingEditorCallback
class is responsible for that feature.
To replace this functionality for your language, I would try the following:
Open the «LanguageName»UiModule
class from your UI project (be careful, it is in the src folder; an abstract version is in the src-gen folder), and add the following lines (this piece of code came from the XtextUIModule
class):
public Class<? extends IXtextEditorCallback> bindIXtextEditorCallback() {
return org.eclipse.xtext.builder.nature.NatureAddingEditorCallback.class;
}
Then replace the returned class with your own.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With