diff options
author | Alain Magloire | 2005-05-09 16:11:08 +0000 |
---|---|---|
committer | Alain Magloire | 2005-05-09 16:11:08 +0000 |
commit | ecd91d8fe31444d39ea23459dd6f31c949bfc26b (patch) | |
tree | 43c6a5d27c92a18ffded09f7f8a3a6032dd163ca | |
parent | 5bde16a1f94ebe5b52d4d065b2aa5f7315b62cb3 (diff) | |
download | org.eclipse.cdt-ecd91d8fe31444d39ea23459dd6f31c949bfc26b.tar.gz org.eclipse.cdt-ecd91d8fe31444d39ea23459dd6f31c949bfc26b.tar.xz org.eclipse.cdt-ecd91d8fe31444d39ea23459dd6f31c949bfc26b.zip |
2005-05-09 Alain Magloire
Patch from David Daoust, PR 94120
* src/org/eclipse/cdt/internal/ui/wizards/CWizardRegistry.java
-rw-r--r-- | core/org.eclipse.cdt.ui/ChangeLog | 4 | ||||
-rw-r--r-- | core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/CWizardRegistry.java | 25 |
2 files changed, 19 insertions, 10 deletions
diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog index 76f72ae2073..036caa4adae 100644 --- a/core/org.eclipse.cdt.ui/ChangeLog +++ b/core/org.eclipse.cdt.ui/ChangeLog @@ -1,3 +1,7 @@ +2005-05-09 Alain Magloire + Patch from David Daoust, PR 94120 + * src/org/eclipse/cdt/internal/ui/wizards/CWizardRegistry.java + 2005-05-06 Alain Magloire PR 93902 to fix warnings. * plugin.xml diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/CWizardRegistry.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/CWizardRegistry.java index e2b19534ec6..f0d5ae996a3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/CWizardRegistry.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/CWizardRegistry.java @@ -17,7 +17,6 @@ import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.Platform; import org.eclipse.jface.action.IAction; import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.internal.IWorkbenchConstants; /** * Convenience class for drop-in C/C++ Wizard contributions. @@ -35,6 +34,12 @@ public class CWizardRegistry { private final static String ATT_CFOLDER = "cfolder";//$NON-NLS-1$ private final static String ATT_CPROJECT = "cproject";//$NON-NLS-1$ private final static String ATT_CCPROJECT = "ccproject";//$NON-NLS-1$ + private final static String TAG_CLASS = "class"; //$NON-NLS-1$ + private final static String TAG_ID = "id"; //$NON-NLS-1$ + private final static String PL_NEW = "newWizards"; //$NON-NLS-1$ + + + /** * Checks if wizard supports C projects. @@ -104,7 +109,7 @@ public class CWizardRegistry { return Boolean.valueOf(project).booleanValue(); } - IConfigurationElement[] classElements = element.getChildren(IWorkbenchConstants.TAG_CLASS); + IConfigurationElement[] classElements = element.getChildren(TAG_CLASS); if (classElements.length > 0) { for (int i = 0; i < classElements.length; i++) { IConfigurationElement[] paramElements = classElements[i].getChildren(TAG_PARAMETER); @@ -167,7 +172,7 @@ public class CWizardRegistry { } private static boolean isTypeWizard(IConfigurationElement element) { - IConfigurationElement[] classElements = element.getChildren(IWorkbenchConstants.TAG_CLASS); + IConfigurationElement[] classElements = element.getChildren(TAG_CLASS); if (classElements.length > 0) { for (int i = 0; i < classElements.length; i++) { IConfigurationElement[] paramElements = classElements[i].getChildren(TAG_PARAMETER); @@ -228,7 +233,7 @@ public class CWizardRegistry { } private static boolean isFileWizard(IConfigurationElement element) { - IConfigurationElement[] classElements = element.getChildren(IWorkbenchConstants.TAG_CLASS); + IConfigurationElement[] classElements = element.getChildren(TAG_CLASS); if (classElements.length > 0) { for (int i = 0; i < classElements.length; i++) { IConfigurationElement[] paramElements = classElements[i].getChildren(TAG_PARAMETER); @@ -289,7 +294,7 @@ public class CWizardRegistry { } private static boolean isFolderWizard(IConfigurationElement element) { - IConfigurationElement[] classElements = element.getChildren(IWorkbenchConstants.TAG_CLASS); + IConfigurationElement[] classElements = element.getChildren(TAG_CLASS); if (classElements.length > 0) { for (int i = 0; i < classElements.length; i++) { IConfigurationElement[] paramElements = classElements[i].getChildren(TAG_PARAMETER); @@ -318,7 +323,7 @@ public class CWizardRegistry { for (int i = 0; i < elements.length; ++i) { IConfigurationElement element= elements[i]; if (isCProjectWizard(element)) { - String id = element.getAttribute(IWorkbenchConstants.TAG_ID); + String id = element.getAttribute(TAG_ID); if (id != null && !idList.contains(id)) { idList.add(id); } @@ -328,7 +333,7 @@ public class CWizardRegistry { for (int i = 0; i < elements.length; ++i) { IConfigurationElement element= elements[i]; if (isCCProjectWizard(element)) { - String id = element.getAttribute(IWorkbenchConstants.TAG_ID); + String id = element.getAttribute(TAG_ID); if (id != null && !idList.contains(id)) { idList.add(id); } @@ -346,7 +351,7 @@ public class CWizardRegistry { for (int i = 0; i < elements.length; ++i) { IConfigurationElement element = elements[i]; if (isCProjectWizard(element)) { - String id = element.getAttribute(IWorkbenchConstants.TAG_ID); + String id = element.getAttribute(TAG_ID); if (id != null && !idList.contains(id)) { idList.add(id); IAction action = new OpenNewWizardAction(element); @@ -360,7 +365,7 @@ public class CWizardRegistry { for (int i = 0; i < elements.length; ++i) { IConfigurationElement element = elements[i]; if (isCCProjectWizard(element)) { - String id = element.getAttribute(IWorkbenchConstants.TAG_ID); + String id = element.getAttribute(TAG_ID); if (id != null && !idList.contains(id)) { idList.add(id); IAction action = new OpenNewWizardAction(element); @@ -390,7 +395,7 @@ public class CWizardRegistry { */ public static IConfigurationElement[] getAllWizardElements() { List elemList = new ArrayList(); - IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(PlatformUI.PLUGIN_ID, IWorkbenchConstants.PL_NEW); + IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(PlatformUI.PLUGIN_ID, PL_NEW); if (extensionPoint != null) { IConfigurationElement[] elements = extensionPoint.getConfigurationElements(); for (int i = 0; i < elements.length; i++) { |