Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-08-23 16:40:09 +0000
committerEike Stepper2011-08-23 16:40:09 +0000
commit763bd76462dfc27b1ed0d26d5765487eddddc3d9 (patch)
tree8aef9876ff704c003688eb84231e99a272d345bb /plugins/org.eclipse.emf.cdo.ui
parent9da9b11b475f7dee7e8d8e32dcbfcc380bcb7e73 (diff)
downloadcdo-763bd76462dfc27b1ed0d26d5765487eddddc3d9.tar.gz
cdo-763bd76462dfc27b1ed0d26d5765487eddddc3d9.tar.xz
cdo-763bd76462dfc27b1ed0d26d5765487eddddc3d9.zip
[355535] Redesign PropertyTesters and IPropertySourceProviders
https://bugs.eclipse.org/bugs/show_bug.cgi?id=355535
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.ui')
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/plugin.xml11
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/CDOPropertyAdapterFactory.java48
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/messages/messages.properties32
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/properties/CDOPropertySource.java71
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/properties/CDOSessionAdapterFactory.java54
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/properties/CDOSessionPropertySource.java254
7 files changed, 56 insertions, 422 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
index 356f819a5a..c157a490dc 100644
--- a/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
@@ -10,6 +10,7 @@ Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)";resolution:=optional;visibility:=reexport,
org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)";resolution:=optional;visibility:=reexport,
org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)";resolution:=optional;visibility:=reexport,
org.eclipse.ui;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,
@@ -78,13 +79,6 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.0.100";
org.eclipse.emf.cdo.tests.ui,
org.eclipse.emf.cdo.dawn.ui,
org.eclipse.emf.cdo.explorer",
- org.eclipse.emf.cdo.internal.ui.properties;version="4.0.100";
- x-friends:="org.eclipse.emf.cdo.ui.defs,
- org.eclipse.emf.cdo.ui.ide,
- org.eclipse.emf.cdo.ui.location,
- org.eclipse.emf.cdo.tests.ui,
- org.eclipse.emf.cdo.dawn.ui,
- org.eclipse.emf.cdo.explorer",
org.eclipse.emf.cdo.internal.ui.views;version="4.0.100";
x-friends:="org.eclipse.emf.cdo.ui.defs,
org.eclipse.emf.cdo.ui.ide,
diff --git a/plugins/org.eclipse.emf.cdo.ui/plugin.xml b/plugins/org.eclipse.emf.cdo.ui/plugin.xml
index c70c0e3a4c..7ae48a363e 100644
--- a/plugins/org.eclipse.emf.cdo.ui/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.ui/plugin.xml
@@ -135,10 +135,13 @@
point="org.eclipse.core.runtime.adapters">
<factory
adaptableType="org.eclipse.emf.cdo.session.CDOSession"
- class="org.eclipse.emf.cdo.internal.ui.properties.CDOSessionAdapterFactory">
- <adapter
- type="org.eclipse.ui.views.properties.IPropertySourceProvider">
- </adapter>
+ class="org.eclipse.emf.cdo.internal.ui.CDOPropertyAdapterFactory">
+ <adapter type="org.eclipse.ui.views.properties.IPropertySourceProvider"/>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.emf.cdo.view.CDOView"
+ class="org.eclipse.emf.cdo.internal.ui.CDOPropertyAdapterFactory">
+ <adapter type="org.eclipse.ui.views.properties.IPropertySourceProvider"/>
</factory>
</extension>
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/CDOPropertyAdapterFactory.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/CDOPropertyAdapterFactory.java
new file mode 100644
index 0000000000..4fb823fe11
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/CDOPropertyAdapterFactory.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.internal.ui;
+
+import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.view.CDOView;
+
+import org.eclipse.emf.internal.cdo.session.SessionPropertyTester;
+import org.eclipse.emf.internal.cdo.view.ViewPropertyTester;
+
+import org.eclipse.net4j.util.ui.AbstractPropertyAdapterFactory;
+import org.eclipse.net4j.util.ui.DefaultPropertySource;
+
+import org.eclipse.ui.views.properties.IPropertySource;
+
+/**
+ * @author Eike Stepper
+ */
+public class CDOPropertyAdapterFactory extends AbstractPropertyAdapterFactory
+{
+ public CDOPropertyAdapterFactory()
+ {
+ }
+
+ @Override
+ protected IPropertySource createPropertySource(Object object)
+ {
+ if (object instanceof CDOSession)
+ {
+ return new DefaultPropertySource<CDOSession>((CDOSession)object, new SessionPropertyTester());
+ }
+
+ if (object instanceof CDOView)
+ {
+ return new DefaultPropertySource<CDOView>((CDOView)object, new ViewPropertyTester());
+ }
+
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/messages/messages.properties b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/messages/messages.properties
index 3a466e8a32..cf828eca0a 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/messages/messages.properties
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/messages/messages.properties
@@ -62,38 +62,6 @@ CDOPreferencePage.7=EMF invalidation notifications:
CDORemoteSessionsView_0=Message from {0}
CDORemoteSessionsView_1=Message to {0}
CDORemoteSessionsView_2=Message:
-CDOSessionPropertySource_0=ID
-CDOSessionPropertySource_10=Name
-CDOSessionPropertySource_11=The name of the repository of this session.
-CDOSessionPropertySource_12=UUID
-CDOSessionPropertySource_13=The UUID of the repository of this session.
-CDOSessionPropertySource_14=Type
-CDOSessionPropertySource_15=The type of the repository of this session. One of MASTER, BACKUP, CLONE.
-CDOSessionPropertySource_16=State
-CDOSessionPropertySource_17=The state of the repository of this session. One of OFFLINE, SYNCING, ONLINE.
-CDOSessionPropertySource_18=Creation Time
-CDOSessionPropertySource_19=The creation time of the repository of this session.
-CDOSessionPropertySource_20=Supporting Audits
-CDOSessionPropertySource_21=Whether the repository of this session is supporting auditing.
-CDOSessionPropertySource_22=Supporting Branches
-CDOSessionPropertySource_23=Whether the repository of this session is supporting branching.
-CDOSessionPropertySource_24=Store Type
-CDOSessionPropertySource_25=The type of the store that backs the repository of this session.
-CDOSessionPropertySource_26=Object ID Types
-CDOSessionPropertySource_27=The types of object IDs created by the store that backs the repository of this session.
-CDOSessionPropertySource_28=Supporting Ecore
-CDOSessionPropertySource_29=Whether the repository of this session is supporting Ecore instances.
-CDOSessionPropertySource_30=Ensure Referential Integrity
-CDOSessionPropertySource_31=Whether the repository of this session is ensuring referential integrity.
-CDOSessionPropertySource_32=ID Generation Location
-CDOSessionPropertySource_33=One of STORE, CLIENT.
-CDOSessionPropertySource_3=The ID of this session.
-CDOSessionPropertySource_4=User
-CDOSessionPropertySource_5=The ID of the authenticated user of this session.
-CDOSessionPropertySource_6=Passive Updates Enabled
-CDOSessionPropertySource_7=Whether this session is receiving passive updates from the repository.
-CDOSessionPropertySource_8=Passive Updates Mode
-CDOSessionPropertySource_9=One of INVALIDATIONS, CHANGES, ADDITIONS.
CDOStateFilter.0=conflict
CDOStateFilter.1=transient
CDOStateFilter.2=new
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/properties/CDOPropertySource.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/properties/CDOPropertySource.java
deleted file mode 100644
index 2d03bf112a..0000000000
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/properties/CDOPropertySource.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.internal.ui.properties;
-
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Eike Stepper
- */
-public abstract class CDOPropertySource<OBJECT> implements IPropertySource
-{
- private List<IPropertyDescriptor> descriptors = new ArrayList<IPropertyDescriptor>();
-
- private OBJECT object;
-
- public CDOPropertySource(OBJECT object)
- {
- this.object = object;
- }
-
- public OBJECT getObject()
- {
- return object;
- }
-
- public IPropertyDescriptor[] getPropertyDescriptors()
- {
- return descriptors.toArray(new IPropertyDescriptor[descriptors.size()]);
- }
-
- public PropertyDescriptor addPropertyDescriptor(String category, Object id, String displayName, String description)
- {
- PropertyDescriptor descriptor = new PropertyDescriptor(id, displayName);
- descriptor.setCategory(category);
- descriptor.setDescription(description);
-
- descriptors.add(descriptor);
- return descriptor;
- }
-
- public boolean isPropertySet(Object id)
- {
- return true;
- }
-
- public void resetPropertyValue(Object id)
- {
- }
-
- public void setPropertyValue(Object id, Object value)
- {
- }
-
- public Object getEditableValue()
- {
- return null;
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/properties/CDOSessionAdapterFactory.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/properties/CDOSessionAdapterFactory.java
deleted file mode 100644
index 3f044c8f0a..0000000000
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/properties/CDOSessionAdapterFactory.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.internal.ui.properties;
-
-import org.eclipse.emf.cdo.session.CDOSession;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.IPropertySourceProvider;
-
-/**
- * @author Eike Stepper
- */
-@SuppressWarnings("rawtypes")
-public class CDOSessionAdapterFactory implements IAdapterFactory
-{
- public static final Class[] CLASSES = { IPropertySourceProvider.class };
-
- public CDOSessionAdapterFactory()
- {
- }
-
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- if (adaptableObject instanceof CDOSession)
- {
- if (adapterType == CLASSES[0])
- {
- return new IPropertySourceProvider()
- {
- public IPropertySource getPropertySource(Object object)
- {
- return new CDOSessionPropertySource((CDOSession)object);
- }
- };
- }
- }
-
- return null;
- }
-
- public Class[] getAdapterList()
- {
- return CLASSES;
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/properties/CDOSessionPropertySource.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/properties/CDOSessionPropertySource.java
deleted file mode 100644
index b483f05bee..0000000000
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/properties/CDOSessionPropertySource.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/**
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.internal.ui.properties;
-
-import org.eclipse.emf.cdo.common.CDOCommonSession.Options.PassiveUpdateMode;
-import org.eclipse.emf.cdo.common.id.CDOID;
-import org.eclipse.emf.cdo.internal.ui.messages.Messages;
-import org.eclipse.emf.cdo.session.CDOSession;
-
-import java.util.Date;
-
-/**
- * @author Eike Stepper
- */
-public class CDOSessionPropertySource extends CDOPropertySource<CDOSession>
-{
- private static final String CATEGORY_SESSION = "Session"; //$NON-NLS-1$
-
- private static final String CATEGORY_REPOSITORY = "Repository"; //$NON-NLS-1$
-
- private static final String SESSION_ID = "sessionID"; //$NON-NLS-1$
-
- private static final String USER_ID = "userID"; //$NON-NLS-1$
-
- private static final String PASSIVE_UPDATE_ENABLED = "passiveUpdateEnabled"; //$NON-NLS-1$
-
- private static final String PASSIVE_UPDATE_MODE = "passiveUpdateMode"; //$NON-NLS-1$
-
- private static final String REPOSITORY_NAME = "repositoryName"; //$NON-NLS-1$
-
- private static final String REPOSITORY_UUID = "repositoryUUID"; //$NON-NLS-1$
-
- private static final String REPOSITORY_TYPE = "repositoryType"; //$NON-NLS-1$
-
- private static final String REPOSITORY_STATE = "repositoryState"; //$NON-NLS-1$
-
- private static final String REPOSITORY_CREATION_TIME = "repositoryCreationTime"; //$NON-NLS-1$
-
- private static final String SUPPORTING_AUDITS = "supportingAudits"; //$NON-NLS-1$
-
- private static final String SUPPORTING_BRANCHES = "supportingBranches"; //$NON-NLS-1$
-
- private static final String SUPPORTING_ECORE = "supportingEcore"; //$NON-NLS-1$
-
- private static final String ENSURE_REFERENTIAL_INTEGRITY = "ensureReferentialIntegrity"; //$NON-NLS-1$
-
- private static final String ID_GENERATION_LOCATION = "idGenerationLocation"; //$NON-NLS-1$
-
- private static final String STORE_TYPE = "storeType"; //$NON-NLS-1$
-
- private static final String OBJECT_ID_TYPES = "objectIDTypes"; //$NON-NLS-1$
-
- public CDOSessionPropertySource(CDOSession object)
- {
- super(object);
-
- addPropertyDescriptor(CATEGORY_SESSION, SESSION_ID,//
- Messages.getString("CDOSessionPropertySource_0"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_3")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_SESSION, USER_ID, //
- Messages.getString("CDOSessionPropertySource_4"), Messages.getString("CDOSessionPropertySource_5")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_SESSION, PASSIVE_UPDATE_ENABLED, //
- Messages.getString("CDOSessionPropertySource_6"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_7")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_SESSION, PASSIVE_UPDATE_MODE, //
- Messages.getString("CDOSessionPropertySource_8"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_9")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_REPOSITORY, REPOSITORY_NAME, //
- Messages.getString("CDOSessionPropertySource_10"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_11")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_REPOSITORY, REPOSITORY_UUID, //
- Messages.getString("CDOSessionPropertySource_12"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_13")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_REPOSITORY, REPOSITORY_TYPE, //
- Messages.getString("CDOSessionPropertySource_14"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_15")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_REPOSITORY, REPOSITORY_STATE, //
- Messages.getString("CDOSessionPropertySource_16"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_17")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_REPOSITORY, REPOSITORY_CREATION_TIME, //
- Messages.getString("CDOSessionPropertySource_18"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_19")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_REPOSITORY, SUPPORTING_AUDITS, //
- Messages.getString("CDOSessionPropertySource_20"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_21")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_REPOSITORY, SUPPORTING_BRANCHES, //
- Messages.getString("CDOSessionPropertySource_22"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_23")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_REPOSITORY, SUPPORTING_ECORE, //
- Messages.getString("CDOSessionPropertySource_28"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_29")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_REPOSITORY, ENSURE_REFERENTIAL_INTEGRITY, //
- Messages.getString("CDOSessionPropertySource_30"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_31")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_REPOSITORY, ID_GENERATION_LOCATION, //
- Messages.getString("CDOSessionPropertySource_32"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_33")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_REPOSITORY, STORE_TYPE, //
- Messages.getString("CDOSessionPropertySource_24"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_25")); //$NON-NLS-1$
-
- addPropertyDescriptor(CATEGORY_REPOSITORY, OBJECT_ID_TYPES, //
- Messages.getString("CDOSessionPropertySource_26"), //$NON-NLS-1$
- Messages.getString("CDOSessionPropertySource_27")); //$NON-NLS-1$
- }
-
- public Object getPropertyValue(Object id)
- {
- CDOSession session = getObject();
- if (SESSION_ID.equals(id))
- {
- return session.getSessionID();
- }
-
- if (USER_ID.equals(id))
- {
- return session.getUserID();
- }
-
- if (PASSIVE_UPDATE_ENABLED.equals(id))
- {
- return session.options().isPassiveUpdateEnabled();
- }
-
- if (PASSIVE_UPDATE_MODE.equals(id))
- {
- return session.options().getPassiveUpdateMode().toString();
- }
-
- if (REPOSITORY_NAME.equals(id))
- {
- return session.getRepositoryInfo().getName();
- }
-
- if (REPOSITORY_UUID.equals(id))
- {
- return session.getRepositoryInfo().getUUID();
- }
-
- if (REPOSITORY_TYPE.equals(id))
- {
- return session.getRepositoryInfo().getType().toString();
- }
-
- if (REPOSITORY_STATE.equals(id))
- {
- return session.getRepositoryInfo().getState().toString();
- }
-
- if (REPOSITORY_CREATION_TIME.equals(id))
- {
- return new Date(session.getRepositoryInfo().getCreationTime());
- }
-
- if (SUPPORTING_AUDITS.equals(id))
- {
- return session.getRepositoryInfo().isSupportingAudits();
- }
-
- if (SUPPORTING_BRANCHES.equals(id))
- {
- return session.getRepositoryInfo().isSupportingBranches();
- }
-
- if (ENSURE_REFERENTIAL_INTEGRITY.equals(id))
- {
- return session.getRepositoryInfo().isEnsuringReferentialIntegrity();
- }
-
- if (ID_GENERATION_LOCATION.equals(id))
- {
- return session.getRepositoryInfo().getIDGenerationLocation();
- }
-
- if (STORE_TYPE.equals(id))
- {
- return session.getRepositoryInfo().getStoreType();
- }
-
- if (OBJECT_ID_TYPES.equals(id))
- {
- StringBuilder builder = new StringBuilder();
- for (CDOID.ObjectType objectIDType : session.getRepositoryInfo().getObjectIDTypes())
- {
- if (builder.length() != 0)
- {
- builder.append(", "); //$NON-NLS-1$
- }
-
- builder.append(objectIDType);
- }
-
- return builder.toString();
- }
-
- return null;
- }
-
- @Override
- public void resetPropertyValue(Object id)
- {
- if (PASSIVE_UPDATE_ENABLED.equals(id))
- {
- getObject().options().setPassiveUpdateEnabled(true);
- }
- else if (PASSIVE_UPDATE_MODE.equals(id))
- {
- getObject().options().setPassiveUpdateMode(PassiveUpdateMode.INVALIDATIONS);
- }
- else
- {
- super.resetPropertyValue(id);
- }
- }
-
- @Override
- public void setPropertyValue(Object id, Object value)
- {
- if (PASSIVE_UPDATE_ENABLED.equals(id))
- {
- getObject().options().setPassiveUpdateEnabled((Boolean)value);
- }
- else if (PASSIVE_UPDATE_MODE.equals(id))
- {
- getObject().options().setPassiveUpdateMode((PassiveUpdateMode)value);
- }
- else
- {
- super.setPropertyValue(id, value);
- }
- }
-}

Back to the top