1
1
/*******************************************************************************
2
- * Copyright (c) 2003, 2024 IBM Corporation and others.
2
+ * Copyright (c) 2003, 2025 IBM Corporation and others.
3
3
*
4
4
* This program and the accompanying materials are made available under the
5
5
* terms of the Eclipse Public License 2.0 which is available at
17
17
18
18
import org .eclipse .jface .resource .ImageDescriptor ;
19
19
20
+ import org .eclipse .draw2d .internal .ImageUtils ;
21
+
20
22
import org .eclipse .gef .palette .CombinedTemplateCreationEntry ;
21
23
import org .eclipse .gef .palette .ConnectionCreationToolEntry ;
22
24
import org .eclipse .gef .palette .MarqueeToolEntry ;
@@ -56,20 +58,26 @@ private static PaletteContainer createComponentsDrawer() {
56
58
57
59
CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry ("Activity" , //$NON-NLS-1$
58
60
"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$
61
65
entries .add (combined );
62
66
63
67
combined = new CombinedTemplateCreationEntry ("Sequential Activity" , "Create a Sequential Activity" , //$NON-NLS-1$ //$NON-NLS-2$
64
68
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$
67
73
entries .add (combined );
68
74
69
75
combined = new CombinedTemplateCreationEntry ("Parallel Activity" , "Create a Parallel Activity" , //$NON-NLS-1$ //$NON-NLS-2$
70
76
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$
73
81
entries .add (combined );
74
82
75
83
drawer .addAll (entries );
@@ -93,8 +101,10 @@ private static PaletteContainer createControlGroup(PaletteRoot root) {
93
101
entries .add (sep );
94
102
95
103
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$
98
108
entries .add (tool );
99
109
controlGroup .addAll (entries );
100
110
return controlGroup ;
0 commit comments