Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2015-11-05 15:55:42 +0000
committerGerrit Code Review @ Eclipse.org2015-11-09 15:35:08 +0000
commit63aa4b33769297fc8ecf2ccb31d4b061370a6281 (patch)
treecc6afa8f6ed76ec142bb5a1bca5dc7801a5926cd
parent75aa6665a0706babc382056fec568c6d396a5d6f (diff)
downloadorg.eclipse.cdt-63aa4b33769297fc8ecf2ccb31d4b061370a6281.tar.gz
org.eclipse.cdt-63aa4b33769297fc8ecf2ccb31d4b061370a6281.tar.xz
org.eclipse.cdt-63aa4b33769297fc8ecf2ccb31d4b061370a6281.zip
Bug 481523 - Open project properties from launch config page
- also removed deprecated fields from CAbstractMainTab Change-Id: I217f2ade868756edb331de60894846e7f5ec5cc2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java5
-rw-r--r--launch/org.eclipse.cdt.launch/META-INF/MANIFEST.MF2
-rw-r--r--launch/org.eclipse.cdt.launch/pom.xml2
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties2
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CAbstractMainTab.java75
5 files changed, 48 insertions, 38 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java
index d845a82577a..d9775b9e224 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java
@@ -841,6 +841,9 @@ implements
}
protected void handleResize(boolean visible) {
+ if (!getShell().isVisible()) {
+ return; // do not resize shell before its open, it will screw up shell positioning
+ }
if (visible && !isNewOpening) return; // do not duplicate
if (visible)
isNewOpening = false;
@@ -982,7 +985,7 @@ implements
protected void cfgChanged(ICConfigurationDescription _cfgd) {
CConfigurationStatus st = _cfgd.getConfigurationStatus();
if (st.getCode() == CConfigurationStatus.TOOLCHAIN_NOT_SUPPORTED) {
- // Re-check, maybe user got the problem fixed
+ // Re-check, maybe user got the problem fixed
st = _cfgd.getConfigurationData().getStatus();
}
if (errPane != null && errMessage != null) {
diff --git a/launch/org.eclipse.cdt.launch/META-INF/MANIFEST.MF b/launch/org.eclipse.cdt.launch/META-INF/MANIFEST.MF
index 44484dc3f7c..8b07f2db46f 100644
--- a/launch/org.eclipse.cdt.launch/META-INF/MANIFEST.MF
+++ b/launch/org.eclipse.cdt.launch/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.launch; singleton:=true
-Bundle-Version: 7.3.0.qualifier
+Bundle-Version: 9.0.0.qualifier
Bundle-Activator: org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/launch/org.eclipse.cdt.launch/pom.xml b/launch/org.eclipse.cdt.launch/pom.xml
index e4c5b06cee2..f85288a9cbf 100644
--- a/launch/org.eclipse.cdt.launch/pom.xml
+++ b/launch/org.eclipse.cdt.launch/pom.xml
@@ -11,7 +11,7 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <version>7.3.0-SNAPSHOT</version>
+ <version>9.0.0-SNAPSHOT</version>
<artifactId>org.eclipse.cdt.launch</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties
index 1a4ef7637aa..26073b4d391 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties
@@ -88,7 +88,7 @@ CMainTab_Choose_program_to_run=Choose a &program to run:
CMainTab_Choose_program_to_run_from_NAME=Choose a program to run from {0}:
CMainTab_UseTerminal=Connect process input && output to a terminal.
CMainTab_Program_invalid_proj_path=Program specification is not a valid project-relative path.
-CMainTab_Build_Config=Build configuration:
+CMainTab_Build_Config=Build Configuration:
CMainTab_Use_Active=Use Active
CMainTab_Use_Automatic=Select Automatically
CMainTab_Build_Config_Active_tooltip=Use active build configuration
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CAbstractMainTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CAbstractMainTab.java
index aa98aa75d25..875701eb812 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CAbstractMainTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CAbstractMainTab.java
@@ -9,7 +9,7 @@
* Ken Ryall (Nokia) - initial API and implementation
* IBM Corporation
* Alex Collins (Broadcom Corp.) - choose build config automatically
- * Anna Dushistova (Mentor Graphics) - [333504] [remote launch] NPE after switching to "Standard Launcher" in Remote Application debug configuration
+ * Anna Dushistova (Mentor Graphics) - [333504] [remote launch] NPE after switching to "Standard Launcher" in Remote Application debug configuration
*******************************************************************************/
package org.eclipse.cdt.launch.ui;
@@ -38,6 +38,8 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
@@ -56,9 +58,11 @@ import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.eclipse.ui.internal.dialogs.PropertyDialog;
/**
* @since 6.1
@@ -75,19 +79,6 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
* @since 6.0
*/
protected Combo fBuildConfigCombo;
- /**
- * @since 7.0
- * @deprecated This control won't be used anymore, combo will have addition item: Select Automatically
- * */
- protected Button fBuildConfigAuto;
- /**
- * Indicates whether the user has clicked on the build config auto button Prevents causing a delta to the underlying launch
- * configuration if the user hasn't touched this setting.
- *
- * @since 7.0
- * @deprecated
- */
- protected boolean fBuildConfigAutoChanged;
/** @since 6.1 */
protected Button fDisableBuildButton;
/** @since 6.1 */
@@ -250,7 +241,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
return (ICProject) dialog.getFirstResult();
}
} catch (CModelException e) {
- LaunchUIPlugin.errorDialog("Launch UI internal error", e); //$NON-NLS-1$
+ LaunchUIPlugin.errorDialog("Launch UI internal error", e); //$NON-NLS-1$
}
return null;
}
@@ -280,7 +271,6 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
if (projDes != null) {
// Populate and select config
ICConfigurationDescription[] configurations = projDes.getConfigurations();
-
for (int i = 0; i < configurations.length; i++) {
String configName = configurations[i].getName();
String id = configurations[i].getId();
@@ -306,8 +296,14 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = colspan;
comboComp.setLayoutData(gd);
- Label dlabel = new Label(comboComp, SWT.NONE);
- dlabel.setText(LaunchMessages.CMainTab_Build_Config);
+ Link dlabel = new Link(comboComp, SWT.NONE);
+ dlabel.setText("<a>" + LaunchMessages.CMainTab_Build_Config + "</a>"); //$NON-NLS-1$//$NON-NLS-2$
+ dlabel.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ openBuildConfigProperties();
+ }
+ });
fBuildConfigCombo = new Combo(comboComp, SWT.READ_ONLY | SWT.DROP_DOWN);
fBuildConfigCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
fBuildConfigCombo.addSelectionListener(new SelectionListener() {
@@ -321,13 +317,23 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
updateLaunchConfigurationDialog();
}
});
- fBuildConfigAuto = new Button(comboComp, SWT.CHECK);
- GridData gd1 = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL);
- gd1.heightHint = 0;
- gd1.horizontalSpan = 2;
- fBuildConfigAuto.setLayoutData(gd1);
- fBuildConfigAuto.setVisible(false);
- fBuildConfigAuto.setText(LaunchMessages.CMainTab_Build_Config_Auto);
+ }
+
+ /**
+ * @since 9.0
+ */
+ protected void openBuildConfigProperties() {
+ IStructuredSelection sel;
+ ICProject cProject = getCProject();
+ if (cProject != null)
+ sel = new StructuredSelection(cProject.getProject());
+ else
+ sel = new StructuredSelection();
+ Shell shell = getShell();
+ String propertyPageId = "org.eclipse.cdt.managedbuilder.ui.properties.Page_head_build";//$NON-NLS-1$
+ PropertyDialog dialog = PropertyDialog.createDialogOn(shell, propertyPageId, sel);
+ if (dialog != null)
+ dialog.open();
}
/** @since 6.1 */
@@ -406,12 +412,13 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
fEnableBuildButton.setSelection(buildBeforeLaunchValue == ICDTLaunchConfigurationConstants.BUILD_BEFORE_LAUNCH_ENABLED);
if (fWorkspaceSettingsButton != null)
fWorkspaceSettingsButton
- .setSelection(buildBeforeLaunchValue == ICDTLaunchConfigurationConstants.BUILD_BEFORE_LAUNCH_USE_WORKSPACE_SETTING);
+ .setSelection(
+ buildBeforeLaunchValue == ICDTLaunchConfigurationConstants.BUILD_BEFORE_LAUNCH_USE_WORKSPACE_SETTING);
}
/**
* Show a dialog that lets the user select a file.
- *
+ *
* @since 6.0
*/
protected String handleBrowseButtonSelected() {
@@ -462,7 +469,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
/**
* This method is deprecated since LaunchUtils#getBinary(IProject, IPath) is too slow to be called on the UI thread. See
* "https://bugs.eclipse.org/bugs/show_bug.cgi?id=328012".
- *
+ *
* @param project
* @param exePath
* @return
@@ -512,7 +519,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
*/
@Override
@@ -540,7 +547,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
/**
* Calculate build config id based on selection of the binary. Subclasses may override.
- *
+ *
* @return
* @since 7.2
*/
@@ -560,13 +567,13 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
/**
* Either page wants Automatic selection in combo or not. Subclass should override
- *
+ *
* @return true if panel support AUTO_CONFIG
* @since 7.2
*/
protected boolean isAutoConfigSupported() {
// original behavior was if this button is null it won't be shown and "supported"
- return fBuildConfigAuto != null;
+ return true;
}
protected void updateProjectFromConfig(ILaunchConfiguration config) {
@@ -597,7 +604,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#updateLaunchConfigurationDialog()
*/
@Override
@@ -616,7 +623,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
String tooltip = EMPTY_STRING;
if (configId != null) {
if (configId.equals(AUTO_CONFIG)) {
- tooltip = LaunchMessages.CMainTab_Build_Config_Auto_tooltip;
+ tooltip = LaunchMessages.CMainTab_Build_Config_Auto_tooltip;
} else if (configId.equals(EMPTY_STRING)) {
tooltip = LaunchMessages.CMainTab_Build_Config_Active_tooltip;
}

Back to the top