[Esbox-commits] r1964 - in branches/work_Fabricio: org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core org.maemo.esbox.launch.analysis org.maemo.esbox.product 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/ui/wizard org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin org.maemo.esbox.tests org.maemo.esbox.tests/src/org/maemo/esbox/tests/cpp org.maemo.esbox.tests/src/org/maemo/esbox/tests/python org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core org.maemo.esbox.vm/src/org/maemo/esbox/vm/core org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu org.maemo.esbox.vm.virtualbox/src/org/maemo/esbox/internal/vm/virtualbox org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware
fabricioepa at garage.maemo.org
fabricioepa at garage.maemo.org
Tue Aug 18 15:42:19 EEST 2009
Author: fabricioepa
Date: 2009-08-18 15:42:18 +0300 (Tue, 18 Aug 2009)
New Revision: 1964
Modified:
branches/work_Fabricio/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core/MaemoCppProjectPackageGatherer.java
branches/work_Fabricio/org.maemo.esbox.launch.analysis/plugin.xml
branches/work_Fabricio/org.maemo.esbox.product/about.mappings
branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/MaemoScriptInstallerMonitor.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/FremantleLicenseAgreementPage.java
branches/work_Fabricio/org.maemo.esbox.tests/asthelper.completions
branches/work_Fabricio/org.maemo.esbox.tests/src/org/maemo/esbox/tests/cpp/TestCppBuildConfigProjectCreator.java
branches/work_Fabricio/org.maemo.esbox.tests/src/org/maemo/esbox/tests/python/ManualTestPyDevInterpreterConfigurator.java
branches/work_Fabricio/org.maemo.esbox.tests/src/org/maemo/esbox/tests/python/TestPythonProjectConverter.java
branches/work_Fabricio/org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu/QemuPreferenceConstants.java
branches/work_Fabricio/org.maemo.esbox.vm.virtualbox/src/org/maemo/esbox/internal/vm/virtualbox/VirtualBoxPreferenceConstants.java
branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwarePreferenceConstants.java
branches/work_Fabricio/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualBuildMachine.java
branches/work_Fabricio/org.maemo.esbox.vm/src/org/maemo/esbox/vm/core/VirtualMachinePreferenceConstants.java
Log:
Merging with /trunk 1961
Modified: branches/work_Fabricio/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core/MaemoCppProjectPackageGatherer.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core/MaemoCppProjectPackageGatherer.java 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core/MaemoCppProjectPackageGatherer.java 2009-08-18 12:42:18 UTC (rev 1964)
@@ -46,11 +46,13 @@
if (sdkTarget == null) {
// generic packages for any target
- info.getSystemPackages().add("maemo-sdk-dev");
info.getSystemPackages().add("maemo-debug-scripts");
info.getSystemPackages().add("maemo-c-debug-tools");
} else {
// target-specific packages
+ if (sdkTarget.getMachine() instanceof IBuildMachine) {
+ info.getSystemPackages().add("maemo-sdk-dev");
+ }
if (MicaCppProjectNature.isCCLanguageNatureInProject(project)) {
if (sdkTarget.getMachine() instanceof IBuildMachine)
info.getSystemPackages().add("maemo-cplusplus-env");
Modified: branches/work_Fabricio/org.maemo.esbox.launch.analysis/plugin.xml
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.launch.analysis/plugin.xml 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.launch.analysis/plugin.xml 2009-08-18 12:42:18 UTC (rev 1964)
@@ -186,7 +186,7 @@
<shortcut
class="org.maemo.esbox.internal.analysis.launch.ESboxCppLtraceLocalLaunchShortcut"
icon="icons/full/obj16/ltrace.gif"
- id="maemoLtraceShortcut"
+ id="maemoLtraceLocalShortcut"
label="Local Ltrace Profiler"
modes="profile">
<contextualLaunch>
@@ -224,7 +224,7 @@
<shortcut
class="org.maemo.esbox.internal.analysis.launch.ESboxCppLtraceRemoteLaunchShortcut"
icon="icons/full/obj16/ltrace.gif"
- id="maemoLtraceShortcut"
+ id="maemoLtraceRemoteShortcut"
label="Remote Ltrace Profiler"
modes="profile">
<contextualLaunch>
Modified: branches/work_Fabricio/org.maemo.esbox.product/about.mappings
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.product/about.mappings 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.product/about.mappings 2009-08-18 12:42:18 UTC (rev 1964)
@@ -7,4 +7,4 @@
# e.g. "0=20020612"
# This value will be added automatically via the build scripts
0=20090211-1700
-1=I20090722
\ No newline at end of file
+1=I20090806
\ No newline at end of file
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java 2009-08-18 12:42:18 UTC (rev 1964)
@@ -66,6 +66,8 @@
private IPath sdkRoot;
+ private long nextTargetCheck;
+
public Scratchbox1SDK(IMachine machine, IPath installLocation,
IPreferenceProvider prefProvider) {
super(machine, installLocation, IScratchbox1SDK.NAME,
@@ -315,6 +317,15 @@
* @see org.maemo.mica.maemosdk.core.sdk.IScratchboxSDK#getCurrentTarget()
*/
public String getCurrentTarget() throws MicaException {
+ // We can't rely on the cache forever, since the user may be
+ // manually switching things outside. Making the user remember to
+ // refresh the SDK is not the right way to fix this. Just let the
+ // cache entry time out after a while.
+ if (System.currentTimeMillis() >= nextTargetCheck) {
+ getCache().set(CURRENT_TARGET_KEY, (String)null);
+ nextTargetCheck = System.currentTimeMillis() + 30 * 1000;
+ }
+
String currentTarget = (String) getCache().get(CURRENT_TARGET_KEY, String.class);
if (currentTarget != null && getTargets().contains(currentTarget))
return currentTarget;
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/MaemoScriptInstallerMonitor.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/MaemoScriptInstallerMonitor.java 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/MaemoScriptInstallerMonitor.java 2009-08-18 12:42:18 UTC (rev 1964)
@@ -169,7 +169,7 @@
boolean oldLicenseLineStart = text.trim().length() >= 80 && text.trim().replaceAll("-", "").length() == 0;
boolean newLicenseLineStart = text.contains("1) IMPORTANT: READ CAREFULLY BEFORE");
boolean newLicenseLineEnd = text.contains("Press Enter to accept");
- if (oldLicenseLineStart || newLicenseLineStart || newLicenseLineEnd) {
+ if (oldLicenseLineStart || (newLicenseLineStart && !readingLicense) || newLicenseLineEnd) {
if (!readingLicense && !gotLicense) {
readingLicense = true;
licenseText = new StringBuilder();
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/FremantleLicenseAgreementPage.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/FremantleLicenseAgreementPage.java 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/FremantleLicenseAgreementPage.java 2009-08-18 12:42:18 UTC (rev 1964)
@@ -112,7 +112,7 @@
GridDataFactory.fillDefaults().span(2,0).applyTo(fRepository);
Label lb= new Label(composite, SWT.WRAP);
- lb.setText("The the wizard will automatically add the url to your /etc/apt/sources.list in scratchbox.");
+ lb.setText("The wizard will automatically add the entry to your /etc/apt/sources.list in scratchbox.");
data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
data.horizontalSpan = 2;
data.widthHint = 150;
Modified: branches/work_Fabricio/org.maemo.esbox.tests/asthelper.completions
===================================================================
(Binary files differ)
Modified: branches/work_Fabricio/org.maemo.esbox.tests/src/org/maemo/esbox/tests/cpp/TestCppBuildConfigProjectCreator.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.tests/src/org/maemo/esbox/tests/cpp/TestCppBuildConfigProjectCreator.java 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.tests/src/org/maemo/esbox/tests/cpp/TestCppBuildConfigProjectCreator.java 2009-08-18 12:42:18 UTC (rev 1964)
@@ -56,9 +56,8 @@
// the default location will be outside scratchbox for this SDK
IProject project = getNonExistingProject("test");
- projCreator = configHandler.createProjectCreatorConverter(project);
try {
- createProject(null);
+ createProject(project, null);
fail("Expected invalid location error");
} catch (CoreException e) {
assertTrue(e.toString(), e.toString().contains("is not visible"));
Modified: branches/work_Fabricio/org.maemo.esbox.tests/src/org/maemo/esbox/tests/python/ManualTestPyDevInterpreterConfigurator.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.tests/src/org/maemo/esbox/tests/python/ManualTestPyDevInterpreterConfigurator.java 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.tests/src/org/maemo/esbox/tests/python/ManualTestPyDevInterpreterConfigurator.java 2009-08-18 12:42:18 UTC (rev 1964)
@@ -57,11 +57,9 @@
// the default location will be outside scratchbox for this SDK
IPath projectPath = TestUtils.getKnownSBVisibleWorkspacePath(theSB1SDKTarget).append("__unittest");
IProject project = getNonExistingProject("testOnSB1", projectPath);
+
+ assertTrue(super.createProject(project, projectPath));
- projCreator = configHandler.createProjectCreatorConverter(project);
-
- assertTrue(super.createProject(projectPath));
-
IProject pyHelloProject = projCreator.getProject();
assertTrue(pyHelloProject.exists());
Modified: branches/work_Fabricio/org.maemo.esbox.tests/src/org/maemo/esbox/tests/python/TestPythonProjectConverter.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.tests/src/org/maemo/esbox/tests/python/TestPythonProjectConverter.java 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.tests/src/org/maemo/esbox/tests/python/TestPythonProjectConverter.java 2009-08-18 12:42:18 UTC (rev 1964)
@@ -15,9 +15,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.*;
import org.maemo.esbox.internal.tests.Activator;
import org.maemo.esbox.tests.common.SboxTestUtils;
import org.maemo.mica.common.core.HostUtils;
Modified: branches/work_Fabricio/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualBuildMachine.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualBuildMachine.java 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualBuildMachine.java 2009-08-18 12:42:18 UTC (rev 1964)
@@ -28,6 +28,9 @@
*
*/
public abstract class BaseVirtualBuildMachine extends BaseVirtualMachine implements IBuildMachineImpl {
+ private Job validateSharesJob;
+
+
public BaseVirtualBuildMachine(String id, String name, String os, String arch,
IMachineController controller, SSHConfiguration sshConfiguration,
ISharedFilesystemProvider sharedFilesystemProvider) {
@@ -48,26 +51,34 @@
// Contrary to the comment below, we re-validate shares before a
// build, and the flags below should prevent double dialogs.
//
- Job job = new Job("Checking shared folders...") {
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- boolean shouldValidate;
- synchronized (BaseVirtualBuildMachine.this) {
- shouldValidate = !validatedShares && !isValidatingShares;
+ if (validateSharesJob == null) {
+ validateSharesJob = new Job("Checking shared folders...") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ boolean shouldValidate;
+ synchronized (BaseVirtualBuildMachine.this) {
+ shouldValidate = !validatedShares && !isValidatingShares;
+ }
+ if (shouldValidate && !monitor.isCanceled()) {
+ // now, verify shared folders
+ ensureSharesMounted(monitor);
+
+ // maybe the user cancelled or there were errors... but don't keep asking
+ validatedShares = true;
+ }
+ return Status.OK_STATUS;
}
- if (shouldValidate && !monitor.isCanceled()) {
- // now, verify shared folders
- ensureSharesMounted(monitor);
-
- // maybe the user cancelled or there were errors... but don't keep asking
- validatedShares = true;
- }
- return Status.OK_STATUS;
+
+ };
+ validateSharesJob.schedule();
+ try {
+ validateSharesJob.join();
+ } catch (InterruptedException e) {
+ validateSharesJob.cancel();
}
-
- };
- job.schedule();
+ validateSharesJob = null;
+ }
/*
// for this kind of machine, check more proactively,
Modified: branches/work_Fabricio/org.maemo.esbox.vm/src/org/maemo/esbox/vm/core/VirtualMachinePreferenceConstants.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.vm/src/org/maemo/esbox/vm/core/VirtualMachinePreferenceConstants.java 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.vm/src/org/maemo/esbox/vm/core/VirtualMachinePreferenceConstants.java 2009-08-18 12:42:18 UTC (rev 1964)
@@ -11,6 +11,7 @@
package org.maemo.esbox.vm.core;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.maemo.mica.internal.api.common.core.filesystem.SharedFolderPreferenceConverter;
/**
@@ -44,4 +45,11 @@
public static final String VM_SHARED_FOLDERS = "VM_SHARED_FOLDERS";
static final Class<?> privateKeysClass = VirtualMachinePreferenceConstantsPrivate.class;
+
+ /**
+ * Return <code>null</code>. We store preferences in {@link IVirtualMachine#getConfiguration()}
+ * and provide this method to make CorePreferenceManager happy.
+ * @return null
+ */
+ public static IPreferenceStore getPreferenceStore() { return null; }
}
Modified: branches/work_Fabricio/org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu/QemuPreferenceConstants.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu/QemuPreferenceConstants.java 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu/QemuPreferenceConstants.java 2009-08-18 12:42:18 UTC (rev 1964)
@@ -11,6 +11,7 @@
package org.maemo.esbox.internal.vm.qemu;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.maemo.esbox.vm.core.IVirtualMachine;
/**
@@ -35,4 +36,11 @@
public static final String QEMU_DISK_IMAGE_PATHS = "QEMU_DISK_IMAGE_PATHS";
static final Class<?> privateKeysClass = QemuPreferenceConstantsPrivate.class;
+
+ /**
+ * Return <code>null</code>. We store preferences in {@link IVirtualMachine#getConfiguration()}
+ * and provide this method to make CorePreferenceManager happy.
+ * @return null
+ */
+ public static IPreferenceStore getPreferenceStore() { return null; }
}
Modified: branches/work_Fabricio/org.maemo.esbox.vm.virtualbox/src/org/maemo/esbox/internal/vm/virtualbox/VirtualBoxPreferenceConstants.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.vm.virtualbox/src/org/maemo/esbox/internal/vm/virtualbox/VirtualBoxPreferenceConstants.java 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.vm.virtualbox/src/org/maemo/esbox/internal/vm/virtualbox/VirtualBoxPreferenceConstants.java 2009-08-18 12:42:18 UTC (rev 1964)
@@ -27,14 +27,17 @@
public static final int VERSION_MAJOR = 1;
public static final int VERSION_MINOR = 0;
- /** Get the preference store that contains these preferences */
- public static IPreferenceStore getPreferenceStore() {
- return Activator.getDefault().getPreferenceStore();
- }
-
public static final String VIRTUALBOX_EXE_NAME = "VIRTUALBOX_EXE_NAME";
public static final String VIRTUALBOX_LAUNCH_PATTERN = "VIRTUALBOX_LAUNCH_PATTERN";
public static final String VIRTUALBOX_MACHINE_NAME = "VIRTUALBOX_MACHINE_NAME";
static final Class<?> privateKeysClass = VirtualBoxPreferenceConstantsPrivate.class;
+
+ /**
+ * Return <code>null</code>. We store preferences in {@link IVirtualMachine#getConfiguration()}
+ * and provide this method to make CorePreferenceManager happy.
+ * @return null
+ */
+ public static IPreferenceStore getPreferenceStore() { return null; }
+
}
Modified: branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwarePreferenceConstants.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwarePreferenceConstants.java 2009-08-17 00:11:43 UTC (rev 1963)
+++ branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwarePreferenceConstants.java 2009-08-18 12:42:18 UTC (rev 1964)
@@ -11,6 +11,7 @@
package org.maemo.esbox.internal.vm.vmware;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.maemo.esbox.vm.core.IVirtualMachine;
/**
@@ -34,4 +35,11 @@
public static final String VMWARE_PRODUCT = "VMWARE_PRODUCT";
static final Class<?> privateKeysClass = VMwarePreferenceConstantsPrivate.class;
+
+ /**
+ * Return <code>null</code>. We store preferences in {@link IVirtualMachine#getConfiguration()}
+ * and provide this method to make CorePreferenceManager happy.
+ * @return null
+ */
+ public static IPreferenceStore getPreferenceStore() { return null; }
}
More information about the Esbox-commits
mailing list