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

Bug 367052

Summary: [xtext][editor] DirtyStateEditorSupport#haveEObjectDescriptionsChanged() should use IResourceDescription.Manager#createDelta()
Product: [Modeling] TMF Reporter: Knut Wannheden <knut.wannheden>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jan, sven.efftinge
Version: 2.2.1Flags: jan: juno+
Target Milestone: M7   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
proposed patch none

Description Knut Wannheden CLA 2011-12-19 02:17:09 EST
The method DirtyStateEditorSupport#haveEObjectDescriptionsChanged() is currently implemented like this:


	public boolean haveEObjectDescriptionsChanged(final IResourceDescription newDescription) {
		return new DefaultResourceDescriptionDelta(dirtyResource.getDescription(), newDescription).haveEObjectDescriptionsChanged();
	}

I think it should instead be using the appropriate IResourceDescription.Manager and call its createDelta() method. See attached patch for details.
Comment 1 Knut Wannheden CLA 2011-12-19 02:17:38 EST
Created attachment 208534 [details]
proposed patch
Comment 2 Jan Koehnlein CLA 2012-02-24 12:08:27 EST
Scheduled for review.
Comment 3 Sven Efftinge CLA 2012-04-03 04:17:19 EDT
Makes sense, but we cannot change the signature of haveEObjectDescriptionsChanged.
Please add an overloaded variant instead and call that. Feel free to push the changes.
Comment 4 Knut Wannheden CLA 2012-04-30 11:33:35 EDT
Pushed fix to master: http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/commit/?id=2f6770d309c7091a63051868c5acfbee51f1e160.

Marked old method as deprecated and implemented as delegate to new method.
Comment 5 Eclipse Webmaster CLA 2017-10-31 11:05:47 EDT
Requested via bug 522520.

-M.
Comment 6 Eclipse Webmaster CLA 2017-10-31 11:17:03 EDT
Requested via bug 522520.

-M.