Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332360

Summary: add resizing context to getResizeConfiguration
Product: [Modeling] Graphiti Reporter: Volker Wegert <eclipse>
Component: CoreAssignee: Project Inbox <graphiti-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: matthias.gorning, michael.wenz
Version: 0.7.0Flags: matthias.gorning: indigo+
matthias.gorning: iplog+
Target Milestone: 0.8.0   
Hardware: All   
OS: All   
Whiteboard: Indigo M4 theme_round_offs
Attachments:
Description Flags
proposed patch matthias.gorning: iplog+

Description Volker Wegert CLA 2010-12-11 09:36:29 EST
Build Identifier: 

The method getResizeConfiguration() of IResizeFeature should receive the IResizeShapeContext so that the feature can enable or disable the horizontal or vertical resizing facilities dynamically, e. g. based on the selection. There's also a typo in IResizeShapeContext.

Reproducible: Always
Comment 1 Volker Wegert CLA 2010-12-11 09:37:27 EST
Created attachment 185019 [details]
proposed patch

This patch both fixes the typo and extends the method signature.
Comment 2 Volker Wegert CLA 2010-12-11 11:59:03 EST
There is one additional problem: If I switch off both horizontal and vertical resizing, a selected diagram element is no longer highlighted. This can be fixed by changing /org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/policy/GFResizableEditPolicy.java, method createShapeHandles: Replace

list.add(new GFSurroundingHandle(owner, cp, supportedResizeDirections, movable));

with 

list.add(new GFSurroundingHandle(owner, cp, PositionConstants.NSEW, movable));
Comment 3 Matthias Gorning CLA 2010-12-13 04:37:32 EST
Patch applied and proposal from comment 2 inserted.
Comment 4 Michael Wenz CLA 2011-04-20 07:36:06 EDT
Corrected whiteboard entry to "theme_round_offs"
Comment 5 Michael Wenz CLA 2011-05-27 09:02:42 EDT
Part of 0.8.0
Comment 6 Michael Wenz CLA 2011-06-24 09:05:38 EDT
Part of Graphiti Indigo 0.8.0