Bug 385586 - Remove,Delete, Update Action (ContextMenu, ButtonPad etc.)
Summary: Remove,Delete, Update Action (ContextMenu, ButtonPad etc.)
Status: VERIFIED FIXED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.9.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Christian Brand CLA
QA Contact:
URL:
Whiteboard: Kepler M1 Theme_bugs Juno_SR1
Keywords: ui, usability
Depends on:
Blocks:
 
Reported: 2012-07-20 07:02 EDT by Dennis Melzer CLA
Modified: 2013-05-06 09:55 EDT (History)
2 users (show)

See Also:
michael.wenz: iplog+
michael.wenz: juno+
christian.brand: kepler+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Melzer CLA 2012-07-20 07:02:15 EDT
Build Identifier: 

The remove,delete, update action don't evalute the isAvaible from the feature.
So are the action always available and broken the api

RemoveAction:
[Code]
	public boolean isAvailable() {
		PictogramElement pe[] = getSelectedPictogramElements();
		for (int i = 0; i < pe.length; i++) {
			IRemoveContext context = new RemoveContext(pe[i]);
			IRemoveFeature removeFeature = getFeatureProvider().getRemoveFeature(context);
			if (removeFeature == null) {
				return false;
			}
		}

		return true;
	}
[/Code]

Suggestion

[Code]
	public boolean isAvailable() {
		PictogramElement pe[] = getSelectedPictogramElements();
		for (int i = 0; i < pe.length; i++) {
			IRemoveContext context = new RemoveContext(pe[i]);
			IRemoveFeature removeFeature = getFeatureProvider().getRemoveFeature(context);
			if (removeFeature == null || !removeFeature.isAvailable(removeFeature )) {
				return false;
			}
		}

		return true;
	}
[/Code]

Reproducible: Always
Comment 1 Christian Brand CLA 2012-08-16 07:10:16 EDT
We are currently on it.

Your proposal is great, but it will not be the only change that has to be done.
Comment 2 Christian Brand CLA 2012-08-17 02:20:20 EDT
The following commit has been done - waiting for verification.

commit 5ee3e5a924e329b9a579f08062fec8c3e37228a7
Author: Christian Brand <christian.brand@sap.com> 2012-08-17 07:47:08
Committer: Christian Brand <christian.brand@sap.com> 2012-08-17 07:47:08
Parent: d9223818d0fae657bd4723ed9ec77deb8f5a9877 (Define version for used Batik plugins in export feature)
Branches: master

Bug 385586 - Remove,Delete, Update Action (ContextMenu,
ButtonPad etc.)

Change-Id: I5a70ab23286434debb22f5ce5f15e657dd485107
Comment 3 Michael Wenz CLA 2012-08-21 07:29:02 EDT
Merged into Head for Kepler M1
Comment 4 Michael Wenz CLA 2012-08-21 07:31:42 EDT
Downported to Juno RC1 SR1 for Graphiti 0.9.1 and verified:

commit 6023102f6a886d7f2c9c28106fc7b40b22fd2357
Author: Christian Brand <christian.brand@sap.com> 2012-08-17 07:47:08
Committer: Christian Brand <christian.brand@sap.com> 2012-08-21 13:09:45
Parent: 08500955ee08d0cd693faea220518151b4d81053 (Updated New&Noteworthy for Juno RC1 SR1)
Branches: origin/b0_9_x
Comment 5 Michael Wenz CLA 2013-05-06 09:55:37 EDT
Set IP log flag as proposal got part of Graphiti coding