diff --git a/build/org.eclipse.cdt.make.ui/plugin.xml b/build/org.eclipse.cdt.make.ui/plugin.xml index 48bc6d1943c..fd55394ef24 100644 --- a/build/org.eclipse.cdt.make.ui/plugin.xml +++ b/build/org.eclipse.cdt.make.ui/plugin.xml @@ -436,7 +436,7 @@ class="org.eclipse.cdt.ui.newui.IncludeTab" name="%Includes" icon="icons/obj16/hfolder_obj.gif" - weight="001" + weight="010" helpId="cdt_u_prop_pns_inc" parent="org.eclipse.cdt.make.internal.ui.properties.PathAndSymbolPage" tooltip="%Includes.tooltip"/> @@ -444,7 +444,7 @@ class="org.eclipse.cdt.ui.newui.SymbolTab" name="%Symbols" icon="icons/obj16/define_obj.gif" - weight="002" + weight="020" helpId="cdt_u_prop_pns_sym" parent="org.eclipse.cdt.make.internal.ui.properties.PathAndSymbolPage" tooltip="%Symbols.tooltip"/> diff --git a/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml b/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml index 2c99f17cac2..5c80786ecf6 100644 --- a/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml +++ b/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml @@ -200,14 +200,14 @@ class="org.eclipse.cdt.managedbuilder.ui.properties.DiscoveryTab" icon="icons/elcl16/discovery.gif" name="(Single) Discovery.options" - weight="005" + weight="050" helpId="cdt_u_prop_build_discovery" parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_Discovery"/> + weight="020"/> + weight="030"/> + weight="040"/> + weight="050"/> @@ -262,7 +262,7 @@ class="org.eclipse.cdt.ui.newui.SymbolTab" icon="icons/obj16/define_obj.gif" name="%Symbols" - weight="002" + weight="020" helpId="cdt_u_prop_pns_sym" parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_PathAndSymb" tooltip="%Symbols.tooltip"/> @@ -270,7 +270,7 @@ class="org.eclipse.cdt.ui.newui.LibraryTab" icon="icons/obj16/lib_obj.gif" name="%Libraries" - weight="003" + weight="030" helpId="cdt_u_prop_pns_lib" parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_PathAndSymb" tooltip="%Libraries.tooltip"/> @@ -278,28 +278,28 @@ class="org.eclipse.cdt.ui.newui.LibraryPathTab" icon="icons/obj16/opentype.gif" name="%Library.paths" - weight="004" + weight="040" helpId="cdt_u_prop_pns_libpath" parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_PathAndSymb"/> + weight="120"/> @@ -336,6 +336,7 @@ class="org.eclipse.cdt.ui.newui.ExpIncludeTab" icon="icons/obj16/hfolder_obj.gif" name="%Includes" + weight="010" helpId="cdt_u_prop_exp" parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_ExpPathAndSymb" tooltip="%Includes.tooltip"/> @@ -343,6 +344,7 @@ class="org.eclipse.cdt.ui.newui.ExpSymbolTab" icon="icons/obj16/define_obj.gif" name="%Symbols" + weight="020" parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_ExpPathAndSymb" helpId="cdt_u_prop_exp" tooltip="%Symbols.tooltip"/> @@ -350,6 +352,7 @@ class="org.eclipse.cdt.ui.newui.ExpLibraryTab" icon="icons/obj16/lib_obj.gif" name="%Libraries" + weight="030" parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_ExpPathAndSymb" helpId="cdt_u_prop_exp" tooltip="%Libraries.tooltip"/> @@ -357,6 +360,7 @@ class="org.eclipse.cdt.ui.newui.ExpLibraryPathTab" icon="icons/obj16/opentype.gif" name="%Library.paths" + weight="040" helpId="cdt_u_prop_exp" parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_ExpPathAndSymb"/> @@ -376,6 +380,7 @@ class="org.eclipse.cdt.ui.newui.BinaryParsTab" name="%Binary.parsers" icon="icons/obj16/bin_obj.gif" + weight="010" helpId="cdt_u_prop_build_setting_binparser" parent="org.eclipse.cdt.managedbuilder.ui.preferences.PrefPage_NewCDTProject" /> @@ -383,6 +388,7 @@ class="org.eclipse.cdt.ui.newui.ErrorParsTab" name="%Error.parsers" icon="icons/obj16/error_obj.gif" + weight="020" helpId="cdt_u_prop_build_setting_errparser" parent="org.eclipse.cdt.managedbuilder.ui.preferences.PrefPage_NewCDTProject" /> @@ -390,6 +396,7 @@ class="org.eclipse.cdt.managedbuilder.ui.properties.DiscoveryTab" icon="icons/elcl16/discovery.gif" name="%Discovery.options" + weight="030" helpId="cdt_u_prop_build_discovery" parent="org.eclipse.cdt.managedbuilder.ui.preferences.PrefPage_NewCDTProject" /> @@ -397,32 +404,38 @@ class="org.eclipse.cdt.managedbuilder.ui.properties.BuilderSettingsTab" icon="icons/obj16/build_settings.gif" name="%Builder.settings" + weight="040" helpId="cdt_u_prop_build" parent="org.eclipse.cdt.managedbuilder.ui.preferences.PrefPage_NewCDTProject"/> diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java index 9321db0194c..fac391600ee 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java @@ -19,7 +19,9 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.Iterator; +import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; @@ -1018,26 +1020,24 @@ implements return (s == null) ? EMPTY_STR : s; } - private synchronized void loadExtensionsSynchronized(Composite parent) - { + private synchronized void loadExtensionsSynchronized(Composite parent) { // Get the extensions IExtensionPoint extensionPoint = Platform.getExtensionRegistry() .getExtensionPoint(EXTENSION_POINT_ID); if (extensionPoint == null) return; IExtension[] extensions = extensionPoint.getExtensions(); if (extensions == null) return; - - for (int i = 0; i < extensions.length; ++i) { - IConfigurationElement[] elements = extensions[i].getConfigurationElements(); - - Arrays.sort(elements, CDTListComparator.getInstance()); - - for (IConfigurationElement element2 : elements) { - if (element2.getName().equals(ELEMENT_NAME)) { - if (loadTab(element2, parent)) return; - } else { - System.out.println(UIMessages.getString("AbstractPage.13") + element2.getName()); //$NON-NLS-1$ - } + + List elements = new ArrayList(); + for (IExtension ext : extensions) + elements.addAll(Arrays.asList(ext.getConfigurationElements())); + Collections.sort(elements, CDTUIListComparator.getInstance()); + + for (IConfigurationElement element : elements) { + if (element.getName().equals(ELEMENT_NAME)) { + if (loadTab(element, parent)) return; + } else { + System.out.println(UIMessages.getString("AbstractPage.13") + element.getName()); //$NON-NLS-1$ } } }