Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369370 - visibility of context button pad for graphical entities.
Summary: visibility of context button pad for graphical entities.
Status: CLOSED FIXED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.9.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: Juno M6 Theme_bugs
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-23 05:40 EST by Nitesh Agrawal CLA
Modified: 2012-06-29 04:21 EDT (History)
2 users (show)

See Also:
matthias.gorning: juno+


Attachments
Image of the situation (28.59 KB, image/jpeg)
2012-01-23 06:04 EST, Michael Wenz CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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)