Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.security.edit')
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ClassPermission.gif (renamed from plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ClassCheck.gif)bin206 -> 206 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/PackagePermission.gif (renamed from plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/PackageCheck.gif)bin207 -> 207 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ResourcePermission.gif (renamed from plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ResourceCheck.gif)bin346 -> 346 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/plugin.properties32
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ClassPermissionItemProvider.java (renamed from plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ClassCheckItemProvider.java)24
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PackagePermissionItemProvider.java (renamed from plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PackageCheckItemProvider.java)24
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PermissionItemProvider.java (renamed from plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/CheckItemProvider.java)26
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ResourcePermissionItemProvider.java (renamed from plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ResourceCheckItemProvider.java)38
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RoleItemProvider.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/SecurityItemProviderAdapterFactory.java54
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java16
12 files changed, 136 insertions, 110 deletions
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ClassCheck.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ClassPermission.gif
index 2b8da630d8..2b8da630d8 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ClassCheck.gif
+++ b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ClassPermission.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/PackageCheck.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/PackagePermission.gif
index 30c5c10cc4..30c5c10cc4 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/PackageCheck.gif
+++ b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/PackagePermission.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ResourceCheck.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ResourcePermission.gif
index 27c7cbbe48..27c7cbbe48 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ResourceCheck.gif
+++ b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ResourcePermission.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties
index eff33b4dbf..d1af9e7a5d 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties
@@ -65,32 +65,24 @@ _UI_User_allGroups_feature = All Groups
_UI_User_allRoles_feature = All Roles
_UI_User_label_feature = Label
_UI_Group_allInheritingGroups_feature = All Inheriting Groups
-_UI_Check_type = Check
-_UI_ClassCheck_type = Class Check
-_UI_PackageCheck_type = Package Check
-_UI_ResourceCheck_type = Resource Check
-_UI_Role_checks_feature = Checks
-_UI_Check_role_feature = Role
-_UI_Check_permission_feature = Permission
-_UI_ClassCheck_classes_feature = Classes
-_UI_PackageCheck_packages_feature = Packages
-_UI_ResourceCheck_pattern_feature = Pattern
-_UI_Permission_READ_literal = READ
-_UI_Permission_WRITE_literal = WRITE
_UI_Realm_allUsers_feature = All Users
_UI_Realm_allGroups_feature = All Groups
_UI_Realm_allRoles_feature = All Roles
-_UI_Realm_allChecks_feature = All Checks
_UI_User_unassignedRoles_feature = Unassigned Roles
-_UI_Realm_defaultPermission_feature = Default Permission
-_UI_User_defaultPermissionOverride_feature = Default Permission Override
-_UI_User_defaultPermission_feature = Default Permission
-_UI_User_allChecks_feature = All Checks
-_UI_ClassCheck_applicableClass_feature = Applicable Class
-_UI_PackageCheck_applicablePackage_feature = Applicable Package
_UI_Realm_defaultAccess_feature = Default Access
_UI_User_defaultAccessOverride_feature = Default Access Override
_UI_User_defaultAccess_feature = Default Access
-_UI_Check_access_feature = Access
_UI_Access_READ_literal = READ
_UI_Access_WRITE_literal = WRITE
+_UI_Permission_type = Permission
+_UI_ClassPermission_type = Class Permission
+_UI_PackagePermission_type = Package Permission
+_UI_ResourcePermission_type = Resource Permission
+_UI_Realm_allPermissions_feature = All Permissions
+_UI_Role_permissions_feature = Permissions
+_UI_User_allPermissions_feature = All Permissions
+_UI_Permission_role_feature = Role
+_UI_Permission_access_feature = Access
+_UI_ClassPermission_applicableClass_feature = Applicable Class
+_UI_PackagePermission_applicablePackage_feature = Applicable Package
+_UI_ResourcePermission_pattern_feature = Pattern
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ClassCheckItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ClassPermissionItemProvider.java
index 01791ad1cb..5e43cf1e75 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ClassCheckItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ClassPermissionItemProvider.java
@@ -3,7 +3,7 @@
package org.eclipse.emf.cdo.security.provider;
import org.eclipse.emf.cdo.security.Access;
-import org.eclipse.emf.cdo.security.ClassCheck;
+import org.eclipse.emf.cdo.security.ClassPermission;
import org.eclipse.emf.cdo.security.SecurityPackage;
import org.eclipse.emf.common.notify.AdapterFactory;
@@ -26,12 +26,12 @@ import java.util.Collection;
import java.util.List;
/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.security.ClassCheck} object.
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.security.ClassPermission} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
-public class ClassCheckItemProvider extends CheckItemProvider implements IEditingDomainItemProvider,
+public class ClassPermissionItemProvider extends PermissionItemProvider implements IEditingDomainItemProvider,
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
{
@@ -41,7 +41,7 @@ public class ClassCheckItemProvider extends CheckItemProvider implements IEditin
* <!-- end-user-doc -->
* @generated
*/
- public ClassCheckItemProvider(AdapterFactory adapterFactory)
+ public ClassPermissionItemProvider(AdapterFactory adapterFactory)
{
super(adapterFactory);
}
@@ -75,14 +75,14 @@ public class ClassCheckItemProvider extends CheckItemProvider implements IEditin
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_ClassCheck_applicableClass_feature"), //$NON-NLS-1$
+ getString("_UI_ClassPermission_applicableClass_feature"), //$NON-NLS-1$
getString(
- "_UI_PropertyDescriptor_description", "_UI_ClassCheck_applicableClass_feature", "_UI_ClassCheck_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- SecurityPackage.Literals.CLASS_CHECK__APPLICABLE_CLASS, true, false, true, null, null, null));
+ "_UI_PropertyDescriptor_description", "_UI_ClassPermission_applicableClass_feature", "_UI_ClassPermission_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.CLASS_PERMISSION__APPLICABLE_CLASS, true, false, true, null, null, null));
}
/**
- * This returns ClassCheck.gif.
+ * This returns ClassPermission.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -90,7 +90,7 @@ public class ClassCheckItemProvider extends CheckItemProvider implements IEditin
@Override
public Object getImage(Object object)
{
- return overlayImage(object, getResourceLocator().getImage("full/obj16/ClassCheck")); //$NON-NLS-1$
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ClassPermission")); //$NON-NLS-1$
}
/**
@@ -113,8 +113,8 @@ public class ClassCheckItemProvider extends CheckItemProvider implements IEditin
@Override
public String getText(Object object)
{
- Access labelValue = ((ClassCheck)object).getAccess();
- EClass applicableClass = ((ClassCheck)object).getApplicableClass();
+ Access labelValue = ((ClassPermission)object).getAccess();
+ EClass applicableClass = ((ClassPermission)object).getApplicableClass();
String label = labelValue == null ? null : labelValue.toString();
if (applicableClass != null)
@@ -122,7 +122,7 @@ public class ClassCheckItemProvider extends CheckItemProvider implements IEditin
label += " " + applicableClass.getName();
}
- return label == null || label.length() == 0 ? getString("_UI_ClassCheck_type") : //$NON-NLS-1$
+ return label == null || label.length() == 0 ? getString("_UI_ClassPermission_type") : //$NON-NLS-1$
label;
}
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PackageCheckItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PackagePermissionItemProvider.java
index 8fa3740e86..98b1126a61 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PackageCheckItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PackagePermissionItemProvider.java
@@ -2,7 +2,7 @@
*/
package org.eclipse.emf.cdo.security.provider;
-import org.eclipse.emf.cdo.security.PackageCheck;
+import org.eclipse.emf.cdo.security.PackagePermission;
import org.eclipse.emf.cdo.security.Access;
import org.eclipse.emf.cdo.security.SecurityPackage;
@@ -25,12 +25,12 @@ import java.util.Collection;
import java.util.List;
/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.security.PackageCheck} object.
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.security.PackagePermission} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
-public class PackageCheckItemProvider extends CheckItemProvider implements IEditingDomainItemProvider,
+public class PackagePermissionItemProvider extends PermissionItemProvider implements IEditingDomainItemProvider,
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
{
@@ -40,7 +40,7 @@ public class PackageCheckItemProvider extends CheckItemProvider implements IEdit
* <!-- end-user-doc -->
* @generated
*/
- public PackageCheckItemProvider(AdapterFactory adapterFactory)
+ public PackagePermissionItemProvider(AdapterFactory adapterFactory)
{
super(adapterFactory);
}
@@ -74,14 +74,14 @@ public class PackageCheckItemProvider extends CheckItemProvider implements IEdit
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_PackageCheck_applicablePackage_feature"), //$NON-NLS-1$
+ getString("_UI_PackagePermission_applicablePackage_feature"), //$NON-NLS-1$
getString(
- "_UI_PropertyDescriptor_description", "_UI_PackageCheck_applicablePackage_feature", "_UI_PackageCheck_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- SecurityPackage.Literals.PACKAGE_CHECK__APPLICABLE_PACKAGE, true, false, true, null, null, null));
+ "_UI_PropertyDescriptor_description", "_UI_PackagePermission_applicablePackage_feature", "_UI_PackagePermission_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.PACKAGE_PERMISSION__APPLICABLE_PACKAGE, true, false, true, null, null, null));
}
/**
- * This returns PackageCheck.gif.
+ * This returns PackagePermission.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -89,7 +89,7 @@ public class PackageCheckItemProvider extends CheckItemProvider implements IEdit
@Override
public Object getImage(Object object)
{
- return overlayImage(object, getResourceLocator().getImage("full/obj16/PackageCheck")); //$NON-NLS-1$
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PackagePermission")); //$NON-NLS-1$
}
/**
@@ -112,10 +112,10 @@ public class PackageCheckItemProvider extends CheckItemProvider implements IEdit
@Override
public String getText(Object object)
{
- Access labelValue = ((PackageCheck)object).getAccess();
+ Access labelValue = ((PackagePermission)object).getAccess();
String label = labelValue == null ? null : labelValue.toString();
- return label == null || label.length() == 0 ? getString("_UI_PackageCheck_type") : //$NON-NLS-1$
- getString("_UI_PackageCheck_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_PackagePermission_type") : //$NON-NLS-1$
+ getString("_UI_PackagePermission_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/CheckItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PermissionItemProvider.java
index 902eb8e391..9ce0d8c817 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/CheckItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PermissionItemProvider.java
@@ -2,7 +2,7 @@
*/
package org.eclipse.emf.cdo.security.provider;
-import org.eclipse.emf.cdo.security.Check;
+import org.eclipse.emf.cdo.security.Permission;
import org.eclipse.emf.cdo.security.Access;
import org.eclipse.emf.cdo.security.SecurityPackage;
@@ -30,12 +30,12 @@ import java.util.Collection;
import java.util.List;
/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.security.Check} object.
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.security.Permission} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
-public class CheckItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
+public class PermissionItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
{
@@ -45,7 +45,7 @@ public class CheckItemProvider extends ItemProviderAdapter implements IEditingDo
* <!-- end-user-doc -->
* @generated
*/
- public CheckItemProvider(AdapterFactory adapterFactory)
+ public PermissionItemProvider(AdapterFactory adapterFactory)
{
super(adapterFactory);
}
@@ -79,10 +79,10 @@ public class CheckItemProvider extends ItemProviderAdapter implements IEditingDo
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_Check_access_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Check_access_feature", "_UI_Check_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- SecurityPackage.Literals.CHECK__ACCESS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null,
- null));
+ getString("_UI_Permission_access_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Permission_access_feature", "_UI_Permission_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.PERMISSION__ACCESS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null, null));
}
/**
@@ -116,10 +116,10 @@ public class CheckItemProvider extends ItemProviderAdapter implements IEditingDo
@Override
public String getText(Object object)
{
- Access labelValue = ((Check)object).getAccess();
+ Access labelValue = ((Permission)object).getAccess();
String label = labelValue == null ? null : labelValue.toString();
- return label == null || label.length() == 0 ? getString("_UI_Check_type") : //$NON-NLS-1$
- getString("_UI_Check_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_Permission_type") : //$NON-NLS-1$
+ getString("_UI_Permission_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -134,9 +134,9 @@ public class CheckItemProvider extends ItemProviderAdapter implements IEditingDo
{
updateChildren(notification);
- switch (notification.getFeatureID(Check.class))
+ switch (notification.getFeatureID(Permission.class))
{
- case SecurityPackage.CHECK__ACCESS:
+ case SecurityPackage.PERMISSION__ACCESS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java
index 27d728c955..c13be5943c 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java
@@ -69,6 +69,7 @@ public class RealmItemProvider extends SecurityElementItemProvider implements IE
{
super.getPropertyDescriptors(object);
+ addAllPermissionsPropertyDescriptor(object);
addNamePropertyDescriptor(object);
addDefaultAccessPropertyDescriptor(object);
}
@@ -76,6 +77,21 @@ public class RealmItemProvider extends SecurityElementItemProvider implements IE
}
/**
+ * This adds a property descriptor for the All Permissions feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAllPermissionsPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Realm_allPermissions_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Realm_allPermissions_feature", "_UI_Realm_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.REALM__ALL_PERMISSIONS, false, false, false, null, null, null));
+ }
+
+ /**
* This adds a property descriptor for the Name feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ResourceCheckItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ResourcePermissionItemProvider.java
index 89b371b20f..15383a360c 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ResourceCheckItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ResourcePermissionItemProvider.java
@@ -3,7 +3,7 @@
package org.eclipse.emf.cdo.security.provider;
import org.eclipse.emf.cdo.security.Access;
-import org.eclipse.emf.cdo.security.ResourceCheck;
+import org.eclipse.emf.cdo.security.ResourcePermission;
import org.eclipse.emf.cdo.security.SecurityPackage;
import org.eclipse.emf.common.notify.AdapterFactory;
@@ -27,12 +27,12 @@ import java.util.Collection;
import java.util.List;
/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.security.ResourceCheck} object.
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.security.ResourcePermission} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
-public class ResourceCheckItemProvider extends CheckItemProvider implements IEditingDomainItemProvider,
+public class ResourcePermissionItemProvider extends PermissionItemProvider implements IEditingDomainItemProvider,
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
{
@@ -42,7 +42,7 @@ public class ResourceCheckItemProvider extends CheckItemProvider implements IEdi
* <!-- end-user-doc -->
* @generated
*/
- public ResourceCheckItemProvider(AdapterFactory adapterFactory)
+ public ResourcePermissionItemProvider(AdapterFactory adapterFactory)
{
super(adapterFactory);
}
@@ -73,17 +73,19 @@ public class ResourceCheckItemProvider extends CheckItemProvider implements IEdi
*/
protected void addPatternPropertyDescriptor(Object object)
{
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ResourceCheck_pattern_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ResourceCheck_pattern_feature", "_UI_ResourceCheck_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- SecurityPackage.Literals.RESOURCE_CHECK__PATTERN, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ResourcePermission_pattern_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_ResourcePermission_pattern_feature", "_UI_ResourcePermission_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.RESOURCE_PERMISSION__PATTERN, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
- * This returns ResourceCheck.gif.
+ * This returns ResourcePermission.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -91,7 +93,7 @@ public class ResourceCheckItemProvider extends CheckItemProvider implements IEdi
@Override
public Object getImage(Object object)
{
- return overlayImage(object, getResourceLocator().getImage("full/obj16/ResourceCheck")); //$NON-NLS-1$
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ResourcePermission")); //$NON-NLS-1$
}
/**
@@ -114,10 +116,10 @@ public class ResourceCheckItemProvider extends CheckItemProvider implements IEdi
@Override
public String getText(Object object)
{
- Access labelValue = ((ResourceCheck)object).getAccess();
+ Access labelValue = ((ResourcePermission)object).getAccess();
String label = labelValue == null ? null : labelValue.toString();
- return label == null || label.length() == 0 ? getString("_UI_ResourceCheck_type") : //$NON-NLS-1$
- getString("_UI_ResourceCheck_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_ResourcePermission_type") : //$NON-NLS-1$
+ getString("_UI_ResourcePermission_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -132,9 +134,9 @@ public class ResourceCheckItemProvider extends CheckItemProvider implements IEdi
{
updateChildren(notification);
- switch (notification.getFeatureID(ResourceCheck.class))
+ switch (notification.getFeatureID(ResourcePermission.class))
{
- case SecurityPackage.RESOURCE_CHECK__PATTERN:
+ case SecurityPackage.RESOURCE_PERMISSION__PATTERN:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RoleItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RoleItemProvider.java
index fc456262b5..30bd474a99 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RoleItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RoleItemProvider.java
@@ -119,7 +119,7 @@ public class RoleItemProvider extends SecurityItemItemProvider implements IEditi
if (childrenFeatures == null)
{
super.getChildrenFeatures(object);
- childrenFeatures.add(SecurityPackage.Literals.ROLE__CHECKS);
+ childrenFeatures.add(SecurityPackage.Literals.ROLE__PERMISSIONS);
}
return childrenFeatures;
}
@@ -192,7 +192,7 @@ public class RoleItemProvider extends SecurityItemItemProvider implements IEditi
case SecurityPackage.ROLE__ID:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
- case SecurityPackage.ROLE__CHECKS:
+ case SecurityPackage.ROLE__PERMISSIONS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -211,14 +211,14 @@ public class RoleItemProvider extends SecurityItemItemProvider implements IEditi
{
super.collectNewChildDescriptors(newChildDescriptors, object);
- newChildDescriptors.add(createChildParameter(SecurityPackage.Literals.ROLE__CHECKS,
- SecurityFactory.eINSTANCE.createClassCheck()));
+ newChildDescriptors.add(createChildParameter(SecurityPackage.Literals.ROLE__PERMISSIONS,
+ SecurityFactory.eINSTANCE.createClassPermission()));
- newChildDescriptors.add(createChildParameter(SecurityPackage.Literals.ROLE__CHECKS,
- SecurityFactory.eINSTANCE.createPackageCheck()));
+ newChildDescriptors.add(createChildParameter(SecurityPackage.Literals.ROLE__PERMISSIONS,
+ SecurityFactory.eINSTANCE.createPackagePermission()));
- newChildDescriptors.add(createChildParameter(SecurityPackage.Literals.ROLE__CHECKS,
- SecurityFactory.eINSTANCE.createResourceCheck()));
+ newChildDescriptors.add(createChildParameter(SecurityPackage.Literals.ROLE__PERMISSIONS,
+ SecurityFactory.eINSTANCE.createResourcePermission()));
}
}
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/SecurityItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/SecurityItemProviderAdapterFactory.java
index e48f472ca7..73ff95d240 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/SecurityItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/SecurityItemProviderAdapterFactory.java
@@ -257,78 +257,78 @@ public class SecurityItemProviderAdapterFactory extends SecurityAdapterFactory i
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.security.ClassCheck} instances.
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.security.ClassPermission} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected ClassCheckItemProvider classCheckItemProvider;
+ protected ClassPermissionItemProvider classPermissionItemProvider;
/**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.security.ClassCheck}.
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.security.ClassPermission}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
- public Adapter createClassCheckAdapter()
+ public Adapter createClassPermissionAdapter()
{
- if (classCheckItemProvider == null)
+ if (classPermissionItemProvider == null)
{
- classCheckItemProvider = new ClassCheckItemProvider(this);
+ classPermissionItemProvider = new ClassPermissionItemProvider(this);
}
- return classCheckItemProvider;
+ return classPermissionItemProvider;
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.security.PackageCheck} instances.
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.security.PackagePermission} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected PackageCheckItemProvider packageCheckItemProvider;
+ protected PackagePermissionItemProvider packagePermissionItemProvider;
/**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.security.PackageCheck}.
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.security.PackagePermission}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
- public Adapter createPackageCheckAdapter()
+ public Adapter createPackagePermissionAdapter()
{
- if (packageCheckItemProvider == null)
+ if (packagePermissionItemProvider == null)
{
- packageCheckItemProvider = new PackageCheckItemProvider(this);
+ packagePermissionItemProvider = new PackagePermissionItemProvider(this);
}
- return packageCheckItemProvider;
+ return packagePermissionItemProvider;
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.security.ResourceCheck} instances.
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.security.ResourcePermission} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected ResourceCheckItemProvider resourceCheckItemProvider;
+ protected ResourcePermissionItemProvider resourcePermissionItemProvider;
/**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.security.ResourceCheck}.
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.security.ResourcePermission}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
- public Adapter createResourceCheckAdapter()
+ public Adapter createResourcePermissionAdapter()
{
- if (resourceCheckItemProvider == null)
+ if (resourcePermissionItemProvider == null)
{
- resourceCheckItemProvider = new ResourceCheckItemProvider(this);
+ resourcePermissionItemProvider = new ResourcePermissionItemProvider(this);
}
- return resourceCheckItemProvider;
+ return resourcePermissionItemProvider;
}
/**
@@ -484,12 +484,12 @@ public class SecurityItemProviderAdapterFactory extends SecurityAdapterFactory i
userItemProvider.dispose();
if (userPasswordItemProvider != null)
userPasswordItemProvider.dispose();
- if (classCheckItemProvider != null)
- classCheckItemProvider.dispose();
- if (packageCheckItemProvider != null)
- packageCheckItemProvider.dispose();
- if (resourceCheckItemProvider != null)
- resourceCheckItemProvider.dispose();
+ if (classPermissionItemProvider != null)
+ classPermissionItemProvider.dispose();
+ if (packagePermissionItemProvider != null)
+ packagePermissionItemProvider.dispose();
+ if (resourcePermissionItemProvider != null)
+ resourcePermissionItemProvider.dispose();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java
index f52a72ab16..395e00c3fc 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java
@@ -77,6 +77,7 @@ public class UserItemProvider extends AssigneeItemProvider implements IEditingDo
addDefaultAccessOverridePropertyDescriptor(object);
addDefaultAccessPropertyDescriptor(object);
addLockedPropertyDescriptor(object);
+ addAllPermissionsPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -216,6 +217,21 @@ public class UserItemProvider extends AssigneeItemProvider implements IEditingDo
}
/**
+ * This adds a property descriptor for the All Permissions feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAllPermissionsPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_User_allPermissions_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_User_allPermissions_feature", "_UI_User_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.USER__ALL_PERMISSIONS, false, false, false, null, null, null));
+ }
+
+ /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.

Back to the top