mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 01:35:39 +02:00
Bug 242004 ISVs should be able to position their cPropertyTabs amongst built-in CDT provided tabs
- Tabs should be sorted by 'weight' attribute (as detailed in the extension point documentation)
This commit is contained in:
parent
537b8d2c4c
commit
a39047b78c
3 changed files with 46 additions and 33 deletions
|
@ -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"/>
|
||||
|
|
|
@ -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"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.managedbuilder.ui.properties.ToolSettingsTab"
|
||||
icon="icons/elcl16/config-tool.gif"
|
||||
name="%Tool.settings"
|
||||
weight="001"
|
||||
weight="010"
|
||||
helpId="cdt_u_prop_build_setting_tool"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_BuildSettings"/>
|
||||
<tab
|
||||
|
@ -216,28 +216,28 @@
|
|||
name="%Build.steps"
|
||||
helpId="cdt_u_prop_build_setting_steps"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_BuildSettings"
|
||||
weight="002"/>
|
||||
weight="020"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.managedbuilder.ui.properties.ArtifactTab"
|
||||
icon="icons/obj16/artifact.gif"
|
||||
name="%Build.artifact"
|
||||
helpId="cdt_u_prop_build_setting_artifact"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_BuildSettings"
|
||||
weight="003"/>
|
||||
weight="030"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.managedbuilder.ui.properties.BuilderSettingsTab"
|
||||
icon="icons/obj16/build_settings.gif"
|
||||
name="%Builder.settings"
|
||||
helpId="cdt_u_prop_build"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_head_build"
|
||||
weight="004"/>
|
||||
weight="040"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.managedbuilder.ui.properties.BuildBehaviourTab"
|
||||
icon="icons/obj16/target_obj.gif"
|
||||
name="%WBB.settings"
|
||||
helpId="cdt_u_prop_build"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_head_build"
|
||||
weight="005"/>
|
||||
weight="050"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.managedbuilder.ui.properties.CPropertyVarsTab"
|
||||
name="(Single) CDT Vars (macros)"
|
||||
|
@ -254,7 +254,7 @@
|
|||
class="org.eclipse.cdt.ui.newui.IncludeTab"
|
||||
icon="icons/obj16/hfolder_obj.gif"
|
||||
name="%Includes"
|
||||
weight="001"
|
||||
weight="010"
|
||||
helpId="cdt_u_prop_pns_inc"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_PathAndSymb"
|
||||
tooltip="%Includes.tooltip"/>
|
||||
|
@ -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"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.ui.newui.RefsTab"
|
||||
icon="icons/obj16/search_ref_obj.gif"
|
||||
name="%References"
|
||||
weight="010"
|
||||
weight="100"
|
||||
helpId="cdt_u_prop_pns_ref"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_PathAndSymb"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.ui.newui.CLocationSourceTab"
|
||||
icon="icons/obj16/fldr_obj.gif"
|
||||
name="%Source.location"
|
||||
weight="008"
|
||||
weight="080"
|
||||
helpId="cdt_u_prop_pns_src"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_PathAndSymb"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.managedbuilder.ui.properties.CBuildLocationOutputTab"
|
||||
icon="icons/obj16/output_folder_obj.gif"
|
||||
name="%Output.location"
|
||||
weight="009"
|
||||
weight="090"
|
||||
helpId="cdt_u_prop_pns_out"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_PathAndSymb"/>
|
||||
<tab
|
||||
|
@ -308,26 +308,26 @@
|
|||
name="%Data.hierarchy"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_PathAndSymb"
|
||||
helpId=""
|
||||
weight="012"/>
|
||||
weight="120"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.ui.newui.EnvironmentTab"
|
||||
icon="icons/obj16/environment.gif"
|
||||
name="(Single) Environment"
|
||||
weight="005"
|
||||
weight="050"
|
||||
helpId="cdt_u_prop_build_environment"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_Environment"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.ui.newui.BinaryParsTab"
|
||||
icon="icons/obj16/bin_obj.gif"
|
||||
name="%Binary.parsers"
|
||||
weight="006"
|
||||
weight="060"
|
||||
helpId="cdt_u_prop_build_setting_binparser"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_BuildSettings"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.ui.newui.ErrorParsTab"
|
||||
icon="icons/obj16/error_obj.gif"
|
||||
name="%Error.parsers"
|
||||
weight="007"
|
||||
weight="070"
|
||||
helpId="cdt_u_prop_build_setting_errparser"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_BuildSettings"/>
|
||||
|
||||
|
@ -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"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.managedbuilder.ui.properties.BuildBehaviourTab"
|
||||
icon="icons/obj16/target_obj.gif"
|
||||
name="%WBB.settings"
|
||||
weight="050"
|
||||
helpId="cdt_u_prop_build"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.preferences.PrefPage_NewCDTProject"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.managedbuilder.ui.preferences.PreferredToolchainsTab"
|
||||
name="%Preferred.toolchains"
|
||||
weight="060"
|
||||
helpId="cdt_u_pref_wizard_toolchains"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.preferences.PrefPage_NewCDTWizard"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.managedbuilder.ui.preferences.WizardDefaultsTab"
|
||||
name="%Wizard.defaults"
|
||||
weight="070"
|
||||
helpId="cdt_u_pref_wizard_defaults"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.preferences.PrefPage_NewCDTWizard"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.managedbuilder.ui.preferences.PropertyPageDefsTab"
|
||||
name="%PropertyPage.defaults"
|
||||
weight="080"
|
||||
helpId="cdt_u_pref_prop_pages"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.preferences.PrefPage_PropertyPage"/>
|
||||
<tab
|
||||
class="org.eclipse.cdt.managedbuilder.ui.preferences.PropertyMultiCfgTab"
|
||||
name="%multicfg"
|
||||
weight="090"
|
||||
helpId="cdt_u_pref_multi_cfg"
|
||||
parent="org.eclipse.cdt.managedbuilder.ui.preferences.PrefPage_MultiConfig">
|
||||
</tab>
|
||||
|
|
|
@ -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<IConfigurationElement> elements = new ArrayList<IConfigurationElement>();
|
||||
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$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue