Skip to content

Commit 6152564

Browse files
ptzieglerazoitl
authored andcommitted
Convert Flow icons to SVG
This converts all icons used in the "Flow" example editor with PNGs (for the view contribution) and SVGs (for the GEF icons).
1 parent 49f8bf7 commit 6152564

36 files changed

+1341
-92
lines changed

org.eclipse.draw2d/META-INF/MANIFEST.MF

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Export-Package: org.eclipse.draw2d,
1313
x-friends:="org.eclipse.gef,
1414
org.eclipse.zest.core,
1515
org.eclipse.draw2d.examples,
16-
org.eclipse.draw2d.tests",
16+
org.eclipse.draw2d.tests,
17+
org.eclipse.gef.examples.flow",
1718
org.eclipse.draw2d.parts,
1819
org.eclipse.draw2d.text,
1920
org.eclipse.draw2d.widgets,

org.eclipse.gef.examples.flow/.externalToolBuilders/Build_Example_Zip.launch

Lines changed: 0 additions & 14 deletions
This file was deleted.

org.eclipse.gef.examples.flow/build.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
bin.includes = about.*,\
1414
plugin.xml,\
1515
.,\
16-
*.gif,\
16+
*.png,\
1717
META-INF/,\
1818
plugin.properties
1919
source.. = src/
20-
src.includes = view.gif,\
20+
src.includes = view.png,\
2121
about.html

org.eclipse.gef.examples.flow/buildZip.xml

Lines changed: 0 additions & 60 deletions
This file was deleted.

org.eclipse.gef.examples.flow/plugin.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
default="true"
2121
name="GEF Flow Example"
2222
extensions="flow"
23-
icon="view.gif"
23+
icon="view.png"
2424
class="org.eclipse.gef.examples.flow.ui.FlowEditor"
2525
contributorClass="org.eclipse.gef.examples.flow.actions.FlowActionBarContributor"
2626
id="GEF Flow Editor">
@@ -35,7 +35,7 @@
3535
</category>
3636
<wizard
3737
name="Flow Diagram"
38-
icon="view.gif"
38+
icon="view.png"
3939
category="org.eclipse.ui.Examples/org.eclipse.gef.examples"
4040
class="org.eclipse.gef.examples.flow.ui.FlowCreationWizard"
4141
id="org.eclipse.gef.examples.flow.wizard.new.file">

org.eclipse.gef.examples.flow/src/org/eclipse/gef/examples/flow/FlowEditorPaletteFactory.java

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2003, 2024 IBM Corporation and others.
2+
* Copyright (c) 2003, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -17,6 +17,8 @@
1717

1818
import org.eclipse.jface.resource.ImageDescriptor;
1919

20+
import org.eclipse.draw2d.internal.ImageUtils;
21+
2022
import org.eclipse.gef.palette.CombinedTemplateCreationEntry;
2123
import org.eclipse.gef.palette.ConnectionCreationToolEntry;
2224
import org.eclipse.gef.palette.MarqueeToolEntry;
@@ -56,20 +58,26 @@ private static PaletteContainer createComponentsDrawer() {
5658

5759
CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry("Activity", //$NON-NLS-1$
5860
"Create a new Activity Node", Activity.class, new SimpleFactory<>(Activity.class), //$NON-NLS-1$
59-
ImageDescriptor.createFromFile(FlowPlugin.class, "images/gear16.gif"), //$NON-NLS-1$
60-
ImageDescriptor.createFromFile(Activity.class, "images/gear16.gif")); //$NON-NLS-1$
61+
ImageDescriptor.createFromFile(FlowPlugin.class,
62+
ImageUtils.getEffectiveFileName("images/gear16.svg")), //$NON-NLS-1$
63+
ImageDescriptor.createFromFile(Activity.class,
64+
ImageUtils.getEffectiveFileName("images/gear24.svg"))); //$NON-NLS-1$
6165
entries.add(combined);
6266

