QuickFix error [message #844306] |
Fri, 13 April 2012 22:30 |
Antonio Metallo Messages: 24 Registered: March 2012 |
Junior Member |
|
|
Hi all,
in MyDlsQuickfixProvider i made this quickfix:
@Fix(MyDslJavaValidator.FIX_NAME)
public void maiInTesta(final Issue issue, IssueResolutionAcceptor acceptor){
ISemanticModification is = new ISemanticModification() {
public void apply(EObject element, IModificationContext context)throws Exception {
Rule a = (Rule)element;
a.setName("new");
}
};
acceptor.accept(issue, "Change the name of the Rule", "Modify "+ issue.getData()[0]+" into "+issue.getData()[1], null, is);
}
But I always get this error:
org.eclipse.emf.common.util.WrappedException: org.eclipse.xtext.validation.IConcreteSyntaxValidator$InvalidConcreteSyntaxException: These errors need to be fixed before the model can be serialized.
File.classi[0]->Classe'Test'.methods[0]->MethodDeclaration'test'.block->Block.blockStatement[3]->BlockStatement.stat->Statement.DD->Declaration.inner->Inner'test'.program->Program.expre[0]->Expression.body_constr->Body.bodyA[2]->BodyA.atom->Atom.dvt[0]->Term: Feature Term.int must not be set. Constraint: (int|dlva) Quantities: int:0, dva:1
File.classi[0]->Classe'Test'.methods[0]->MethodDeclaration'test'.block->Block.blockStatement[3]->BlockStatement.stat->Statement.DD->Declaration.inner->Inner'test'.program->Program.expre[0]->Expression.body_constr->Body.bodyA[2]->BodyA.atom->Atom.dvt[0]->Term: Feature Term.int must not be set. Constraint: (int|dlva) Quantities: int:0, dlva:1
at org.eclipse.xtext.ui.editor.quickfix.IssueResolution.apply(IssueResolution.java:50)
at org.eclipse.xtext.ui.editor.quickfix.QuickAssistCompletionProposal.apply(QuickAssistCompletionProposal.java:32)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:933)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelectedProposalWithMask(CompletionProposalPopup.java:879)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$27(CompletionProposalPopup.java:875)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup$5.widgetDefaultSelected(CompletionProposalPopup.java:657)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:119)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
What should I do to resolve this error?
|
|
|
Re: QuickFix error [message #844743 is a reply to message #844306] |
Sat, 14 April 2012 09:46 |
|
Hi,
the error says there is something invalid with the model it trys to serialize.
cannot say if this is a bug in the serializer or if there is something wrong with your code and model
is actually invalid.
how does the grammar (Specially for Terms) look like? how does the test model look like.
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 5.04181 seconds