Hi Frank,

If it worked with an older Version, my guess is that you generated the
token resolvers and afterwards changed the type of an attribute in the
Ecore model. Maybe... its hard to tell without having the full projects.
But if it is working for you now it should be fine. :) If you find out
what caused the problem let us know.

In general everything in your 'resource' and 'ui' projects is
overridden. So you do not have to delete them.

Exceptions are all classes in the 'src' folder (in which token resolvers
are placed by default). Other artefacts can be marked as not-override by
using the 'override<ArtifactName>=false' options.

This is also explained in the EMFText User Guide.

Cheers
Jendrik

Am 10.06.11 11:39, schrieb Dietze, Frank:
> Hi Jendrick,
> 
> meanwhile I solved the problem by using an earlier version of my 
> emftext-project after wasting too much time.
> If you are interested in further tracing the issue, I'd like to support this.
> The current sample was:
> 
> about: TestOntology
> {
> term Konzept1
>       feature test
> ;
> }
> 
> If any of the model changes, should I delete the generated projects 
> "~.resource" und "~.resource.*.ui" to generate it really new?
> The only manually change at token resolvers rely on the Cardinality-Token "*".
> 
> Frank
> 
> 
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Jendrik 
> Johannes
> Sent: Freitag, 10. Juni 2011 11:23
> To: [email protected]
> Subject: Re: [EMFText-Users] Class cast exception
> 
> Hi Frank,
> 
> My guess is that there is a problem with the token resolvers. Maybe the
> String "transitive" is parsed at a point where a String is expected but
> converted to boolean. Could you send the example that causes the
> exception? Did you adjust any of the token resolvers manually or change
> the type of an attribute in the metamodel after you generated the token
> resolvers for the first time?
> 
> Cheers
> Jendrik
> 
> Am 10.06.11 10:47, schrieb Dietze, Frank:
>> How to deal with a following exception?
>>  
>> _java.lang.ClassCastException_: java.lang.Boolean cannot be cast to
>> java.lang.String
>>         at
>> org.emftext.teadsl.resource.teadsl.mopp.TeadslParser.parse_oml_Property(_TeadslParser.java:1073_)
>>         at
>> org.emftext.teadsl.resource.teadsl.mopp.TeadslParser.parse_oml_Concept(_TeadslParser.java:939_)
>>         at
>> org.emftext.teadsl.resource.teadsl.mopp.TeadslParser.parse_oml_Ontology(_TeadslParser.java:664_)
>>         at
>> org.emftext.teadsl.resource.teadsl.mopp.TeadslParser.start(_TeadslParser.java:514_)
>>         at
>> org.emftext.teadsl.resource.teadsl.mopp.TeadslParser.doParse(_TeadslParser.java:235_)
>>         at
>> org.emftext.teadsl.resource.teadsl.mopp.TeadslParser.parse(_TeadslParser.java:285_)
>>         at
>> org.emftext.teadsl.resource.teadsl.mopp.TeadslResource.doLoad(_TeadslResource.java:179_)
>>         at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(_ResourceImpl.java:1494_)
>>         at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(_ResourceImpl.java:1282_)
>>         at
>> org.emftext.teadsl.resource.teadsl.mopp.TeadslResource.load(_TeadslResource.java:448_)
>>         at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(_ResourceSetImpl.java:255_)
>>         at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(_ResourceSetImpl.java:270_)
>>         at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(_ResourceSetImpl.java:397_)
>>         at
>> org.emftext.teadsl.resource.teadsl.ui.TeadslEditor.initializeResourceObject(_TeadslEditor.java:153_)
>>         at
>> org.emftext.teadsl.resource.teadsl.ui.TeadslEditor.doSetInput(_TeadslEditor.java:130_)
>>         at
>> org.eclipse.ui.texteditor.AbstractTextEditor$19.run(_AbstractTextEditor.java:3043_)
>>         at
>> org.eclipse.jface.operation.ModalContext.runInCurrentThread(_ModalContext.java:464_)
>>         at
>> org.eclipse.jface.operation.ModalContext.run(_ModalContext.java:372_)
>>         at
>> org.eclipse.jface.window.ApplicationWindow$1.run(_ApplicationWindow.java:759_)
>>         at
>> org.eclipse.swt.custom.BusyIndicator.showWhile(_BusyIndicator.java:70_)
>>         at
>> org.eclipse.jface.window.ApplicationWindow.run(_ApplicationWindow.java:756_)
>>         at
>> org.eclipse.ui.internal.WorkbenchWindow.run(_WorkbenchWindow.java:2606_)
>>         at
>> org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(_AbstractTextEditor.java:3061_)
>>         at
>> org.eclipse.ui.texteditor.AbstractTextEditor.init(_AbstractTextEditor.java:3088_)
>>         at
>> org.eclipse.ui.internal.EditorManager.createSite(_EditorManager.java:798_)
>>         at
>> org.eclipse.ui.internal.EditorReference.createPartHelper(_EditorReference.java:647_)
>>         at
>> org.eclipse.ui.internal.EditorReference.createPart(_EditorReference.java:465_)
>>         at
>> org.eclipse.ui.internal.WorkbenchPartReference.getPart(_WorkbenchPartReference.java:595_)
>>         at
>> org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(_EditorAreaHelper.java:271_)
>>         at
>> org.eclipse.ui.internal.EditorManager.setVisibleEditor(_EditorManager.java:1429_)
>>         at
>> org.eclipse.ui.internal.EditorManager$5.runWithException(_EditorManager.java:942_)
>>         at
>> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(_StartupThreading.java:31_)
>>         at org.eclipse.swt.widgets.RunnableLock.run(_RunnableLock.java:35_)
>>         at
>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(_Synchronizer.java:134_)
>>         at
>> org.eclipse.swt.widgets.Display.runAsyncMessages(_Display.java:4041_)
>>         at
>> org.eclipse.swt.widgets.Display.readAndDispatch(_Display.java:3660_)
>>         at
>> org.eclipse.ui.application.WorkbenchAdvisor.openWindows(_WorkbenchAdvisor.java:803_)
>>         at
>> org.eclipse.ui.internal.Workbench$31.runWithException(_Workbench.java:1567_)
>>         at
>> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(_StartupThreading.java:31_)
>>         at org.eclipse.swt.widgets.RunnableLock.run(_RunnableLock.java:35_)
>>         at
>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(_Synchronizer.java:134_)
>>         at
>> org.eclipse.swt.widgets.Display.runAsyncMessages(_Display.java:4041_)
>>         at
>> org.eclipse.swt.widgets.Display.readAndDispatch(_Display.java:3660_)
>>         at org.eclipse.ui.internal.Workbench.runUI(_Workbench.java:2548_)
>>  
>> My DSL is:
>>  
>> _*SYNTAXDEF*__teadsl_
>> _*FOR*__<http://www.sap.com/research/0.1/OML>
>> <platform:/resource/com.sap.research.oml.model/model/OML.genmodel>_
>> _*START*__Ontology_
>>  
>> _*OPTIONS*__{_
>>         _generateCodeFromGeneratorModel = __"true"__;_
>>         _basePackage = __"org.emftext.teadsl.resource.teadsl"__;_
>>         _uiBasePackage = __"org.emftext.teadsl.resource.teadsl.ui"__;_
>> _}_
>> _*TOKENS*__{_
>>         _*DEFINE*__SL_COMMENT __$'//'(~('\n'|'\r'|'\uffff'))* $__;_
>>         _*DEFINE*__TRANSITIVE __$'transitive'|'Transitive'$__;_
>>         _*DEFINE*__CARDINALITY __$('0'..'9')+|'*'$__;_
>> _}_
>>  
>> _*TOKENSTYLES*__{_
>>         _"SL_COMMENT"____*COLOR*____#AAAAAA__;_
>> _}_
>>  
>> _*RULES*__{_
>> _Ontology ::=_
>>         _"about:"__localName[] __!0_
>>         _"{"__concepts* __"}"_
>> _;_
>>  
>> _Concept ::=_
>>         _"term"__localName[] (__"is a"__subConceptOf[])?_
>>         _properties*_
>>         _";"_
>> _;_
>>  
>> _Property ::=_
>>         _"feature"__localName[] _
>> _//      ("(is a" subPropertyOf[] ")")? _
>> _//      ("[" minCard[CARDINALITY] "," maxCard[CARDINALITY] "]")?_
>> _//      ":" types ("," types)* _
>> _//      isTransitive[TRANSITIVE]?_
>> _;_
>>  
>> _//PropertyType ::=_
>> _//      (simpleType[undefined: "", boolean: "boolean", string:
>> "string", int: "int", double: "double"])?_
>> _//      (referenceType[] ("as" roleName[])?)?_
>> _//;_
>>  
>>  
>> _}_
>>  
>>  
>> Thanks for some advices!
>>  
>>  
>> *Frank Dietze*
>> Student intern   I   SAP Research Dresden
>> *SAP AG*   I   Chemnitzer Str. 48   I   01187 Dresden   I   Germany
>>  
>> T +49 351 4811-6170   I   F +49 6227 78-56297   I  
>> _mailto:[email protected]_ <mailto:[email protected]>
>> _www.sap.com_ <http://www.sap.com/>
>>  
>>  
>> Pflichtangaben/Mandatory Disclosure Statements:
>> _http://www.sap.com/company/legal/impressum.epx_
>> Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige
>> vertrauliche Informationen enthalten. Sollten Sie diese E-Mail
>> irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts,
>> eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt.
>> Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
>> Vielen Dank.
>>
>> This e-mail may contain trade secrets or privileged, undisclosed, or
>> otherwise confidential information. If you have received this e-mail in
>> error, you are hereby notified that any review, copying, or distribution
>> of it is strictly prohibited. Please inform us immediately and destroy
>> the original transmittal. Thank you for your cooperation.
> _______________________________________________
> emftext-users mailing list
> [email protected]
> http://mail-st.inf.tu-dresden.de/cgi-bin/mailman/listinfo/emftext-users

_______________________________________________
emftext-users mailing list
[email protected]
http://mail-st.inf.tu-dresden.de/cgi-bin/mailman/listinfo/emftext-users

Reply via email to