Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 163726
Collapse All | Expand All

(-)src/org/eclipse/tptp/trace/ui/internal/launcher/core/LauncherUtility.java (-10 / +19 lines)
Lines 1237-1255 Link Here
1237
	}
1237
	}
1238
	
1238
	
1239
	public static ILaunchConfiguration addExtendedConfigurationDefaults(final ILaunchConfiguration config) {
1239
	public static ILaunchConfiguration addExtendedConfigurationDefaults(final ILaunchConfiguration config) {
1240
		ILaunchConfigurationWorkingCopy wc;
1240
		ILaunchConfiguration result = config;
1241
		try {
1241
		try {
1242
			wc = config.getWorkingCopy();
1242
			ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
1243
			ProfilingSetsManager manager = ProfilingSetsManager.instance();
1243
			addExtendedAttributes(wc);
1244
			IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore();
1244
			result = wc.doSave();
1245
			boolean autoFilteringCriteriaDefault = store.getBoolean(TraceConstants.AUTO_FILTER_CRITERIA_OPTION);
1246
			wc.setAttribute(IProfileLaunchConfigurationConstants.ATTR_AUTO_FILTER_CRITERIA, autoFilteringCriteriaDefault);
1247
			wc.setAttribute(IProfileLaunchConfigurationConstants.ATTR_PROFILING_SET, manager.getDefaultSet() == null ? null : manager.getDefaultSet().getId());
1248
			wc.setAttribute(IProfileLaunchConfigurationConstants.ATTR_FILTER_SET, autoFilteringCriteriaDefault ? TraceConstants.AUTO_GENERATED_FILTER_SET : LauncherConstants.DEFAULT_FILTER_ID);
1249
			return wc.doSave();
1250
		} catch (CoreException exception) {
1245
		} catch (CoreException exception) {
1251
		}
1246
		}
1252
		return config;
1247
		return result;
1248
	}
1249
1250
	public static ILaunchConfiguration addExtendedConfigurationDefaults(final ILaunchConfigurationWorkingCopy wc) {
1251
		addExtendedAttributes(wc);
1252
		return wc;
1253
	}
1254
1255
	private static void addExtendedAttributes(ILaunchConfigurationWorkingCopy wc) {
1256
		ProfilingSetsManager manager = ProfilingSetsManager.instance();
1257
		IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore();
1258
		boolean autoFilteringCriteriaDefault = store.getBoolean(TraceConstants.AUTO_FILTER_CRITERIA_OPTION);
1259
		wc.setAttribute(IProfileLaunchConfigurationConstants.ATTR_AUTO_FILTER_CRITERIA, autoFilteringCriteriaDefault);
1260
		wc.setAttribute(IProfileLaunchConfigurationConstants.ATTR_PROFILING_SET, manager.getDefaultSet() == null ? null : manager.getDefaultSet().getId());
1261
		wc.setAttribute(IProfileLaunchConfigurationConstants.ATTR_FILTER_SET, autoFilteringCriteriaDefault ? TraceConstants.AUTO_GENERATED_FILTER_SET : LauncherConstants.DEFAULT_FILTER_ID);
1253
	}
1262
	}
1254
	
1263
	
1255
	/* ----------------------------------------------------------------------------------------------------------------------------------------- */
1264
	/* ----------------------------------------------------------------------------------------------------------------------------------------- */

Return to bug 163726