Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,6 @@ public interface ICoreConstants {
* build as background job
*/
String RUN_API_ANALYSIS_AS_JOB = "Preferences.MainPage.runAPIAnalysisAsJob";//$NON-NLS-1$
/**
* Boolean preference whether add
* '-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true' to VM
* arguments when creating a new launch configuration
*/
String ADD_SWT_NON_DISPOSAL_REPORTING = "Preferences.MainPage.addSwtNonDisposalReporting ";//$NON-NLS-1$

/**
* Explicit preference value for {@link #WORKSPACE_TARGET_HANDLE} when the user chooses no
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public void setValueOrRemove(String key, int value) {
* @see #setToDefault(String)
*/
public void setValueOrRemove(String key, String value) {
if (value.equals(getDefaultString(key))) {
if (value == null || value.equals(getDefaultString(key))) {
fInstanceScopePrefs.remove(key);
} else {
fInstanceScopePrefs.put(key, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public void initializeDefaultPreferences() {
corePrefs.setDefault(ICoreConstants.WORKSPACE_PLUGINS_OVERRIDE_TARGET, true);
corePrefs.setDefault(ICoreConstants.DISABLE_API_ANALYSIS_BUILDER, false);
corePrefs.setDefault(ICoreConstants.RUN_API_ANALYSIS_AS_JOB, false);
corePrefs.setDefault(ICoreConstants.ADD_SWT_NON_DISPOSAL_REPORTING, true);
corePrefs.setDefault(ICoreConstants.TEST_PLUGIN_PATTERN, ICoreConstants.TEST_PLUGIN_PATTERN_DEFAULTVALUE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,26 @@
*/
public interface ILaunchingPreferenceConstants {

public static final String VALUE_JUNIT_LAUNCH_WITH_TESTPLUGIN = "testPluginOnly"; //$NON-NLS-1$
public static final String VALUE_JUNIT_LAUNCH_WITH_ALL = "allWorkspacePlugins"; //$NON-NLS-1$

// Main preference page
public static final String PROP_AUTO_MANAGE = "Preferences.MainPage.automanageDependencies"; //$NON-NLS-1$
public static final String PROP_RUNTIME_WORKSPACE_LOCATION = "Preferences.MainPage.runtimeWorkspaceLocation"; //$NON-NLS-1$
public static final String PROP_RUNTIME_WORKSPACE_LOCATION_IS_CONTAINER = "Preferences.MainPage.runtimeWorkspaceLocationIsContainer"; //$NON-NLS-1$
public static final String PROP_JUNIT_WORKSPACE_LOCATION = "Preferences.MainPage.junitWorkspaceLocation"; //$NON-NLS-1$
public static final String PROP_JUNIT_WORKSPACE_LOCATION_IS_CONTAINER = "Preferences.MainPage.junitWorkspaceLocationIsContainer"; //$NON-NLS-1$
public static final String PROP_AUTO_MANAGE = "Preferences.Launching.automanageDependencies"; //$NON-NLS-1$
public static final String PROP_RUNTIME_WORKSPACE_LOCATION = "Preferences.Launching.runtimeWorkspaceLocation"; //$NON-NLS-1$
public static final String PROP_RUNTIME_WORKSPACE_LOCATION_IS_CONTAINER = "Preferences.Launching.runtimeWorkspaceLocationIsContainer"; //$NON-NLS-1$
public static final String PROP_JUNIT_WORKSPACE_LOCATION = "Preferences.Launching.junitWorkspaceLocation"; //$NON-NLS-1$
public static final String PROP_JUNIT_LAUNCH_WITH = "Preferences.Launching.junitLaunchWith"; //$NON-NLS-1$
public static final String PROP_JUNIT_AUTO_INCLUDE = "Preferences.Launching.junitAutoInclude"; //$NON-NLS-1$
public static final String PROP_JUNIT_INCLUDE_OPTIONAL = "Preferences.Launching.junitIncludeOptional"; //$NON-NLS-1$
public static final String PROP_JUNIT_ADD_NEW_WORKSPACE_PLUGINS = "Preferences.Launching.junitAddNewWorkspacePlugins"; //$NON-NLS-1$
public static final String PROP_JUNIT_VALIDATE_LAUNCH = "Preferences.Launching.junitValidateLaunch"; //$NON-NLS-1$
public static final String PROP_JUNIT_WORKSPACE_LOCATION_IS_CONTAINER = "Preferences.Launching.junitWorkspaceLocationIsContainer"; //$NON-NLS-1$
/**
* Boolean preference whether add
* '-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true' to VM
* arguments when creating a new launch configuration
*/
public static final String ADD_SWT_NON_DISPOSAL_REPORTING = "Preferences.Launching.addSwtNonDisposalReporting";//$NON-NLS-1$

// OSGi Frameworks
public static final String DEFAULT_OSGI_FRAMEOWRK = "Preference.default.osgi.framework"; //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ public void initializeDefaultPreferences() {
prefs.putBoolean(ILaunchingPreferenceConstants.PROP_RUNTIME_WORKSPACE_LOCATION_IS_CONTAINER, true);
prefs.put(ILaunchingPreferenceConstants.PROP_JUNIT_WORKSPACE_LOCATION, "${workspace_loc}/../junit-workspace"); //$NON-NLS-1$
prefs.putBoolean(ILaunchingPreferenceConstants.PROP_JUNIT_WORKSPACE_LOCATION_IS_CONTAINER, false);
prefs.put(ILaunchingPreferenceConstants.PROP_JUNIT_LAUNCH_WITH, ILaunchingPreferenceConstants.VALUE_JUNIT_LAUNCH_WITH_TESTPLUGIN);
prefs.putBoolean(ILaunchingPreferenceConstants.PROP_JUNIT_AUTO_INCLUDE, true);
prefs.putBoolean(ILaunchingPreferenceConstants.PROP_JUNIT_INCLUDE_OPTIONAL, true);
prefs.putBoolean(ILaunchingPreferenceConstants.PROP_JUNIT_ADD_NEW_WORKSPACE_PLUGINS, false);
prefs.putBoolean(ILaunchingPreferenceConstants.PROP_JUNIT_VALIDATE_LAUNCH, true);
prefs.putBoolean(ILaunchingPreferenceConstants.ADD_SWT_NON_DISPOSAL_REPORTING, true);

// copy over instance scope prefs from UI plugin
IEclipsePreferences oldInstancePrefs = InstanceScope.INSTANCE.getNode(IPDEConstants.UI_PLUGIN_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import org.eclipse.pde.core.plugin.TargetPlatform;
import org.eclipse.pde.core.target.ITargetPlatformService;
import org.eclipse.pde.internal.build.IPDEBuildConstants;
import org.eclipse.pde.internal.core.ICoreConstants;
import org.eclipse.pde.internal.core.PDECore;
import org.eclipse.pde.internal.core.PDEPreferencesManager;
import org.eclipse.pde.internal.core.TargetPlatformHelper;
Expand Down Expand Up @@ -440,8 +439,8 @@ public static String getDefaultJUnitConfigurationLocation() {
* '-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true'
*/
public static boolean getAddSwtNonDisposalReportingPreference() {
PDEPreferencesManager prefs = PDECore.getDefault().getPreferencesManager();
return prefs.getBoolean(ICoreConstants.ADD_SWT_NON_DISPOSAL_REPORTING);
PDEPreferencesManager launchingStore = PDELaunchingPlugin.getDefault().getPreferenceManager();
return launchingStore.getBoolean(ILaunchingPreferenceConstants.ADD_SWT_NON_DISPOSAL_REPORTING);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
import org.eclipse.pde.core.target.ITargetLocation;
import org.eclipse.pde.core.target.NameVersionDescriptor;
import org.eclipse.pde.core.target.TargetBundle;
import org.eclipse.pde.internal.core.ICoreConstants;
import org.eclipse.pde.internal.core.P2Utils;
import org.eclipse.pde.internal.core.PDECore;
import org.eclipse.pde.internal.core.PDEPreferencesManager;
import org.eclipse.pde.internal.core.TargetPlatformHelper;
import org.eclipse.pde.internal.core.target.TargetPlatformService;
import org.eclipse.pde.internal.launching.ILaunchingPreferenceConstants;
import org.eclipse.pde.internal.launching.PDELaunchingPlugin;
import org.eclipse.pde.internal.launching.launcher.LaunchArgumentsHelper;
import org.eclipse.pde.ui.tests.PDETestCase;
import org.junit.Test;
Expand Down Expand Up @@ -549,7 +549,7 @@ public void testArguments() throws Exception {
definition.setVMArguments(vmArgs);
assertEquals(vmArgs, definition.getVMArguments());

PDEPreferencesManager prefs = PDECore.getDefault().getPreferencesManager();
PDEPreferencesManager prefs = PDELaunchingPlugin.getDefault().getPreferenceManager();
try {
getTargetService().saveTargetDefinition(definition);
setTargetPlatform(definition);
Expand All @@ -563,24 +563,24 @@ public void testArguments() throws Exception {

// Check that new launch configs will be prepopulated from target
// along with ADD_SWT_NON_DISPOSAL_REPORTING == false
prefs.setValue(ICoreConstants.ADD_SWT_NON_DISPOSAL_REPORTING, false);
prefs.setValue(ILaunchingPreferenceConstants.ADD_SWT_NON_DISPOSAL_REPORTING, false);
assertEquals(vmArgs, LaunchArgumentsHelper.getInitialVMArguments());

// Check that new launch configs will be prepopulated from target
// along with ADD_SWT_NON_DISPOSAL_REPORTING == true
prefs.setValue(ICoreConstants.ADD_SWT_NON_DISPOSAL_REPORTING, true);
prefs.setValue(ILaunchingPreferenceConstants.ADD_SWT_NON_DISPOSAL_REPORTING, true);
assertEquals(vmArgs + " -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true",
LaunchArgumentsHelper.getInitialVMArguments());

// Check that new launch configs will be prepopulated from target
// along with ADD_SWT_NON_DISPOSAL_REPORTING == true but the define
// is already set in the target platform to false
prefs.setValue(ICoreConstants.ADD_SWT_NON_DISPOSAL_REPORTING, true);
prefs.setValue(ILaunchingPreferenceConstants.ADD_SWT_NON_DISPOSAL_REPORTING, true);
vmArgs = "-testVMArgument -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=false -testVMArgument2";
definition.setVMArguments(vmArgs);
assertEquals(vmArgs, LaunchArgumentsHelper.getInitialVMArguments());
} finally {
prefs.setToDefault(ICoreConstants.ADD_SWT_NON_DISPOSAL_REPORTING);
prefs.setToDefault(ILaunchingPreferenceConstants.ADD_SWT_NON_DISPOSAL_REPORTING);
getTargetService().deleteTarget(definition.getHandle());
resetTargetPlatform();
}
Expand Down
6 changes: 6 additions & 0 deletions ui/org.eclipse.pde.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@
class="org.eclipse.pde.bnd.ui.preferences.ReposPreferencePage"
id="org.eclipse.pde.bnd.ui.preferences.ReposPreferencePage">
</page>
<page
category="org.eclipse.pde.ui.MainPreferencePage"
class="org.eclipse.pde.internal.ui.preferences.LaunchingPreferencePage"
id="org.eclipse.pde.ui.LaunchingPreferencePage"
name="Launching">
</page>
</extension>
<extension
point="org.eclipse.ui.keywords">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ public interface IPreferenceConstants extends ILaunchingPreferenceConstants {
* Boolean preference whether API analysis has been disabled
*/
public static final String DISABLE_API_ANALYSIS_BUILDER = "Preferences.MainPage.disableAPIAnalysisBuilder";//$NON-NLS-1$
/**
* Boolean preference whether add
* '-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true' to VM
* arguments when creating a new launch configuration
*/
public static final String ADD_SWT_NON_DISPOSAL_REPORTING = "Preferences.MainPage.addSwtNonDisposalReporting ";//$NON-NLS-1$


// Editor Outline
public static final String PROP_OUTLINE_SORTING = "PDEMultiPageContentOutline.SortingAction.isChecked"; //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,8 @@ public class PDEUIMessages extends NLS {
public static String MainPreferencePage_WorkspacePluginsOverrideTarget;
public static String MainPreferencePage_WorkspacePluginsOverrideTargetTooltip;
public static String MainPreferencePage_DisableAPIAnalysisBuilder;

public static String MainPreferencePage_optionTestPlugin;
public static String MainPreferencePage_RunAPIAnalysisBuilderAsJob;

public static String MainPreferencePage_test_plugin_pattern_group;
Expand Down Expand Up @@ -2704,6 +2706,8 @@ public class PDEUIMessages extends NLS {

public static String LauncherUtils_title;

public static String LaunchingPreferencePage_description;

public static String RemoveLazyLoadingDirectiveResolution_remove;

public static String RemoveAutomaticModuleResolution_remove;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ MainPreferencePage_junitWorkspace_asLocation=Us&e as workspace location
MainPreferencePage_junitWorkspace_fileSystem=File S&ystem...
MainPreferencePage_junitWorkspace_variables=Va&riables...
MainPreferencePage_junitWorkspace_workspace=W&orkspace...
MainPreferencePage_junitWorkspaceGroup=Workspace location for new JUnit Plug-in Test launch configurations
MainPreferencePage_junitWorkspaceGroup=For new JUnit Plug-in Test launch configurations
MainPreferencePage_promptBeforeOverwrite=Prompt &before overwriting build.xml files when exporting
MainPreferencePage_promtBeforeRemove=Prompt before deleting a &target definition file
MainPreferencePage_runtimeWorkspace_asContainer=Append launch &configuration name to this location
Expand All @@ -369,6 +369,7 @@ MainPreferencePage_ShowTargetStatus=S&how current target platform in status bar
MainPreferencePage_updateStale=&Update stale manifest files prior to launching
MainPreferencePage_WorkspacePluginsOverrideTarget=Workspace p&lug-ins override target platform plug-ins with the same id
MainPreferencePage_DisableAPIAnalysisBuilder=&Disable API analysis builder
MainPreferencePage_optionTestPlugin=The Plug-in of the Test
MainPreferencePage_RunAPIAnalysisBuilderAsJob=&Run API analysis in the background (experimental)
MainPreferencePage_WorkspacePluginsOverrideTargetTooltip=When disabled, all plug-in versions from workspace and target platform are being used.
MainPreferencePage_test_plugin_pattern_group=Test plug-in detection:
Expand Down Expand Up @@ -2189,6 +2190,7 @@ AboutSection_imgMessage=Select a GIF or PNG image:
LauncherSection_launcherName=Launcher Name:
LauncherSection_dialogTitle=Image Selection
LauncherSection_dialogMessage=Select an image:
LaunchingPreferencePage_description=Settings for Plug-in launches
RemoveLazyLoadingDirectiveResolution_remove=Remove lazy activation header
RemoveAutomaticModuleResolution_remove=Remove automatic module name header
ProductDefinitonWizardPage_applicationDefinition=<form><p>An Eclipse product must be associated with an <a href="applications">application</a>, the default entry point for the product when it is running.</p></form>
Expand Down
Loading
Loading