Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345125 - [editor] Unable to open OCLInEcoreEditor with a simple Ecore file.
Summary: [editor] Unable to open OCLInEcoreEditor with a simple Ecore file.
Status: CLOSED FIXED
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: 3.1.0   Edit
Hardware: PC Windows 7
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: OCL Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-09 07:31 EDT by Adolfo Sanchez-Barbudo Herrera CLA
Modified: 2011-05-27 03:13 EDT (History)
1 user (show)

See Also:


Attachments
Offending ecore file (857 bytes, application/xml)
2011-05-09 07:34 EDT, Adolfo Sanchez-Barbudo Herrera CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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