Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Remove,Delete, Update Action
Remove,Delete, Update Action [message #896877] Fri, 20 July 2012 09:07 Go to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
Hello,

the remove,delete, update action don't evalute the isAvaible from the feature.Is this a bug?
So are the action always available and broken the api

RemoveAction:
	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;
	}


Suggestion

	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;
	}
Re: Remove,Delete, Update Action [message #896894 is a reply to message #896877] Fri, 20 July 2012 10:25 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Would you please file this as a bugzilla?

Thanks,
Michael
Re: Remove,Delete, Update Action [message #897371 is a reply to message #896894] Mon, 23 July 2012 20:01 Go to previous message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
Michael Wenz wrote on Fri, 20 July 2012 06:25
Would you please file this as a bugzilla?

Thanks,
Michael

ok done https://bugs.eclipse.org/bugs/show_bug.cgi?id=385586
Previous Topic:Setting Auto/Default layout in the diagram
Next Topic:Changing Palette Font + Size
Goto Forum:
  


Current Time: Sat Apr 20 01:17:48 GMT 2024

Powered by FUDForum. Page generated in 0.03523 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top