Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lttng/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/TracingRcpPlugin.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/lttng/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/TracingRcpPlugin.java b/lttng/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/TracingRcpPlugin.java
index c2863df1ee..1ad47df7d4 100644
--- a/lttng/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/TracingRcpPlugin.java
+++ b/lttng/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/TracingRcpPlugin.java
@@ -71,12 +71,20 @@ public class TracingRcpPlugin extends AbstractUIPlugin {
}
/**
- * Gets the tracing workspace root directory
+ * Gets the tracing workspace root directory. By default it uses the user's
+ * home directory. This value can be overwritten by using the global
+ * TRACING_RCP_ROOT environment variable.
*
* @return the tracing workspace root directory
*/
public static String getWorkspaceRoot() {
- return System.getProperty("user.home"); //$NON-NLS-1$
+ /* Look for the environment variable in the global environment variables */
+ String workspaceRoot = System.getenv().get("TRACING_RCP_ROOT"); //$NON-NLS-1$
+ if (workspaceRoot == null) {
+ /* Use the user's home directory */
+ workspaceRoot = System.getProperty("user.home"); //$NON-NLS-1$
+ }
+ return workspaceRoot;
}
// ------------------------------------------------------------------------

Back to the top