6367
combined = new CombinedTemplateCreationEntry("Sequential Activity", "Create a Sequential Activity", //$NON-NLS-1$ //$NON-NLS-2$
6468
SequentialActivity.class, new SimpleFactory<>(SequentialActivity.class),
65-
ImageDescriptor.createFromFile(FlowPlugin.class, "images/sequence16.gif"), //$NON-NLS-1$
66-
ImageDescriptor.createFromFile(FlowPlugin.class, "images/sequence16.gif")); //$NON-NLS-1$
69+
ImageDescriptor.createFromFile(FlowPlugin.class,
70+
ImageUtils.getEffectiveFileName("images/sequence16.svg")), //$NON-NLS-1$
71+
ImageDescriptor.createFromFile(FlowPlugin.class,
72+
ImageUtils.getEffectiveFileName("images/sequence24.svg"))); //$NON-NLS-1$
6773
entries.add(combined);
6874

6975
combined = new CombinedTemplateCreationEntry("Parallel Activity", "Create a Parallel Activity", //$NON-NLS-1$ //$NON-NLS-2$
7076
ParallelActivity.class, new SimpleFactory<>(ParallelActivity.class),
71-
ImageDescriptor.createFromFile(FlowPlugin.class, "images/parallel16.gif"), //$NON-NLS-1$
72-
ImageDescriptor.createFromFile(FlowPlugin.class, "images/parallel16.gif")); //$NON-NLS-1$
77+
ImageDescriptor.createFromFile(FlowPlugin.class,
78+
ImageUtils.getEffectiveFileName("images/parallel16.svg")), //$NON-NLS-1$
79+
ImageDescriptor.createFromFile(FlowPlugin.class,
80+
ImageUtils.getEffectiveFileName("images/parallel24.svg"))); //$NON-NLS-1$
7381
entries.add(combined);
7482

7583
drawer.addAll(entries);
@@ -93,8 +101,10 @@ private static PaletteContainer createControlGroup(PaletteRoot root) {
93101
entries.add(sep);
94102

95103
tool = new ConnectionCreationToolEntry("Connection Creation", "Creating connections", null, //$NON-NLS-1$ //$NON-NLS-2$
96-
ImageDescriptor.createFromFile(FlowPlugin.class, "images/connection16.gif"), //$NON-NLS-1$
97-
ImageDescriptor.createFromFile(Activity.class, "images/connection16.gif")); //$NON-NLS-1$
104+
ImageDescriptor.createFromFile(FlowPlugin.class,
105+
ImageUtils.getEffectiveFileName("images/connection16.svg")), //$NON-NLS-1$
106+
ImageDescriptor.createFromFile(FlowPlugin.class,
107+
ImageUtils.getEffectiveFileName("images/connection24.svg"))); //$NON-NLS-1$
98108
entries.add(tool);
99109
controlGroup.addAll(entries);
100110
return controlGroup;

org.eclipse.gef.examples.flow/src/org/eclipse/gef/examples/flow/FlowImages.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2003, 2024 IBM Corporation and others.
2+
* Copyright (c) 2003, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -16,12 +16,15 @@
1616

1717
import org.eclipse.jface.resource.ImageDescriptor;
1818

19+
import org.eclipse.draw2d.internal.ImageUtils;
20+
1921
/**
2022
* @author hudsonr
2123
*/
2224
public class FlowImages {
2325

24-
public static final Image GEAR = ImageDescriptor.createFromFile(FlowPlugin.class, "images/gear.gif") //$NON-NLS-1$
26+
public static final Image GEAR = ImageDescriptor
27+
.createFromFile(FlowPlugin.class, ImageUtils.getEffectiveFileName("images/gear16.svg")) //$NON-NLS-1$
2528
.createImage(true);
2629

2730
private FlowImages() {
-512 Bytes
Binary file not shown.
-172 Bytes
Binary file not shown.
197 Bytes
Loading

0 commit comments

Comments
 (0)