public class EditingCapabilitiesUtil
extends java.lang.Object
Constructor and Description |
---|
EditingCapabilitiesUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
enableActivities(java.lang.Object context)
Enables the editing capabilities in the workbench for the given object.
|
static java.util.Set<java.lang.String> |
getEnabledActivityIds(org.eclipse.emf.ecore.EObject eObject)
Gets the enabled activity IDs for the given
EObject . |
static java.util.Set<java.lang.String> |
getEnabledAndRequiredActivityIds(org.eclipse.emf.ecore.EObject eObject)
Gets the enabled & required activity IDs for the given
EObject . |
static java.util.Set<java.lang.String> |
getRequiredActivityIds(org.eclipse.emf.ecore.EObject eObject)
Gets the required activity IDs for the given
EObject . |
static java.util.Set<java.lang.String> |
getUIReductionActivities()
Gets all the activities participating in UI reduction.
|
static java.util.Set<java.lang.String> |
getWorkbenchEnabledActivityIds()
Return the set of capabilities that are enabled in the
workbench capabilities preferences.
|
static boolean |
hasDisabledEditingCapabilities(org.eclipse.emf.ecore.EObject eObject)
Return
true if the editing capabilities for the given EObject
are disabled. |
static boolean |
hasEnabledEditingCapabilities(org.eclipse.emf.ecore.EObject eObject)
Return
true if the editing capabilities for the given EObject
are enabled. |
static void |
reenableActivities()
Re-enable the editing capabilities in the workbench for the current
active context.
|
static void |
removeEditingCapabilities(org.eclipse.emf.ecore.EObject eObject)
Removes the editing capabilities for the given
EObject . |
static void |
setEditingCapabilitiesEnabled(org.eclipse.emf.ecore.EObject eObject,
boolean enabled)
Enable / disable editing capabilities for the given
EObject . |
static void |
setEnabledActivityIds(org.eclipse.emf.ecore.EObject eObject,
java.util.Collection<java.lang.String> enabledActivityIds)
Sets the given collection of activity IDs to be enabled for the given
EObject . |
static void |
setRequiredActivityIds(org.eclipse.emf.ecore.EObject eObject,
java.util.Collection<java.lang.String> requiredActivityIds)
Sets the given collection of activity IDs to be required for the given
EObject . |
public static void removeEditingCapabilities(org.eclipse.emf.ecore.EObject eObject)
EObject
.
This method differs from disabling editing capabilities through setEditingCapabilitiesEnabled in that none of the enabled or required capabilities are preserved.
eObject
- the EObject
to remove its editing capabilitiespublic static void setEditingCapabilitiesEnabled(org.eclipse.emf.ecore.EObject eObject, boolean enabled)
EObject
.eObject
- the EObject
to enable / disable editing capabilities forpublic static boolean hasEnabledEditingCapabilities(org.eclipse.emf.ecore.EObject eObject)
true
if the editing capabilities for the given EObject
are enabled.
Note: If no editing capabilities exist for the object or are disabled, this method will return false.
eObject
- the EObject
to querytrue
if the editing capabilities for the given EObject
are enabled,
false
otherwisepublic static boolean hasDisabledEditingCapabilities(org.eclipse.emf.ecore.EObject eObject)
true
if the editing capabilities for the given EObject
are disabled.
Note: If no editing capabilities exist for the object the state is still considered disabled, however this method will return false.
eObject
- the EObject
to querytrue
if the editing capabilities for the given EObject
are disabled,
false
otherwisepublic static java.util.Set<java.lang.String> getEnabledActivityIds(org.eclipse.emf.ecore.EObject eObject)
EObject
.eObject
- public static java.util.Set<java.lang.String> getRequiredActivityIds(org.eclipse.emf.ecore.EObject eObject)
EObject
.eObject
- public static java.util.Set<java.lang.String> getEnabledAndRequiredActivityIds(org.eclipse.emf.ecore.EObject eObject)
EObject
.eObject
- public static void setEnabledActivityIds(org.eclipse.emf.ecore.EObject eObject, java.util.Collection<java.lang.String> enabledActivityIds)
EObject
.eObject
- the EObject
to modifyenabledActivityIds
- the collection of activity IDs to enabledpublic static void setRequiredActivityIds(org.eclipse.emf.ecore.EObject eObject, java.util.Collection<java.lang.String> requiredActivityIds)
EObject
.eObject
- the EObject
to modifyrequiredActivityIds
- the collection of activity IDs to requirepublic static java.util.Set<java.lang.String> getWorkbenchEnabledActivityIds()
public static java.util.Set<java.lang.String> getUIReductionActivities()
public static void enableActivities(java.lang.Object context)
context
- the context objectpublic static void reenableActivities()