-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow contributions to DSLD Classpath Container #304
Comments
It should be the case that adding your DSLD file to the |
Not sure I understand. I am talking about deploying a dsld file in an installed plugin, like the ones in the org.codehaus.groovyXX/plugin_dsld_support folders. AFAIU the only plugin that is searched for dsld files is the currently active compiler plugin, see https://github.com/groovy/groovy-eclipse/blob/master/ide/org.codehaus.groovy.eclipse.dsl/src/org/codehaus/groovy/eclipse/dsl/classpath/DSLDContainerInitializer.java#L78 |
Apologies, I forgot how this works. It's been a while. :) So, only dsld files found on the classpath or in the global location are added. The reason is that dslds are typically associated with a library that is on the classpath. Even groovy-based plugins (eg- grails plugin) adds entries to the classpath. And a reason against adding dslds from a plugin to a project is that these dslds would apply to all groovy projects in the entire workspace, regardless of whether or not they actually use the plugin. So, here's a recommendation. Somewhere inside of your plugin, ensure that a classpath container is added to a project's classpath. This classpath container should add a path that adds the dsld. This is exactly how the grails plugin works. |
Ok, thank you, it's all clear. |
My plugin adds a dsl for an RCP application. I also have a DSLD file for the DSL. AFAIU at the moment, I have to tell the user to put the .dsld file into ~/.groovy/greclipse/dsld manually. I would rather like to tell groovy-eclipse that i would like to contribute descriptors from a given bundle in a given subfolder of that bundle to the DSLD Classpath Container, and that these descriptors would then be picked up automatically.
The text was updated successfully, but these errors were encountered: