Mercurial > hg > de.codedo.java.editor
annotate src/de/codedo/java/editor/Activator.java @ 9:935df68696c0 default tip
Reflection Code in eigene Klasse verschoben.
author | Dirk Olmes <dirk.olmes@codedo.de> |
---|---|
date | Thu, 15 Oct 2020 12:05:06 +0200 |
parents | f7d908568cfc |
children |
rev | line source |
---|---|
0
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
1 package de.codedo.java.editor; |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
2 |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
3 import org.eclipse.ui.plugin.AbstractUIPlugin; |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
4 import org.osgi.framework.BundleContext; |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
5 |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
6 /** |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
7 * The activator class controls the plug-in life cycle |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
8 */ |
1
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
9 public class Activator extends AbstractUIPlugin |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
10 { |
0
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
11 // The plug-in ID |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
12 public static final String PLUGIN_ID = "de.codedo.java.editor"; //$NON-NLS-1$ |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
13 |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
14 // The shared instance |
1
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
15 private static Activator Plugin; |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
16 |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
17 private CodedoJavaElementImageProvider _javaElementImageProvider; |
0
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
18 |
1
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
19 public static Activator getDefault() |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
20 { |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
21 return Plugin; |
0
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
22 } |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
23 |
1
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
24 public void start(BundleContext context) throws Exception |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
25 { |
0
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
26 super.start(context); |
1
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
27 Plugin = this; |
0
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
28 } |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
29 |
1
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
30 public void stop(BundleContext context) throws Exception |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
31 { |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
32 Plugin = null; |
0
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
33 super.stop(context); |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
34 } |
1
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
35 |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
36 public synchronized CodedoJavaElementImageProvider getJavaElementImageProvider() |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
37 { |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
38 if (_javaElementImageProvider == null) |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
39 { |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
40 _javaElementImageProvider = new CodedoJavaElementImageProvider(); |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
41 } |
f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
42 return _javaElementImageProvider; |
0
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
43 } |
ca07a15b6cc8
created a plugin that allows to set a custom icon on a java editor
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
44 } |