Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.core.variables/plugin.xml2
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java6
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/variables/VariablesPlugin.java17
-rw-r--r--org.eclipse.ui.console/plugin.xml2
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java21
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java10
6 files changed, 21 insertions, 37 deletions
diff --git a/org.eclipse.core.variables/plugin.xml b/org.eclipse.core.variables/plugin.xml
index 59c9bb433..b9e24835f 100644
--- a/org.eclipse.core.variables/plugin.xml
+++ b/org.eclipse.core.variables/plugin.xml
@@ -14,7 +14,7 @@
</library>
</runtime>
<requires>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
+ <import plugin="org.eclipse.core.runtime"/>
</requires>
<extension-point id="valueVariables" name="%valueVariablesExtensionPointName" schema="schema/valueVariables.exsd"/>
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
index 41e66ddd8..4c0241d9d 100644
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
+++ b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
@@ -203,7 +203,7 @@ public class StringVariableManager implements IStringVariableManager {
* Loads contributed dynamic variables
*/
private void loadDynamicVariables() {
- IExtensionPoint point= VariablesPlugin.getDefault().getDescriptor().getExtensionPoint(EXTENSION_POINT_DYNAMIC_VARIABLES);
+ IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(VariablesPlugin.PI_CORE_VARIABLES, EXTENSION_POINT_DYNAMIC_VARIABLES);
IConfigurationElement elements[]= point.getConfigurationElements();
for (int i = 0; i < elements.length; i++) {
IConfigurationElement element = elements[i];
@@ -271,7 +271,7 @@ public class StringVariableManager implements IStringVariableManager {
* merged with existing persisted values.
*/
private void loadContributedValueVariables() {
- IExtensionPoint point= VariablesPlugin.getDefault().getDescriptor().getExtensionPoint(EXTENSION_POINT_VALUE_VARIABLES);
+ IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(VariablesPlugin.PI_CORE_VARIABLES, EXTENSION_POINT_VALUE_VARIABLES);
IConfigurationElement elements[]= point.getConfigurationElements();
for (int i = 0; i < elements.length; i++) {
IConfigurationElement element = elements[i];
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/variables/VariablesPlugin.java b/org.eclipse.core.variables/src/org/eclipse/core/variables/VariablesPlugin.java
index 0756a5455..fa82ad928 100644
--- a/org.eclipse.core.variables/src/org/eclipse/core/variables/VariablesPlugin.java
+++ b/org.eclipse.core.variables/src/org/eclipse/core/variables/VariablesPlugin.java
@@ -12,7 +12,6 @@
package org.eclipse.core.variables;
import org.eclipse.core.internal.variables.StringVariableManager;
-import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
@@ -52,12 +51,9 @@ public class VariablesPlugin extends Plugin {
* when the facilities provided by the Variables plug-in are required.
* <b>Clients must never explicitly instantiate a plug-in runtime class.</b>
* </p>
- *
- * @param pluginDescriptor the plug-in descriptor for the
- * Variables plug-in
*/
- public VariablesPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
+ public VariablesPlugin() {
+ super();
plugin = this;
}
@@ -102,13 +98,7 @@ public class VariablesPlugin extends Plugin {
* Convenience method which returns the unique identifier of this plugin.
*/
public static String getUniqueIdentifier() {
- if (getDefault() == null) {
- // If the default instance is not yet initialized,
- // return a static identifier. This identifier must
- // match the plugin id defined in plugin.xml
- return PI_CORE_VARIABLES;
- }
- return getDefault().getDescriptor().getUniqueIdentifier();
+ return PI_CORE_VARIABLES;
}
/**
@@ -119,5 +109,4 @@ public class VariablesPlugin extends Plugin {
public IStringVariableManager getStringVariableManager() {
return StringVariableManager.getDefault();
}
-
}
diff --git a/org.eclipse.ui.console/plugin.xml b/org.eclipse.ui.console/plugin.xml
index db7e2bd63..a74f13a05 100644
--- a/org.eclipse.ui.console/plugin.xml
+++ b/org.eclipse.ui.console/plugin.xml
@@ -19,7 +19,7 @@
<import plugin="org.eclipse.jface.text"/>
<import plugin="org.eclipse.help"/>
<import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
+ <import plugin="org.eclipse.core.runtime"/>
</requires>
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java
index 910bb6f93..5446acf8b 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
@@ -12,7 +12,6 @@
package org.eclipse.ui.console;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
@@ -38,6 +37,12 @@ public class ConsolePlugin extends AbstractUIPlugin {
* The singleton console plugin instance
*/
private static ConsolePlugin fgPlugin= null;
+
+ /**
+ * Unique identifier constant (value <code>"org.eclipse.ui.console"</code>)
+ * for the UI Console plug-in.
+ */
+ private static final String PI_UI_CONSOLE = "org.eclipse.ui.console"; //$NON-NLS-1$
/**
* Returns the singleton instance of the console plugin.
@@ -46,8 +51,8 @@ public class ConsolePlugin extends AbstractUIPlugin {
return fgPlugin;
}
- public ConsolePlugin(IPluginDescriptor descriptor) {
- super(descriptor);
+ public ConsolePlugin() {
+ super();
fgPlugin = this;
}
@@ -55,13 +60,7 @@ public class ConsolePlugin extends AbstractUIPlugin {
* Convenience method which returns the unique identifier of this plugin.
*/
public static String getUniqueIdentifier() {
- if (getDefault() == null) {
- // If the default instance is not yet initialized,
- // return a static identifier. This identifier must
- // match the plugin id defined in plugin.xml
- return "org.eclipse.ui.console"; //$NON-NLS-1$
- }
- return getDefault().getDescriptor().getUniqueIdentifier();
+ return PI_UI_CONSOLE;
}
/**
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java
index 56996d719..ced5ab90a 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java
@@ -14,6 +14,7 @@ package org.eclipse.ui.internal.console;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
+import java.util.Map;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
@@ -34,19 +35,14 @@ public class ConsolePluginImages {
/**
* A table of all the <code>ImageDescriptor</code>s.
*/
- private static HashMap imageDescriptors;
+ private static Map imageDescriptors;
/* Declare Common paths */
private static URL ICON_BASE_URL= null;
static {
String pathSuffix = "icons/full/"; //$NON-NLS-1$
-
- try {
- ICON_BASE_URL= new URL(ConsolePlugin.getDefault().getDescriptor().getInstallURL(), pathSuffix);
- } catch (MalformedURLException e) {
- // do nothing
- }
+ ICON_BASE_URL= ConsolePlugin.getDefault().getBundle().getEntry(pathSuffix);
}
// Use IPath and toOSString to build the names to ensure they have the slashes correct

Back to the top