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
20 changes: 20 additions & 0 deletions org.eclipse.wb.core/.settings/.api_filters
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,26 @@
</message_arguments>
</filter>
</resource>
<resource path="src/org/eclipse/wb/core/controls/palette/PaletteComposite.java" type="org.eclipse.wb.core.controls.palette.PaletteComposite">
<filter comment="Removal of reference to internal Figure class" id="338792546">
<message_arguments>
<message_argument value="org.eclipse.wb.core.controls.palette.PaletteComposite"/>
<message_argument value="getCategoryFigure(ICategory)"/>
</message_arguments>
</filter>
<filter comment="Removal of reference to internal Figure class" id="338792546">
<message_arguments>
<message_argument value="org.eclipse.wb.core.controls.palette.PaletteComposite"/>
<message_argument value="getEntryFigure(DesignerContainer, DesignerEntry)"/>
</message_arguments>
</filter>
<filter comment="Removal of reference to internal Figure class" id="338792546">
<message_arguments>
<message_argument value="org.eclipse.wb.core.controls.palette.PaletteComposite"/>
<message_argument value="getEntryFigure(ICategory, IEntry)"/>
</message_arguments>
</filter>
</resource>
<resource path="src/org/eclipse/wb/core/gef/IEditPartConfigurator.java" type="org.eclipse.wb.core.gef.IEditPartConfigurator">
<filter comment="Restructuring of internal EditPart" id="403804204">
<message_arguments>
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, 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
Expand All @@ -20,7 +20,7 @@
import org.eclipse.draw2d.geometry.Rectangle;

