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 05:07 Go to next message
Sir Wayne is currently offline Sir Wayne
Messages: 206
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 06:25 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1583
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 16:01 Go to previous message
Sir Wayne is currently offline Sir Wayne
Messages: 206
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 Aug 23 16:02:38 EDT 2014

Powered by FUDForum. Page generated in 0.01670 seconds