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

Bug 363539

Summary: DiagramEditorDummy is a little too dummy
Product: [Modeling] Graphiti Reporter: Hernan Gonzalez <hjg.com.ar>
Component: CoreAssignee: Michael Wenz <michael.wenz>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.gorning, michael.wenz
Version: 0.8.0Flags: michael.wenz: iplog+
michael.wenz: juno+
Target Milestone: 0.9.0   
Hardware: All   
OS: All   
Whiteboard: Juno M4 Theme_bugs

Description Hernan Gonzalez CLA 2011-11-10 16:19:28 EST
Build Identifier: 

DiagramEditorDummy is used by ExtensionManager.createDiagramTypeProvider() , oriented towards Dark Processing. The problem is that DiagramEditorDummy  has a blank implementation of executeFeature() , which in some cases (when a feature calls another), breaks everything.

Because in dark processing mode we have nothing to do with GEF (right?) I think the following implementaion would be enough


	@Override
	public void executeFeature(IFeature feature, IContext context) {
		if (feature.canExecute(context)) {
			feature.execute(context);
		}
	}

I'm not sure if the canExecute() should be call here.

Reproducible: Always
Comment 1 Michael Wenz CLA 2011-11-11 04:43:06 EST
I added the proposed implementation to DiagramEditorDummy. Thanks for the contribution!
I think the canExecute check should be done here in case the method is directly called by a user. Additionally I have added a test in testDarkFeatureProcessing
Checked-in and pushed to Eclipse:
commit f85cd7849f6c467df8042b7c5e49f398143cfc82
Author: mwenz <michael.wenz@sap.com> 2011-11-11 10:39:41
Committer: mwenz <michael.wenz@sap.com> 2011-11-11 10:39:41
Parent: d0ad1625ec8fef4e1b386d3fba37c198970a9d52 (Bug 363464: Return IReason to pass on information if layout has been performed)
Branches: origin/master, master
Comment 2 Michael Wenz CLA 2012-04-11 10:47:29 EDT
Bookkeeping: Set target release
Comment 3 Michael Wenz CLA 2012-06-29 04:15:14 EDT
Part of Graphiti 0.9.0 (Eclipse Juno)