Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/cross
diff options
context:
space:
mode:
authorIulia Vasii2014-10-27 14:23:45 +0000
committerTeodor Madan2014-10-28 12:30:02 +0000
commit1a87fa7fe354503517e04341503e832c31a66cbe (patch)
tree803e6df954145787bcc6a1c59e41302ad9de103b /cross
parent9134d71fe501a53efe40ec0a7b66da2f96fb5b7e (diff)
downloadorg.eclipse.cdt-1a87fa7fe354503517e04341503e832c31a66cbe.tar.gz
org.eclipse.cdt-1a87fa7fe354503517e04341503e832c31a66cbe.tar.xz
org.eclipse.cdt-1a87fa7fe354503517e04341503e832c31a66cbe.zip
Bug 370768 - new 'Edit...' button to access connection properties
Change-Id: I0117516b6c79bfe4acc80ecce81c5acad775c697 Signed-off-by: Iulia Vasii <IuliaMadalina.Vasii@freescale.com> Reviewed-on: https://git.eclipse.org/r/35543 Tested-by: Hudson CI Reviewed-by: Teodor Madan <teodor.madan@freescale.com> Tested-by: Teodor Madan <teodor.madan@freescale.com>
Diffstat (limited to 'cross')
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java1
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties1
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java49
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCMainTab.java49
4 files changed, 84 insertions, 16 deletions
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java
index da4da1a34fb..04dad439ae8 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java
@@ -41,6 +41,7 @@ public class Messages extends NLS {
public static String RemoteCMainTab_ErrorNoConnection;
public static String RemoteCMainTab_Connection;
public static String RemoteCMainTab_New;
+ public static String RemoteCMainTab_Edit;
public static String RemoteCMainTab_Properties;
public static String RemoteCMainTab_Properties_title;
public static String RemoteCMainTab_Properties_Location;
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties
index 02d314ad181..9ddb5594d5e 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties
@@ -43,6 +43,7 @@ RemoteCMainTab_ErrorNoConnection=Remote Connection must be selected.
RemoteCMainTab_Remote_Path_Browse_Button=Browse...
RemoteCMainTab_Connection=Connection:
RemoteCMainTab_New=New...
+RemoteCMainTab_Edit=Edit...
Gdbserver_Settings_Tab_Name=Gdbserver Settings
Gdbserver_name_textfield_label=Gdbserver path:
Port_number_textfield_label=Port number:
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java
index 796e1627911..bcc7d06cb00 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java
@@ -22,6 +22,7 @@
* Anna Dushistova (MontaVista) - [375067] [remote] Automated remote launch does not support project-less debug
* Dan Ungureanu (Freescale) - [428367] [remote launch] Fix missing title for Properties dialog
* Alvaro Sanchez-Leon (Ericsson) - [430313] [remote] Auto Remote Debug - Unable to download to folder
+ * Iulia Vasii (Freescale) - [370768] new 'Edit...' button to access connection properties
*******************************************************************************/
package org.eclipse.cdt.launch.remote.tabs;
@@ -39,6 +40,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.core.RSECorePlugin;
@@ -62,6 +64,7 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PreferencesUtil;
public class RemoteCDSFMainTab extends CMainTab {
@@ -75,8 +78,12 @@ public class RemoteCDSFMainTab extends CMainTab {
/* Defaults */
private static final String REMOTE_PATH_DEFAULT = EMPTY_STRING;
private static final boolean SKIP_DOWNLOAD_TO_REMOTE_DEFAULT = false;
+
+ /* SystemConnectionPropertyPage id*/
+ private static final String SYSTEM_PAGE_ID = "org.eclipse.rse.SystemPropertyPage"; //$NON-NLS-1$
protected Button newRemoteConnectionButton;
+ protected Button editRemoteConnectionButton;
protected Button remoteConnectionPropertiesButton;
protected Button remoteBrowseButton;
protected Label connectionLabel;
@@ -156,7 +163,7 @@ public class RemoteCDSFMainTab extends CMainTab {
protected void createRemoteConnectionGroup(Composite parent, int colSpan) {
Composite projComp = new Composite(parent, SWT.NONE);
GridLayout projLayout = new GridLayout();
- projLayout.numColumns = 4;
+ projLayout.numColumns = 5;
projLayout.marginHeight = 0;
projLayout.marginWidth = 0;
projComp.setLayout(projLayout);
@@ -178,7 +185,7 @@ public class RemoteCDSFMainTab extends CMainTab {
public void modifyText(ModifyEvent e) {
useDefaultsFromConnection();
- updatePropertiesButton();
+ updateConnectionButtons();
setDirty(true);
updateLaunchConfigurationDialog();
}
@@ -195,6 +202,16 @@ public class RemoteCDSFMainTab extends CMainTab {
updateConnectionPulldown();
}
});
+
+ editRemoteConnectionButton = createPushButton(projComp,
+ Messages.RemoteCMainTab_Edit, null);
+ editRemoteConnectionButton.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+ handleEditRemoteConnectionSelected();
+ }
+ });
remoteConnectionPropertiesButton = createPushButton(projComp,
Messages.RemoteCMainTab_Properties, null);
@@ -308,6 +325,17 @@ public class RemoteCDSFMainTab extends CMainTab {
// Ignore
}
}
+
+ /**
+ * Opens the <code>SystemConnectionPropertyPage</code> page for the selected connection.
+ */
+ protected void handleEditRemoteConnectionSelected() {
+ IHost currentConnectionSelected = getCurrentConnection();
+ PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(getControl().getShell(), currentConnectionSelected, SYSTEM_PAGE_ID, null, null);
+ if (dialog != null) {
+ dialog.open();
+ }
+ }
protected IHost getCurrentConnection() {
int currentSelection = connectionCombo.getSelectionIndex();
@@ -463,23 +491,28 @@ public class RemoteCDSFMainTab extends CMainTab {
if (connections.length > 0) {
connectionCombo.select(connections.length - 1);
}
- updatePropertiesButton();
+ updateConnectionButtons();
}
- private void updatePropertiesButton() {
+ private void updateConnectionButtons() {
if ((remoteConnectionPropertiesButton == null)
|| remoteConnectionPropertiesButton.isDisposed()) {
return;
}
- boolean bEnableProperties = false;
+ if ((editRemoteConnectionButton == null)
+ || editRemoteConnectionButton.isDisposed()) {
+ return;
+ }
+ boolean bEnable = false;
IHost currentConnectionSelected = getCurrentConnection();
if (currentConnectionSelected != null) {
IRSESystemType sysType = currentConnectionSelected.getSystemType();
if (sysType != null && sysType.isEnabled() && !sysType.isLocal()) {
- bEnableProperties = true;
+ bEnable = true;
}
}
- remoteConnectionPropertiesButton.setEnabled(bEnableProperties);
+ remoteConnectionPropertiesButton.setEnabled(bEnable);
+ editRemoteConnectionButton.setEnabled(bEnable);
}
protected void updateTargetProgFromConfig(ILaunchConfiguration config) {
@@ -664,7 +697,7 @@ public class RemoteCDSFMainTab extends CMainTab {
updateTargetProgFromConfig(config);
updateSkipDownloadFromConfig(config);
- updatePropertiesButton();
+ updateConnectionButtons();
isInitializing = false;
}
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCMainTab.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCMainTab.java
index 8798bc2795b..1baadaa2979 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCMainTab.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCMainTab.java
@@ -21,6 +21,7 @@
* Anna Dushistova (Mentor Graphics) - [318052] [remote launch] Properties are not saved/used
* Anna Dushistova (Mentor Graphics) - [333453] adapted the fix from RemoteCDSFMainTab.java
* Dan Ungureanu (Freescale) - [428367] [remote launch] Fix missing title for Properties dialog
+ * Iulia Vasii (Freescale) - [370768] new 'Edit...' button to access connection properties
*******************************************************************************/
package org.eclipse.cdt.launch.remote.tabs;
@@ -38,6 +39,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.core.RSECorePlugin;
@@ -61,6 +63,7 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PreferencesUtil;
public class RemoteCMainTab extends CMainTab {
@@ -74,8 +77,12 @@ public class RemoteCMainTab extends CMainTab {
/* Defaults */
private static final String REMOTE_PATH_DEFAULT = EMPTY_STRING;
private static final boolean SKIP_DOWNLOAD_TO_REMOTE_DEFAULT = false;
+
+ /* SystemConnectionPropertyPage id*/
+ private static final String SYSTEM_PAGE_ID = "org.eclipse.rse.SystemPropertyPage"; //$NON-NLS-1$
protected Button newRemoteConnectionButton;
+ protected Button editRemoteConnectionButton;
protected Button remoteConnectionPropertiesButton;
protected Button remoteBrowseButton;
protected Label connectionLabel;
@@ -173,7 +180,7 @@ public class RemoteCMainTab extends CMainTab {
protected void createRemoteConnectionGroup(Composite parent, int colSpan) {
Composite projComp = new Composite(parent, SWT.NONE);
GridLayout projLayout = new GridLayout();
- projLayout.numColumns = 4;
+ projLayout.numColumns = 5;
projLayout.marginHeight = 0;
projLayout.marginWidth = 0;
projComp.setLayout(projLayout);
@@ -195,7 +202,7 @@ public class RemoteCMainTab extends CMainTab {
public void modifyText(ModifyEvent e) {
useDefaultsFromConnection();
- updatePropertiesButton();
+ updateConnectionButtons();
setDirty(true);
updateLaunchConfigurationDialog();
}
@@ -212,6 +219,16 @@ public class RemoteCMainTab extends CMainTab {
updateConnectionPulldown();
}
});
+
+ editRemoteConnectionButton = createPushButton(projComp,
+ Messages.RemoteCMainTab_Edit, null);
+ editRemoteConnectionButton.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+ handleEditRemoteConnectionSelected();
+ }
+ });
remoteConnectionPropertiesButton = createPushButton(projComp,
Messages.RemoteCMainTab_Properties, null);
@@ -374,7 +391,7 @@ public class RemoteCMainTab extends CMainTab {
updateTargetProgFromConfig(config);
updateSkipDownloadFromConfig(config);
- updatePropertiesButton();
+ updateConnectionButtons();
isInitializing = false;
}
@@ -390,6 +407,17 @@ public class RemoteCMainTab extends CMainTab {
// Ignore
}
}
+
+ /**
+ * Opens the <code>SystemConnectionPropertyPage</code> page for the selected connection.
+ */
+ protected void handleEditRemoteConnectionSelected() {
+ IHost currentConnectionSelected = getCurrentConnection();
+ PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(getControl().getShell(), currentConnectionSelected, SYSTEM_PAGE_ID, null, null);
+ if (dialog != null) {
+ dialog.open();
+ }
+ }
protected IHost getCurrentConnection() {
int currentSelection = connectionCombo.getSelectionIndex();
@@ -534,23 +562,28 @@ public class RemoteCMainTab extends CMainTab {
if (connections.length > 0) {
connectionCombo.select(connections.length - 1);
}
- updatePropertiesButton();
+ updateConnectionButtons();
}
- private void updatePropertiesButton() {
+ private void updateConnectionButtons() {
if ((remoteConnectionPropertiesButton == null)
|| remoteConnectionPropertiesButton.isDisposed()) {
return;
}
- boolean bEnableProperties = false;
+ if ((editRemoteConnectionButton == null)
+ || editRemoteConnectionButton.isDisposed()) {
+ return;
+ }
+ boolean bEnable = false;
IHost currentConnectionSelected = getCurrentConnection();
if (currentConnectionSelected != null) {
IRSESystemType sysType = currentConnectionSelected.getSystemType();
if (sysType != null && sysType.isEnabled() && !sysType.isLocal()) {
- bEnableProperties = true;
+ bEnable = true;
}
}
- remoteConnectionPropertiesButton.setEnabled(bEnableProperties);
+ remoteConnectionPropertiesButton.setEnabled(bEnable);
+ editRemoteConnectionButton.setEnabled(bEnable);
}
protected void updateTargetProgFromConfig(ILaunchConfiguration config) {

Back to the top