[Esbox-commits] r1545 - trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin

eswartz at garage.maemo.org eswartz at garage.maemo.org
Thu May 7 01:41:07 EEST 2009


Author: eswartz
Date: 2009-05-07 01:41:06 +0300 (Thu, 07 May 2009)
New Revision: 1545

Modified:
   trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/SDKTargetSelectionPage.java
Log:
Merge rev 1543 from work_Ed branch

Modified: trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/SDKTargetSelectionPage.java
===================================================================
--- trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/SDKTargetSelectionPage.java	2009-05-06 20:38:25 UTC (rev 1544)
+++ trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/SDKTargetSelectionPage.java	2009-05-06 22:41:06 UTC (rev 1545)
@@ -22,8 +22,6 @@
 import org.eclipse.jface.viewers.ICheckStateListener;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeSelection;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.jface.wizard.WizardPage;
@@ -35,7 +33,6 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 import org.maemo.esbox.internal.scratchbox.sb1.Activator;
-import org.maemo.esbox.scratchbox.sb1.sdk.IScratchbox1SDK;
 import org.maemo.mica.common.core.sdk.ISDK;
 import org.maemo.mica.common.core.sdk.ISDKTarget;
 import org.maemo.mica.common.project.core.IBuildTargetFilter;
@@ -233,22 +230,10 @@
 	 * @return
 	 */
 	public ISDK getScratchboxSDK() {
-		final ISDK[] sdk = new ISDK[1];
-		
-		Activator.getDefault().getWorkbench().getDisplay().syncExec(
-				new Runnable() {
-					public void run() {
-						for (TreePath path : ((TreeSelection)targetTree.getSelection()).getPaths()) {
-							Object obj = path.getFirstSegment();
-							if (ISDK.class.isAssignableFrom(obj
-									.getClass())) {
-								sdk[0] = (IScratchbox1SDK) obj;
-							}
-						}
-
-					}
-				});
-		return sdk[0];
+		for (ISDKTarget target : getTargets()) {
+			return target.getSDK();
+		}
+		return null;
 	}
 
 	/**



More information about the Esbox-commits mailing list