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

Bug 369370

Summary: visibility of context button pad for graphical entities.
Product: [Modeling] Graphiti Reporter: Nitesh Agrawal <niteshsince1982>
Component: CoreAssignee: Project Inbox <graphiti-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.gorning, michael.wenz
Version: 0.8.0Flags: matthias.gorning: juno+
Target Milestone: 0.9.0   
Hardware: All   
OS: All   
Whiteboard: Juno M6 Theme_bugs
Attachments:
Description Flags
Image of the situation none

Description Nitesh Agrawal CLA 2012-01-23 05:40:30 EST
Build Identifier: 

Context button pad is visible for a graphical entity when the following method from the class ContextButtonManagerForPad returns a boolean ‘true’ value.

       
      private boolean replaceContextButtonPad(IFigure figure) {
            // requires new context buttons, if there is no active figure
            if (getActiveFigure() == null) {
                  return true;
            }

            // requires no changed context buttons, if the given figure equals
            // the active figure
            if (figure.equals(getActiveFigure()))
                  return false;

            // requires changed context buttons, if the given figure is a child of
            // the active figure (otherwise children would not have context buttons
            // when the mouse moves from parent to child -- see next check)
            IFigure parent = figure.getParent();
            while (parent != null) {
                  if (parent.equals(getActiveFigure()))
                        return true;
                  parent = parent.getParent();
            }

            // requires no (new) context buttons, if the the mouse is still in the
            // sensitive area of the active context button pad
            if (getActiveContextButtonPad() != null) {
                  if (getActiveContextButtonPad().isMouseInOverlappingArea()) {
                        return false;
                  }
            }

            return true;
      }

If figure's parent is not equal to the active figure, then this validation will return boolean false and context button pad will not be visible on the figure.
The above mentioned case is very much possible. 

Reproducible: Always
Comment 1 Michael Wenz CLA 2012-01-23 06:04:16 EST
Created attachment 209901 [details]
Image of the situation
Comment 2 Matthias Gorning CLA 2012-02-16 09:48:02 EST
Fixed.

commit 275057474485eae0ef283e2bd41645b9f45121bc
Author: mgorning <matthias.gorning@sap.com> 2012-02-16 15:44:55
Committer: mgorning <matthias.gorning@sap.com> 2012-02-16 15:44:55
Parent: 22be9a8d1e4ecef963e0b993d931efd6a69ef5e3 (formatter)
Branches: origin/master, master
Comment 3 Michael Wenz CLA 2012-04-11 10:55:03 EDT
Bookkeeping: Set target release
Comment 4 Michael Wenz CLA 2012-06-29 04:21:08 EDT
Part of Graphiti 0.9.0 (Eclipse Juno)