Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import org.eclipse.wb.core.model.AbstractComponentInfo;
import org.eclipse.wb.core.model.broadcast.DisplayEventListener;
import org.eclipse.wb.draw2d.Figure;
import org.eclipse.wb.gef.core.EditPart;
import org.eclipse.wb.gef.core.policies.EditPolicy;
import org.eclipse.wb.gef.core.requests.DragPermissionRequest;
import org.eclipse.wb.gef.graphical.GraphicalEditPart;
Expand All @@ -36,6 +35,7 @@
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.Request;
import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.gef.requests.SelectionRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,12 @@ public Command getCommand(Request request) {
* is not the requested target (for example, this EditPart is not a composite), it will forward
* the call to its parent.
*/
public EditPart getTargetEditPart(Request request) {
public org.eclipse.gef.EditPart getTargetEditPart(Request request) {
request = processRequestProcessors(request);
EditPart target = null;
org.eclipse.gef.EditPart target = null;
// update target using any understanding EditPolicy
for (EditPolicy editPolicy : getUnderstandingPolicies(request)) {
EditPart newTarget = ((org.eclipse.wb.gef.core.policies.EditPolicy) editPolicy).getTargetEditPart(request);
org.eclipse.gef.EditPart newTarget = editPolicy.getTargetEditPart(request);
if (newTarget != null) {
target = newTarget;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2023 Google, Inc.
* Copyright (c) 2011, 2025 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
Expand All @@ -12,10 +12,10 @@
*******************************************************************************/
package org.eclipse.wb.gef.core.policies;

import org.eclipse.wb.gef.core.EditPart;
import org.eclipse.wb.gef.core.events.IEditPolicyListener;

import org.eclipse.draw2d.EventListenerList;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.Request;
import org.eclipse.gef.commands.Command;

Expand Down Expand Up @@ -71,14 +71,6 @@ public boolean isActive() {
return m_isActive;
}

/**
* @return the <i>host</i> {@link EditPart} on which this policy is installed.
*/
@Override
public EditPart getHost() {
return (EditPart) super.getHost();
}

////////////////////////////////////////////////////////////////////////////
//
// Request/Command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ protected Conditional getTargetingConditional() {
*/
protected void updateTargetUnderMouse() {
if (!m_isLockTarget) {
org.eclipse.wb.gef.core.EditPart editPart =
EditPart editPart =
getCurrentViewer().findTargetEditPart(
getLocation().x,
getLocation().y,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2023 Google, Inc.
* Copyright (c) 2011, 2025 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
Expand All @@ -12,9 +12,9 @@
*******************************************************************************/
package org.eclipse.wb.internal.gef.tree.policies;

import org.eclipse.wb.gef.core.EditPart;
import org.eclipse.wb.gef.core.policies.EditPolicy;

import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartListener;
import org.eclipse.gef.Request;
import org.eclipse.gef.RequestConstants;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.eclipse.wb.draw2d.border.Border;
import org.eclipse.wb.draw2d.border.CompoundBorder;
import org.eclipse.wb.draw2d.border.LineBorder;
import org.eclipse.wb.gef.core.EditPart;
import org.eclipse.wb.gef.core.IEditPartViewer;
import org.eclipse.wb.gef.core.policies.EditPolicy;
import org.eclipse.wb.gef.graphical.GraphicalEditPart;
Expand All @@ -34,6 +33,8 @@
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.draw2d.geometry.Translatable;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartViewer;
import org.eclipse.gef.editparts.LayerManager;

import java.lang.reflect.Method;
Expand Down Expand Up @@ -324,9 +325,9 @@ public static void scheduleSelection(EditPart host, Object model) {
/**
* Schedules selection of {@link EditPart} with given model.
*/
public static void scheduleSelection(final IEditPartViewer viewer, final Object model) {
public static void scheduleSelection(final EditPartViewer viewer, final Object model) {
ExecutionUtils.runLogLater(() -> {
EditPart editPart = (EditPart) viewer.getEditPartRegistry().get(model);
EditPart editPart = viewer.getEditPartRegistry().get(model);
if (editPart != null) {
viewer.select(editPart);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ public void deleting(Object toolkitModel) {
//
////////////////////////////////////////////////////////////////////////////
@Override
public org.eclipse.wb.gef.core.EditPart getTargetEditPart(org.eclipse.gef.Request request) {
public EditPart getTargetEditPart(org.eclipse.gef.Request request) {
request = processRequestProcessors(request);
org.eclipse.wb.gef.core.EditPart target = super.getTargetEditPart(request);
EditPart target = super.getTargetEditPart(request);
boolean isOperationRequest =
request.getType() == RequestConstants.REQ_CREATE
|| request.getType() == PasteRequest.REQ_PASTE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011 Google, Inc.
* Copyright (c) 2011, 2025 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
Expand All @@ -14,9 +14,9 @@

import org.eclipse.wb.core.gef.part.AbstractComponentEditPart;
import org.eclipse.wb.core.gef.policy.TabOrderContainerEditPolicy;
import org.eclipse.wb.gef.core.EditPart;
import org.eclipse.wb.internal.swing.model.component.ComponentInfo;

import org.eclipse.gef.EditPart;
import org.eclipse.gef.Request;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2024 Google, Inc. and others.
* Copyright (c) 2011, 2025 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
Expand All @@ -14,9 +14,9 @@

import org.eclipse.wb.core.gef.part.AbstractComponentEditPart;
import org.eclipse.wb.core.gef.policy.TabOrderContainerEditPolicy;
import org.eclipse.wb.gef.core.EditPart;
import org.eclipse.wb.internal.swt.model.widgets.ControlInfo;

import org.eclipse.gef.EditPart;
import org.eclipse.gef.Request;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public Command getCommand(Request request) {
}

@Override
public org.eclipse.wb.gef.core.EditPart getTargetEditPart(Request request) {
public EditPart getTargetEditPart(Request request) {
actualLogger.log(getHost(), "getTargetEditPart", request);
return getHost();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2024 Google, Inc.
* Copyright (c) 2011, 2025 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
Expand Down Expand Up @@ -237,7 +237,7 @@ protected Command getAddCommand(List<? extends EditPart> addParts, Object refere
}

@Override
public org.eclipse.wb.gef.core.EditPart getTargetEditPart(Request request) {
public EditPart getTargetEditPart(Request request) {
if (request instanceof SelectionRequest) {
return this;
}
Expand Down
Loading