[Esbox-commits] r830 - in trunk: common/org.maemo.esbox.launch/src/org/maemo/esbox/launch/ui device/org.maemo.esbox.device.launch/META-INF device/org.maemo.esbox.device.launch/src/org/maemo/esbox/device/launch/ui

lwang at garage.maemo.org lwang at garage.maemo.org
Fri Oct 3 00:24:28 EEST 2008


Author: lwang
Date: 2008-10-03 00:24:27 +0300 (Fri, 03 Oct 2008)
New Revision: 830

Modified:
   trunk/common/org.maemo.esbox.launch/src/org/maemo/esbox/launch/ui/AbstractConnectionConfigPage.java
   trunk/device/org.maemo.esbox.device.launch/META-INF/MANIFEST.MF
   trunk/device/org.maemo.esbox.device.launch/src/org/maemo/esbox/device/launch/ui/RawConnectionConfigPage.java
   trunk/device/org.maemo.esbox.device.launch/src/org/maemo/esbox/device/launch/ui/SSHLaunchProtocolPage.java
Log:
part of preparation for RSE extension in ConnectionConfigPage UI.

Modified: trunk/common/org.maemo.esbox.launch/src/org/maemo/esbox/launch/ui/AbstractConnectionConfigPage.java
===================================================================
--- trunk/common/org.maemo.esbox.launch/src/org/maemo/esbox/launch/ui/AbstractConnectionConfigPage.java	2008-10-02 21:17:34 UTC (rev 829)
+++ trunk/common/org.maemo.esbox.launch/src/org/maemo/esbox/launch/ui/AbstractConnectionConfigPage.java	2008-10-02 21:24:27 UTC (rev 830)
@@ -31,4 +31,10 @@
 	protected void setInitializing( boolean isInitializing ) {
 		fIsInitializing = isInitializing;
 	}
+
+	protected void update() {
+		if (! isInitializing()) {
+			updateLaunchConfigurationDialog();
+		}
+	}
 }

Modified: trunk/device/org.maemo.esbox.device.launch/META-INF/MANIFEST.MF
===================================================================
--- trunk/device/org.maemo.esbox.device.launch/META-INF/MANIFEST.MF	2008-10-02 21:17:34 UTC (rev 829)
+++ trunk/device/org.maemo.esbox.device.launch/META-INF/MANIFEST.MF	2008-10-02 21:24:27 UTC (rev 830)
@@ -15,4 +15,5 @@
  org.maemo.esbox.ui;bundle-version="1.5.0"
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Bundle-ActivationPolicy: lazy
-Export-Package: org.maemo.esbox.device.launch
+Export-Package: org.maemo.esbox.device.launch,
+ org.maemo.esbox.device.launch.ui

Modified: trunk/device/org.maemo.esbox.device.launch/src/org/maemo/esbox/device/launch/ui/RawConnectionConfigPage.java
===================================================================
--- trunk/device/org.maemo.esbox.device.launch/src/org/maemo/esbox/device/launch/ui/RawConnectionConfigPage.java	2008-10-02 21:17:34 UTC (rev 829)
+++ trunk/device/org.maemo.esbox.device.launch/src/org/maemo/esbox/device/launch/ui/RawConnectionConfigPage.java	2008-10-02 21:24:27 UTC (rev 830)
@@ -31,6 +31,7 @@
  * A UI page that allows user to enter IP address and port number for both
  * host and target.
  * 
+ * @author eswartz
  * @author LWang
  *
  */
@@ -90,9 +91,7 @@
 		IDialogFieldListener validator = new IDialogFieldListener() {
 
 			public void dialogFieldChanged(DialogField field) {
-				if (!isInitializing()) {
-					updateLaunchConfigurationDialog();
-				}
+				update();
 			}
 			
 		};

Modified: trunk/device/org.maemo.esbox.device.launch/src/org/maemo/esbox/device/launch/ui/SSHLaunchProtocolPage.java
===================================================================
--- trunk/device/org.maemo.esbox.device.launch/src/org/maemo/esbox/device/launch/ui/SSHLaunchProtocolPage.java	2008-10-02 21:17:34 UTC (rev 829)
+++ trunk/device/org.maemo.esbox.device.launch/src/org/maemo/esbox/device/launch/ui/SSHLaunchProtocolPage.java	2008-10-02 21:24:27 UTC (rev 830)
@@ -68,7 +68,9 @@
 		//
 		Composite pane1 = createCompositeEx( parent, 1, GridData.FILL_HORIZONTAL );
 		
-		fConnectionConfigPage = createConnectionConfigPane(pane1);
+		fConnectionConfigPage = getConnectionConfigPage();
+		fConnectionConfigPage.setLaunchConfigurationDialog(getLaunchConfigurationDialog());
+		fConnectionConfigPage.createControl(pane1);
 
 		createSeparator(parent, 1);
 		
@@ -78,12 +80,14 @@
 		createFileTablePane(pane2);
 	}
 
-	protected IConnectionConfigPage createConnectionConfigPane(Composite parent) {
-		IConnectionConfigPage page = new RawConnectionConfigPage();
-		page.setLaunchConfigurationDialog(getLaunchConfigurationDialog());
-		page.createControl(parent);
-		
-		return page;
+	/**
+	 * Get connection configuration page.
+	 * Subclass can provide its own implementation.
+	 * 
+	 * @return
+	 */
+	protected IConnectionConfigPage getConnectionConfigPage() {
+		return new RawConnectionConfigPage();
 	}
 	
 	protected void createFileTablePane(Composite parent) {
@@ -131,6 +135,13 @@
 		return fConnectionConfigPage.getErrorMessage();
 	}
 
+	public String getMessage() {
+		if ( (super.getMessage() != null) || (fConnectionConfigPage == null)) {
+			return super.getMessage();
+		}
+		return fConnectionConfigPage.getMessage();
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
 	 */



More information about the Esbox-commits mailing list