1

我已经使用包含表达式的Xtext实现了域特定语言(DSL) ,因此为了轻松检查它们的有效性,我决定使用Xtext-typesystem Framework
我试图实现本教程中给出的示例,但是当我使用

@Inject   private ITypesystem ts;

然后尝试运行 Launch Runtime Eclipse 以检查我的规则的有效性,编辑器不会打开并且我收到很多错误。下面是其中一些:

java.lang.NoClassDefFoundError: org/eclipse/xtext/xbase/lib/Procedures$Procedure1
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
at java.lang.Class.getDeclaredConstructors(Class.java:1853)
at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:629)
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:845)

...

org.eclipse.papyrus.core.services.ServiceNotFoundException: Can't get the current Eclipse Active Editor. No ServiceRegistry found.
at org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers.getServiceRegistry(ServiceUtilsForActionHandlers.java:67)
at org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers.getTransactionalEditingDomain(ServiceUtilsForActionHandlers.java:88)
at org.eclipse.papyrus.diagram.common.handlers.GraphicalCommandHandler.getEditingDomain(GraphicalCommandHandler.java:135)
at org.eclipse.papyrus.diagram.common.handlers.LoadHandler.getCommand(LoadHandler.java:49)
at org.eclipse.papyrus.diagram.common.handlers.GraphicalCommandHandler.isEnabled(GraphicalCommandHandler.java:107)
at org.eclipse.ui.internal.handlers.HandlerProxy.isEnabled(HandlerProxy.java:320)
at org.eclipse.core.commands.Command.isEnabled(Command.java:833)
at org.eclipse.core.commands.Command.setHandler(Command.java:965)

(Papyrus 和这个有什么关系?)

!MESSAGE A conflict occurred for ALT+CTRL+I:Binding(ALT+CTRL+I,
ParameterizedCommand(Command(org.eclipse.egit.ui.team.Ignore,Ignore,
    ,
    Category(org.eclipse.egit.ui.commandCategory,Git,null,true),
    org.eclipse.egit.ui.internal.actions.IgnoreActionHandler,
    ,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)Binding(ALT+CTRL+I,
ParameterizedCommand(Command(org.eclipse.team.svn.ui.command.AddToSVNIgnoreCommand,Add to svn:ignore...,
    ,
    Category(org.eclipse.team.svn.ui.command.category,SVN,null,true),
    ,
    ,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)

还有很多其他错误。关于为什么会发生这种情况的任何想法?

先感谢您。

4

1 回答 1

1

不知何故,您向包 org.eclipse.xtext.xbase.lib 引入了(传递?)依赖项。请确保将其导入清单中,并且不要将其从启动配置中排除。eGit / SVN 键绑定冲突似乎与此无关。

于 2012-09-09T20:52:08.937 回答