File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 *******************************************************************************/
1313package org .eclipse .wb .gef .core ;
1414
15- import org .eclipse .wb .internal .gef .core .EditPartVisitor ;
16-
1715import org .eclipse .gef .EditPolicy ;
1816import org .eclipse .gef .Request ;
1917import org .eclipse .gef .commands .Command ;
@@ -68,23 +66,6 @@ protected List<?> getModelChildren() {
6866 return Collections .EMPTY_LIST ;
6967 }
7068
71- ////////////////////////////////////////////////////////////////////////////
72- //
73- // Visiting
74- //
75- ////////////////////////////////////////////////////////////////////////////
76- /**
77- * Visits this {@link EditPart} and its children using given {@link EditPartVisitor}.
78- */
79- public final void accept (EditPartVisitor visitor ) {
80- if (visitor .visit (this )) {
81- for (EditPart childPart : (List <EditPart >) getChildren ()) {
82- childPart .accept (visitor );
83- }
84- visitor .endVisit (this );
85- }
86- }
87-
8869 ////////////////////////////////////////////////////////////////////////////
8970 //
9071 // EditPart
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2020import org .eclipse .wb .internal .core .model .menu .IMenuObjectInfo ;
2121import org .eclipse .wb .internal .core .model .menu .IMenuObjectListener ;
2222import org .eclipse .wb .internal .core .model .menu .MenuObjectInfoUtils ;
23- import org .eclipse .wb .internal .gef .core .EditPartVisitor ;
2423import org .eclipse .wb .internal .gef .core .IActiveToolListener ;
2524
2625import org .eclipse .gef .EditPart ;
@@ -206,16 +205,11 @@ public EditPart getTargetEditPart(org.eclipse.gef.Request request) {
206205 public void run () {
207206 try {
208207 MenuObjectInfoUtils .m_selectingObject = m_object ;
209- ((org .eclipse .wb .gef .core .EditPart )getViewer ().getRootEditPart ()).accept (new EditPartVisitor () {
210- @ Override
211- public boolean visit (EditPart editPart ) {
212- if (editPart instanceof MenuObjectEditPart ) {
213- editPart .refresh ();
214- return false ;
215- }
216- return true ;
208+ for (EditPart editPart : getViewer ().getEditPartRegistry ().values ()) {
209+ if (editPart instanceof MenuObjectEditPart ) {
210+ editPart .refresh ();
217211 }
218- });
212+ }
219213 } finally {
220214 MenuObjectInfoUtils .m_selectingObject = null ;
221215 }
You can’t perform that action at this time.
0 commit comments