Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2016-11-01 03:51:13 -0400
committerEike Stepper2016-11-01 03:51:13 -0400
commit050002b788e2ca3bd4f6fecb1b7659b48046c07a (patch)
treed6f6d6483406c064675628ce084937122cd18292
parent723f7ff9da9ab663208b66dfe99c9bf6a25f63ce (diff)
downloadcdo-050002b788e2ca3bd4f6fecb1b7659b48046c07a.tar.gz
cdo-050002b788e2ca3bd4f6fecb1b7659b48046c07a.tar.xz
cdo-050002b788e2ca3bd4f6fecb1b7659b48046c07a.zip
[Releng] Add "cdo.explorer.setUserName" property
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch14
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/CDOClient2.launch2
4 files changed, 27 insertions, 9 deletions
diff --git a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java
index 267ce499ee..b01723d583 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java
@@ -48,12 +48,14 @@ import org.eclipse.net4j.util.event.IEvent;
import org.eclipse.net4j.util.event.IListener;
import org.eclipse.net4j.util.lifecycle.ILifecycle;
import org.eclipse.net4j.util.lifecycle.LifecycleEventAdapter;
+import org.eclipse.net4j.util.om.OMPlatform;
import org.eclipse.net4j.util.security.IPasswordCredentials;
import org.eclipse.net4j.util.security.PasswordCredentials;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.spi.cdo.InternalCDOSession;
import org.eclipse.equinox.security.storage.ISecurePreferences;
import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
@@ -80,6 +82,10 @@ public abstract class CDORepositoryImpl extends AbstractElement implements CDORe
public static final String REPOSITORY_KEY = CDORepository.class.getName();
+ private static final boolean READABLE_IDS = OMPlatform.INSTANCE.isProperty("cdo.explorer.readableIDs");
+
+ private static final boolean SET_USER_NAME = OMPlatform.INSTANCE.isProperty("cdo.explorer.setUserName");
+
private final Set<CDOCheckout> checkouts = new HashSet<CDOCheckout>();
private final Set<CDOCheckout> openCheckouts = new HashSet<CDOCheckout>();
@@ -611,7 +617,7 @@ public abstract class CDORepositoryImpl extends AbstractElement implements CDORe
config.setConnector(connector);
config.setRepositoryName(name);
- if (Boolean.getBoolean("cdo.explorer.readableIDs"))
+ if (READABLE_IDS)
{
config.setIDGenerator(new CDOIDGenerator()
{
@@ -711,6 +717,16 @@ public abstract class CDORepositoryImpl extends AbstractElement implements CDORe
CDOSession session = sessionConfiguration.openSession();
session.options().setGeneratedPackageEmulationEnabled(true);
+
+ if (SET_USER_NAME && StringUtil.isEmpty(session.getUserID()))
+ {
+ String userName = System.getProperty("user.name");
+ if (!StringUtil.isEmpty(userName))
+ {
+ ((InternalCDOSession)session).setUserID(userName);
+ }
+ }
+
return session;
}
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java
index 2be7addda8..0e4c0aa034 100644
--- a/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java
+++ b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java
@@ -225,7 +225,7 @@ public class CDOHistoryPage extends HistoryPage
});
}
- if (TEST)
+ if (DEBUG)
{
((LabelProvider)tableViewer.getLabelProvider()).setFormatTimeStamps(false);
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch b/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch
index b228702446..69ce4173a1 100644
--- a/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch
+++ b/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
<setAttribute key="additional_plugins">
+<setEntry value="banking.edit:1.0.0.qualifier:default:true"/>
+<setEntry value="banking:0.1.0.qualifier:default:true"/>
<setEntry value="javax.servlet:3.1.0.v201410161800:default:false"/>
-<setEntry value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.edit:2.0.300.qualifier:default:true"/>
-<setEntry value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.edit:1.0.300.qualifier:default:true"/>
-<setEntry value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.edit:1.0.300.qualifier:default:true"/>
-<setEntry value="org.eclipse.emf.cdo.dawn.examples.acore.edit:1.0.400.qualifier:default:true"/>
+<setEntry value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.edit:2.0.400.qualifier:default:true"/>
+<setEntry value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.edit:1.0.400.qualifier:default:true"/>
+<setEntry value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.edit:1.0.400.qualifier:default:true"/>
+<setEntry value="org.eclipse.emf.cdo.dawn.examples.acore.edit:1.0.500.qualifier:default:true"/>
<setEntry value="org.eclipse.emf.cdo.edit:4.4.100.qualifier:default:true"/>
-<setEntry value="org.eclipse.emf.cdo.examples.company.edit:4.0.400.qualifier:default:true"/>
+<setEntry value="org.eclipse.emf.cdo.examples.company.edit:4.0.500.qualifier:default:true"/>
<setEntry value="org.eclipse.emf.cdo.expressions.edit:4.3.200.qualifier:default:true"/>
<setEntry value="org.eclipse.emf.cdo.security.edit:4.3.200.qualifier:default:true"/>
<setEntry value="org.eclipse.emf.compare.edit:4.2.1.201608311750:default:true"/>
@@ -59,7 +61,7 @@
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -nosplash&#13;&#10;-clean"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=512m&#13;&#10;-Xms40m&#13;&#10;-Xmx2g&#13;&#10;-Dosgi.console.enable.builtin=true&#13;&#10;-Dosgi.checkConfiguration=false&#13;&#10;-Dorg.eclipse.emf.cdo.ui.team.history.test=false"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx2g&#13;&#10;-Dosgi.console.enable.builtin=true&#13;&#10;-Dosgi.checkConfiguration=false&#13;&#10;-Dorg.eclipse.emf.cdo.ui.team.history.test=true&#13;&#10;-Dcdo.explorer.setUserName=true"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<setAttribute key="selected_features">
diff --git a/plugins/org.eclipse.emf.cdo.ui/CDOClient2.launch b/plugins/org.eclipse.emf.cdo.ui/CDOClient2.launch
index 99eb590748..72050efa31 100644
--- a/plugins/org.eclipse.emf.cdo.ui/CDOClient2.launch
+++ b/plugins/org.eclipse.emf.cdo.ui/CDOClient2.launch
@@ -24,7 +24,7 @@
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -nosplash&#13;&#10;-console"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx1g&#13;&#10;-Dosgi.console.enable.builtin=true&#13;&#10;-Dosgi.checkConfiguration=false&#13;&#10;-Dorg.eclipse.emf.cdo.ui.team.history.test=false"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx2g&#13;&#10;-Dosgi.console.enable.builtin=true&#13;&#10;-Dosgi.checkConfiguration=false&#13;&#10;-Dorg.eclipse.emf.cdo.ui.team.history.test=true&#13;&#10;-Dcdo.explorer.setUserName=true"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<stringAttribute key="selectedPlugin" value="org.eclipse.emf.cdo"/>

Back to the top