aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2012-03-29 17:25:06 -0700
committerSiva Velusamy <vsiva@google.com>2012-03-30 12:16:59 -0700
commitcee40c48fde8bbdab12c737258d5bfffd9250dbf (patch)
tree2568df3da1e93aa25e178c044c8de66a7d655ba3 /eclipse/plugins
parent8e6fabf386fd691fab8891d76a7f96669bbdb2ae (diff)
downloadsdk-cee40c48fde8bbdab12c737258d5bfffd9250dbf.zip
sdk-cee40c48fde8bbdab12c737258d5bfffd9250dbf.tar.gz
sdk-cee40c48fde8bbdab12c737258d5bfffd9250dbf.tar.bz2
monitor: use .android/monitor-workspace as workspace
This CL makes the monitor app to always use the folder $HOME/.android/monitor-workspace for its workspace location. Change-Id: I5fa3dd5f8a820b79e38d42d9a91eb9c3ac3224cc
Diffstat (limited to 'eclipse/plugins')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.monitor/monitor.product1
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/MonitorApplication.java8
2 files changed, 9 insertions, 0 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/monitor.product b/eclipse/plugins/com.android.ide.eclipse.monitor/monitor.product
index 1ca7b7c..63e6891 100644
--- a/eclipse/plugins/com.android.ide.eclipse.monitor/monitor.product
+++ b/eclipse/plugins/com.android.ide.eclipse.monitor/monitor.product
@@ -7,6 +7,7 @@
</configIni>
<launcherArgs>
+ <programArgs>-data @noDefault</programArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
</launcherArgs>
diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/MonitorApplication.java b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/MonitorApplication.java
index 45d0185..27ba6d7 100644
--- a/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/MonitorApplication.java
+++ b/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/MonitorApplication.java
@@ -17,7 +17,10 @@
package com.android.ide.eclipse.monitor;
import com.android.ide.eclipse.monitor.SdkToolsLocator.SdkInstallStatus;
+import com.android.prefs.AndroidLocation;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
@@ -32,11 +35,16 @@ import java.io.File;
public class MonitorApplication implements IApplication {
private static final String SDK_PATH_ENVVAR = "com.android.sdk.path";
+ private static final String MONITOR_WORKSPACE_PATH = "monitor-workspace";
@Override
public Object start(IApplicationContext context) throws Exception {
Display display = PlatformUI.createDisplay();
+ Location instanceLoc = Platform.getInstanceLocation();
+ IPath workspacePath = new Path(AndroidLocation.getFolder()).append(MONITOR_WORKSPACE_PATH);
+ instanceLoc.set(workspacePath.toFile().toURI().toURL(), true);
+
String sdkPath = findSdkPath(display);
if (!isValidSdkLocation(sdkPath)) {
// exit with return code -1