diff options
author | kmoore | 2007-08-02 20:26:15 +0000 |
---|---|---|
committer | kmoore | 2007-08-02 20:26:15 +0000 |
commit | e1466744902211c5c17e41e2fe4a05928f5b5142 (patch) | |
tree | 02d871fc91f13affe3e46be4462935833739d939 /jpa | |
parent | 0b7d19ada68e581eb820b25b3bfd0c4eb7ad46fe (diff) | |
download | webtools.dali-e1466744902211c5c17e41e2fe4a05928f5b5142.tar.gz webtools.dali-e1466744902211c5c17e41e2fe4a05928f5b5142.tar.xz webtools.dali-e1466744902211c5c17e41e2fe4a05928f5b5142.zip |
some cleaning up of api and singletons
Diffstat (limited to 'jpa')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaPlatformRegistry.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaPlatformRegistry.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaPlatformRegistry.java index 7e396d832f..02346a981b 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaPlatformRegistry.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaPlatformRegistry.java @@ -25,8 +25,15 @@ import org.eclipse.jpt.utility.internal.iterators.TransformationIterator; public class JpaPlatformRegistry { - public static final JpaPlatformRegistry INSTANCE = new JpaPlatformRegistry(); + private static final JpaPlatformRegistry INSTANCE = new JpaPlatformRegistry(); + /** + * Return the singleton. + */ + public static JpaPlatformRegistry instance() { + return INSTANCE; + } + private static final String EXTENSION_ID = "jpaPlatform"; //$NON-NLS-1$ @@ -98,7 +105,7 @@ public class JpaPlatformRegistry * IJpaProject, either when creating the project, or when changing the * platform. */ - public IJpaPlatform getJpaPlatform(String id) { + public IJpaPlatform jpaPlatform(String id) { IConfigurationElement registeredConfigElement = this.jpaPlatforms.get(id); if (registeredConfigElement == null) { @@ -129,7 +136,7 @@ public class JpaPlatformRegistry * Return the label for the platform with the given id. * This does not load the platform's plugin classes. */ - public String getJpaPlatformLabel(String id) { + public String jpaPlatformLabel(String id) { return jpaPlatforms.get(id).getAttribute(AT_LABEL); } |