Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8321476

Browse files
committedApr 4, 2025·
Use getInstance() instead of INSTANCE for access to singleton Plugins
1 parent a8434ca commit 8321476

File tree

146 files changed

+453
-434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+453
-434
lines changed
 

‎com.archimatetool.canvas/src/com/archimatetool/canvas/CanvasEditorPlugin.java

+10-5
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,23 @@ public class CanvasEditorPlugin extends AbstractUIPlugin {
2222

2323
public static final String PLUGIN_ID = "com.archimatetool.canvas"; //$NON-NLS-1$
2424

25-
/**
26-
* The shared instance
27-
*/
28-
public static CanvasEditorPlugin INSTANCE;
25+
// The shared instance
26+
private static CanvasEditorPlugin instance;
2927

3028
/**
3129
* The File location of this plugin folder
3230
*/
3331
private static File fPluginFolder;
3432

33+
/**
34+
* @return the shared instance
35+
*/
36+
public static CanvasEditorPlugin getInstance() {
37+
return instance;
38+
}
39+
3540
public CanvasEditorPlugin() {
36-
INSTANCE = this;
41+
instance = this;
3742
}
3843

3944
/**

‎com.archimatetool.canvas/src/com/archimatetool/canvas/ICanvasImages.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
public interface ICanvasImages {
1919

20-
ImageFactory ImageFactory = new ImageFactory(CanvasEditorPlugin.INSTANCE);
20+
ImageFactory ImageFactory = new ImageFactory(CanvasEditorPlugin.getInstance());
2121

2222
String IMGPATH = "img/"; //$NON-NLS-1$
2323

0 commit comments

Comments
 (0)