Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » problems with jet editor and some emf/jet1 include files
problems with jet editor and some emf/jet1 include files [message #45527] Thu, 15 May 2008 06:49 Go to next message
gary s thompson is currently offline gary s thompsonFriend
Messages: 92
Registered: July 2009
Member
Dear All
I am using the jet editor to edit some jet files. However, in some cases
specifically incude files I am getting an error on load

here is an example file

<%for (GenFeature genFeature : genClass.getDeclaredGenFeatures()) {
String xxxx_featureType = "unknown";
Object xxxx_ecoreFeature = genFeature.getEcoreFeature();
xxxx_featureType = xxxx_ecoreFeature instanceof
org.eclipse.emf.ecore.EAttribute ? "attribute" : xxxx_featureType;
xxxx_featureType = xxxx_ecoreFeature instanceof
org.eclipse.emf.ecore.EReference ? "role" : xxxx_featureType;
%>
/**
* String constant for <%=xxxx_featureType%> <%=genFeature.getName()%>
* @generated
*/
public static final String <%=genFeature.getUpperName()%> =
"<%=genFeature.getName()%>";

<%}%>

<%for (org.eclipse.emf.ecore.EAnnotation xxxx_annotation:
genClass.getEcoreModelElement().getEAnnotations()) {
if
(xxxx_annotation.getSource().equals("http://www.leeds.ac.uk/xxxx-ecore-1.0/xxxx_genmodel"))
{
org.eclipse.emf.ecore.EAnnotation xxxx_staticAnnotation =
xxxx_annotation.getEAnnotation("static");
if (xxxx_staticAnnotation != null) {
String xxxx_staticModifiers = (String)
xxxx_staticAnnotation.getDetails().get("modifiers");
String xxxx_staticName = (String)
xxxx_staticAnnotation.getDetails().get("name");
String xxxx_staticType = (String)
xxxx_staticAnnotation.getDetails().get("type");
String xxxx_staticDefault = (String)
xxxx_staticAnnotation.getDetails().get("default");

// todo improve type handling...
if (! xxxx_staticType.equals("ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString")) {
throw new RuntimeException("unexpected non string
type for xxxx static: " + xxxx_staticType);
}
// todo add alternative for object
// todo add documentation handler
%>
/**
* todo add documentation code
* @generated
*/
<%=xxxx_staticModifiers%> String <%=xxxx_staticName%> =
"<%=xxxx_staticDefault%>";

<%}}}%>

and the stack trace

org.eclipse.core.runtime.AssertionFailedException: assertion failed:
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:111)
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:97)
at org.eclipse.jface.text.Position.<init>(Position.java:62)
at
org.eclipse.jet.internal.editor.JETTextEditor$PositionsColle ctor.matchOffset(JETTextEditor.java:439)
at
org.eclipse.jet.internal.editor.JETTextEditor$PositionsColle ctor.visit(JETTextEditor.java:416)
at
org.eclipse.jet.core.parser.ast.JavaScriptlet.accept0(JavaSc riptlet.java:54)
at
org.eclipse.jet.core.parser.ast.JETASTElement.accept(JETASTE lement.java:105)
at
org.eclipse.jet.core.parser.ast.JETCompilationUnit.accept0(J ETCompilationUnit.java:128)
at
org.eclipse.jet.core.parser.ast.JETASTElement.accept(JETASTE lement.java:105)
at
org.eclipse.jet.internal.editor.JETTextEditor.requestCompila tionUnit(JETTextEditor.java:301)
at
org.eclipse.jet.internal.editor.JETTextEditor.getASTElement( JETTextEditor.java:309)
at
org.eclipse.jet.internal.editor.rules.ASTElementScannerRule. evaluate(ASTElementScannerRule.java:39)
at
org.eclipse.jet.internal.editor.rules.ASTElementScannerRule. evaluate(ASTElementScannerRule.java:33)
at
org.eclipse.jface.text.rules.RuleBasedScanner.nextToken(Rule BasedScanner.java:174)
at
org.eclipse.jface.text.rules.RuleBasedPartitionScanner.nextT oken(RuleBasedPartitionScanner.java:79)
at
org.eclipse.jface.text.rules.FastPartitioner.initialize(Fast Partitioner.java:166)
at
org.eclipse.jface.text.rules.FastPartitioner.checkInitializa tion(FastPartitioner.java:151)
at
org.eclipse.jface.text.rules.FastPartitioner.connect(FastPar titioner.java:143)
at
org.eclipse.jface.text.rules.FastPartitioner.connect(FastPar titioner.java:125)
at
org.eclipse.jet.internal.editor.configuration.JETDocumentPro vider.createDocument(JETDocumentProvider.java:45)
at
org.eclipse.ui.editors.text.FileDocumentProvider.createEleme ntInfo(FileDocumentProvider.java:734)
at
org.eclipse.ui.texteditor.AbstractDocumentProvider.connect(A bstractDocumentProvider.java:398)
at
org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(Abst ractTextEditor.java:3989)
at
org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(Status TextEditor.java:190)
at
org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetI nput(AbstractDecoratedTextEditor.java:1325)
at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor .java:165)
at
org.eclipse.ui.texteditor.AbstractTextEditor$19.run(Abstract TextEditor.java:3024)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:444)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:352)
at
org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.java:758)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:755)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2476)
at
org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(Ab stractTextEditor.java:3042)
at
org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTe xtEditor.java:3069)
at
org.eclipse.jet.internal.editor.JETTextEditor.init(JETTextEd itor.java:134)
at
org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:799)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:643)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:428)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:594)
at
org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(Ed itorAreaHelper.java:263)
at
org.eclipse.ui.internal.EditorManager.setVisibleEditor(Edito rManager.java:1410)
at
org.eclipse.ui.internal.EditorManager$5.runWithException(Edi torManager.java:944)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:132)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3375)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3033)
at
org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:803)
at
org.eclipse.ui.internal.Workbench$27.runWithException(Workbe nch.java:1365)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:132)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3375)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3033)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2305)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 10)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:494)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:489)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:112)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
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(EclipseS tarter.java:379)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

