project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/TestsPlugin.java
changeset 637 ced8425c3871
parent 0 fb279309251b
child 1434 79471fd1fd69
equal deleted inserted replaced
636:f96e62c11eac 637:ced8425c3871
    61 	public static TestsPlugin getDefault() {
    61 	public static TestsPlugin getDefault() {
    62 		return plugin;
    62 		return plugin;
    63 	}
    63 	}
    64 
    64 
    65 	/**
    65 	/**
    66 	 * Get build configurations for the first non-empty SDK we find
    66 	 * Get some build configurations for the first non-empty SDK we find.
    67 	 * @return
    67 	 * @return a list of contexts, no more than 8.
    68 	 */
    68 	 */
    69 	public static List<ISymbianBuildContext> getUsableBuildConfigs() {
    69 	public static List<ISymbianBuildContext> getUsableBuildConfigs() {
    70 		for (ISymbianSDK sdk : SDKCorePlugin.getSDKManager().getSDKList()) {
    70 		for (ISymbianSDK sdk : SDKCorePlugin.getSDKManager().getSDKList()) {
    71 			List<ISymbianBuildContext> contexts = sdk.getUnfilteredBuildConfigurations();
    71 			List<ISymbianBuildContext> contexts = sdk.getUnfilteredBuildConfigurations();
    72 			if (contexts.size() > 0)
    72 			if (contexts.size() > 0) {
    73 				return contexts;
    73 				return contexts.subList(0, Math.min(contexts.size(), 8));
       
    74 			}
    74 		}
    75 		}
    75 		TestCase.fail("No installed SDKs provide build configurations");
    76 		TestCase.fail("No installed SDKs provide build configurations");
    76 		return Collections.EMPTY_LIST;
    77 		return Collections.emptyList();
    77 	}
    78 	}
    78 
    79 
    79 }
    80 }