Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestExtSettingsProvider.java')
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestExtSettingsProvider.java131
1 files changed, 36 insertions, 95 deletions
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestExtSettingsProvider.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestExtSettingsProvider.java
index c0464a9f703..7fa6afa9d09 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestExtSettingsProvider.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestExtSettingsProvider.java
@@ -25,120 +25,61 @@ public class TestExtSettingsProvider extends CExternalSettingProvider {
public static final String TEST_EXTERNAL_PROVIDER_ID = CTestPlugin.PLUGIN_ID + ".testExtSettingsProvider";
- private static CExternalSetting[] SETTINGS_1 = new CExternalSetting[]{
- new CExternalSetting(null, null, null, new ICSettingEntry[]{
- new CIncludePathEntry("ip_a", 0),
- new CIncludePathEntry("ip_b", 0),
- new CIncludeFileEntry("if_a", 0),
- new CIncludeFileEntry("if_b", 0),
- new CMacroEntry("m_a", "mv_a", 0),
- new CMacroEntry("m_b", "mv_b", 0),
- new CMacroFileEntry("mf_a", 0),
- new CMacroFileEntry("mf_b", 0),
- new CLibraryPathEntry("lp_a", 0),
- new CLibraryPathEntry("lp_b", 0),
- new CLibraryFileEntry("lf_a", 0),
- new CLibraryFileEntry("lf_b", 0),
- new CSourceEntry("sp_a", null, 0),
- new CSourceEntry("sp_b", null, 0),
- new COutputEntry("op_a", null, 0),
- new COutputEntry("op_b", null, 0),
- })
- };
+ private static CExternalSetting[] SETTINGS_1 = new CExternalSetting[] { new CExternalSetting(null, null, null,
+ new ICSettingEntry[] { new CIncludePathEntry("ip_a", 0), new CIncludePathEntry("ip_b", 0),
+ new CIncludeFileEntry("if_a", 0), new CIncludeFileEntry("if_b", 0),
+ new CMacroEntry("m_a", "mv_a", 0), new CMacroEntry("m_b", "mv_b", 0),
+ new CMacroFileEntry("mf_a", 0), new CMacroFileEntry("mf_b", 0), new CLibraryPathEntry("lp_a", 0),
+ new CLibraryPathEntry("lp_b", 0), new CLibraryFileEntry("lf_a", 0),
+ new CLibraryFileEntry("lf_b", 0), new CSourceEntry("sp_a", null, 0),
+ new CSourceEntry("sp_b", null, 0), new COutputEntry("op_a", null, 0),
+ new COutputEntry("op_b", null, 0), }) };
- private static CExternalSetting[] SETTINGS_2 = new CExternalSetting[]{
- new CExternalSetting(null, null, null, new ICSettingEntry[]{
- new CIncludePathEntry("ip_a2", 0),
- new CIncludePathEntry("ip_b2", 0),
- new CIncludeFileEntry("if_a2", 0),
- new CIncludeFileEntry("if_b2", 0),
- new CMacroEntry("m_a2", "mv_a2", 0),
- new CMacroEntry("m_b2", "mv_b2", 0),
- new CMacroFileEntry("mf_a2", 0),
- new CMacroFileEntry("mf_b2", 0),
- new CLibraryPathEntry("lp_a2", 0),
- new CLibraryPathEntry("lp_b2", 0),
- new CLibraryFileEntry("lf_a2", 0),
- new CLibraryFileEntry("lf_b2", 0),
- new CSourceEntry("sp_a2", null, 0),
- new CSourceEntry("sp_b2", null, 0),
- new COutputEntry("op_a2", null, 0),
- new COutputEntry("op_b2", null, 0),
- })
- };
+ private static CExternalSetting[] SETTINGS_2 = new CExternalSetting[] { new CExternalSetting(null, null, null,
+ new ICSettingEntry[] { new CIncludePathEntry("ip_a2", 0), new CIncludePathEntry("ip_b2", 0),
+ new CIncludeFileEntry("if_a2", 0), new CIncludeFileEntry("if_b2", 0),
+ new CMacroEntry("m_a2", "mv_a2", 0), new CMacroEntry("m_b2", "mv_b2", 0),
+ new CMacroFileEntry("mf_a2", 0), new CMacroFileEntry("mf_b2", 0), new CLibraryPathEntry("lp_a2", 0),
+ new CLibraryPathEntry("lp_b2", 0), new CLibraryFileEntry("lf_a2", 0),
+ new CLibraryFileEntry("lf_b2", 0), new CSourceEntry("sp_a2", null, 0),
+ new CSourceEntry("sp_b2", null, 0), new COutputEntry("op_a2", null, 0),
+ new COutputEntry("op_b2", null, 0), }) };
- private static CExternalSetting[] SETTINGS_3 = new CExternalSetting[]{
- new CExternalSetting(
- new String[]{
- "org.eclipse.cdt.core.assembly"
- },
- null, null,
- new ICSettingEntry[]{
- new CMacroEntry("m_c", "mv_c", 0)
- }
- )
- };
+ private static CExternalSetting[] SETTINGS_3 = new CExternalSetting[] {
+ new CExternalSetting(new String[] { "org.eclipse.cdt.core.assembly" }, null, null,
+ new ICSettingEntry[] { new CMacroEntry("m_c", "mv_c", 0) }) };
- private static CExternalSetting[] SETTINGS_4 = new CExternalSetting[]{
- new CExternalSetting(
- new String[]{
- "org.eclipse.cdt.core.assembly",
- "org.eclipse.cdt.core.gcc"
- },
- null, null,
- new ICSettingEntry[]{
- new CMacroEntry("m_c", "mv_c", 0)
- }
- )
- };
+ private static CExternalSetting[] SETTINGS_4 = new CExternalSetting[] {
+ new CExternalSetting(new String[] { "org.eclipse.cdt.core.assembly", "org.eclipse.cdt.core.gcc" }, null,
+ null, new ICSettingEntry[] { new CMacroEntry("m_c", "mv_c", 0) }) };
- private static CExternalSetting[] SETTINGS_5 = new CExternalSetting[]{
- new CExternalSetting(
- new String[]{
- "org.eclipse.cdt.core.g++"
- },
- null, null,
- new ICSettingEntry[]{
- new CMacroEntry("THE_MACRO", "", 0)
- }
- ),
- new CExternalSetting(
- new String[]{
- "org.eclipse.cdt.core.assembly"
- },
- null, null,
- new ICSettingEntry[]{
- new CMacroEntry("THE_MACRO", "TheValue", 0)
- }
- )
- };
+ private static CExternalSetting[] SETTINGS_5 = new CExternalSetting[] {
+ new CExternalSetting(new String[] { "org.eclipse.cdt.core.g++" }, null, null,
+ new ICSettingEntry[] { new CMacroEntry("THE_MACRO", "", 0) }),
+ new CExternalSetting(new String[] { "org.eclipse.cdt.core.assembly" }, null, null,
+ new ICSettingEntry[] { new CMacroEntry("THE_MACRO", "TheValue", 0) }) };
- public static final CExternalSetting[][] SETTINGS_VARIANTS = new CExternalSetting[][]{
- SETTINGS_1,
- SETTINGS_2,
- SETTINGS_3,
- SETTINGS_4,
- SETTINGS_5};
+ public static final CExternalSetting[][] SETTINGS_VARIANTS = new CExternalSetting[][] { SETTINGS_1, SETTINGS_2,
+ SETTINGS_3, SETTINGS_4, SETTINGS_5 };
private static int variantNum;
@Override
- public CExternalSetting[] getSettings(IProject project,
- ICConfigurationDescription cfg) {
+ public CExternalSetting[] getSettings(IProject project, ICConfigurationDescription cfg) {
return SETTINGS_VARIANTS[variantNum].clone();
}
- public static void setVariantNum(int num){
- if(num < 0 || num >= SETTINGS_VARIANTS.length)
+ public static void setVariantNum(int num) {
+ if (num < 0 || num >= SETTINGS_VARIANTS.length)
throw new IllegalArgumentException();
variantNum = num;
}
- public static int getVariantNum(){
+ public static int getVariantNum() {
return variantNum;
}
- public static int getMaxVariantNum(){
+ public static int getMaxVariantNum() {
return SETTINGS_VARIANTS.length - 1;
}

Back to the top