diff --git a/org.eclipse.wb.core.java/src/org/eclipse/wb/core/gef/policy/selection/TopSelectionEditPolicy.java b/org.eclipse.wb.core.java/src/org/eclipse/wb/core/gef/policy/selection/TopSelectionEditPolicy.java index a9172dca6..d6c3bfd9b 100644 --- a/org.eclipse.wb.core.java/src/org/eclipse/wb/core/gef/policy/selection/TopSelectionEditPolicy.java +++ b/org.eclipse.wb.core.java/src/org/eclipse/wb/core/gef/policy/selection/TopSelectionEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2025 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -85,7 +85,10 @@ public boolean understandsRequest(Request request) { @Override //@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "BC_UNCONFIRMED_CAST") public Command getCommand(Request request) { - return getResizeCommand((ChangeBoundsRequest) request); + if (REQ_RESIZE.equals(request.getType())) { + return getResizeCommand((ChangeBoundsRequest) request); + } + return null; } @Override diff --git a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/EditPart.java b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/EditPart.java index e38fd553c..bc1a1c899 100644 --- a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/EditPart.java +++ b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/EditPart.java @@ -16,7 +16,6 @@ import org.eclipse.gef.EditPolicy; import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; import java.util.ArrayList; import java.util.Collections; @@ -223,18 +222,6 @@ private List getUnderstandingPolicies(Request request) { // Request/Command // //////////////////////////////////////////////////////////////////////////// - /** - * Returns the {@link Command} to perform the specified {@link Request} or null. - */ - public Command getCommand(Request request) { - for (EditPolicy editPolicy : getUnderstandingPolicies(request)) { - Command command = editPolicy.getCommand(request); - if (command != null) { - return command; - } - } - return null; - } /** * Return the {@link EditPart} that should be used as the target for the diff --git a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/LayoutEditPolicy.java b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/LayoutEditPolicy.java index 956140e3c..aecbb8f40 100644 --- a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/LayoutEditPolicy.java +++ b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/LayoutEditPolicy.java @@ -147,20 +147,23 @@ public org.eclipse.wb.gef.core.EditPart getTargetEditPart(Request request) { @Override //@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "BC_UNCONFIRMED_CAST") public Command getCommand(Request request) { + if (!understandsRequest(request)) { + return null; + } Object type = request.getType(); - if (type == RequestConstants.REQ_CREATE) { + if (REQ_CREATE.equals(type)) { return getCreateCommand((CreateRequest) request); } - if (type == PasteRequest.REQ_PASTE) { + if (PasteRequest.REQ_PASTE.equals(type)) { return getPasteCommand((PasteRequest) request); } - if (type == RequestConstants.REQ_MOVE) { + if (REQ_MOVE.equals(type)) { return getMoveCommand((ChangeBoundsRequest) request); } - if (type == RequestConstants.REQ_ADD) { + if (REQ_ADD.equals(type)) { return getAddCommand((ChangeBoundsRequest) request); } - if (type == RequestConstants.REQ_ORPHAN) { + if (REQ_ORPHAN.equals(type)) { return getOrphanCommand((GroupRequest) request); } return null; diff --git a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/tree/policies/LayoutEditPolicy.java b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/tree/policies/LayoutEditPolicy.java index 025d5df85..b947d5251 100644 --- a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/tree/policies/LayoutEditPolicy.java +++ b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/tree/policies/LayoutEditPolicy.java @@ -150,6 +150,9 @@ public org.eclipse.wb.gef.core.EditPart getTargetEditPart(Request request) { */ @Override public Command getCommand(Request request) { + if (!understandsRequest(request)) { + return null; + } // prepare drop location DropRequest dropRequest = (DropRequest) request; Point location = dropRequest.getLocation(); diff --git a/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/flow/AbstractFlowLayoutEditPolicy.java b/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/flow/AbstractFlowLayoutEditPolicy.java index 36b813d37..8d4c9c4c1 100644 --- a/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/flow/AbstractFlowLayoutEditPolicy.java +++ b/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/flow/AbstractFlowLayoutEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2025 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -102,6 +102,9 @@ private List getReferenceChildren(Request request) { //////////////////////////////////////////////////////////////////////////// @Override public Command getCommand(Request request) { + if (!understandsRequest(request)) { + return null; + } Command command = super.getCommand(request); if (command == null) { command = getCommand(request, getReferenceObject(request)); diff --git a/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/generic/AbstractColumnSelectionEditPolicy.java b/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/generic/AbstractColumnSelectionEditPolicy.java index ddb6a8e8b..72e36d929 100644 --- a/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/generic/AbstractColumnSelectionEditPolicy.java +++ b/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/generic/AbstractColumnSelectionEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2025 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -96,7 +96,10 @@ public boolean understandsRequest(Request request) { @Override //@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "BC_UNCONFIRMED_CAST") public Command getCommand(Request request) { - return getResizeCommand((ChangeBoundsRequest) request); + if (REQ_RESIZE.equals(request.getType())) { + return getResizeCommand((ChangeBoundsRequest) request); + } + return null; } @Override diff --git a/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/position/AbstractPositionLayoutEditPolicy.java b/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/position/AbstractPositionLayoutEditPolicy.java index b680c6783..d34d7e115 100644 --- a/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/position/AbstractPositionLayoutEditPolicy.java +++ b/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/position/AbstractPositionLayoutEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2024 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -173,6 +173,9 @@ private static double getOffset(int size, double offsetPercent) { //////////////////////////////////////////////////////////////////////////// @Override public Command getCommand(Request request) { + if (!understandsRequest(request)) { + return null; + } if (m_activeFeedback != null) { Command command = getCommand(request, m_activeFeedback.getData()); if (command != null) { diff --git a/org.eclipse.wb.core/src/org/eclipse/wb/core/gefTree/policy/SingleObjectLayoutEditPolicy.java b/org.eclipse.wb.core/src/org/eclipse/wb/core/gefTree/policy/SingleObjectLayoutEditPolicy.java index f04703b6a..b96ab29bf 100644 --- a/org.eclipse.wb.core/src/org/eclipse/wb/core/gefTree/policy/SingleObjectLayoutEditPolicy.java +++ b/org.eclipse.wb.core/src/org/eclipse/wb/core/gefTree/policy/SingleObjectLayoutEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2024 Google, Inc. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -59,6 +59,9 @@ protected final boolean isGoodReferenceChild(Request request, EditPart editPart) //////////////////////////////////////////////////////////////////////////// @Override public final Command getCommand(Request request) { + if (!understandsRequest(request)) { + return null; + } if (!isEmpty()) { return null; } diff --git a/org.eclipse.wb.core/src/org/eclipse/wb/internal/core/gef/policy/layout/generic/SimpleContainerLayoutEditPolicy.java b/org.eclipse.wb.core/src/org/eclipse/wb/internal/core/gef/policy/layout/generic/SimpleContainerLayoutEditPolicy.java index 90df02520..eee7287eb 100644 --- a/org.eclipse.wb.core/src/org/eclipse/wb/internal/core/gef/policy/layout/generic/SimpleContainerLayoutEditPolicy.java +++ b/org.eclipse.wb.core/src/org/eclipse/wb/internal/core/gef/policy/layout/generic/SimpleContainerLayoutEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2024 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -89,6 +89,9 @@ protected void eraseLayoutTargetFeedback(Request request) { //////////////////////////////////////////////////////////////////////////// @Override public Command getCommand(Request request) { + if (!understandsRequest(request)) { + return null; + } if (!m_container.isEmpty()) { return null; } diff --git a/org.eclipse.wb.layout.group/src/org/eclipse/wb/internal/layout/group/gef/GroupSelectionEditPolicy2.java b/org.eclipse.wb.layout.group/src/org/eclipse/wb/internal/layout/group/gef/GroupSelectionEditPolicy2.java index e70a707e5..18c0906c9 100644 --- a/org.eclipse.wb.layout.group/src/org/eclipse/wb/internal/layout/group/gef/GroupSelectionEditPolicy2.java +++ b/org.eclipse.wb.layout.group/src/org/eclipse/wb/internal/layout/group/gef/GroupSelectionEditPolicy2.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2025 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -275,20 +275,24 @@ private int[] setupResizeEdges(int direction) { @Override public Command getCommand(Request request) { if (REQ_RESIZE.equals(request.getType())) { - // resizing multiple components is not supported by Matisse - if (((ChangeBoundsRequest) request).getEditParts().size() > 1) { - return null; - } - return new EditCommand(m_layout.getAdapter(JavaInfo.class)) { - @Override - protected void executeEdit() throws Exception { - m_layout.command_commit(); - } - }; + return getResizeCommand((ChangeBoundsRequest) request); } return null; } + private Command getResizeCommand(ChangeBoundsRequest request) { + // resizing multiple components is not supported by Matisse + if (request.getEditParts().size() > 1) { + return null; + } + return new EditCommand(m_layout.getAdapter(JavaInfo.class)) { + @Override + protected void executeEdit() throws Exception { + m_layout.command_commit(); + } + }; + } + //////////////////////////////////////////////////////////////////////////// // // Alignment figures diff --git a/org.eclipse.wb.rcp.nebula/META-INF/MANIFEST.MF b/org.eclipse.wb.rcp.nebula/META-INF/MANIFEST.MF index c6ebc6d04..f9b0f609d 100644 --- a/org.eclipse.wb.rcp.nebula/META-INF/MANIFEST.MF +++ b/org.eclipse.wb.rcp.nebula/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.wb.rcp.nebula;singleton:=true -Bundle-Version: 1.12.0.qualifier +Bundle-Version: 1.12.100.qualifier Bundle-Activator: org.eclipse.wb.internal.rcp.nebula.Activator Bundle-Vendor: %providerName Require-Bundle: org.eclipse.ui;bundle-version="[3.206.0,4.0.0)", diff --git a/org.eclipse.wb.rcp.nebula/src/org/eclipse/wb/internal/rcp/nebula/collapsiblebuttons/CollapsibleButtonsLayoutEditPolicy.java b/org.eclipse.wb.rcp.nebula/src/org/eclipse/wb/internal/rcp/nebula/collapsiblebuttons/CollapsibleButtonsLayoutEditPolicy.java index 5e36d735a..9c860bddc 100644 --- a/org.eclipse.wb.rcp.nebula/src/org/eclipse/wb/internal/rcp/nebula/collapsiblebuttons/CollapsibleButtonsLayoutEditPolicy.java +++ b/org.eclipse.wb.rcp.nebula/src/org/eclipse/wb/internal/rcp/nebula/collapsiblebuttons/CollapsibleButtonsLayoutEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2024 Google, Inc. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -86,19 +86,23 @@ protected ILayoutRequestValidator getRequestValidator() { //////////////////////////////////////////////////////////////////////////// @Override protected Command getCommand(Request request, Object referenceObject) { - if (request instanceof final CollapsibleButtonDropRequest buttonRequest) { - final ControlInfo reference = (ControlInfo) referenceObject; - return new EditCommand(m_collButtons) { - @Override - protected void executeEdit() throws Exception { - ControlInfo newButton = CollapsibleButtonsInfo.createButton(m_collButtons, reference); - buttonRequest.setButton(newButton); - } - }; + if (CollapsibleButtonDropRequest.TYPE.equals(request.getType())) { + return getDropCommand((CollapsibleButtonDropRequest) request, referenceObject); } return super.getCommand(request, referenceObject); } + private Command getDropCommand(CollapsibleButtonDropRequest buttonRequest, Object referenceObject) { + final ControlInfo reference = (ControlInfo) referenceObject; + return new EditCommand(m_collButtons) { + @Override + protected void executeEdit() throws Exception { + ControlInfo newButton = CollapsibleButtonsInfo.createButton(m_collButtons, reference); + buttonRequest.setButton(newButton); + } + }; + } + @Override protected Command getMoveCommand(Object moveObject, Object referenceObject) { final ControlInfo button = (ControlInfo) moveObject; diff --git a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/forms/FormHeadLayoutEditPolicy.java b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/forms/FormHeadLayoutEditPolicy.java index bffa8d5eb..d047ec7b3 100644 --- a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/forms/FormHeadLayoutEditPolicy.java +++ b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/forms/FormHeadLayoutEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2024 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -78,6 +78,9 @@ protected void eraseLayoutTargetFeedback(Request request) { //////////////////////////////////////////////////////////////////////////// @Override public Command getCommand(Request request) { + if (!understandsRequest(request)) { + return null; + } if (m_form.getHeadClient() != null) { return null; } diff --git a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/forms/layout/ColumnLayoutSelectionEditPolicy.java b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/forms/layout/ColumnLayoutSelectionEditPolicy.java index 0732db5d1..fe09541db 100644 --- a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/forms/layout/ColumnLayoutSelectionEditPolicy.java +++ b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/forms/layout/ColumnLayoutSelectionEditPolicy.java @@ -95,7 +95,10 @@ public boolean understandsRequest(Request request) { @Override public Command getCommand(final Request request) { - return getResizeCommand((ChangeBoundsRequest) request); + if (REQ_RESIZE.equals(request.getType())) { + return getResizeCommand((ChangeBoundsRequest) request); + } + return null; } @Override diff --git a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/jface/DialogButtonBarLayoutEditPolicy.java b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/jface/DialogButtonBarLayoutEditPolicy.java index 582faa0a3..85a84255d 100644 --- a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/jface/DialogButtonBarLayoutEditPolicy.java +++ b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/jface/DialogButtonBarLayoutEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2024 Google, Inc. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -89,19 +89,23 @@ protected ILayoutRequestValidator getRequestValidator() { //////////////////////////////////////////////////////////////////////////// @Override protected Command getCommand(Request request, Object referenceObject) { - if (request instanceof final DialogButtonDropRequest buttonRequest) { - final ControlInfo reference = (ControlInfo) referenceObject; - return new EditCommand(m_composite) { - @Override - protected void executeEdit() throws Exception { - ControlInfo newButton = DialogInfo.createButtonOnButtonBar(m_composite, reference); - buttonRequest.setButton(newButton); - } - }; + if (DialogButtonDropRequest.TYPE.equals(request.getType())) { + return getDropCommand((DialogButtonDropRequest) request, referenceObject); } return super.getCommand(request, referenceObject); } + private Command getDropCommand(DialogButtonDropRequest buttonRequest, Object referenceObject) { + final ControlInfo reference = (ControlInfo) referenceObject; + return new EditCommand(m_composite) { + @Override + protected void executeEdit() throws Exception { + ControlInfo newButton = DialogInfo.createButtonOnButtonBar(m_composite, reference); + buttonRequest.setButton(newButton); + } + }; + } + @Override protected Command getMoveCommand(Object moveObject, Object referenceObject) { final ControlInfo button = (ControlInfo) moveObject; diff --git a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/jface/action/ToolBarManagerLayoutEditPolicy.java b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/jface/action/ToolBarManagerLayoutEditPolicy.java index 299e9cb9a..6a4b5a963 100644 --- a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/jface/action/ToolBarManagerLayoutEditPolicy.java +++ b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/jface/action/ToolBarManagerLayoutEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2024 Google, Inc. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -86,20 +86,24 @@ protected ILayoutRequestValidator getRequestValidator() { //////////////////////////////////////////////////////////////////////////// @Override protected Command getCommand(Request request, Object referenceObject) { - if (request instanceof final ActionDropRequest actionRequest) { - final ContributionItemInfo reference = (ContributionItemInfo) referenceObject; - return new EditCommand(m_manager) { - @Override - protected void executeEdit() throws Exception { - ActionContributionItemInfo newItem = - m_manager.command_CREATE(actionRequest.getAction(), reference); - actionRequest.setItem(newItem); - } - }; + if (ActionDropRequest.TYPE.equals(request.getType())) { + return getDropCommand((ActionDropRequest) request, referenceObject); } return super.getCommand(request, referenceObject); } + private Command getDropCommand(ActionDropRequest actionRequest, Object referenceObject) { + final ContributionItemInfo reference = (ContributionItemInfo) referenceObject; + return new EditCommand(m_manager) { + @Override + protected void executeEdit() throws Exception { + ActionContributionItemInfo newItem = + m_manager.command_CREATE(actionRequest.getAction(), reference); + actionRequest.setItem(newItem); + } + }; + } + @Override protected void command_CREATE(ContributionItemInfo newObject, ContributionItemInfo referenceObject) throws Exception { diff --git a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/AbstractPartSelectionEditPolicy.java b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/AbstractPartSelectionEditPolicy.java index f53d6ffb8..1280f54e4 100644 --- a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/AbstractPartSelectionEditPolicy.java +++ b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/AbstractPartSelectionEditPolicy.java @@ -115,7 +115,10 @@ public boolean understandsRequest(Request request) { @Override public Command getCommand(final Request request) { - return getResizeCommand((ChangeBoundsRequest) request); + if (REQ_RESIZE.equals(request.getType())) { + return getResizeCommand((ChangeBoundsRequest) request); + } + return null; } @Override diff --git a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/PageLayoutCreateFolderLayoutEditPolicy.java b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/PageLayoutCreateFolderLayoutEditPolicy.java index ceff90706..ea811ca3f 100644 --- a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/PageLayoutCreateFolderLayoutEditPolicy.java +++ b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/PageLayoutCreateFolderLayoutEditPolicy.java @@ -91,20 +91,24 @@ protected boolean isHorizontal(Request request) { //////////////////////////////////////////////////////////////////////////// @Override protected Command getCommand(Request request, Object referenceObject) { - if (request instanceof final ViewDropRequest viewDrop_Request) { - final ViewInfo viewInfo = viewDrop_Request.getView(); - final FolderViewInfo reference = (FolderViewInfo) referenceObject; - return new EditCommand(m_folder) { - @Override - protected void executeEdit() throws Exception { - FolderViewInfo newView = m_folder.command_CREATE(viewInfo.getId(), reference); - viewDrop_Request.setComponent(newView); - } - }; + if (ViewDropRequest.TYPE.equals(request.getType())) { + return getDropCommand((ViewDropRequest) request, referenceObject); } return super.getCommand(request, referenceObject); } + private Command getDropCommand(ViewDropRequest viewDrop_Request, Object referenceObject) { + final ViewInfo viewInfo = viewDrop_Request.getView(); + final FolderViewInfo reference = (FolderViewInfo) referenceObject; + return new EditCommand(m_folder) { + @Override + protected void executeEdit() throws Exception { + FolderViewInfo newView = m_folder.command_CREATE(viewInfo.getId(), reference); + viewDrop_Request.setComponent(newView); + } + }; + } + @Override protected Command getMoveCommand(Object moveObject, Object referenceObject) { final FolderViewInfo item = (FolderViewInfo) moveObject; diff --git a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/PageLayoutSidesLayoutEditPolicy.java b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/PageLayoutSidesLayoutEditPolicy.java index d8c94d89c..c97f5cdd8 100644 --- a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/PageLayoutSidesLayoutEditPolicy.java +++ b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/PageLayoutSidesLayoutEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Google, Inc. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -124,26 +124,30 @@ protected void addFeedbacks() throws Exception { //////////////////////////////////////////////////////////////////////////// @Override protected Command getCommand(Request request, Object data) { - if (request instanceof final ViewDropRequest viewDrop_Request) { - final ViewInfo viewInfo = viewDrop_Request.getView(); - final int relationship = (Integer) data; - return new EditCommand(m_page) { - @Override - protected void executeEdit() throws Exception { - Object newView; - if (relationship == FOLDER_RELATIONSHIP) { - PageLayoutCreateFolderInfo folder = convertIntoFolder(); - newView = folder.command_CREATE(viewInfo.getId(), null); - } else { - newView = m_page.command_CREATE(viewInfo.getId(), relationship, 0.5f, m_part); - } - viewDrop_Request.setComponent(newView); - } - }; + if (ViewDropRequest.TYPE.equals(request.getType())) { + return getDropCommand((ViewDropRequest) request, data); } return super.getCommand(request, data); } + private Command getDropCommand(ViewDropRequest viewDrop_Request, Object data) { + final ViewInfo viewInfo = viewDrop_Request.getView(); + final int relationship = (Integer) data; + return new EditCommand(m_page) { + @Override + protected void executeEdit() throws Exception { + Object newView; + if (relationship == FOLDER_RELATIONSHIP) { + PageLayoutCreateFolderInfo folder = convertIntoFolder(); + newView = folder.command_CREATE(viewInfo.getId(), null); + } else { + newView = m_page.command_CREATE(viewInfo.getId(), relationship, 0.5f, m_part); + } + viewDrop_Request.setComponent(newView); + } + }; + } + @Override protected Command getCreateCommand(Object newObject, Object data) { return null; diff --git a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/shortcuts/FastViewContainerLayoutEditPolicy.java b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/shortcuts/FastViewContainerLayoutEditPolicy.java index dac952667..0e87fe6a5 100644 --- a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/shortcuts/FastViewContainerLayoutEditPolicy.java +++ b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/shortcuts/FastViewContainerLayoutEditPolicy.java @@ -96,22 +96,26 @@ protected boolean isHorizontal(Request request) { //////////////////////////////////////////////////////////////////////////// @Override @Deprecated - @SuppressWarnings("removal") protected Command getCommand(Request request, Object referenceObject) { - if (request instanceof final ViewDropRequest viewDrop_Request) { - final ViewInfo viewInfo = viewDrop_Request.getView(); - final FastViewInfo reference = (FastViewInfo) referenceObject; - return new EditCommand(m_page) { - @Override - protected void executeEdit() throws Exception { - FastViewInfo newView = m_container.command_CREATE(viewInfo.getId(), reference); - viewDrop_Request.setComponent(newView); - } - }; + if (ViewDropRequest.TYPE.equals(request.getType())) { + return getDropCommand((ViewDropRequest) request, referenceObject); } return super.getCommand(request, referenceObject); } + @SuppressWarnings("removal") + private Command getDropCommand(ViewDropRequest viewDrop_Request, Object referenceObject) { + final ViewInfo viewInfo = viewDrop_Request.getView(); + final FastViewInfo reference = (FastViewInfo) referenceObject; + return new EditCommand(m_page) { + @Override + protected void executeEdit() throws Exception { + FastViewInfo newView = m_container.command_CREATE(viewInfo.getId(), reference); + viewDrop_Request.setComponent(newView); + } + }; + } + @Override @Deprecated @SuppressWarnings("removal") diff --git a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/shortcuts/PerspectiveShortcutContainerLayoutEditPolicy.java b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/shortcuts/PerspectiveShortcutContainerLayoutEditPolicy.java index 5cf8d739c..dc82387cd 100644 --- a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/shortcuts/PerspectiveShortcutContainerLayoutEditPolicy.java +++ b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/shortcuts/PerspectiveShortcutContainerLayoutEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2024 Google, Inc. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -88,21 +88,25 @@ protected boolean isHorizontal(Request request) { //////////////////////////////////////////////////////////////////////////// @Override protected Command getCommand(Request request, Object referenceObject) { - if (request instanceof final PerspectiveDropRequest perspectiveDrop_Request) { - final PerspectiveInfo perspectiveInfo = perspectiveDrop_Request.getPerspective(); - final PerspectiveShortcutInfo reference = (PerspectiveShortcutInfo) referenceObject; - return new EditCommand(m_page) { - @Override - protected void executeEdit() throws Exception { - PerspectiveShortcutInfo newPerspective = - m_container.command_CREATE(perspectiveInfo.getId(), reference); - perspectiveDrop_Request.setComponent(newPerspective); - } - }; + if (PerspectiveDropRequest.TYPE.equals(request.getType())) { + return getDropRequest((PerspectiveDropRequest) request, referenceObject); } return super.getCommand(request, referenceObject); } + private Command getDropRequest(PerspectiveDropRequest perspectiveDrop_Request, Object referenceObject) { + final PerspectiveInfo perspectiveInfo = perspectiveDrop_Request.getPerspective(); + final PerspectiveShortcutInfo reference = (PerspectiveShortcutInfo) referenceObject; + return new EditCommand(m_page) { + @Override + protected void executeEdit() throws Exception { + PerspectiveShortcutInfo newPerspective = + m_container.command_CREATE(perspectiveInfo.getId(), reference); + perspectiveDrop_Request.setComponent(newPerspective); + } + }; + } + @Override protected Command getMoveCommand(Object moveObject, Object referenceObject) { final PerspectiveShortcutInfo item = (PerspectiveShortcutInfo) moveObject; diff --git a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/shortcuts/ViewShortcutContainerLayoutEditPolicy.java b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/shortcuts/ViewShortcutContainerLayoutEditPolicy.java index c97a491bc..a92149673 100644 --- a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/shortcuts/ViewShortcutContainerLayoutEditPolicy.java +++ b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/rcp/perspective/shortcuts/ViewShortcutContainerLayoutEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2024 Google, Inc. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -86,20 +86,24 @@ protected boolean isHorizontal(Request request) { //////////////////////////////////////////////////////////////////////////// @Override protected Command getCommand(Request request, Object referenceObject) { - if (request instanceof final ViewDropRequest viewDrop_Request) { - final ViewInfo viewInfo = viewDrop_Request.getView(); - final ViewShortcutInfo reference = (ViewShortcutInfo) referenceObject; - return new EditCommand(m_page) { - @Override - protected void executeEdit() throws Exception { - ViewShortcutInfo newView = m_container.command_CREATE(viewInfo.getId(), reference); - viewDrop_Request.setComponent(newView); - } - }; + if (ViewDropRequest.TYPE.equals(request.getType())) { + return getDropRequest((ViewDropRequest) request, referenceObject); } return super.getCommand(request, referenceObject); } + private Command getDropRequest(ViewDropRequest viewDrop_Request, Object referenceObject) { + final ViewInfo viewInfo = viewDrop_Request.getView(); + final ViewShortcutInfo reference = (ViewShortcutInfo) referenceObject; + return new EditCommand(m_page) { + @Override + protected void executeEdit() throws Exception { + ViewShortcutInfo newView = m_container.command_CREATE(viewInfo.getId(), reference); + viewDrop_Request.setComponent(newView); + } + }; + } + @Override protected Command getMoveCommand(Object moveObject, Object referenceObject) { final ViewShortcutInfo item = (ViewShortcutInfo) moveObject; diff --git a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/widgets/SashFormSelectionEditPolicy.java b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/widgets/SashFormSelectionEditPolicy.java index 0caa9714f..41ded6e62 100644 --- a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/widgets/SashFormSelectionEditPolicy.java +++ b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/widgets/SashFormSelectionEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2025 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -108,7 +108,10 @@ public boolean understandsRequest(Request request) { @Override public Command getCommand(final Request request) { - return getResizeCommand((ChangeBoundsRequest) request); + if (REQ_RESIZE.equals(request.getType())) { + return getResizeCommand((ChangeBoundsRequest) request); + } + return null; } @Override diff --git a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/widgets/TreeTreeColumnSelectionEditPolicy.java b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/widgets/TreeTreeColumnSelectionEditPolicy.java index ec496550d..c8cf85842 100644 --- a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/widgets/TreeTreeColumnSelectionEditPolicy.java +++ b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/widgets/TreeTreeColumnSelectionEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2025 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -94,7 +94,10 @@ public boolean understandsRequest(Request request) { @Override public Command getCommand(final Request request) { - return getResizeCommand((ChangeBoundsRequest) request); + if (REQ_RESIZE.equals(request.getType())) { + return getResizeCommand((ChangeBoundsRequest) request); + } + return null; } @Override diff --git a/org.eclipse.wb.swing.FormLayout/src/org/eclipse/wb/internal/swing/FormLayout/gef/header/selection/DimensionSelectionEditPolicy.java b/org.eclipse.wb.swing.FormLayout/src/org/eclipse/wb/internal/swing/FormLayout/gef/header/selection/DimensionSelectionEditPolicy.java index 48de8341d..90270b849 100644 --- a/org.eclipse.wb.swing.FormLayout/src/org/eclipse/wb/internal/swing/FormLayout/gef/header/selection/DimensionSelectionEditPolicy.java +++ b/org.eclipse.wb.swing.FormLayout/src/org/eclipse/wb/internal/swing/FormLayout/gef/header/selection/DimensionSelectionEditPolicy.java @@ -138,6 +138,13 @@ public boolean understandsRequest(Request request) { @Override public Command getCommand(Request request) { + if (REQ_RESIZE.equals(request.getType())) { + return getResizeCommand((ChangeBoundsRequest) request); + } + return null; + } + + private Command getResizeCommand(ChangeBoundsRequest request) { if (!getLayout().canChangeDimensions()) { return null; } diff --git a/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/MigLayoutEditPolicy.java b/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/MigLayoutEditPolicy.java index a956225d7..ae57d95ea 100644 --- a/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/MigLayoutEditPolicy.java +++ b/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/MigLayoutEditPolicy.java @@ -208,6 +208,9 @@ private boolean isValidTarget() { @Override public Command getCommand(Request request) { + if (!understandsRequest(request)) { + return null; + } if (m_flowCommand != null) { return m_flowCommand; } diff --git a/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/MigLayoutSplitEditPolicy.java b/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/MigLayoutSplitEditPolicy.java index 1ded4771a..4639c50f0 100644 --- a/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/MigLayoutSplitEditPolicy.java +++ b/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/MigLayoutSplitEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2025 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -110,6 +110,9 @@ protected boolean isGoodReferenceChild(Request request, EditPart editPart) { @Override public Command getCommand(Request request) { + if (!understandsRequest(request)) { + return null; + } m_horizontalCommand = isHorizontal(request); return super.getCommand(request); } diff --git a/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/header/selection/DimensionSelectionEditPolicy.java b/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/header/selection/DimensionSelectionEditPolicy.java index 8f6c95009..318f64a47 100644 --- a/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/header/selection/DimensionSelectionEditPolicy.java +++ b/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/header/selection/DimensionSelectionEditPolicy.java @@ -143,6 +143,13 @@ public boolean understandsRequest(Request request) { @Override public Command getCommand(Request request) { + if (REQ_RESIZE.equals(request.getType())) { + return getResizeCommand(request); + } + return null; + } + + private Command getResizeCommand(Request request) { if (!getLayout().canChangeDimensions()) { return null; } diff --git a/org.eclipse.wb.swing/src/org/eclipse/wb/internal/swing/gef/policy/component/box/StrutSelectionEditPolicy.java b/org.eclipse.wb.swing/src/org/eclipse/wb/internal/swing/gef/policy/component/box/StrutSelectionEditPolicy.java index 364167ef1..5355574a7 100644 --- a/org.eclipse.wb.swing/src/org/eclipse/wb/internal/swing/gef/policy/component/box/StrutSelectionEditPolicy.java +++ b/org.eclipse.wb.swing/src/org/eclipse/wb/internal/swing/gef/policy/component/box/StrutSelectionEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2025 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -91,7 +91,10 @@ public boolean understandsRequest(Request request) { @Override public Command getCommand(Request request) { - return getResizeCommand((ChangeBoundsRequest) request); + if (REQ_RESIZE.equals(request.getType())) { + return getResizeCommand((ChangeBoundsRequest) request); + } + return null; } @Override diff --git a/org.eclipse.wb.swing/src/org/eclipse/wb/internal/swing/gef/policy/layout/gbl/header/selection/DimensionSelectionEditPolicy.java b/org.eclipse.wb.swing/src/org/eclipse/wb/internal/swing/gef/policy/layout/gbl/header/selection/DimensionSelectionEditPolicy.java index 4dd676f47..3251a4ef6 100644 --- a/org.eclipse.wb.swing/src/org/eclipse/wb/internal/swing/gef/policy/layout/gbl/header/selection/DimensionSelectionEditPolicy.java +++ b/org.eclipse.wb.swing/src/org/eclipse/wb/internal/swing/gef/policy/layout/gbl/header/selection/DimensionSelectionEditPolicy.java @@ -133,7 +133,10 @@ public boolean understandsRequest(Request request) { @Override public Command getCommand(Request request) { - return m_resizeCommand; + if (REQ_RESIZE.equals(request.getType())) { + return m_resizeCommand; + } + return null; } @Override diff --git a/org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/gef/policy/TableTableColumnSelectionEditPolicy.java b/org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/gef/policy/TableTableColumnSelectionEditPolicy.java index 859edf173..4ebbacee9 100644 --- a/org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/gef/policy/TableTableColumnSelectionEditPolicy.java +++ b/org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/gef/policy/TableTableColumnSelectionEditPolicy.java @@ -97,7 +97,10 @@ public boolean understandsRequest(Request request) { @Override //@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "BC_UNCONFIRMED_CAST") public Command getCommand(Request request) { - return getResizeCommand((ChangeBoundsRequest) request); + if (REQ_RESIZE == request.getType()) { + return getResizeCommand((ChangeBoundsRequest) request); + } + return null; } @Override diff --git a/org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/gef/policy/layout/RowLayoutSelectionEditPolicy.java b/org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/gef/policy/layout/RowLayoutSelectionEditPolicy.java index cf2b648b0..468b01066 100644 --- a/org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/gef/policy/layout/RowLayoutSelectionEditPolicy.java +++ b/org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/gef/policy/layout/RowLayoutSelectionEditPolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2025 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -94,7 +94,7 @@ public boolean understandsRequest(Request request) { @Override public Command getCommand(Request request) { - if (request instanceof ChangeBoundsRequest) { + if (REQ_RESIZE == request.getType()) { return getResizeCommand((ChangeBoundsRequest) request); } return null; diff --git a/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/EditPartTest.java b/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/EditPartTest.java index efb300f47..73a9efbe3 100644 --- a/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/EditPartTest.java +++ b/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/EditPartTest.java @@ -328,7 +328,6 @@ public void eraseTargetFeedback(Request request) { // RequestsLogger expectedLogger = new RequestsLogger(); expectedLogger.log(testEditPart, new String[]{ - "understandsRequest", "getCommand", "understandsRequest", "getTargetEditPart"}, request); @@ -347,7 +346,6 @@ public void eraseTargetFeedback(Request request) { // expectedLogger.log(testEditPart, new String[]{ // - "understandsRequest", "getCommand", // "understandsRequest", diff --git a/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/GefCursorTestCase.java b/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/GefCursorTestCase.java index 1605b5b21..0f4b33f06 100644 --- a/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/GefCursorTestCase.java +++ b/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/GefCursorTestCase.java @@ -163,13 +163,13 @@ protected List createSelectionHandles() { private Handle createResizeHandle(int direction) { ResizeHandle handle = new ResizeHandle(getHost(), direction); - handle.setDragTracker(new ResizeTracker(direction, "REQ_RESIZE")); + handle.setDragTracker(new ResizeTracker(direction, REQ_RESIZE)); return handle; } @Override public boolean understandsRequest(Request request) { - return super.understandsRequest(request) || "REQ_RESIZE".equals(request.getType()); + return super.understandsRequest(request) || REQ_RESIZE.equals(request.getType()); } @Override @@ -182,7 +182,7 @@ public EditPart getTargetEditPart(org.eclipse.gef.Request request) { @Override public Command getCommand(Request request) { - if (understandsRequest(request)) { + if (REQ_RESIZE.equals(request.getType())) { return acceptResizeCommand; } return null;