Skip to content
Merged
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 @@ -26,7 +26,6 @@
import org.eclipse.wb.gef.graphical.handles.SquareHandle;
import org.eclipse.wb.gef.graphical.policies.SelectionEditPolicy;
import org.eclipse.wb.gef.graphical.tools.ResizeTracker;
import org.eclipse.wb.internal.core.DesignerPlugin;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Cursors;
Expand Down Expand Up @@ -108,15 +107,15 @@ private Rectangle getComponentCells() {
/**
* @return the pixels {@link Rectangle} of host component.
*/
private Rectangle getComponentCellBounds() throws Exception {
private Rectangle getComponentCellBounds() {
Rectangle cells = getComponentCells();
return getGridInfo().getCellsRectangle(cells);
}

/**
* @return the pixels {@link Rectangle} of host component in feedback.
*/
private Rectangle getComponentCellBounds_atFeedback() throws Exception {
private Rectangle getComponentCellBounds_atFeedback() {
Rectangle bounds = getComponentCellBounds();
translateModelToFeedback(bounds);
return bounds;
Expand All @@ -131,17 +130,7 @@ private Rectangle getComponentCellBounds_atFeedback() throws Exception {
* @return the {@link MoveHandle} for host component.
*/
protected final MoveHandle createMoveHandle() {
MoveHandle moveHandle = new MoveHandle(getHost(), new Locator() {
@Override
public void relocate(IFigure target) {
try {
Rectangle bounds = getComponentCellBounds_atFeedback();
target.setBounds(bounds);
} catch (Throwable e) {
DesignerPlugin.log(e);
}
}
});
MoveHandle moveHandle = new MoveHandle(getHost(), target -> target.setBounds(getComponentCellBounds_atFeedback()));
moveHandle.setForegroundColor(ColorConstants.red);
return moveHandle;
}
Expand Down Expand Up @@ -625,12 +614,7 @@ public SideLocator(double relativeX, double relativeY) {

@Override
protected Rectangle getReferenceRectangle() {
try {
Rectangle bounds = getComponentCellBounds_atFeedback();
return bounds;
} catch (Throwable e) {
return new Rectangle();
}
return getComponentCellBounds_atFeedback();
}
}
//
Expand Down
Loading