Custom Types [message #882117] |
Tue, 05 June 2012 18:10  |
Eclipse User |
|
|
|
So language I've been implementing needs built-in types like say 'char' type in Java. Where do I add those types and how? Is there a tutorial that explains this in detail? I found some answers on this forum but the links are outdated.
|
|
|
|
|
|
|
|
|
|
Re: Custom Types [message #883550 is a reply to message #883534] |
Fri, 08 June 2012 15:12   |
Eclipse User |
|
|
|
My model doesn't allow import other than the built in types. However there are also some custom validators and tagTypes that are hard to implement using enums.
I meant this tutorial: blogs.itemis.de/stundzig/archives/795 one you linked in your first response.
So if I understood you correctly. I made a .jar file containing 'builtin.domm' file. I added that file to buildpath (I assume that will make it available for the project I'm building). In it it clearly states:
Quote:You could make this change known analogous to the way the ImportUriGlobalScopeProvider is bound in the AbstractXRuntimeModule
AbstractXRuntimeModule is src-gen and not src. Just to be sure I tried to add DOMMLiteGlobalScopeProvider to DOMMLiteRuntimeModule like this:
public class DOMMLiteRuntimeModule extends ftn.danielfath.AbstractDOMMLiteRuntimeModule {
@Override
public void configureIScopeProviderDelegate(com.google.inject.Binder binder) {
binder.bind(org.eclipse.xtext.scoping.IGlobalScopeProvider.class).
annotatedWith(com.google.inject.name.Names.named(
"org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.delegate"
)).to(DOMMLiteGlobalScopeProvider.class);}
}
Which caused an error:
!MESSAGE A conflict occurred for CTRL+O:
Binding(CTRL+O,
ParameterizedCommand(Command(org.eclipse.graphiti.ui.internal.action.SaveImageAction,Export Diagram,
Export Diagram,
Category(org.eclipse.graphiti.ui.Graphiti_Category,Edit,Graphiti Diagram Editor,true),
,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
Binding(CTRL+O,
ParameterizedCommand(Command(org.eclipse.papyrus.sysml.modelexplorer.FlowPort_OutCreateCommand,Create a new FlowPort_Out,
Create a new FlowPort_Out,
Category(org.eclipse.papyrus.editor.category,Papyrus Category,this a category of papyrus commands,true),
org.eclipse.papyrus.sysml.modelexplorer.handler.FlowPort_OutHandler,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
but then the editor was all messed up.
[Updated on: Fri, 08 June 2012 15:22] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06224 seconds