Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 345125

Summary: [editor] Unable to open OCLInEcoreEditor with a simple Ecore file.
Product: [Modeling] OCL Reporter: Adolfo Sanchez-Barbudo Herrera <adolfosbh>
Component: CoreAssignee: OCL Inbox <mdt-ocl-inbox>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: ed
Version: 3.1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Offending ecore file none

Description Adolfo Sanchez-Barbudo Herrera CLA 2011-05-09 07:31:32 EDT
Eclipse Modeling M7 + OCL Examples:

Steps:
1. Create a new ecore model (OCLInEcore editor is successfully open)
2. Close the OCLInEcore editor.
3. Create some classes and references using the Sample Ecore Editor.
4. Close the Sample Ecore Editor.
5. Open the file using the OCLInEcore editor => File can't be opened with exception pasted below:

I'll attach the ecore file (valid ecore file) which can't be opened, but it doesn't contain any rare stuff...

Exception:
Unable to create editor ID org.eclipse.ocl.examples.xtext.oclinecore.Ecore: Editor could not be initialized.

java.lang.NullPointerException
	at org.eclipse.ocl.examples.xtext.essentialocl.services.EssentialOCLCrossReferenceSerializer.getDivergentPath(EssentialOCLCrossReferenceSerializer.java:133)
	at org.eclipse.ocl.examples.xtext.essentialocl.services.EssentialOCLCrossReferenceSerializer.getConvertedLinkText(EssentialOCLCrossReferenceSerializer.java:97)
	at org.eclipse.ocl.examples.xtext.essentialocl.services.EssentialOCLCrossReferenceSerializer.serializeCrossRef(EssentialOCLCrossReferenceSerializer.java:202)
	at org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor$AssignmentToken.serializeInternal(AbstractParseTreeConstructor.java:254)
	at org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor$AbstractToken.serialize(AbstractParseTreeConstructor.java:159)
	at org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor.write(AbstractParseTreeConstructor.java:772)
	at org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor.write(AbstractParseTreeConstructor.java:767)
	at org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor.write(AbstractParseTreeConstructor.java:767)
	at org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor.write(AbstractParseTreeConstructor.java:767)
	at org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor.write(AbstractParseTreeConstructor.java:767)
	at org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor.serializeSubtree(AbstractParseTreeConstructor.java:733)
	at org.eclipse.xtext.parsetree.reconstr.Serializer.serialize(Serializer.java:56)
	at org.eclipse.xtext.parsetree.reconstr.Serializer.serialize(Serializer.java:62)
	at org.eclipse.xtext.resource.XtextResource.doSave(XtextResource.java:286)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1423)
	at org.eclipse.ocl.examples.xtext.oclinecore.ui.model.OCLinEcoreDocumentProvider.setDocumentContent(OCLinEcoreDocumentProvider.java:233)
...
Comment 1 Adolfo Sanchez-Barbudo Herrera CLA 2011-05-09 07:34:20 EDT
Created attachment 195057 [details]
Offending ecore file
Comment 2 Ed Willink CLA 2011-05-09 12:10:54 EDT
Already fixed in CVS.
Comment 3 Adolfo Sanchez-Barbudo Herrera CLA 2011-05-09 13:56:22 EDT
Ok,

I'll go on with the new stuff testing by upgrading the OCL Examples with our nightly p2 repo.

Cheers,
Adolfo.
Comment 4 Ed Willink CLA 2011-05-27 03:13:28 EDT
Closing