regards
gary

nb if anyone has any thoughts on my previous post 'jet editor java syntax
coloring' (forwarded to the correct place by Ed Merks, thanks!) I would
still love to solve it ;-)
Re: problems with jet editor and some emf/jet1 include files [message #45587 is a reply to message #45527] Fri, 16 May 2008 12:54 Go to previous messageGo to next message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Gary:

I suggest you submit a bugzilla.

https://bugs.eclipse.org/bugs/enter_bug.cgi

Classification: Modeling
Product: M2T
Component: Jet Editor

And, as always, patches are very much appreciated.

Paul
Re: problems with jet editor and some emf/jet1 include files [message #46493 is a reply to message #45587] Wed, 28 May 2008 16:50 Go to previous messageGo to next message
Marc Moser is currently offline Marc MoserFriend
Messages: 66
Registered: July 2009
Member
Hi,

I have the same problem. If I try to open any of my *.javajetinc
templates (used in EMF) the JET editor fails to open indicating an
assertion failure.

Did someone already submit a bugzille (couldn't find any browsing the
ilst)?

Best,
Marc

On Fri, 16 May 2008 12:54:03 +0000 (UTC), pelder@ca.ibm.com (Paul
Elder) wrote:

>Gary:
>
>I suggest you submit a bugzilla.
>
>https://bugs.eclipse.org/bugs/enter_bug.cgi
>
>Classification: Modeling
>Product: M2T
>Component: Jet Editor
>
>And, as always, patches are very much appreciated.
>
>Paul
>
>
Re: problems with jet editor and some emf/jet1 include files [message #46646 is a reply to message #46493] Thu, 29 May 2008 17:24 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Marc:

Haven't seen one, go ahead an submit.

Paul
"Marc Moser" <moser@montages.com> wrote in message
news:5t2r345fcooo5a25gu52ammedm32dsjgik@4ax.com...
> Hi,
>
> I have the same problem. If I try to open any of my *.javajetinc
> templates (used in EMF) the JET editor fails to open indicating an
> assertion failure.
>
> Did someone already submit a bugzille (couldn't find any browsing the
> ilst)?
>
> Best,
> Marc
>
> On Fri, 16 May 2008 12:54:03 +0000 (UTC), pelder@ca.ibm.com (Paul
> Elder) wrote:
>
>>Gary:
>>
>>I suggest you submit a bugzilla.
>>
>>https://bugs.eclipse.org/bugs/enter_bug.cgi
>>
>>Classification: Modeling
>>Product: M2T
>>Component: Jet Editor
>>
>>And, as always, patches are very much appreciated.
>>
>>Paul
>>
>>
Previous Topic:Acessing elements from a list
Next Topic:JET beginner question
Goto Forum:
  


Current Time: Tue Mar 19 07:48:46 GMT 2024

Powered by FUDForum. Page generated in 0.04897 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top