/**
* Implementation of {@link ILocator} that relocates target {@link Figure} relative to the some
* Implementation of {@link ILocator} that relocates target {@link IFigure} relative to the some
* reference {@link Rectangle} using two floating-point value indicating the horizontal and vertical
* offset from that reference {@link Rectangle}. The values (0.0, 0.0) would indicate the top-left
* corner, while the values (1.0, 1.0) would indicate the bottom-right corner.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.eclipse.swt.widgets.Shell;

/**
* Collection of utilities for {@link Figure}'s.
* Collection of utilities for {@link IFigure}'s.
*
* @author lobas_av
* @coverage gef.draw2d
Expand All @@ -35,7 +35,7 @@ public class FigureUtils {
//
////////////////////////////////////////////////////////////////////////////
/**
* Removes given {@link Figure} from its parent.
* Removes given {@link IFigure} from its parent.
*/
public static void removeFigure(IFigure figure) {
if (figure != null && figure.getParent() != null) {
Expand All @@ -49,8 +49,8 @@ public static void removeFigure(IFigure figure) {
//
////////////////////////////////////////////////////////////////////////////
/**
* Translates given {@link Translatable} from <code>source</code> {@link Figure} bounds
* coordinates to bounds coordinates from <code>target</code> {@link Figure}.
* Translates given {@link Translatable} from <code>source</code> {@link IFigure} bounds
* coordinates to bounds coordinates from <code>target</code> {@link IFigure}.
*/
public static final void translateFigureToFigure(IFigure source, IFigure target,
Translatable translatable) {
Expand All @@ -70,7 +70,7 @@ public static final void translateFigureToFigure2(IFigure source,
}

/**
* Translates given {@link Translatable} from this {@link Figure} bounds coordinates to absolute (
* Translates given {@link Translatable} from this {@link IFigure} bounds coordinates to absolute (
* {@link RootFigure} relative) coordinates.
*/
public static final void translateFigureToAbsolute(IFigure figure, Translatable translatable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,14 @@ public void selectEntry(DesignerEntry selectedEntry, boolean reload) {
}

/**
* @return the {@link Figure} used for displaying {@link ICategory}.
* @return the {@link IFigure} used for displaying {@link ICategory}.
* @deprecated Use {@link #getCategoryFigure(DesignerContainer)} instead. This
* method will be removed after the 2027-03 release.
* @since 1.24
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.19", forRemoval = true)
public org.eclipse.wb.draw2d.Figure getCategoryFigure(ICategory category) {
public IFigure getCategoryFigure(ICategory category) {
return m_categoryFigures.get(category);
}

Expand All @@ -335,19 +336,21 @@ public IFigure getCategoryFigure(DesignerContainer category) {
*
* @deprecated Use {@link #getEntryFigure(DesignerContainer, DesignerEntry)}
* instead. This method will be removed after the 2027-03 release.
* @since 1.24
*/
@SuppressWarnings("removal")
@Deprecated(since = "3.19", forRemoval = true)
public org.eclipse.wb.draw2d.Figure getEntryFigure(ICategory category, IEntry entry) {
public IFigure getEntryFigure(ICategory category, IEntry entry) {
CategoryFigure categoryFigure = m_categoryFigures.get(category);
return categoryFigure.m_entryFigures.get(entry);
}

/**
* @return the {@link IFigure} used for displaying {@link DesignerEntry}.
* @since 1.24
*/
@SuppressWarnings("removal")
public org.eclipse.wb.draw2d.Figure getEntryFigure(DesignerContainer category, DesignerEntry entry) {
public IFigure getEntryFigure(DesignerContainer category, DesignerEntry entry) {
return getEntryFigure((ICategory) category, (IEntry) entry);
}

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, 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
Expand All @@ -12,9 +12,8 @@
*******************************************************************************/
package org.eclipse.wb.core.gef.figure;

import org.eclipse.wb.draw2d.Figure;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.swt.graphics.Color;
Expand Down Expand Up @@ -60,10 +59,10 @@ public OutlineImageFigure(Image image, Color borderColor, Rectangle bounds) {
//
////////////////////////////////////////////////////////////////////////////
@Override
protected void paintClientArea(Graphics graphics) {
protected void paintFigure(Graphics graphics) {
if (m_image != null) {
graphics.drawImage(m_image, 0, 0);
graphics.drawImage(m_image, bounds.x, bounds.y);
}
graphics.drawRectangle(getClientArea().getResized(-1, -1));
graphics.drawRectangle(bounds.x, bounds.y, bounds.width - 1, bounds.height - 1);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
package org.eclipse.wb.core.gef.part;

import org.eclipse.wb.core.gef.policy.selection.NonResizableSelectionEditPolicy;
import org.eclipse.wb.draw2d.Figure;
import org.eclipse.wb.gef.graphical.DesignEditPart;
import org.eclipse.wb.internal.core.model.description.IComponentDescription;
import org.eclipse.wb.internal.core.utils.state.GlobalState;

import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Rectangle;
Expand Down Expand Up @@ -55,9 +55,9 @@ public ComponentIconEditPart(Object component) {
protected IFigure createFigure() {
return new Figure() {
@Override
protected void paintClientArea(Graphics graphics) {
protected void paintFigure(Graphics graphics) {
Image image = getIcon().createImage();
graphics.drawImage(image, 0, 0);
graphics.drawImage(image, bounds.x, bounds.y);
image.dispose();
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
import org.eclipse.wb.core.gef.header.IHeaderMenuProvider;
import org.eclipse.wb.core.gef.header.IHeadersProvider;
import org.eclipse.wb.core.gef.policy.selection.EmptySelectionEditPolicy;
import org.eclipse.wb.draw2d.Figure;
import org.eclipse.wb.gef.graphical.DesignEditPart;
import org.eclipse.wb.internal.gef.graphical.GraphicalViewer;

import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Rectangle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
package org.eclipse.wb.internal.core.gef.policy.layout.absolute;

import org.eclipse.wb.core.model.IAbstractComponentInfo;
import org.eclipse.wb.draw2d.Figure;
import org.eclipse.wb.draw2d.FigureUtils;

import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Rectangle;
Expand Down Expand Up @@ -53,17 +53,16 @@ public DotsFeedback(AbsoluteBasedLayoutEditPolicy<C> layoutEditPolicy, IFigure h
//
////////////////////////////////////////////////////////////////////////////
@Override
protected void paintClientArea(Graphics graphics) {
protected void paintFigure(Graphics graphics) {
// paint dots if needed
if (m_layoutEditPolicy.isShowGridFeedback()) {
Rectangle r = getClientArea();
int gridStepX = m_layoutEditPolicy.getGridStepX();
int gridStepY = m_layoutEditPolicy.getGridStepY();
// paint dots
int x = r.x;
for (int i = 0; i < r.width / gridStepX; i++) {
int y = r.y;
for (int j = 0; j < r.height / gridStepY; j++) {
int x = bounds.x;
for (int i = 0; i < bounds.width / gridStepX; i++) {
int y = bounds.y;
for (int j = 0; j < bounds.height / gridStepY; j++) {
graphics.drawPoint(x, y);
y += gridStepY;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -12,11 +12,9 @@
*******************************************************************************/
package org.eclipse.wb.internal.core.gef.policy.layout.absolute;

import org.eclipse.wb.draw2d.Figure;

import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;

Expand Down Expand Up @@ -59,15 +57,14 @@ public LineEndFigure(int alignment, Color color) {
//
////////////////////////////////////////////////////////////////////////////
@Override
protected void paintClientArea(Graphics graphics) {
protected void paintFigure(Graphics graphics) {
int oldAntialias = graphics.getAntialias();
try {
graphics.setAntialias(SWT.ON);
graphics.setForegroundColor(m_color);
graphics.setBackgroundColor(m_color);
graphics.setLineStyle(SWT.LINE_SOLID);
Rectangle clientArea = getClientArea();
graphics.fillArc(0, 0, clientArea.width, clientArea.height, m_startAngle, m_lengthAngle);
graphics.fillArc(bounds.x, bounds.y, bounds.width, bounds.height, m_startAngle, m_lengthAngle);
} finally {
graphics.setAntialias(oldAntialias);
}
Expand Down
Loading