Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Problem with AdaptedGradientColoredAreas
Problem with AdaptedGradientColoredAreas [message #1697589] Fri, 05 June 2015 08:08 Go to next message
Krisztian Koncz is currently offline Krisztian KonczFriend
Messages: 31
Registered: September 2014
Location: Budapest
Member

The GFAbstractShape doesn't handle IPredefinedRenderingStyle.STYLE_ADAPTATION_ACTION_ALLOWED
IPredefinedRenderingStyle.STYLE_ADAPTATION_ACTION_FORBIDDEN properly.

Why is that code commented? I tried to uncomment it, and it works.

private int getStyleAdaptation() {
		int styleAdaptation = IPredefinedRenderingStyle.STYLE_ADAPTATION_DEFAULT;
		int selectionFeedback = getVisualState().getSelectionFeedback();
		if (selectionFeedback == IVisualState.SELECTION_PRIMARY)
			styleAdaptation = IPredefinedRenderingStyle.STYLE_ADAPTATION_PRIMARY_SELECTED;
		else if (selectionFeedback == IVisualState.SELECTION_SECONDARY)
			styleAdaptation = IPredefinedRenderingStyle.STYLE_ADAPTATION_SECONDARY_SELECTED;
		int actionTargetFeedback = getVisualState().getActionTargetFeedback();
		// if (actionTargetFeedback == IVisualState.ACTION_TARGET_ALLOWED)
		// styleAdaptation =
		// IPredefinedRenderingStyle.STYLE_ADAPTATION_ACTION_ALLOWED;
		// else if (actionTargetFeedback ==
		// IVisualState.ACTION_TARGET_FORBIDDEN)
		// styleAdaptation =
		// IPredefinedRenderingStyle.STYLE_ADAPTATION_ACTION_FORBIDDEN;
		// TODO why is every actionTargetFeedback folded to
		// STYLE_ADAPTATION_SECONDARY_SELECTED?
		//
		if (actionTargetFeedback == IVisualState.ACTION_TARGET_ALLOWED)
			styleAdaptation = IPredefinedRenderingStyle.STYLE_ADAPTATION_SECONDARY_SELECTED;
		return styleAdaptation;
	}
Re: Problem with AdaptedGradientColoredAreas [message #1697866 is a reply to message #1697589] Tue, 09 June 2015 08:09 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1883
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Krisztian,

good question, I don't know... Looks like an oversight at first glance.

Would you file a bug for that?

Thanks,
Michael
Re: Problem with AdaptedGradientColoredAreas [message #1697870 is a reply to message #1697866] Tue, 09 June 2015 08:37 Go to previous message
Krisztian Koncz is currently offline Krisztian KonczFriend
Messages: 31
Registered: September 2014
Location: Budapest
Member

Michael,

Thanks for this reply, here is the bug I have reported: https://bugs.eclipse.org/bugs/show_bug.cgi?id=469689

Krisztian
Previous Topic:Creating Graphiti Diagrams
Next Topic:Editor shapes are red after changing model in another editor
Goto Forum:
  


Current Time: Thu Jan 18 23:35:04 GMT 2018

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

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