Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » IAE Exception when no type name.
IAE Exception when no type name. [message #1738954] Tue, 26 July 2016 09:42
Stéphane Galland is currently offline Stéphane GallandFriend
Messages: 123
Registered: July 2014
Location: Belfort, France
Senior Member
I have defined a type as:
Type returns xtend::XtendTypeDeclaration:
	{xtend::XtendTypeDeclaration} annotations+=XAnnotation*
	(
		// Agent
		{SarlAgent.annotationInfo = current}
		modifiers+=CommonModifier*
		'agent' name=ValidID 
		('extends' extends=JvmParameterizedTypeReference)?
		'{' (members+=AOPMember)* '}'
        |
<REST OF THE RULE>
        )
;


This rule defines the keyword "agent" for declaring a type of agent.
When typing the keyword without the name, I have an exception.

For example:
agent |
(where | is the position of the cursor).
java.lang.IllegalArgumentException: Qualified name cannot be null
	at org.eclipse.xtext.naming.IQualifiedNameConverter$DefaultImpl.toQualifiedName(IQualifiedNameConverter.java:57)
	at org.eclipse.xtext.xbase.XbaseQualifiedNameConverter.toQualifiedName(XbaseQualifiedNameConverter.java:36)
	at org.eclipse.xtend.core.resource.XtendResourceDescription$4.apply(XtendResourceDescription.java:174)
	at org.eclipse.xtend.core.resource.XtendResourceDescription$4.apply(XtendResourceDescription.java:1)
	at org.eclipse.xtend.core.resource.XtendResourceDescription.registerAllTypes(XtendResourceDescription.java:205)
	at org.eclipse.xtend.core.resource.XtendResourceDescription.getImportedNames(XtendResourceDescription.java:179)
	at org.eclipse.xtext.resource.persistence.SerializableResourceDescription$1.apply(SerializableResourceDescription.java:73)
	at org.eclipse.xtext.resource.persistence.SerializableResourceDescription$1.apply(SerializableResourceDescription.java:1)
	at org.eclipse.xtext.xbase.lib.ObjectExtensions.operator_doubleArrow(ObjectExtensions.java:139)
	at org.eclipse.xtext.resource.persistence.SerializableResourceDescription.createCopy(SerializableResourceDescription.java:78)
	at org.eclipse.xtext.resource.persistence.ResourceStorageWritable.writeResourceDescription(ResourceStorageWritable.java:138)
	at org.eclipse.xtext.resource.persistence.ResourceStorageWritable.writeEntries(ResourceStorageWritable.java:76)
	at org.eclipse.xtext.xbase.resource.BatchLinkableResourceStorageWritable.writeEntries(BatchLinkableResourceStorageWritable.java:55)
	at org.eclipse.xtext.resource.persistence.ResourceStorageWritable.writeResource(ResourceStorageWritable.java:53)
	at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport.announceDirtyState(DirtyStateEditorSupport.java:555)
	at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.postParse(XtextDocumentReconcileStrategy.java:179)
	at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.doReconcile(XtextDocumentReconcileStrategy.java:153)
	at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.reconcile(XtextDocumentReconcileStrategy.java:67)
	at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.doRun(XtextReconciler.java:442)
	at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.access$3(XtextReconciler.java:422)
	at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:363)
	at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:1)
	at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:37)
	at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:98)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.modify(XtextDocument.java:428)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.internalModify(XtextDocument.java:162)
	at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.run(XtextReconciler.java:360)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


This exception occurs just before i'm stating to type the name of the type.

Is it a bug is Xtext API, or a mis-usage from me?

Thank you.
Stéphane.
Previous Topic:Cross-reference: a set of constants of Enum
Next Topic:Umlauts and UTF-8 BOM
Goto Forum:
  


Current Time: Wed Dec 11 22:28:46 GMT 2024

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

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

Back to the top