[Esbox-commits] r1186 - in trunk: org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/maemosdk/core org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/commands org.maemo.esbox.maemosdk.ui org.maemo.esbox.maemosdk.ui/META-INF org.maemo.esbox.maemosdk.ui/icons/full/obj16 org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/wizards org.maemo.esbox.product org.maemo.esbox.project.cpp org.maemo.esbox.project.cpp/META-INF org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/properties org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards org.maemo.esbox.project.python org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/scratchbox/core org.maemo.esbox.scratchbox.sb1/conf org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/scratchbox/sb1/sdk org.maemo.esbox.vm/src/org/maemo/esbox/vm/ui
eswartz at garage.maemo.org
eswartz at garage.maemo.org
Sun Feb 1 21:35:33 EET 2009
Author: eswartz
Date: 2009-02-01 21:35:32 +0200 (Sun, 01 Feb 2009)
New Revision: 1186
Added:
trunk/org.maemo.esbox.maemosdk.ui/icons/full/obj16/maemo_convert.png
trunk/org.maemo.esbox.maemosdk.ui/icons/full/obj16/package_install.png
trunk/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/wizards/
trunk/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/wizards/ESboxImportDebianSourcePackageProjectWizard.java
trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppDebianProjectImportConfigurationComposite.java
trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppDebianProjectSupport.java
trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppProjectDebianSupportAdapterFactory.java
trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppProjectImportConfigurationComposite.java
trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards/ConvertToESboxCppProjectWizard.java
trunk/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonDebianProjectImportConfigurationComposite.java
trunk/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonDebianProjectSupport.java
trunk/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonProjectDebianSupportAdapterFactory.java
Removed:
trunk/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/wizards/ESboxImportDebianSourcePackageProjectWizard.java
trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards/ConvertToMicaCppBuildConfigWizard.java
trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards/ConvertToMicaCppBuildConfigWizardPage.java
trunk/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/scratchbox/core/PersistentCache.java
Modified:
trunk/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/maemosdk/core/ESboxBuildTargetFilter.java
trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestProcessLauncher.java
trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB1ProcessLauncher.java
trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2ProcessLauncher.java
trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSb1SDKTarget.java
trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/commands/MockProcessLauncher.java
trunk/org.maemo.esbox.maemosdk.ui/META-INF/MANIFEST.MF
trunk/org.maemo.esbox.maemosdk.ui/plugin.xml
trunk/org.maemo.esbox.product/ESbox.product
trunk/org.maemo.esbox.product/plugin.properties
trunk/org.maemo.esbox.project.cpp/META-INF/MANIFEST.MF
trunk/org.maemo.esbox.project.cpp/plugin.xml
trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/ConvertCppProjectMarkerResolutionGenerator.java
trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/MaemoCppProjectPackageGatherer.java
trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/properties/ESBoxOldCppTargetPropertyPage.java
trunk/org.maemo.esbox.project.python/plugin.xml
trunk/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/ScratchboxPackageManagerProvider.java
trunk/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/CacheUtils.java
trunk/org.maemo.esbox.scratchbox.sb1/conf/run.sh
trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDKTarget.java
trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher/Scratchbox1ProcessLauncher.java
trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/scratchbox/sb1/sdk/IScratchbox1SDKTarget.java
trunk/org.maemo.esbox.vm/src/org/maemo/esbox/vm/ui/SelectVirtualMachineDialog.java
Log:
Merge revs 1136:HEAD from work_Ed branch (sprint 4 work) + new build
number
Modified: trunk/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/maemosdk/core/ESboxBuildTargetFilter.java
===================================================================
--- trunk/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/maemosdk/core/ESboxBuildTargetFilter.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/maemosdk/core/ESboxBuildTargetFilter.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -34,7 +34,7 @@
* @see org.maemo.mica.common.project.core.IBuildTargetFilter#accept(org.maemo.mica.common.core.sdk.ISDKTarget)
*/
public boolean accept(ISDKTarget sdkTarget) {
- return true;
+ return accept(sdkTarget.getSDK());
}
}
Modified: trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestProcessLauncher.java
===================================================================
--- trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestProcessLauncher.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestProcessLauncher.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -90,10 +90,11 @@
public void run(ISDKTarget target) throws Exception {
- String cmdText = "echo $CC $LDFLAGS =$SPACEY= \"$LAST\" $LANG$MAIL$IFS .";
+ String cmdText = "echo $CC $LDFLAGS +$PROXY+ =$SPACEY= \"$LAST\" $LANG$MAIL$IFS .";
IEnvironmentModifierBlock envVarBlock = EnvironmentManager.getInstance().createEnvironmentModifierBlock();
- envVarBlock.define("CC", "gcc");
+ envVarBlock.define("CC", "c:\\gcc");
envVarBlock.define("LDFLAGS", "-lm");
+ envVarBlock.define("PROXY", "127.0.0.1,nokia.com,192.168.*/24");
envVarBlock.define("SPACEY", "-a -b larry's -d"); // the ' should not cause a problem
envVarBlock.define("LAST", "*"); // this should not be expanded
envVarBlock.undefine("LANG");
@@ -108,7 +109,7 @@
int exit = processLauncher.waitAndRead(out, err);
assertEquals(target.getName() + ": " + err.toString(), 0, exit); // some targets can't handle export $@
assertEquals("", err.toString());
- assertStdTextEquals("gcc -lm =-a -b larry's -d= * .\n", out.toString());
+ assertStdTextEquals("c:\\gcc -lm +127.0.0.1,nokia.com,192.168.*/24+ =-a -b larry's -d= * .\n", out.toString());
}
});
@@ -136,6 +137,7 @@
});
}
+
/** Test launching and consuming output */
@Test
public void testStreamParsing() throws Exception {
Modified: trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB1ProcessLauncher.java
===================================================================
--- trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB1ProcessLauncher.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB1ProcessLauncher.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -133,7 +133,7 @@
String last = args.get(args.size() - 1);
// System.out.println(last);
assertEquals(
- "./run.sh " + tempPath.toPortableString() + " \\\"CC=gcc,LDFLAGS=-lm,SPACEY=a b c,WILD=*,-FOOBAR\\\" \\\"./configure --enable-maintainer-mode --disable-gtk\\\"",
+ "./run.sh " + tempPath.toPortableString() + " \\\"CC=gcc}LDFLAGS=-lm}SPACEY=a b c}WILD=*}-FOOBAR\\\" \\\"./configure --enable-maintainer-mode --disable-gtk\\\"",
last);
}
Modified: trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2ProcessLauncher.java
===================================================================
--- trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2ProcessLauncher.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2ProcessLauncher.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -89,9 +89,9 @@
// be sure no variables are left unexpanded
assertFalse(CommandLineArguments.toCommandLine(args).contains("${"));
- // assume the pattern is still sb2 -e -t ...
+ // assume the pattern is still sb2 [-e|-m <mode>] -J ...
assertEquals("sb2", args.get(0));
- assertTrue(args.contains("-t"));
+ assertTrue(args.contains("-J"));
assertTrue(args.contains("-e") || args.contains("-m"));
}
});
Modified: trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSb1SDKTarget.java
===================================================================
--- trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSb1SDKTarget.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSb1SDKTarget.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -84,8 +84,10 @@
List<String> targetDevkits = target.getDevkit();
String newDevkit = null;
for(String tmpDk : devkits){
- // do not use debian-lenny
- if(!tmpDk.equals("debian-lenny")&&!targetDevkits.contains(tmpDk)){
+ // do not use debian-lenny or debian-sarge, which mess up the arch name in ARMEL
+ if(!tmpDk.equals("debian-lenny")&&
+ !tmpDk.equals("debian-sarge")&&
+ !targetDevkits.contains(tmpDk)){
newDevkit = tmpDk;
break;
}
@@ -94,8 +96,13 @@
return;
//fail("Impossible to add new devkit, since target "+target.getName()+" already includes all devkits.");
assertTrue(target.addDevkit(newDevkit));
- targetDevkits = target.getDevkit();
- assertTrue(targetDevkits.contains(newDevkit));
+ try {
+ List<String> currentDevkits = target.getDevkit();
+ assertTrue(currentDevkits.contains(newDevkit));
+ } finally {
+ // restore
+ target.setDevkits(targetDevkits);
+ }
}
Modified: trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/commands/MockProcessLauncher.java
===================================================================
--- trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/commands/MockProcessLauncher.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/commands/MockProcessLauncher.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -17,6 +17,7 @@
import org.maemo.mica.common.core.MicaException;
import org.maemo.mica.common.core.env.IEnvironmentModifierBlock;
import org.maemo.mica.common.core.process.IProcessLauncher;
+import org.maemo.mica.common.core.process.IProcessMonitor;
import org.maemo.mica.common.core.process.IStreamLineMonitor;
import org.maemo.mica.common.core.sdk.ISDKTarget;
@@ -195,4 +196,11 @@
public int waitToComplete(IProgressMonitor monitor) {
return 0;
}
+
+ /* (non-Javadoc)
+ * @see org.maemo.mica.common.core.process.IProcessLauncher#createProcessMonitor()
+ */
+ public IProcessMonitor createProcessMonitor() {
+ return null;
+ }
}
Modified: trunk/org.maemo.esbox.maemosdk.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/org.maemo.esbox.maemosdk.ui/META-INF/MANIFEST.MF 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.maemosdk.ui/META-INF/MANIFEST.MF 2009-02-01 19:35:32 UTC (rev 1186)
@@ -12,7 +12,9 @@
org.maemo.mica.common.ui;bundle-version="2.0.0",
org.maemo.esbox.maemosdk.core;bundle-version="2.0.0",
org.eclipse.ui.ide;bundle-version="3.4.1",
- org.eclipse.ui.views;bundle-version="3.3.0"
+ org.eclipse.ui.views;bundle-version="3.3.0",
+ org.maemo.mica.linux.packages.core;bundle-version="2.0.0",
+ org.maemo.mica.linux.packages.ui;bundle-version="2.0.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Export-Package: org.maemo.esbox.internal.api.maemosdk.ui.preferences,
Copied: trunk/org.maemo.esbox.maemosdk.ui/icons/full/obj16/maemo_convert.png (from rev 1185, branches/work_Ed/org.maemo.esbox.maemosdk.ui/icons/full/obj16/maemo_convert.png)
===================================================================
(Binary files differ)
Copied: trunk/org.maemo.esbox.maemosdk.ui/icons/full/obj16/package_install.png (from rev 1185, branches/work_Ed/org.maemo.esbox.maemosdk.ui/icons/full/obj16/package_install.png)
===================================================================
(Binary files differ)
Modified: trunk/org.maemo.esbox.maemosdk.ui/plugin.xml
===================================================================
--- trunk/org.maemo.esbox.maemosdk.ui/plugin.xml 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.maemosdk.ui/plugin.xml 2009-02-01 19:35:32 UTC (rev 1186)
@@ -75,5 +75,24 @@
</action>
</actionSet>
</extension>
-
+
+ <extension
+ point="org.eclipse.ui.importWizards">
+ <wizard
+ category="org.maemo.esbox.Import"
+ class="org.maemo.esbox.internal.maemosdk.ui.wizards.ESboxImportDebianSourcePackageProjectWizard"
+ icon="icons/full/obj16/package_install.png"
+ id="org.maemo.esbox.maemosdk.ui.wizards.ImportDebianSourcePackageProject"
+ name="Project from Debian Repository">
+ <description>
+ Import a project from sources in an Debian apt repository.
+ </description>
+ <selection
+ class="org.eclipse.core.resources.IProject">
+ </selection>
+ </wizard>
+ <category
+ id="org.maemo.esbox.Import"
+ name="ESbox"/>
+ </extension>
</plugin>
Copied: trunk/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/wizards (from rev 1185, branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/wizards)
Deleted: trunk/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/wizards/ESboxImportDebianSourcePackageProjectWizard.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/wizards/ESboxImportDebianSourcePackageProjectWizard.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/wizards/ESboxImportDebianSourcePackageProjectWizard.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Nokia Corporation
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Swartz (Nokia) - initial API and implementation
- *******************************************************************************/
-
-package org.maemo.esbox.internal.maemosdk.ui.wizards;
-
-import org.eclipse.ui.IImportWizard;
-import org.maemo.esbox.maemosdk.core.ESboxBuildTargetFilter;
-import org.maemo.mica.common.project.core.IBuildTargetFilter;
-import org.maemo.mica.linux.packages.ui.wizards.ImportDebianSourcePackageWizard;
-
-/**
- * ESbox Debian Project Importer
- * @author eswartz
- *
- */
-public class ESboxImportDebianSourcePackageProjectWizard extends
- ImportDebianSourcePackageWizard implements IImportWizard {
-
- /**
- *
- */
- public ESboxImportDebianSourcePackageProjectWizard() {
- setWindowTitle("Import ESbox Project from Repository");
- }
-
- /* (non-Javadoc)
- * @see org.maemo.mica.linux.packages.ui.wizards.ImportDebianSourcePackageWizard#createBuildTargetFilter()
- */
- @Override
- protected IBuildTargetFilter createBuildTargetFilter() {
- return new ESboxBuildTargetFilter();
- }
-
-}
Copied: trunk/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/wizards/ESboxImportDebianSourcePackageProjectWizard.java (from rev 1185, branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/wizards/ESboxImportDebianSourcePackageProjectWizard.java)
===================================================================
--- trunk/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/wizards/ESboxImportDebianSourcePackageProjectWizard.java (rev 0)
+++ trunk/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/wizards/ESboxImportDebianSourcePackageProjectWizard.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.maemosdk.ui.wizards;
+
+import org.eclipse.ui.IImportWizard;
+import org.maemo.esbox.maemosdk.core.ESboxBuildTargetFilter;
+import org.maemo.mica.common.project.core.IBuildTargetFilter;
+import org.maemo.mica.linux.packages.ui.wizards.ImportDebianSourcePackageWizard;
+
+/**
+ * ESbox Debian Project Importer
+ * @author eswartz
+ *
+ */
+public class ESboxImportDebianSourcePackageProjectWizard extends
+ ImportDebianSourcePackageWizard implements IImportWizard {
+
+ /**
+ *
+ */
+ public ESboxImportDebianSourcePackageProjectWizard() {
+ setWindowTitle("Import ESbox Project from Repository");
+ }
+
+ /* (non-Javadoc)
+ * @see org.maemo.mica.linux.packages.ui.wizards.ImportDebianSourcePackageWizard#createBuildTargetFilter()
+ */
+ @Override
+ protected IBuildTargetFilter createBuildTargetFilter() {
+ return new ESboxBuildTargetFilter();
+ }
+
+}
Modified: trunk/org.maemo.esbox.product/ESbox.product
===================================================================
--- trunk/org.maemo.esbox.product/ESbox.product 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.product/ESbox.product 2009-02-01 19:35:32 UTC (rev 1186)
@@ -1,163 +1,163 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.4"?>
-
-<product name="ESbox" id="org.maemo.esbox.product.esbox" application="org.eclipse.ui.ide.workbench" version="2.0.0-I20090114" useFeatures="true">
-
- <aboutInfo>
- <image path="/org.maemo.esbox.product/icons/esbox_64.png"/>
- <text>
- %productBlurb
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.4"?>
+
+<product name="ESbox" id="org.maemo.esbox.product.esbox" application="org.eclipse.ui.ide.workbench" version="2.0.0-I20090202" useFeatures="true">
+
+ <aboutInfo>
+ <image path="/org.maemo.esbox.product/icons/esbox_64.png"/>
+ <text>
+ %productBlurb
+ </text>
+ </aboutInfo>
+
+ <configIni use="default">
+ </configIni>
+
+ <launcherArgs>
<vmArgs>-Xms40m
-Xmx800m
--XX:MaxPermSize=128m</vmArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="/org.maemo.esbox.product/icons/esbox_16.png" i32="/org.maemo.esbox.product/icons/esbox_32.png" i48="/org.maemo.esbox.product/icons/esbox_48.png" i64="/org.maemo.esbox.product/icons/esbox_64.png" i128="/org.maemo.esbox.product/icons/esbox_128.png"/>
-
- <splash
- location="org.maemo.esbox.product"
- startupProgressRect="0,176,467,16"
- startupMessageRect="32,160,398,16"
- startupForegroundColor="000000" />
- <launcher name="esbox">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <intro introId="org.maemo.esbox.product.intro"/>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="com.jcraft.jsch"/>
- <plugin id="com.redhat.eclipse.cdt.autotools"/>
- <plugin id="org.eclipse.cdt.core"/>
- <plugin id="org.eclipse.cdt.core.aix"/>
+-XX:MaxPermSize=128m</vmArgs>
+ <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
+ </launcherArgs>
+
+ <windowImages i16="/org.maemo.esbox.product/icons/esbox_16.png" i32="/org.maemo.esbox.product/icons/esbox_32.png" i48="/org.maemo.esbox.product/icons/esbox_48.png" i64="/org.maemo.esbox.product/icons/esbox_64.png" i128="/org.maemo.esbox.product/icons/esbox_128.png"/>
+
+ <splash
+ location="org.maemo.esbox.product"
+ startupProgressRect="0,176,467,16"
+ startupMessageRect="32,160,398,16"
+ startupForegroundColor="000000" />
+ <launcher name="esbox">
+ <solaris/>
+ <win useIco="false">
+ <bmp/>
+ </win>
+ </launcher>
+
+ <intro introId="org.maemo.esbox.product.intro"/>
+
+ <vm>
+ </vm>
+
+ <plugins>
+ <plugin id="com.ibm.icu"/>
+ <plugin id="com.jcraft.jsch"/>
+ <plugin id="com.redhat.eclipse.cdt.autotools"/>
+ <plugin id="org.eclipse.cdt.core"/>
+ <plugin id="org.eclipse.cdt.core.aix"/>
<plugin id="org.eclipse.cdt.core.linux" fragment="true"/>
- <plugin id="org.eclipse.cdt.core.linux.ia64"/>
- <plugin id="org.eclipse.cdt.core.linux.ppc"/>
+ <plugin id="org.eclipse.cdt.core.linux.ia64"/>
+ <plugin id="org.eclipse.cdt.core.linux.ppc"/>
<plugin id="org.eclipse.cdt.core.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.cdt.core.linux.x86_64"/>
- <plugin id="org.eclipse.cdt.core.macosx"/>
- <plugin id="org.eclipse.cdt.core.qnx"/>
- <plugin id="org.eclipse.cdt.core.solaris"/>
+ <plugin id="org.eclipse.cdt.core.linux.x86_64"/>
+ <plugin id="org.eclipse.cdt.core.macosx"/>
+ <plugin id="org.eclipse.cdt.core.qnx"/>
+ <plugin id="org.eclipse.cdt.core.solaris"/>
<plugin id="org.eclipse.cdt.core.win32"/>
- <plugin id="org.eclipse.cdt.debug.core"/>
- <plugin id="org.eclipse.cdt.debug.mi.core"/>
- <plugin id="org.eclipse.cdt.debug.mi.ui"/>
- <plugin id="org.eclipse.cdt.debug.ui"/>
- <plugin id="org.eclipse.cdt.launch"/>
- <plugin id="org.eclipse.cdt.make.core"/>
- <plugin id="org.eclipse.cdt.make.ui"/>
- <plugin id="org.eclipse.cdt.managedbuilder.core"/>
- <plugin id="org.eclipse.cdt.managedbuilder.gnu.ui"/>
- <plugin id="org.eclipse.cdt.managedbuilder.ui"/>
- <plugin id="org.eclipse.cdt.ui"/>
- <plugin id="org.eclipse.compare"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.filebuffers"/>
- <plugin id="org.eclipse.core.filesystem"/>
+ <plugin id="org.eclipse.cdt.debug.core"/>
+ <plugin id="org.eclipse.cdt.debug.mi.core"/>
+ <plugin id="org.eclipse.cdt.debug.mi.ui"/>
+ <plugin id="org.eclipse.cdt.debug.ui"/>
+ <plugin id="org.eclipse.cdt.launch"/>
+ <plugin id="org.eclipse.cdt.make.core"/>
+ <plugin id="org.eclipse.cdt.make.ui"/>
+ <plugin id="org.eclipse.cdt.managedbuilder.core"/>
+ <plugin id="org.eclipse.cdt.managedbuilder.gnu.ui"/>
+ <plugin id="org.eclipse.cdt.managedbuilder.ui"/>
+ <plugin id="org.eclipse.cdt.ui"/>
+ <plugin id="org.eclipse.compare"/>
+ <plugin id="org.eclipse.core.commands"/>
+ <plugin id="org.eclipse.core.contenttype"/>
+ <plugin id="org.eclipse.core.databinding"/>
+ <plugin id="org.eclipse.core.expressions"/>
+ <plugin id="org.eclipse.core.filebuffers"/>
+ <plugin id="org.eclipse.core.filesystem"/>
<plugin id="org.eclipse.core.filesystem.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.net"/>
+ <plugin id="org.eclipse.core.jobs"/>
+ <plugin id="org.eclipse.core.net"/>
<plugin id="org.eclipse.core.net.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.core.resources"/>
- <plugin id="org.eclipse.core.resources.compatibility" fragment="true"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.core.variables"/>
- <plugin id="org.eclipse.dd.dsf"/>
- <plugin id="org.eclipse.dd.dsf.debug"/>
- <plugin id="org.eclipse.dd.dsf.debug.ui"/>
- <plugin id="org.eclipse.dd.dsf.ui"/>
- <plugin id="org.eclipse.dd.gdb"/>
- <plugin id="org.eclipse.dd.gdb.ui"/>
- <plugin id="org.eclipse.dd.mi"/>
- <plugin id="org.eclipse.debug.core"/>
- <plugin id="org.eclipse.debug.ui"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.jface.text"/>
- <plugin id="org.eclipse.jsch.core"/>
- <plugin id="org.eclipse.ltk.core.refactoring"/>
- <plugin id="org.eclipse.ltk.ui.refactoring"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.search"/>
- <plugin id="org.eclipse.swt"/>
+ <plugin id="org.eclipse.core.resources"/>
+ <plugin id="org.eclipse.core.resources.compatibility" fragment="true"/>
+ <plugin id="org.eclipse.core.runtime"/>
+ <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
+ <plugin id="org.eclipse.core.variables"/>
+ <plugin id="org.eclipse.dd.dsf"/>
+ <plugin id="org.eclipse.dd.dsf.debug"/>
+ <plugin id="org.eclipse.dd.dsf.debug.ui"/>
+ <plugin id="org.eclipse.dd.dsf.ui"/>
+ <plugin id="org.eclipse.dd.gdb"/>
+ <plugin id="org.eclipse.dd.gdb.ui"/>
+ <plugin id="org.eclipse.dd.mi"/>
+ <plugin id="org.eclipse.debug.core"/>
+ <plugin id="org.eclipse.debug.ui"/>
+ <plugin id="org.eclipse.equinox.app"/>
+ <plugin id="org.eclipse.equinox.common"/>
+ <plugin id="org.eclipse.equinox.preferences"/>
+ <plugin id="org.eclipse.equinox.registry"/>
+ <plugin id="org.eclipse.equinox.security"/>
+ <plugin id="org.eclipse.help"/>
+ <plugin id="org.eclipse.jface"/>
+ <plugin id="org.eclipse.jface.databinding"/>
+ <plugin id="org.eclipse.jface.text"/>
+ <plugin id="org.eclipse.jsch.core"/>
+ <plugin id="org.eclipse.ltk.core.refactoring"/>
+ <plugin id="org.eclipse.ltk.ui.refactoring"/>
+ <plugin id="org.eclipse.osgi"/>
+ <plugin id="org.eclipse.search"/>
+ <plugin id="org.eclipse.swt"/>
<plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.team.core"/>
- <plugin id="org.eclipse.team.ui"/>
- <plugin id="org.eclipse.text"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.browser"/>
- <plugin id="org.eclipse.ui.console"/>
- <plugin id="org.eclipse.ui.editors"/>
- <plugin id="org.eclipse.ui.forms"/>
- <plugin id="org.eclipse.ui.ide"/>
- <plugin id="org.eclipse.ui.ide.application"/>
- <plugin id="org.eclipse.ui.intro"/>
- <plugin id="org.eclipse.ui.navigator"/>
- <plugin id="org.eclipse.ui.navigator.resources"/>
- <plugin id="org.eclipse.ui.net"/>
- <plugin id="org.eclipse.ui.views"/>
- <plugin id="org.eclipse.ui.views.properties.tabbed"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.eclipse.ui.workbench.texteditor"/>
- <plugin id="org.eclipse.update.configurator"/>
- <plugin id="org.eclipse.update.core"/>
+ <plugin id="org.eclipse.team.core"/>
+ <plugin id="org.eclipse.team.ui"/>
+ <plugin id="org.eclipse.text"/>
+ <plugin id="org.eclipse.ui"/>
+ <plugin id="org.eclipse.ui.browser"/>
+ <plugin id="org.eclipse.ui.console"/>
+ <plugin id="org.eclipse.ui.editors"/>
+ <plugin id="org.eclipse.ui.forms"/>
+ <plugin id="org.eclipse.ui.ide"/>
+ <plugin id="org.eclipse.ui.ide.application"/>
+ <plugin id="org.eclipse.ui.intro"/>
+ <plugin id="org.eclipse.ui.navigator"/>
+ <plugin id="org.eclipse.ui.navigator.resources"/>
+ <plugin id="org.eclipse.ui.net"/>
+ <plugin id="org.eclipse.ui.views"/>
+ <plugin id="org.eclipse.ui.views.properties.tabbed"/>
+ <plugin id="org.eclipse.ui.workbench"/>
+ <plugin id="org.eclipse.ui.workbench.texteditor"/>
+ <plugin id="org.eclipse.update.configurator"/>
+ <plugin id="org.eclipse.update.core"/>
<plugin id="org.eclipse.update.core.linux" fragment="true"/>
- <plugin id="org.indt.esbox.core"/>
- <plugin id="org.indt.esbox.debug"/>
- <plugin id="org.indt.esbox.help"/>
- <plugin id="org.indt.esbox.launch"/>
- <plugin id="org.indt.esbox.python.debug"/>
- <plugin id="org.indt.esbox.python.launch"/>
- <plugin id="org.indt.esbox.python.ui"/>
- <plugin id="org.indt.esbox.ui"/>
- <plugin id="org.maemo.esbox.debug.dsf.gdb"/>
- <plugin id="org.maemo.esbox.product"/>
- <plugin id="org.maemo.esbox.project.core"/>
- <plugin id="org.maemo.esbox.project.ui"/>
- <plugin id="org.python.pydev"/>
- <plugin id="org.python.pydev.ast"/>
- <plugin id="org.python.pydev.core"/>
- <plugin id="org.python.pydev.debug"/>
- <plugin id="org.python.pydev.jython"/>
- <plugin id="org.python.pydev.parser"/>
- </plugins>
-
- <features>
- <feature id="org.maemo.esbox.product" version="0.0.0"/>
- <feature id="org.maemo.esbox.product.supplement" version="0.0.0"/>
- <feature id="com.redhat.eclipse.cdt.autotools.feature" version="0.0.0"/>
- <feature id="org.eclipse.dd.dsf.gdb" version="0.0.0"/>
- <feature id="org.eclipse.dd.dsf.gdb_launch" version="0.0.0"/>
- <feature id="org.eclipse.dd.dsf.sdk" version="0.0.0"/>
- <feature id="org.python.pydev.feature" version="0.0.0"/>
- <feature id="org.eclipse.platform" version="0.0.0"/>
- <feature id="org.eclipse.cdt" version="0.0.0"/>
- <feature id="org.eclipse.rse" version="0.0.0"/>
- </features>
-
-</product>
+ <plugin id="org.indt.esbox.core"/>
+ <plugin id="org.indt.esbox.debug"/>
+ <plugin id="org.indt.esbox.help"/>
+ <plugin id="org.indt.esbox.launch"/>
+ <plugin id="org.indt.esbox.python.debug"/>
+ <plugin id="org.indt.esbox.python.launch"/>
+ <plugin id="org.indt.esbox.python.ui"/>
+ <plugin id="org.indt.esbox.ui"/>
+ <plugin id="org.maemo.esbox.debug.dsf.gdb"/>
+ <plugin id="org.maemo.esbox.product"/>
+ <plugin id="org.maemo.esbox.project.core"/>
+ <plugin id="org.maemo.esbox.project.ui"/>
+ <plugin id="org.python.pydev"/>
+ <plugin id="org.python.pydev.ast"/>
+ <plugin id="org.python.pydev.core"/>
+ <plugin id="org.python.pydev.debug"/>
+ <plugin id="org.python.pydev.jython"/>
+ <plugin id="org.python.pydev.parser"/>
+ </plugins>
+
+ <features>
+ <feature id="org.maemo.esbox.product" version="0.0.0"/>
+ <feature id="org.maemo.esbox.product.supplement" version="0.0.0"/>
+ <feature id="com.redhat.eclipse.cdt.autotools.feature" version="0.0.0"/>
+ <feature id="org.eclipse.dd.dsf.gdb" version="0.0.0"/>
+ <feature id="org.eclipse.dd.dsf.gdb_launch" version="0.0.0"/>
+ <feature id="org.eclipse.dd.dsf.sdk" version="0.0.0"/>
+ <feature id="org.python.pydev.feature" version="0.0.0"/>
+ <feature id="org.eclipse.platform" version="0.0.0"/>
+ <feature id="org.eclipse.cdt" version="0.0.0"/>
+ <feature id="org.eclipse.rse" version="0.0.0"/>
+ </features>
+
+</product>
Modified: trunk/org.maemo.esbox.product/plugin.properties
===================================================================
--- trunk/org.maemo.esbox.product/plugin.properties 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.product/plugin.properties 2009-02-01 19:35:32 UTC (rev 1186)
@@ -13,7 +13,7 @@
productName=ESbox
productBlurb=ESbox\n\
-version: 2.0.0-I20090114\n\
+version: 2.0.0-I20090202\n\
Eclipse build id: {0}\n\
\n\
Copyright (c)2007-2009 INdT, 2007-2009 Nokia Corporation. All rights reserved.\n\
@@ -28,7 +28,7 @@
shortcut.samples.tooltip = Samples
shortcut.whatsnew.tooltip = What's New
-productIntroTitle = Welcome to ESbox 2.0.0-I20090114
+productIntroTitle = Welcome to ESbox 2.0.0-I20090202
productIntroBrandingText = ESbox
introDescription-overview = ESbox is an Eclipse plug-in that helps programmers to develop applications for maemo platform on Scratchbox Apophis.
introDescription-tutorials = Learn how to be productive using ESbox by completing end-to-end tutorials that will guide you along the way.
Modified: trunk/org.maemo.esbox.project.cpp/META-INF/MANIFEST.MF
===================================================================
--- trunk/org.maemo.esbox.project.cpp/META-INF/MANIFEST.MF 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.project.cpp/META-INF/MANIFEST.MF 2009-02-01 19:35:32 UTC (rev 1186)
@@ -18,6 +18,7 @@
org.eclipse.cdt.make.core;bundle-version="5.0.1",
org.eclipse.cdt.make.ui;bundle-version="5.0.1",
org.eclipse.cdt.ui;bundle-version="5.0.1",
- org.maemo.mica.linux.packages.core;bundle-version="2.0.0"
+ org.maemo.mica.linux.packages.core;bundle-version="2.0.0",
+ org.maemo.mica.linux.packages.ui;bundle-version="2.0.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Modified: trunk/org.maemo.esbox.project.cpp/plugin.xml
===================================================================
--- trunk/org.maemo.esbox.project.cpp/plugin.xml 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.project.cpp/plugin.xml 2009-02-01 19:35:32 UTC (rev 1186)
@@ -6,7 +6,7 @@
point="org.eclipse.ui.newWizards">
<wizard
category="org.eclipse.cdt.ui.newCWizards"
- class="org.maemo.esbox.internal.project.cpp.ui.wizards.ConvertToMicaCppBuildConfigWizard"
+ class="org.maemo.esbox.internal.project.cpp.ui.wizards.ConvertToESboxCppProjectWizard"
finalPerspective="org.eclipse.cdt.ui.CPerspective"
hasPages="true"
icon="icons/full/obj16/maemo_convert.png"
@@ -21,7 +21,7 @@
</wizard>
<wizard
category="org.eclipse.cdt.ui.newCCWizards"
- class="org.maemo.esbox.internal.project.cpp.ui.wizards.ConvertToMicaCppBuildConfigWizard"
+ class="org.maemo.esbox.internal.project.cpp.ui.wizards.ConvertToESboxCppProjectWizard"
finalPerspective="org.eclipse.cdt.ui.CPerspective"
hasPages="true"
icon="icons/full/obj16/maemo_convert.png"
@@ -34,6 +34,7 @@
class="org.eclipse.core.resources.IProject">
</selection>
</wizard>
+
</extension>
<extension
point="org.eclipse.ui.newWizards">
@@ -61,6 +62,89 @@
</wizard>
</extension>
+
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <commonWizard
+ associatedExtensionId="org.eclipse.cdt.ui.navigator.content"
+ menuGroupId="org.eclipse.cdt.ui.newProject"
+ type="new"
+ wizardId="org.maemo.mica.cpp.project.ui.wizards.ConvertToESboxWizard">
+ <enablement>
+ <and>
+ <adapt
+ type="org.eclipse.core.resources.IProject">
+ </adapt>
+ <not>
+ <adapt
+ type="org.eclipse.core.resources.IProject">
+ <test
+ property="org.eclipse.core.resources.projectNature"
+ value="org.maemo.mica.cpp.project.core.ESboxCppNature">
+ </test>
+ </adapt>
+ </not>
+ </and>
+ </enablement>
+ </commonWizard>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <commonWizard
+ menuGroupId="org.eclipse.cdt.ui.newProject"
+ type="new"
+ wizardId="org.maemo.mica.cpp.project.ui.wizards.ESboxCppCProjectWizard">
+ <enablement></enablement>
+ </commonWizard>
+ <commonWizard
+ menuGroupId="org.eclipse.cdt.ui.newProject"
+ type="new"
+ wizardId="org.maemo.mica.cpp.project.ui.wizards.ESboxCppCCProjectWizard">
+ <enablement></enablement>
+ </commonWizard>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <commonWizard
+ associatedExtensionId="org.eclipse.cdt.ui.navigator.content"
+ menuGroupId="org.eclipse.cdt.ui.newProject"
+ type="new"
+ wizardId="org.maemo.mica.cpp.project.ui.wizards.ConvertToESboxCppBuildConfigWizard">
+ <enablement>
+ <and>
+ <adapt type="org.eclipse.core.resources.IProject" />
+ <not>
+ <adapt type="org.eclipse.core.resources.IProject" >
+ <test
+ property="org.eclipse.core.resources.projectNature"
+ value="org.maemo.mica.cpp.project.core.ESboxCppNature"/>
+ </adapt>
+ </not>
+ </and>
+ <and>
+ <adapt type="org.eclipse.core.resources.IProject" />
+ <not>
+ <adapt type="org.eclipse.core.resources.IProject" >
+ <test
+ property="org.eclipse.core.resources.projectNature"
+ value="org.maemo.mica.python.project.core.ESboxPythonNature"/>
+ </adapt>
+ </not>
+ </and>
+ </enablement>
+ </commonWizard>
+
+ <commonWizard
+ associatedExtensionId="org.eclipse.cdt.ui.navigator.content"
+ menuGroupId="org.eclipse.cdt.ui.newProject"
+ type="new"
+ wizardId="org.maemo.mica.cpp.project.ui.wizards.ESboxNewCppBuildConfigProjectWizard">
+ <enablement>
+ </enablement>
+ </commonWizard>
+ </extension>
+
<extension
point="org.eclipse.ui.propertyPages">
<page
@@ -94,4 +178,15 @@
</projectPackageGatherer>
</extension>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.maemo.mica.cpp.project.core.MicaCppProjectType"
+ class="org.maemo.esbox.internal.project.cpp.core.CppProjectDebianSupportAdapterFactory">
+ <adapter
+ type="org.maemo.mica.linux.packages.core.adapters.IDebianProjectConvertImportSupport">
+ </adapter>
+ </factory>
+ </extension>
+
</plugin>
Modified: trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/ConvertCppProjectMarkerResolutionGenerator.java
===================================================================
--- trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/ConvertCppProjectMarkerResolutionGenerator.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/ConvertCppProjectMarkerResolutionGenerator.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -18,7 +18,7 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.*;
import org.maemo.esbox.internal.project.cpp.Activator;
-import org.maemo.esbox.internal.project.cpp.ui.wizards.ConvertToMicaCppBuildConfigWizard;
+import org.maemo.esbox.internal.project.cpp.ui.wizards.ConvertToESboxCppProjectWizard;
import org.maemo.mica.common.project.core.IOldESboxProjectBuilder;
/**
@@ -61,7 +61,7 @@
public void run(IMarker marker) {
try {
- ConvertToMicaCppBuildConfigWizard wizard = new ConvertToMicaCppBuildConfigWizard();
+ ConvertToESboxCppProjectWizard wizard = new ConvertToESboxCppProjectWizard();
WizardDialog dialog = new WizardDialog(null, wizard);
if (dialog.open() == IDialogConstants.OK_ID) {
marker.delete();
Copied: trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppDebianProjectImportConfigurationComposite.java (from rev 1185, branches/work_Ed/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppDebianProjectImportConfigurationComposite.java)
===================================================================
--- trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppDebianProjectImportConfigurationComposite.java (rev 0)
+++ trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppDebianProjectImportConfigurationComposite.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.project.cpp.core;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.maemo.mica.common.core.IValidatingDialogPage;
+import org.maemo.mica.common.project.core.IProjectTypeConfigKeys;
+import org.maemo.mica.common.project.core.ProjectConfigHandler;
+import org.maemo.mica.cpp.project.core.MicaCppProjectType;
+
+/**
+ * This composite contains the configurable aspects of a project for a Debian
+ * source package.
+ * @author eswartz
+ *
+ */
+public class CppDebianProjectImportConfigurationComposite extends CppProjectImportConfigurationComposite {
+
+ private String[] rules;
+
+ public CppDebianProjectImportConfigurationComposite(
+ Composite parent,
+ IValidatingDialogPage dialogPage, MicaCppProjectType projectType,
+ final IProject project,
+ final IPath projectLocation,
+ ProjectConfigHandler configHandler,
+ String[] rules) {
+ super(parent, SWT.NONE, dialogPage, projectType, project, projectLocation, configHandler,
+ false, true);
+ this.rules = rules;
+ }
+
+ /* (non-Javadoc)
+ * @see org.maemo.esbox.internal.project.cpp.core.CppProjectImportConfigurationComposite#init()
+ */
+ @Override
+ protected void setFieldContents() {
+ super.setFieldContents();
+
+ buildConfigureTargetField.setItems(rules);
+ buildIncrTargetField.setItems(rules);
+ buildAutoTargetField.setItems(rules);
+ buildCleanTargetField.setItems(rules);
+ }
+
+ /* (non-Javadoc)
+ * @see org.maemo.esbox.internal.project.cpp.core.CppProjectImportConfigurationComposite#initRules(boolean, boolean, boolean, boolean)
+ */
+ @Override
+ protected void initRules(boolean gotConfigureRule, boolean gotCleanRule,
+ boolean gotIncrRule) {
+ super.initRules(gotConfigureRule, gotCleanRule, gotIncrRule);
+
+ // get default rules based on guesses
+ for (String rule : rules) {
+ if (!gotConfigureRule && rule.contains("config")) {
+ setRule(IProjectTypeConfigKeys.KEY_CONFIGURE_BUILD_SETTING, rule, buildConfigureTargetField);
+ gotConfigureRule = true;
+ }
+ if (!gotCleanRule && rule.contains("clean")) {
+ setRule(IProjectTypeConfigKeys.KEY_CLEAN_BUILD_SETTING, rule, buildCleanTargetField);
+ gotCleanRule = true;
+ }
+ if (!gotIncrRule && (rule.contains("build") || rule.contains("all"))) {
+ setRule(IProjectTypeConfigKeys.KEY_INCREMENTAL_BUILD_SETTING, rule, buildIncrTargetField);
+ gotIncrRule = true;
+ }
+ }
+ }
+}
Copied: trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppDebianProjectSupport.java (from rev 1185, branches/work_Ed/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppDebianProjectSupport.java)
===================================================================
--- trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppDebianProjectSupport.java (rev 0)
+++ trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppDebianProjectSupport.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.project.cpp.core;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.swt.widgets.Composite;
+import org.maemo.mica.common.core.IValidatingDialogPage;
+import org.maemo.mica.common.project.core.ProjectConfigHandler;
+import org.maemo.mica.cpp.project.core.MicaCppProjectType;
+import org.maemo.mica.linux.packages.core.adapters.IDebianProjectConvertImportSupport;
+
+/**
+ * @author eswartz
+ *
+ */
+public class CppDebianProjectSupport implements IDebianProjectConvertImportSupport {
+
+ private final MicaCppProjectType projectType;
+
+ /**
+ * @param adaptableObject
+ */
+ public CppDebianProjectSupport(MicaCppProjectType projectType) {
+ this.projectType = projectType;
+ }
+
+ /* (non-Javadoc)
+ * @see org.maemo.mica.linux.packages.core.adapters.IDebianProjectSupport#createProjectImportConfigurationComposite(org.eclipse.swt.widgets.Composite, org.eclipse.jface.dialogs.IDialogPage, org.eclipse.core.resources.IProject, org.eclipse.core.runtime.IPath, org.maemo.mica.common.project.core.ProjectConfigHandler)
+ */
+ public Composite createDebianProjectImportConfigurationComposite(Composite parent,
+ int style, IValidatingDialogPage dialogPage, IProject project,
+ IPath projectLocation, ProjectConfigHandler configHandler, String[] debianRules) {
+
+ CppProjectImportConfigurationComposite configComposite =
+ new CppDebianProjectImportConfigurationComposite(
+ parent,
+ dialogPage,
+ projectType,
+ project,
+ projectLocation,
+ configHandler,
+ debianRules
+ );
+
+ configComposite.init();
+
+ return configComposite;
+ }
+
+}
Copied: trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppProjectDebianSupportAdapterFactory.java (from rev 1185, branches/work_Ed/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppProjectDebianSupportAdapterFactory.java)
===================================================================
--- trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppProjectDebianSupportAdapterFactory.java (rev 0)
+++ trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppProjectDebianSupportAdapterFactory.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.project.cpp.core;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.maemo.mica.cpp.project.core.MicaCppProjectType;
+import org.maemo.mica.linux.packages.core.adapters.IDebianProjectConvertImportSupport;
+
+/**
+ * This factory proclaims Debian support for a project type.
+ * @author eswartz
+ *
+ */
+public class CppProjectDebianSupportAdapterFactory implements IAdapterFactory {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ */
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (adaptableObject instanceof MicaCppProjectType) {
+ if (adapterType.equals(IDebianProjectConvertImportSupport.class)) {
+ return new CppDebianProjectSupport((MicaCppProjectType) adaptableObject);
+ }
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+ */
+ public Class[] getAdapterList() {
+ return new Class[] { IDebianProjectConvertImportSupport.class };
+ }
+
+}
Copied: trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppProjectImportConfigurationComposite.java (from rev 1185, branches/work_Ed/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppProjectImportConfigurationComposite.java)
===================================================================
--- trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppProjectImportConfigurationComposite.java (rev 0)
+++ trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/CppProjectImportConfigurationComposite.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -0,0 +1,333 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.project.cpp.core;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.maemo.mica.common.core.IValidatingDialogPage;
+import org.maemo.mica.common.project.core.IProjectType;
+import org.maemo.mica.common.project.core.ProjectConfigHandler;
+import org.maemo.mica.common.project.ui.wizards.BaseProjectImportConfigurationComposite;
+import org.maemo.mica.common.ui.common.ComboDialogField;
+import org.maemo.mica.common.ui.common.GridLayoutWrappedTextUtils;
+import org.maemo.mica.cpp.project.core.MicaCppProjectType;
+
+import com.nokia.cpp.internal.api.utils.core.FileUtils;
+
+/**
+ * This is the basic UI for configuring a C/C++ project on import or conversion.
+ * @author eswartz
+ *
+ */
+public class CppProjectImportConfigurationComposite extends BaseProjectImportConfigurationComposite {
+
+ protected ComboDialogField buildLocationField;
+ protected ComboDialogField buildConfigureTargetField;
+ protected ComboDialogField buildIncrTargetField;
+ protected ComboDialogField buildAutoTargetField;
+ protected ComboDialogField buildCleanTargetField;
+ protected String[] allDirs;
+ protected IPath projectLocation;
+ protected MicaCppProjectType projectType;
+ private boolean showBuildLocation;
+ private boolean showConfigureRule;
+
+ /**
+ * @param parent
+ * @param style
+ * @param dialogPage
+ */
+ public CppProjectImportConfigurationComposite(Composite parent, int style,
+ IValidatingDialogPage dialogPage, MicaCppProjectType projectType,
+ final IProject project,
+ final IPath projectLocation,
+ ProjectConfigHandler configHandler,
+ boolean showBuildLocation, boolean showConfigureRule) {
+ super(parent, style, dialogPage, project, projectLocation, configHandler);
+ this.projectType = projectType;
+ this.projectLocation = projectLocation;
+ this.showBuildLocation = showBuildLocation;
+ this.showConfigureRule = showConfigureRule;
+
+ }
+
+ /**
+ * @param parent
+ * @param style
+ * @param dialogPage
+ */
+ public CppProjectImportConfigurationComposite(Composite parent, int style,
+ IValidatingDialogPage dialogPage, MicaCppProjectType projectType,
+ final IProject project,
+ final IPath projectLocation,
+ ProjectConfigHandler configHandler) {
+ this(parent, style, dialogPage, projectType, project, projectLocation, configHandler, true, false);
+ }
+
+ public void init() {
+
+ final List<String> allPathsList = new ArrayList<String>();
+ File dir = projectLocation.toFile();
+ final String base = dir.getAbsolutePath();
+
+ allPathsList.add("");
+
+ // just walking here
+ FileUtils.listFilesInTree(dir, new FileFilter() {
+ public boolean accept(File pathname) {
+ if (pathname.isDirectory()) {
+ allPathsList.add(pathname.getAbsolutePath().substring(base.length() + 1));
+ }
+ return true;
+ }
+ },
+ true
+ );
+
+ allDirs = (String[]) allPathsList.toArray(new String[allPathsList.size()]);
+
+ buildLocationField = new ComboDialogField(SWT.READ_ONLY);
+ buildConfigureTargetField = new ComboDialogField(SWT.READ_ONLY);
+ buildIncrTargetField = new ComboDialogField(SWT.READ_ONLY);
+ buildAutoTargetField = new ComboDialogField(SWT.READ_ONLY);
+ buildCleanTargetField = new ComboDialogField(SWT.READ_ONLY);
+
+ setFieldContents();
+ super.init();
+ }
+
+ /**
+ *
+ */
+ protected void setFieldContents() {
+ buildLocationField.setItems(allDirs);
+
+ String[] stockRules = new String[] { "", "all", "clean" };
+
+
+ buildConfigureTargetField.setItems(stockRules);
+ buildIncrTargetField.setItems(stockRules);
+ buildAutoTargetField.setItems(stockRules);
+ buildCleanTargetField.setItems(stockRules);
+
+ }
+
+ protected void createProjectUI(Composite composite) {
+ if (showBuildLocation) {
+ createBuildLocationUI(composite);
+ }
+
+ createBuildRuleUI(composite);
+ }
+
+ /**
+ * @param composite
+ */
+ protected void createBuildLocationUI(Composite composite) {
+ Composite twoWay = new Composite(composite, SWT.NONE);
+ twoWay.setLayout(new GridLayout(2, false));
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(twoWay);
+
+ buildLocationField.setLabelText("Build location:");
+ buildLocationField.doFillIntoGrid(twoWay, 2);
+ Combo combo = buildLocationField.getComboControl(twoWay);
+ combo.setToolTipText("Specify the project-relative build location.");
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(combo);
+ combo.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ IPath path = new Path(buildLocationField.getText());
+ if (path.isEmpty())
+ path = null;
+ configHandler.getConfigProperties().put(MicaCppProjectType.KEY_BUILD_LOCATION,
+ path);
+ dialogPage.validatePage();
+ }
+ });
+ }
+
+ /**
+ * @param composite
+ */
+ protected void createBuildRuleUI(Composite composite) {
+ Control control;
+ Label helpLabel = new Label(composite, SWT.WRAP);
+ //GridDataFactory.swtDefaults().grab(false, false).hint(textSize, SWT.DEFAULT).applyTo(label);
+ GridDataFactory.swtDefaults().align(SWT.FILL, SWT.TOP).grab(true, false).applyTo(helpLabel);
+ helpLabel.setText("Select the targets to use when building the project.\n\n"
+ +"(See Project > Properties > Maemo Build Configurations > Build Settings to change these settings after the project is created.)");
+
+ GridData helpLabelGridData = GridDataFactory.swtDefaults().span(2,1).create();
+
+ GridLayoutWrappedTextUtils.setupLabel(getShell(), helpLabel, helpLabelGridData);
+
+ Group group = new Group(composite, SWT.NONE);
+ GridDataFactory.fillDefaults().grab(true, true).indent(6, 6).applyTo(group);
+ group.setText("Build Targets");
+ group.setLayout(new GridLayout(2, false));
+
+ if (showConfigureRule)
+ createConfigureRuleUI(group);
+
+ buildIncrTargetField.setLabelText("Incremental/full build rule:");
+ buildIncrTargetField.doFillIntoGrid(group, 2);
+ control = buildIncrTargetField.getComboControl(group);
+ control.setToolTipText("Specify the rule that builds the project on a Project > Build command.");
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(control);
+ buildIncrTargetField.getComboControl(group).addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ updateRule(IProjectType.KEY_INCREMENTAL_BUILD_SETTING, buildIncrTargetField);
+ }
+ });
+
+ buildAutoTargetField.setLabelText("Auto build rule:");
+ buildAutoTargetField.doFillIntoGrid(group, 2);
+ control = buildAutoTargetField.getComboControl(group);
+ control.setToolTipText("Specify the rule that builds the project when Project > Build Automatically is enabled.");
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(control);
+ buildAutoTargetField.getComboControl(group).addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ updateRule(IProjectType.KEY_AUTO_BUILD_SETTING, buildAutoTargetField);
+ }
+ });
+
+ buildCleanTargetField.setLabelText("Clean build rule:");
+ buildCleanTargetField.doFillIntoGrid(group, 2);
+ control = buildCleanTargetField.getComboControl(group);
+ control.setToolTipText("Specify the rule that cleans the project on a Project > Clean command.");
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(control);
+ buildCleanTargetField.getComboControl(group).addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ updateRule(IProjectType.KEY_CLEAN_BUILD_SETTING, buildCleanTargetField);
+ }
+ });
+ }
+
+ /**
+ * @param showConfigureRule
+ * @param group
+ */
+ protected void createConfigureRuleUI(Group group) {
+ Control control;
+ buildConfigureTargetField.setLabelText("Configure build rule:");
+ buildConfigureTargetField.doFillIntoGrid(group, 2);
+ control = buildConfigureTargetField.getComboControl(group);
+ control.setToolTipText("Specify the rule that builds the project on a Project > Build Application > Configure command.");
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(control);
+
+ buildConfigureTargetField.getComboControl(group).addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ updateRule(IProjectType.KEY_CONFIGURE_BUILD_SETTING,
+ buildConfigureTargetField);
+ }
+ });
+ }
+
+ /**
+ * Return text unless it is empty or null.
+ * @param text
+ * @return
+ */
+ protected String nonEmptyOrNull(String text) {
+ return text == null || text.length() == 0 ? null : text;
+ }
+
+ /**
+ * @param firstElement
+ */
+ protected void setBuildLocation(IPath path) {
+
+ }
+
+ /**
+ * Set the current rules into the fields and initialize the rest with guesses.
+ * @param configHandler
+ * @param rules
+ */
+ protected void initFromConfig() {
+ super.initFromConfig();
+
+ boolean gotConfigureRule = false, gotCleanRule = false, gotIncrRule = false;
+
+ // get any existing rules
+ initRule(IProjectType.KEY_AUTO_BUILD_SETTING, buildAutoTargetField);
+ gotIncrRule = initRule(IProjectType.KEY_INCREMENTAL_BUILD_SETTING, buildIncrTargetField);
+ gotCleanRule = initRule(IProjectType.KEY_CLEAN_BUILD_SETTING, buildCleanTargetField);
+ gotConfigureRule = initRule(IProjectType.KEY_CONFIGURE_BUILD_SETTING, buildConfigureTargetField);
+
+ initRules(gotConfigureRule, gotCleanRule, gotIncrRule);
+ }
+
+ /**
+ *
+ */
+ protected boolean initRule(String setting, ComboDialogField field) {
+ String rule = (String) configHandler.getConfigProperties().get(setting);
+ rule = nonEmptyOrNull(rule);
+ if (rule != null) {
+ field.setText(rule);
+ return true;
+ }
+ configHandler.getConfigProperties().remove(setting);
+ field.setText("");
+ return false;
+ }
+
+ /**
+ *
+ */
+ protected void setRule(String setting, String value, ComboDialogField field) {
+ configHandler.getConfigProperties().put(setting, value);
+ field.setText(value);
+ }
+
+ /**
+ */
+ protected void updateRule(String setting,
+ ComboDialogField field) {
+ String rule = nonEmptyOrNull(field.getText());
+ if (rule == null)
+ configHandler.getConfigProperties().remove(setting);
+ else
+ configHandler.getConfigProperties().put(setting, rule);
+ dialogPage.validatePage();
+ }
+
+ /**
+ */
+ protected void initRules(boolean gotConfigureRule, boolean gotCleanRule,
+ boolean gotIncrRule) {
+
+ }
+
+}
\ No newline at end of file
Modified: trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/MaemoCppProjectPackageGatherer.java
===================================================================
--- trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/MaemoCppProjectPackageGatherer.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/core/MaemoCppProjectPackageGatherer.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -35,11 +35,18 @@
* @see org.maemo.mica.linux.packages.core.aptpkgconfig.install.IProjectPackageGatherer#scanPackages(org.eclipse.core.resources.IProject, org.eclipse.core.runtime.IProgressMonitor)
*/
public ProjectPackageInfo scanPackages(IProject project,
+ //ISDKTarget sdkTarget,
IProgressMonitor monitor) throws CoreException {
if (MicaCppProjectNature.isNatureInProject(project)) {
ProjectPackageInfo info = new ProjectPackageInfo();
- info.getSystemPackages().add("maemo-debug-scripts");
+ //if (sdkTarget == null) {
+ // generic packages for any target
+ info.getSystemPackages().add("maemo-debug-scripts");
+ info.getSystemPackages().add("maemo-c-debug-tools");
+ // }
+
+ // XXX: need device-env for devices
if (MicaCppProjectNature.isCCLanguageNatureInProject(project)) {
info.getSystemPackages().add("maemo-cplusplus-env");
}
Modified: trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/properties/ESBoxOldCppTargetPropertyPage.java
===================================================================
--- trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/properties/ESBoxOldCppTargetPropertyPage.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/properties/ESBoxOldCppTargetPropertyPage.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -17,7 +17,7 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
-import org.maemo.esbox.internal.project.cpp.ui.wizards.ConvertToMicaCppBuildConfigWizard;
+import org.maemo.esbox.internal.project.cpp.ui.wizards.ConvertToESboxCppProjectWizard;
import org.maemo.mica.common.project.ui.properties.BaseBuildTargetPropertyPage;
/**
@@ -80,7 +80,7 @@
Display.getDefault().asyncExec(new Runnable() {
public void run() {
- ConvertToMicaCppBuildConfigWizard wizard = new ConvertToMicaCppBuildConfigWizard();
+ ConvertToESboxCppProjectWizard wizard = new ConvertToESboxCppProjectWizard();
WizardDialog dialog = new WizardDialog(null, wizard);
dialog.open();
}
Copied: trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards/ConvertToESboxCppProjectWizard.java (from rev 1185, branches/work_Ed/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards/ConvertToESboxCppProjectWizard.java)
===================================================================
--- trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards/ConvertToESboxCppProjectWizard.java (rev 0)
+++ trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards/ConvertToESboxCppProjectWizard.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.project.cpp.ui.wizards;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.maemo.esbox.internal.project.cpp.Activator;
+import org.maemo.mica.cpp.project.ui.wizards.ConvertToMicaCppBuildConfigWizard;
+
+/**
+ * Convert existing projects to build with ESbox as C/C++ projects.
+ * @author eswartz
+ *
+ */
+public class ConvertToESboxCppProjectWizard extends ConvertToMicaCppBuildConfigWizard {
+
+ public ConvertToESboxCppProjectWizard() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#initializeDefaultPageImageDescriptor()
+ */
+ @Override
+ protected void initializeDefaultPageImageDescriptor() {
+ ImageDescriptor image = Activator.getImageDescriptor("./icons/full/wizban/maemo_convert.gif");
+ setDefaultPageImageDescriptor(image);
+ }
+}
Deleted: trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards/ConvertToMicaCppBuildConfigWizard.java
===================================================================
--- trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards/ConvertToMicaCppBuildConfigWizard.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards/ConvertToMicaCppBuildConfigWizard.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Nokia Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Swartz (Nokia) - initial API and implementation
- *******************************************************************************/
-
-package org.maemo.esbox.internal.project.cpp.ui.wizards;
-
-import org.eclipse.cdt.make.core.MakeCorePlugin;
-import org.eclipse.cdt.ui.wizards.conversion.ConversionWizard;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.maemo.esbox.internal.project.cpp.Activator;
-
-public class ConvertToMicaCppBuildConfigWizard extends ConversionWizard {
-
- /**
- *
- */
- public ConvertToMicaCppBuildConfigWizard() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#initializeDefaultPageImageDescriptor()
- */
- @Override
- protected void initializeDefaultPageImageDescriptor() {
- ImageDescriptor image = Activator.getImageDescriptor("./icons/full/wizban/maemo_convert.gif");
- setDefaultPageImageDescriptor(image);
- }
-
- public void addPages() {
- mainPage = new ConvertToMicaCppBuildConfigWizardPage(getPrefix());
- addPage(mainPage);
- }
-
- public String getProjectID() {
- return MakeCorePlugin.MAKE_PROJECT_ID;
- }
-
- public String getBuildSystemId() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.wizards.newresource.BasicNewResourceWizard#selectAndReveal(org.eclipse.core.resources.IResource)
- */
- @Override
- protected void selectAndReveal(IResource newResource) {
- // workaround a npe
- if (getWorkbench() != null && getWorkbench().getActiveWorkbenchWindow() != null)
- super.selectAndReveal(newResource);
- }
-}
Deleted: trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards/ConvertToMicaCppBuildConfigWizardPage.java
===================================================================
--- trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards/ConvertToMicaCppBuildConfigWizardPage.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.project.cpp/src/org/maemo/esbox/internal/project/cpp/ui/wizards/ConvertToMicaCppBuildConfigWizardPage.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -1,370 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Intel corporation - customization for New Project model.
- * Ed Swartz - modify for ESbox
- *******************************************************************************/
-package org.maemo.esbox.internal.project.cpp.ui.wizards;
-
-
-import org.eclipse.cdt.ui.wizards.conversion.ConvertProjectWizardPage;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
-import org.maemo.esbox.internal.project.cpp.Activator;
-import org.maemo.mica.common.core.MicaException;
-import org.maemo.mica.common.core.Policy;
-import org.maemo.mica.common.core.execEnv.ExecutionEnvironmentFactory;
-import org.maemo.mica.common.core.execEnv.IExecutionEnvironment;
-import org.maemo.mica.common.core.sdk.ISDKTarget;
-import org.maemo.mica.common.project.core.*;
-import org.maemo.mica.common.ui.BuildTargetUI;
-import org.maemo.mica.common.ui.ExecutionEnvironmentUI;
-import org.maemo.mica.common.ui.BuildTargetUI.IBuildTargetCheckedListener;
-import org.maemo.mica.cpp.project.core.*;
-
-import java.lang.reflect.InvocationTargetException;
-import java.text.MessageFormat;
-import java.util.*;
-
-public class ConvertToMicaCppBuildConfigWizardPage extends ConvertProjectWizardPage {
-
- private CheckboxTreeViewer buildTargetTreeViewer;
- protected ISDKTarget[] theSdkTargets;
- protected IExecutionEnvironment theExecEnv;
- private TreeViewer execEnvTreeViewer;
- private ISDKTarget theCurrentSdkTarget;
-
- /**
- * Constructor for ConvertToStdMakeProjectWizardPage.
- * @param pageName
- */
- public ConvertToMicaCppBuildConfigWizardPage(String pageName) {
- super(pageName);
- }
-
- /**
- * Method getWzTitleResource returns the correct Title Label for this class
- * overriding the default in the superclass.
- */
- protected String getWzTitleResource(){
- return "Convert C/C++ Projects";
- }
-
- /**
- * Method getWzDescriptionResource returns the correct description
- * Label for this class overriding the default in the superclass.
- */
- protected String getWzDescriptionResource(){
- return "Convert one or more projects to ESbox C/C++ projects.\nUse this for projects created in older ESbox releases or to make existing C/C++ projects build with ESbox (only).";
-
- }
-
- public void createControl(Composite parent) {
- super.createControl(parent);
-
- ((GridData) tableViewer.getTable().getLayoutData()).minimumHeight = 100;
-
- Composite composite = (Composite) getControl();
-
- ///
- Label label = new Label(composite, SWT.NONE);
- label.setText("Select the build target to use:");
-
- buildTargetTreeViewer = BuildTargetUI.createConfiguredBuildTargetCheckboxViewer(composite,
- BuildTargetUI.DEFAULT_STYLE);
-
- GridDataFactory.fillDefaults()
- .minSize(new Point(SWT.DEFAULT, 100))
- .applyTo(buildTargetTreeViewer.getTree());
-
- buildTargetTreeViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
- theSdkTargets = new ISDKTarget[0];
-
- BuildTargetUI.setupStandardBuildTargetCheckboxViewer(buildTargetTreeViewer,
- new IBuildTargetCheckedListener() {
-
- public void buildTargetChecked(Object selectedElement,
- Object[] checkedElements) {
- // add targets
- List<ISDKTarget> currentTargets = new ArrayList<ISDKTarget>();
- for (Object targetObj : checkedElements) {
- if (targetObj instanceof ISDKTarget)
- currentTargets.add((ISDKTarget) targetObj);
- }
- theSdkTargets = (ISDKTarget[]) currentTargets
- .toArray(new ISDKTarget[currentTargets.size()]);
- setPageComplete(validatePage());
- }
-
- }, true);
-
- buildTargetTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- Object obj = ((IStructuredSelection) event.getSelection()).getFirstElement();
- theCurrentSdkTarget = null;
- if (obj instanceof ISDKTarget)
- theCurrentSdkTarget = (ISDKTarget) obj;
- setPageComplete(validatePage());
- }
-
- });
-
- buildTargetTreeViewer.setInput(new Object());
-
- ////
-
- label = new Label(composite, SWT.NONE);
- label.setText("Select the runtime environment:");
-
- execEnvTreeViewer = ExecutionEnvironmentUI.createConfiguredExecutionEnvironmentViewer(composite,
- ExecutionEnvironmentUI.DEFAULT_STYLE);
-
- execEnvTreeViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
-
- execEnvTreeViewer.getTree().setToolTipText("This is the environment in which the project runs. ESbox will offer to start the environment upon a launch.");
-
- theExecEnv = null;
- execEnvTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection) execEnvTreeViewer.getSelection();
- theExecEnv = (IExecutionEnvironment) selection.getFirstElement();
- setPageComplete(validatePage());
- }
-
- });
-
- execEnvTreeViewer.setInput(new Object());
-
-
- // try to pick current settings, if known
- IStructuredSelection sel = ((BasicNewResourceWizard)getWizard()).getSelection();
- Object[] elements = null;
- if (sel != null)
- elements = sel.toArray();
- if (elements == null || elements.length == 0)
- elements = ((IStructuredContentProvider) tableViewer.getContentProvider()).getElements(tableViewer.getInput());
-
- IProjectProperties projectProperties = getCandidateESboxProjectProperties(elements);
- if (projectProperties != null) {
- try {
- theSdkTargets = new ISDKTarget[] { projectProperties.getSDKTarget() };
- buildTargetTreeViewer.setCheckedElements(theSdkTargets);
- theCurrentSdkTarget = theSdkTargets[0];
- buildTargetTreeViewer.setSelection(new StructuredSelection(theCurrentSdkTarget));
- } catch (MicaException e) {
- }
-
- String execEnvId = projectProperties.getExecutionEnvironmentId();
- if (execEnvId != null) {
- // the ids changed, so be looser
- String baseId = execEnvId;
- int idx = execEnvId.lastIndexOf('.');
- if (idx >= 0)
- baseId = execEnvId.substring(idx + 1);
- for (IExecutionEnvironment execEnv : ExecutionEnvironmentFactory.getInstance().getExecutionEnvironments()) {
- if (execEnv.getId().endsWith(baseId)) {
- theExecEnv = execEnv;
- execEnvTreeViewer.setSelection(new StructuredSelection(theExecEnv));
- break;
- }
- }
- }
- }
-
- // select all by default
- if (sel != null) {
- tableViewer.setCheckedElements(sel.toArray());
- } else {
- tableViewer.setAllChecked(true);
- }
- setPageComplete(validatePage());
- }
-
- /**
- * Find an existing ESbox project with properties we can use
- * @return IProject or <code>null</code>
- */
- private IProjectProperties getCandidateESboxProjectProperties(Object[] elements) {
- for (Object obj : elements) {
- if (obj instanceof IProject) {
- IProject project = (IProject) obj;
- IProjectProperties projectProperties;
- try {
- projectProperties = ProjectManager.getInstance().getOldStyleProjectProperties(project);
- // ping it to find one with a valid target
- projectProperties.getSDKTarget();
- return projectProperties;
- } catch (MicaException e) {
- // not a candidate
- }
- }
- }
- return null;
- }
-
- /**
- * It's a candidate if it's not already an ESbox (new) project.
- */
- public boolean isCandidate(IProject project) {
- return !MicaCppProjectNature.isNatureInProject(project);
- }
-
- public void convertProject(IProject project, String bsId, IProgressMonitor monitor) throws CoreException{
- convertToESboxProject(project, bsId, null, monitor);
- }
-
-
- public void convertProject(IProject project, IProgressMonitor monitor, String projectID) throws CoreException{
- convertToESboxProject(project, null, projectID, monitor);
- }
-
- /**
- * @param project
- */
- private void convertToESboxProject(IProject project, String bsId, String projectId, IProgressMonitor monitor) throws CoreException {
- monitor.beginTask("Converting to ESbox project", 1);
- try {
- MicaCppProjectCreatorConverterBase creator = new MicaCppBuildConfigProjectCreatorConverter();
- MicaCppConfigHandler configHandler = new MicaCppConfigHandler();
- configHandler.setInitialTargetName(theCurrentSdkTarget.getName());
- List<BuildConfigurationParameters> params = new ArrayList<BuildConfigurationParameters>();
- for (ISDKTarget target : theSdkTargets) {
- params.add(new BuildConfigurationParameters(target.getName(), target));
- }
- configHandler.setBuildConfigurationParameters(params);
- configHandler.setIndexerId(null);
- configHandler.setExecutionEnvironment(theExecEnv.getId());
- IProjectType projectType;
- if (this.convertToCC)
- projectType = ProjectManager.getInstance().getProjectType(MicaCppProjectType.ID_CC);
- else
- projectType = ProjectManager.getInstance().getProjectType(MicaCppProjectType.ID_C);
- creator.setup(project, projectType, configHandler);
- IWorkspaceRunnable runnable = creator.getProjectConverterRunnable();
- invokeRunnable(runnable);
- monitor.worked(1);
- } finally {
- monitor.done();
- }
-
- }
-
- private boolean invokeRunnable(final IWorkspaceRunnable workspaceRunnable) {
- // CDT still locks the whole workspace
- //ISchedulingRule rule = projectCreator.getProject();
- ISchedulingRule rule = ResourcesPlugin.getWorkspace().getRoot();
-
- final WorkspaceModifyOperation operation = new WorkspaceModifyOperation(rule) {
-
- @Override
- protected void execute(IProgressMonitor monitor)
- throws CoreException, InvocationTargetException,
- InterruptedException {
- workspaceRunnable.run(monitor);
- }
-
- };
-
- WorkspaceJob job = new WorkspaceJob("Converting project(s)") {
-
- @Override
- public IStatus runInWorkspace(IProgressMonitor monitor)
- throws CoreException {
- try {
- operation.run(monitor);
- } catch (InterruptedException e) {
- return Policy.getCancelStatus(Activator.getDefault());
- } catch (Exception e) {
- if (e instanceof InvocationTargetException
- && ((InvocationTargetException) e).getTargetException() instanceof CoreException)
- e = (CoreException) ((InvocationTargetException) e).getTargetException();
-
- Activator.getErrorLogger().logAndShowError(null, e);
- }
- return Status.OK_STATUS;
- }
-
- };
- job.setRule(rule);
- job.setUser(true);
- job.schedule();
-
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.ui.wizards.conversion.ConvertProjectWizardPage#validatePage()
- */
- @Override
- protected boolean validatePage() {
- if (!super.validatePage())
- return false;
-
- setMessage(null);
- setErrorMessage(null);
-
- // must have a build target and execution environment
- if (theCurrentSdkTarget == null) {
- setErrorMessage("An initial build target must be selected.");
- return false;
- }
-
- if (theSdkTargets.length == 0) {
- setErrorMessage("A set of build targets must be selected.");
- return false;
- }
-
- if (theExecEnv == null) {
- setErrorMessage("A runtime environment must be selected.");
- return false;
- }
-
- // we can only accept projects which can build from and which are visible from scratchbox
- Object[] elements = getCheckedElements();
- for (Object element : elements) {
- if (element instanceof IProject) {
- IProject project = (IProject) element;
- IPath path = project.getRawLocation();
- if (path == null)
- path = project.getLocation();
- for (ISDKTarget sdkTarget : theSdkTargets) {
- try {
- ProjectManager.getInstance().validateSDKTargetForProjectLocation(
- path, sdkTarget);
- } catch (MicaException e) {
- setErrorMessage(e.getMessage());
- return false;
- }
- }
-
- // check for Makefile or autotools -- not fatal but suspicious
- if (!CppScriptLauncher.getInstance().validateAutomakeState(project, null)) {
- setMessage(MessageFormat.format("No Makefile or known autotools files exist in the project ''{0}''",
- project.getName()),
- WARNING);
- }
- }
- }
-
- return true;
- }
-
-}
Modified: trunk/org.maemo.esbox.project.python/plugin.xml
===================================================================
--- trunk/org.maemo.esbox.project.python/plugin.xml 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.project.python/plugin.xml 2009-02-01 19:35:32 UTC (rev 1186)
@@ -30,6 +30,7 @@
</commonWizard>
</extension>
+
<extension
point="org.maemo.mica.linux.packages.core.projectPackageGatherer">
<projectPackageGatherer
@@ -37,4 +38,16 @@
</projectPackageGatherer>
</extension>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.maemo.mica.python.project.core.MicaPythonProjectType"
+ class="org.maemo.esbox.internal.project.python.core.PythonProjectDebianSupportAdapterFactory">
+ <adapter
+ type="org.maemo.mica.linux.packages.core.adapters.IDebianProjectConvertImportSupport">
+ </adapter>
+ </factory>
+
+ </extension>
+
</plugin>
Copied: trunk/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonDebianProjectImportConfigurationComposite.java (from rev 1185, branches/work_Ed/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonDebianProjectImportConfigurationComposite.java)
===================================================================
--- trunk/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonDebianProjectImportConfigurationComposite.java (rev 0)
+++ trunk/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonDebianProjectImportConfigurationComposite.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.project.python.core;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.maemo.mica.common.core.IValidatingDialogPage;
+import org.maemo.mica.common.project.core.ProjectConfigHandler;
+import org.maemo.mica.common.ui.common.GridLayoutWrappedTextUtils;
+import org.maemo.mica.python.project.ui.wizards.PythonProjectImportConfigurationComposite;
+
+/**
+ * This composite contains the configurable aspects of a project for a Debian
+ * source package.
+ * @author eswartz
+ *
+ */
+public class PythonDebianProjectImportConfigurationComposite extends PythonProjectImportConfigurationComposite {
+
+ /*private*/ String[] rules;
+
+ public PythonDebianProjectImportConfigurationComposite(
+ Composite parent,
+ IValidatingDialogPage dialogPage,
+ final IProject project,
+ final IPath projectLocation,
+ ProjectConfigHandler configHandler,
+ String[] rules) {
+ super(parent, SWT.NONE, dialogPage, project, projectLocation, configHandler);
+ this.rules = rules;
+ }
+
+ /* (non-Javadoc)
+ * @see org.maemo.mica.python.project.ui.wizards.PythonProjectImportConfigurationComposite#createProjectUI(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected void createProjectUI(Composite composite) {
+ super.createProjectUI(composite);
+
+ Label label = new Label(composite, SWT.NONE);
+ GridData labelData = GridDataFactory.swtDefaults().create();
+ label.setText("Python projects cannot (currently) be built with the 'debian/rules' script since this requires a Make-based builder.");
+
+ GridLayoutWrappedTextUtils.setupLabel(getShell(), label, labelData);
+
+ }
+}
Copied: trunk/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonDebianProjectSupport.java (from rev 1185, branches/work_Ed/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonDebianProjectSupport.java)
===================================================================
--- trunk/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonDebianProjectSupport.java (rev 0)
+++ trunk/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonDebianProjectSupport.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.project.python.core;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.swt.widgets.Composite;
+import org.maemo.mica.common.core.IValidatingDialogPage;
+import org.maemo.mica.common.project.core.ProjectConfigHandler;
+import org.maemo.mica.linux.packages.core.adapters.IDebianProjectConvertImportSupport;
+import org.maemo.mica.python.project.core.MicaPythonProjectType;
+import org.maemo.mica.python.project.ui.wizards.PythonProjectImportConfigurationComposite;
+
+/**
+ * @author eswartz
+ *
+ */
+public class PythonDebianProjectSupport implements IDebianProjectConvertImportSupport {
+
+ /**
+ * @param micaPythonProjectType
+ * @param adaptableObject
+ */
+ public PythonDebianProjectSupport(MicaPythonProjectType micaPythonProjectType) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.maemo.mica.linux.packages.core.adapters.IDebianProjectSupport#createProjectImportConfigurationComposite(org.eclipse.swt.widgets.Composite, org.eclipse.jface.dialogs.IDialogPage, org.eclipse.core.resources.IProject, org.eclipse.core.runtime.IPath, org.maemo.mica.common.project.core.ProjectConfigHandler)
+ */
+ public Composite createDebianProjectImportConfigurationComposite(Composite parent,
+ int style, IValidatingDialogPage dialogPage, IProject project,
+ IPath projectLocation, ProjectConfigHandler configHandler, String[] debianRules) {
+
+ PythonDebianProjectImportConfigurationComposite configComposite =
+ new PythonDebianProjectImportConfigurationComposite(
+ parent,
+ dialogPage,
+ project,
+ projectLocation,
+ configHandler,
+ debianRules
+ );
+
+ configComposite.init();
+
+ return configComposite;
+ }
+
+}
Copied: trunk/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonProjectDebianSupportAdapterFactory.java (from rev 1185, branches/work_Ed/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonProjectDebianSupportAdapterFactory.java)
===================================================================
--- trunk/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonProjectDebianSupportAdapterFactory.java (rev 0)
+++ trunk/org.maemo.esbox.project.python/src/org/maemo/esbox/internal/project/python/core/PythonProjectDebianSupportAdapterFactory.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.project.python.core;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.maemo.mica.linux.packages.core.adapters.IDebianProjectConvertImportSupport;
+import org.maemo.mica.python.project.core.MicaPythonProjectType;
+
+/**
+ * This factory proclaims Debian support for a project type.
+ * @author eswartz
+ *
+ */
+public class PythonProjectDebianSupportAdapterFactory implements IAdapterFactory {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ */
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (adaptableObject instanceof MicaPythonProjectType) {
+ if (adapterType.equals(IDebianProjectConvertImportSupport.class)) {
+ return new PythonDebianProjectSupport((MicaPythonProjectType) adaptableObject);
+ }
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+ */
+ public Class[] getAdapterList() {
+ return new Class[] { IDebianProjectConvertImportSupport.class };
+ }
+
+}
Modified: trunk/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/ScratchboxPackageManagerProvider.java
===================================================================
--- trunk/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/ScratchboxPackageManagerProvider.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/ScratchboxPackageManagerProvider.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -43,6 +43,7 @@
IPackageManager manager = new AptPackageManager(sdkTarget,
new ScratchboxAptPackageManagerBridge((IScratchboxSDKTarget) sdkTarget));
+ manager.initialize();
return manager;
}
Modified: trunk/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/CacheUtils.java
===================================================================
--- trunk/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/CacheUtils.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/CacheUtils.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -10,29 +10,42 @@
*******************************************************************************/
package org.maemo.esbox.internal.api.scratchbox.core.sdk;
-import org.maemo.esbox.internal.scratchbox.core.PersistentCache;
+import org.maemo.mica.common.core.PersistentCache;
import org.maemo.mica.common.core.machine.IMachine;
/**
* Singleton pattern. Use CacheUtils.getInstance() to access instance.
*
+ * @author eswartz
* @author baranov
*
*/
public class CacheUtils {
+ private static final CacheUtils INSTANCE = new CacheUtils();
+
+ /**
+ * Default filename, under workspace metadata for this plugin's state, where
+ * the cache is stored.
+ */
+ static final String SCRATCHBOX_CACHE_FILE = "scratchbox_cache.dat";
+
+ /**
+ * The environment variable which, if defined, overrides the file above. It
+ * should be a full filesystem path.
+ */
+ static final String SCRATCHBOX_CACHE_ENV = "SCRATCHBOX_CACHE";
+
// cache
private boolean useCaching;
private PersistentCache cache;
- private static final CacheUtils INSTANCE = new CacheUtils();
-
/**
*
*/
protected CacheUtils() {
useCaching = true; // !GeneralUtils.isJUnitRunning();
- cache = new PersistentCache();
+ cache = new PersistentCache(SCRATCHBOX_CACHE_FILE, SCRATCHBOX_CACHE_ENV);
cache.load();
}
@@ -40,6 +53,8 @@
* @return instance
*/
public static synchronized CacheUtils getInstance() {
+ // split initialization like this to avoid debugging problems with recursive class init
+ INSTANCE.cache.ensureInitialized();
return INSTANCE;
}
Deleted: trunk/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/scratchbox/core/PersistentCache.java
===================================================================
--- trunk/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/scratchbox/core/PersistentCache.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/scratchbox/core/PersistentCache.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Nokia Corporation
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Swartz (Nokia) - initial API and implementation
- *******************************************************************************/
-
-package org.maemo.esbox.internal.scratchbox.core;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IPath;
-import org.maemo.mica.common.core.Policy;
-
-/**
- * This object stores (key, value) pairs for cached data which is expensive to
- * compute. The keys are unique strings. Values are serializable objects. The
- * cache is loaded and stored with the plugin.
- *
- * @author eswartz
- *
- */
-public class PersistentCache {
-
- /**
- * Default filename, under workspace metadata for this plugin's state, where
- * the cache is stored.
- */
- private static final String SCRATCHBOX_CACHE_FILE = "scratchbox_cache.dat";
-
- /**
- * The environment variable which, if defined, overrides the file above. It
- * should be a full filesystem path.
- */
- private static final String SCRATCHBOX_CACHE_ENV = "SCRATCHBOX_CACHE";
-
- private Map<String, Object> data;
-
- public PersistentCache() {
- data = new HashMap<String, Object>();
- }
-
- /**
- * Try to load the cache from plugin state.
- */
- public synchronized void load() {
- File state = getCacheFile();
- if (state == null)
- return;
- try {
- ObjectInputStream ois = new ObjectInputStream(new FileInputStream(
- state));
- try {
- data = (Map<String, Object>) ois.readObject();
- } catch (ClassNotFoundException e) {
- Activator.getErrorLogger().logError("Cannot unserialize data",
- e);
- } finally {
- Policy.close(ois);
- }
- } catch (IOException e) {
- // ignore
- }
- }
-
- /**
- * @return
- */
- private File getCacheFile() {
- // check for argument passed to unit test
- String sboxCache = System.getenv(SCRATCHBOX_CACHE_ENV);
- if (sboxCache != null && sboxCache.length() > 0) {
- return new File(sboxCache);
- }
- if (Activator.getDefault() == null)
- return null;
- IPath stateLocation = Activator.getDefault().getStateLocation();
- File state = stateLocation.append(SCRATCHBOX_CACHE_FILE).toFile();
- return state;
- }
-
- /**
- * Save the cache to plugin state.
- */
- public synchronized void save() {
- File state = getCacheFile();
- if (state == null)
- return;
- ObjectOutputStream oos;
- try {
- oos = new ObjectOutputStream(new FileOutputStream(state));
- } catch (IOException e1) {
- Activator.getErrorLogger().logError("Cannot write cache data", e1);
- return;
- }
- try {
- oos.writeObject(data);
- } catch (IOException e) {
- Activator.getErrorLogger().logError("Cannot serialize cache data",
- e);
- } finally {
- Policy.close(oos);
- }
- }
-
- /**
- * Delete the entries in the cache.
- */
- public synchronized void clear() {
- data.clear();
- }
-
- /**
- * Get a value from the cache.
- *
- * @param key
- * KEY_xxx
- * @return
- */
- public synchronized Object get(String key) {
- return data.get(key);
- }
-
- /**
- * Store a value in the cache
- *
- * @param key
- * KEY_xxx
- * @param value
- */
- public synchronized void set(String key, Object value) {
- data.put(key, value);
- }
-}
Modified: trunk/org.maemo.esbox.scratchbox.sb1/conf/run.sh
===================================================================
--- trunk/org.maemo.esbox.scratchbox.sb1/conf/run.sh 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.scratchbox.sb1/conf/run.sh 2009-02-01 19:35:32 UTC (rev 1186)
@@ -29,7 +29,7 @@
# apply exports and unsets
if [ "$__export_list" != "-" ] ; then
- IFS=,; for __export in $__export_list; do
+ IFS='}'; for __export in $__export_list; do
case $__export in
-* ) unset `echo $__export | sed s/-//` ;;
* ) export $__export ;;
Modified: trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDKTarget.java
===================================================================
--- trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDKTarget.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDKTarget.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -121,7 +121,7 @@
return false;
else if (possibleDK.contains(newDevkit)) {
existingDK.add(newDevkit);
- doAddDevkits(existingDK);
+ setDevkits(existingDK);
return true;
}
throw new MicaException("No such devkit: " + newDevkit);
@@ -138,10 +138,10 @@
}
}
dtToAdd.addAll(existingDK);
- doAddDevkits(dtToAdd);
+ setDevkits(dtToAdd);
}
- private void doAddDevkits(List<String> existingDK) throws MicaException {
+ public void setDevkits(List<String> existingDK) throws MicaException {
IScratchbox1SDK sdk = (IScratchbox1SDK) this.getSDK();
sdk.createTarget(this.getName(), this.getCompiler(), existingDK, this
.getCputransp(), true);
Modified: trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher/Scratchbox1ProcessLauncher.java
===================================================================
--- trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher/Scratchbox1ProcessLauncher.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher/Scratchbox1ProcessLauncher.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -99,7 +99,7 @@
substitutor.define("DIRECTORY", workingDirectory.toPortableString());
String exportsString = CommandLineArguments.toString(envArgs,
- ",", false); //$NON-NLS-1$
+ "}", false); //$NON-NLS-1$
substitutor.define("EXPORTS", exportsString);
substitutor.define("COMMAND", cmdLine.get(0));
Modified: trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/scratchbox/sb1/sdk/IScratchbox1SDKTarget.java
===================================================================
--- trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/scratchbox/sb1/sdk/IScratchbox1SDKTarget.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/scratchbox/sb1/sdk/IScratchbox1SDKTarget.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -26,4 +26,7 @@
boolean addDevkit(String newDevkits) throws MicaException;
public void addDevkits(List<String> newDevkits) throws MicaException;
+
+ void setDevkits(List<String> devkits) throws MicaException;
+
}
Modified: trunk/org.maemo.esbox.vm/src/org/maemo/esbox/vm/ui/SelectVirtualMachineDialog.java
===================================================================
--- trunk/org.maemo.esbox.vm/src/org/maemo/esbox/vm/ui/SelectVirtualMachineDialog.java 2009-02-01 16:28:38 UTC (rev 1185)
+++ trunk/org.maemo.esbox.vm/src/org/maemo/esbox/vm/ui/SelectVirtualMachineDialog.java 2009-02-01 19:35:32 UTC (rev 1186)
@@ -11,8 +11,6 @@
package org.maemo.esbox.vm.ui;
-import org.eclipse.core.runtime.IProduct;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.dialogs.*;
import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.swt.SWT;
@@ -22,6 +20,7 @@
import org.eclipse.swt.widgets.*;
import org.eclipse.ui.dialogs.PreferencesUtil;
import org.maemo.esbox.internal.vm.Activator;
+import org.maemo.mica.common.core.GeneralUtils;
/**
* This dialog tells the user that a build machine should be selected.
@@ -41,7 +40,7 @@
public SelectVirtualMachineDialog(Shell shell) {
super(shell, "Select Virtual Machine", null,
// note: UI is added below to provide a hyperlink
- getProductName() + " needs to know what machine to use to build and launch your code. \n\n"+
+ GeneralUtils.getProductName() + " needs to know what machine to use to build and launch your code. \n\n"+
"Your system cannot directly launch scratchbox or maemo tools, so a virtual machine running 32-bit Linux/i386 must be used.\n\n"+
"Please configure the settings by clicking the link below.",
MessageDialog.INFORMATION,
@@ -51,17 +50,6 @@
Activator.getDefault().getPreferenceStore().getBoolean(BUG_ME_NOT));
}
- /**
- * @return
- */
- private static String getProductName() {
- IProduct product = Platform.getProduct();
- if (product != null)
- return product.getName();
- else
- return "Eclipse";
- }
-
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IconAndMessageDialog#createMessageArea(org.eclipse.swt.widgets.Composite)
*/
More information about the Esbox-commits
mailing list