Bug 400547 - getSelectionInfoForShape does not work for shapes with transparent GraphicsAlgorithm
Summary: getSelectionInfoForShape does not work for shapes with transparent GraphicsAl...
Status: ASSIGNED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.9.0   Edit
Hardware: All All
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-12 05:14 EST by Boris Savov CLA
Modified: 2013-02-15 10:11 EST (History)
1 user (show)

See Also:


Attachments
new classes to enable adding children shapes to compartment shape (3.75 KB, application/x-zip-compressed)
2013-02-12 05:14 EST, Boris Savov CLA
no flags Details
slightly updated versions of Feature and ToolBehavior providers (4.42 KB, application/x-zip-compressed)
2013-02-12 05:15 EST, Boris Savov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Savov CLA 2013-02-12 05:14:58 EST
Created attachment 226905 [details]
new classes to enable adding children shapes to compartment shape

Hello,
In my use case I need to show compartment figure (say EClass) with children figures (EAttribute) and highlight selected EAttributes with solid background color.
However I’ve noticed that IToolBehaviorProvider#getSelectionInfoForShape does not work for shapes with transparent GraphicsAlgorithm => setFilled(false).
I have prepared sample code, which is an enhancement of the Graphiti tutorial, with the possibility to add EAttribute as children to EClass figure.
Just put the content of features.zip in org.eclipse.graphiti.examples.tutorial.features package, and the content of diagram.zip to org.eclipse.graphiti.examples.tutorial.diagram package.

features.zip – contains new files to enable adding children shapes to compartment shape
diagram.zip –contains slightly updated versions of Feature and ToolBehavior providers
Comment 1 Boris Savov CLA 2013-02-12 05:15:37 EST
Created attachment 226906 [details]
slightly updated versions of Feature and ToolBehavior providers
Comment 2 Michael Wenz CLA 2013-02-15 10:11:08 EST
Taking a step back and checking the behavior in the current master branch (Graphiti 0.10.0 for Eclipse Kepler) I started to remember that we already had issues with this functionality (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=391523). Not all setting in the shape selection info objects were evaluated.
So we decided to strip the API down to the really supported functionality which was mainly control over hover colors. Therefore the existing functionality will not help in your case (neither in Graphiti 0.9 where the functionality is not supported, nor in 0.10 where the functionality does no longer exist).

I switch this bug to an enhancement request to introduce the functionality to influence selection behavior, but I doubt that this will get into Kepler for simple lack of capacity.