diff options
author | Eike Stepper | 2013-10-22 16:51:57 +0000 |
---|---|---|
committer | Eike Stepper | 2013-10-22 16:51:57 +0000 |
commit | 7a74ca646b78f03a3fc266b95c0f8351dcbcffc2 (patch) | |
tree | 74c361b8fd304f452d0a7f375dcd966748aea182 /plugins | |
parent | 262e082974e7c6bb38d9ae9b61d7c6fa661802e4 (diff) | |
download | cdo-7a74ca646b78f03a3fc266b95c0f8351dcbcffc2.tar.gz cdo-7a74ca646b78f03a3fc266b95c0f8351dcbcffc2.tar.xz cdo-7a74ca646b78f03a3fc266b95c0f8351dcbcffc2.zip |
Enrich the preferences model
Diffstat (limited to 'plugins')
24 files changed, 1926 insertions, 439 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.releng.preferences.edit/META-INF/MANIFEST.MF index eb9673bda5..ab2329c35e 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences.edit/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.cdo.releng.preferences.edit/META-INF/MANIFEST.MF @@ -10,6 +10,6 @@ Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: J2SE-1.5 Export-Package: org.eclipse.emf.cdo.releng.preferences.provider;version="1.0.0" Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)", - org.eclipse.emf.cdo.releng.preferences;bundle-version="[1.0.0,2.0.0)";visibility:=reexport, - org.eclipse.emf.edit;bundle-version="[2.5.0,3.0.0)";visibility:=reexport + org.eclipse.emf.cdo.releng.preferences;visibility:=reexport;bundle-version="[1.0.0,2.0.0)", + org.eclipse.emf.edit;visibility:=reexport;bundle-version="[2.5.0,3.0.0)" Bundle-ActivationPolicy: lazy diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.releng.preferences.edit/plugin.properties index 95340cf637..901773fcd7 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences.edit/plugin.properties +++ b/plugins/org.eclipse.emf.cdo.releng.preferences.edit/plugin.properties @@ -37,3 +37,9 @@ _UI_Property_value_feature = Value _UI_Unknown_feature = Unspecified _UI_PreferenceNode_location_feature = Location +_UI_PreferenceItem_type = Preference Item +_UI_PreferenceItem_root_feature = Root +_UI_PreferenceItem_absolutePath_feature = Absolute Path +_UI_PreferenceItem_name_feature = Name +_UI_PreferenceItem_scope_feature = Scope +_UI_PreferenceItem_scopeRelativePath_feature = Scope Relative Path diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PreferenceItemItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PreferenceItemItemProvider.java new file mode 100644 index 0000000000..27ebaa8664 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PreferenceItemItemProvider.java @@ -0,0 +1,220 @@ +/** + */ +package org.eclipse.emf.cdo.releng.preferences.provider; + +import org.eclipse.emf.cdo.releng.preferences.PreferenceItem; +import org.eclipse.emf.cdo.releng.preferences.PreferencesPackage; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ +public class PreferenceItemItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public PreferenceItemItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addRootPropertyDescriptor(object); + addScopePropertyDescriptor(object); + addAbsolutePathPropertyDescriptor(object); + addScopeRelativePathPropertyDescriptor(object); + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Root feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addRootPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_PreferenceItem_root_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PreferenceItem_root_feature", "_UI_PreferenceItem_type"), + PreferencesPackage.Literals.PREFERENCE_ITEM__ROOT, false, false, false, null, null, null)); + } + + /** + * This adds a property descriptor for the Absolute Path feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addAbsolutePathPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_PreferenceItem_absolutePath_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PreferenceItem_absolutePath_feature", + "_UI_PreferenceItem_type"), PreferencesPackage.Literals.PREFERENCE_ITEM__ABSOLUTE_PATH, false, false, + false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Scope Relative Path feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addScopeRelativePathPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_PreferenceItem_scopeRelativePath_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PreferenceItem_scopeRelativePath_feature", + "_UI_PreferenceItem_type"), PreferencesPackage.Literals.PREFERENCE_ITEM__SCOPE_RELATIVE_PATH, false, false, + false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Name feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addNamePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_PreferenceItem_name_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PreferenceItem_name_feature", "_UI_PreferenceItem_type"), + PreferencesPackage.Literals.PREFERENCE_ITEM__NAME, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Scope feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addScopePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_PreferenceItem_scope_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PreferenceItem_scope_feature", "_UI_PreferenceItem_type"), + PreferencesPackage.Literals.PREFERENCE_ITEM__SCOPE, false, false, false, null, null, null)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() + { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) + { + String label = ((PreferenceItem)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_PreferenceItem_type") + : getString("_UI_PreferenceItem_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(PreferenceItem.class)) + { + case PreferencesPackage.PREFERENCE_ITEM__ABSOLUTE_PATH: + case PreferencesPackage.PREFERENCE_ITEM__SCOPE_RELATIVE_PATH: + case PreferencesPackage.PREFERENCE_ITEM__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return PreferencesEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PreferenceNodeItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PreferenceNodeItemProvider.java index 9e1a90dc8a..ac35a2a2b0 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PreferenceNodeItemProvider.java +++ b/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PreferenceNodeItemProvider.java @@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.releng.preferences.PreferencesPackage; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; @@ -26,7 +25,6 @@ import org.eclipse.emf.edit.provider.IItemPropertySource; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; import java.util.Collection; @@ -38,7 +36,7 @@ import java.util.List; * <!-- end-user-doc --> * @generated */ -public class PreferenceNodeItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, +public class PreferenceNodeItemProvider extends PreferenceItemItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { /** @@ -65,29 +63,12 @@ public class PreferenceNodeItemProvider extends ItemProviderAdapter implements I { super.getPropertyDescriptors(object); - addNamePropertyDescriptor(object); addLocationPropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Name feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected void addNamePropertyDescriptor(Object object) - { - itemPropertyDescriptors.add(createItemPropertyDescriptor( - ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_PreferenceNode_name_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_PreferenceNode_name_feature", "_UI_PreferenceNode_type"), - PreferencesPackage.Literals.PREFERENCE_NODE__NAME, true, false, false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); - } - - /** * This adds a property descriptor for the Location feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -188,7 +169,6 @@ public class PreferenceNodeItemProvider extends ItemProviderAdapter implements I switch (notification.getFeatureID(PreferenceNode.class)) { - case PreferencesPackage.PREFERENCE_NODE__NAME: case PreferencesPackage.PREFERENCE_NODE__LOCATION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; @@ -219,16 +199,4 @@ public class PreferenceNodeItemProvider extends ItemProviderAdapter implements I PreferencesFactory.eINSTANCE.createProperty())); } - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public ResourceLocator getResourceLocator() - { - return PreferencesEditPlugin.INSTANCE; - } - } diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PreferencesItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PreferencesItemProviderAdapterFactory.java index a6b7b72676..4205968ef0 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PreferencesItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PreferencesItemProviderAdapterFactory.java @@ -187,7 +187,7 @@ public class PreferencesItemProviderAdapterFactory extends PreferencesAdapterFac if (isFactoryForType(type)) { Object adapter = super.adapt(object, type); - if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) + if (!(type instanceof Class<?>) || ((Class<?>)type).isInstance(adapter)) { return adapter; } @@ -243,9 +243,13 @@ public class PreferencesItemProviderAdapterFactory extends PreferencesAdapterFac public void dispose() { if (preferenceNodeItemProvider != null) + { preferenceNodeItemProvider.dispose(); + } if (propertyItemProvider != null) + { propertyItemProvider.dispose(); + } } } diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PropertyItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PropertyItemProvider.java index 8f7c93872c..f58d44ed82 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PropertyItemProvider.java +++ b/plugins/org.eclipse.emf.cdo.releng.preferences.edit/src/org/eclipse/emf/cdo/releng/preferences/provider/PropertyItemProvider.java @@ -15,7 +15,6 @@ import org.eclipse.emf.cdo.releng.preferences.Property; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; @@ -24,7 +23,6 @@ import org.eclipse.emf.edit.provider.IItemPropertySource; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; import java.util.Collection; @@ -36,7 +34,7 @@ import java.util.List; * <!-- end-user-doc --> * @generated */ -public class PropertyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, +public class PropertyItemProvider extends PreferenceItemItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { /** @@ -63,29 +61,12 @@ public class PropertyItemProvider extends ItemProviderAdapter implements IEditin { super.getPropertyDescriptors(object); - addNamePropertyDescriptor(object); addValuePropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Name feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected void addNamePropertyDescriptor(Object object) - { - itemPropertyDescriptors.add(createItemPropertyDescriptor( - ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Property_name_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Property_name_feature", "_UI_Property_type"), - PreferencesPackage.Literals.PROPERTY__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, null)); - } - - /** * This adds a property descriptor for the Value feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -152,7 +133,6 @@ public class PropertyItemProvider extends ItemProviderAdapter implements IEditin switch (notification.getFeatureID(Property.class)) { - case PreferencesPackage.PROPERTY__NAME: case PreferencesPackage.PROPERTY__VALUE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; @@ -173,16 +153,4 @@ public class PropertyItemProvider extends ItemProviderAdapter implements IEditin super.collectNewChildDescriptors(newChildDescriptors, object); } - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public ResourceLocator getResourceLocator() - { - return PreferencesEditPlugin.INSTANCE; - } - } diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences.editor/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.releng.preferences.editor/META-INF/MANIFEST.MF index eed4a14fc5..9ebe0c92cd 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences.editor/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.cdo.releng.preferences.editor/META-INF/MANIFEST.MF @@ -11,11 +11,11 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5 Export-Package: org.eclipse.emf.cdo.releng.preferences.action;version="1.0.0", org.eclipse.emf.cdo.releng.preferences.presentation;version="1.0.0" Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)", - org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)";visibility:=reexport, - org.eclipse.emf.cdo.releng.preferences.edit;bundle-version="[1.0.0,2.0.0)";visibility:=reexport, - org.eclipse.emf.ecore.xmi;bundle-version="[2.5.0,3.0.0)";visibility:=reexport, - org.eclipse.emf.edit.ui;bundle-version="[2.5.0,3.0.0)";visibility:=reexport, - org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)";visibility:=reexport, + org.eclipse.core.resources;visibility:=reexport;bundle-version="[3.5.0,4.0.0)", + org.eclipse.emf.cdo.releng.preferences.edit;visibility:=reexport;bundle-version="[1.0.0,2.0.0)", + org.eclipse.emf.ecore.xmi;visibility:=reexport;bundle-version="[2.5.0,3.0.0)", + org.eclipse.emf.edit.ui;visibility:=reexport;bundle-version="[2.5.0,3.0.0)", + org.eclipse.ui.ide;visibility:=reexport;bundle-version="[3.5.0,4.0.0)", org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)", org.eclipse.emf.cdo.releng.ui;bundle-version="[1.0.0,2.0.0)" Bundle-ActivationPolicy: lazy diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences.editor/plugin.xml b/plugins/org.eclipse.emf.cdo.releng.preferences.editor/plugin.xml index 728c33e1bc..d30b651171 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences.editor/plugin.xml +++ b/plugins/org.eclipse.emf.cdo.releng.preferences.editor/plugin.xml @@ -28,14 +28,11 @@ <category id="org.eclipse.emf.ecore.Wizard.category.ID" name="%_UI_Wizard_category"/> - <category - id="org.eclipse.emf.cdo.releng" - name="%_UI_Wizard_category"/> <wizard id="org.eclipse.emf.cdo.releng.preferences.presentation.PreferencesModelWizardID" name="%_UI_PreferencesModelWizard_label" class="org.eclipse.emf.cdo.releng.preferences.presentation.PreferencesModelWizard" - category="org.eclipse.emf.cdo.releng" + category="org.eclipse.emf.ecore.Wizard.category.ID" icon="icons/full/obj16/PreferencesModelFile.gif"> <description>%_UI_PreferencesModelWizard_description</description> <selection class="org.eclipse.core.resources.IResource"/> diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.releng.preferences/META-INF/MANIFEST.MF index ad8152eb4b..e6a2488648 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/META-INF/MANIFEST.MF @@ -7,7 +7,7 @@ Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-Localization: plugin Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)", - org.eclipse.emf.ecore;bundle-version="[2.9.0,3.0.0)";visibility:=reexport, + org.eclipse.emf.ecore;visibility:=reexport;bundle-version="[2.9.0,3.0.0)", org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/model/preferences.ecore b/plugins/org.eclipse.emf.cdo.releng.preferences/model/preferences.ecore index cf39a96d45..e57b012008 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences/model/preferences.ecore +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/model/preferences.ecore @@ -2,26 +2,52 @@ <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="preferences" nsURI="http://www.eclipse.org/CDO/releng/preferences/1.0" nsPrefix="preferences"> - <eClassifiers xsi:type="ecore:EClass" name="PreferenceNode"> + <eClassifiers xsi:type="ecore:EClass" name="PreferenceItem" abstract="true"> + <eOperations name="getParent" eType="#//PreferenceNode"/> + <eOperations name="getItem" eType="#//PreferenceItem"> + <eParameters name="path" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eOperations> + <eOperations name="getInScope" eType="#//PreferenceItem"> + <eParameters name="scopeName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eOperations> + <eOperations name="getInScope" eType="#//PreferenceItem"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="root" eType="#//PreferenceNode" + changeable="false" volatile="true" transient="true" derived="true" resolveProxies="false"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="scope" eType="#//PreferenceNode" + changeable="false" volatile="true" transient="true" derived="true" resolveProxies="false"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="absolutePath" lowerBound="1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" changeable="false" + volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="scopeRelativePath" lowerBound="1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" changeable="false" + volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="PreferenceNode" eSuperTypes="#//PreferenceItem"> <eOperations name="getNode" eType="#//PreferenceNode"> <eParameters name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> </eOperations> <eOperations name="getProperty" eType="#//Property"> <eParameters name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> </eOperations> - <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1" - eType="#//PreferenceNode" containment="true" eOpposite="#//PreferenceNode/parent" - eKeys="#//PreferenceNode/name"/> + <eOperations name="getInScope" eType="#//PreferenceNode"> + <eParameters name="scopeName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eOperations> + <eOperations name="getInScope" eType="#//PreferenceNode"/> <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//PreferenceNode" eOpposite="#//PreferenceNode/children"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1" + eType="#//PreferenceNode" containment="true" eOpposite="#//PreferenceNode/parent"/> <eStructuralFeatures xsi:type="ecore:EReference" name="properties" upperBound="-1" - eType="#//Property" containment="true" eOpposite="#//Property/parent" eKeys="#//Property/name"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + eType="#//Property" containment="true" eOpposite="#//Property/parent" eKeys="#//PreferenceItem/name"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="location" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" changeable="false" volatile="true" transient="true" derived="true"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Property"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eClassifiers xsi:type="ecore:EClass" name="Property" eSuperTypes="#//PreferenceItem"> + <eOperations name="getInScope" eType="#//Property"> + <eParameters name="scopeName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eOperations> + <eOperations name="getInScope" eType="#//Property"/> <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//PreferenceNode" eOpposite="#//PreferenceNode/properties"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="#//EscapedString"/> diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/model/preferences.ecorediag b/plugins/org.eclipse.emf.cdo.releng.preferences/model/preferences.ecorediag index 4521c46fac..94a1737a14 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences/model/preferences.ecorediag +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/model/preferences.ecorediag @@ -1,12 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_nIq4kAWgEeOo7_Wc1UIK7A" type="EcoreTools" measurementUnit="Pixel"> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_nIq4kAWgEeOo7_Wc1UIK7A" type="EcoreTools" measurementUnit="Pixel"> <children xmi:type="notation:Node" xmi:id="_xuHNQAWgEeOo7_Wc1UIK7A" type="1001"> <children xmi:type="notation:Node" xmi:id="_xuJCcAWgEeOo7_Wc1UIK7A" type="4001"/> <children xmi:type="notation:Node" xmi:id="_xuKQkAWgEeOo7_Wc1UIK7A" type="5001"> - <children xmi:type="notation:Node" xmi:id="_ixYSwAWhEeOo7_Wc1UIK7A" type="2001"> - <element xmi:type="ecore:EAttribute" href="preferences.ecore#//PreferenceNode/name"/> - <layoutConstraint xmi:type="notation:Location" xmi:id="_ixYSwQWhEeOo7_Wc1UIK7A"/> - </children> <children xmi:type="notation:Node" xmi:id="_fbxAcAfTEeOoPqB4RyWmHw" type="2001"> <element xmi:type="ecore:EAttribute" href="preferences.ecore#//PreferenceNode/location"/> <layoutConstraint xmi:type="notation:Location" xmi:id="_fbxAcQfTEeOoPqB4RyWmHw"/> @@ -30,15 +26,11 @@ </children> <styles xmi:type="notation:ShapeStyle" xmi:id="_xuHNQQWgEeOo7_Wc1UIK7A" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/> <element xmi:type="ecore:EClass" href="preferences.ecore#//PreferenceNode"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xuHNQgWgEeOo7_Wc1UIK7A" x="195" y="45" width="378" height="138"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xuHNQgWgEeOo7_Wc1UIK7A" x="115" y="235"/> </children> <children xmi:type="notation:Node" xmi:id="_aTA_UAWhEeOo7_Wc1UIK7A" type="1001"> <children xmi:type="notation:Node" xmi:id="_aTCNcAWhEeOo7_Wc1UIK7A" type="4001"/> <children xmi:type="notation:Node" xmi:id="_aTC0gAWhEeOo7_Wc1UIK7A" type="5001"> - <children xmi:type="notation:Node" xmi:id="_lyxAIAWhEeOo7_Wc1UIK7A" type="2001"> - <element xmi:type="ecore:EAttribute" href="preferences.ecore#//Property/name"/> - <layoutConstraint xmi:type="notation:Location" xmi:id="_lyxAIQWhEeOo7_Wc1UIK7A"/> - </children> <children xmi:type="notation:Node" xmi:id="_7mlRwAWhEeOo7_Wc1UIK7A" type="2001"> <element xmi:type="ecore:EAttribute" href="preferences.ecore#//Property/value"/> <layoutConstraint xmi:type="notation:Location" xmi:id="_7mlRwQWhEeOo7_Wc1UIK7A"/> @@ -54,34 +46,58 @@ </children> <styles xmi:type="notation:ShapeStyle" xmi:id="_aTA_UQWhEeOo7_Wc1UIK7A" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/> <element xmi:type="ecore:EClass" href="preferences.ecore#//Property"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aTA_UgWhEeOo7_Wc1UIK7A" x="195" y="360"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aTA_UgWhEeOo7_Wc1UIK7A" x="500" y="235"/> </children> <children xmi:type="notation:Node" xmi:id="_Z3I7YAZAEeOo7_Wc1UIK7A" type="1004"> <children xmi:type="notation:Node" xmi:id="_Z3JicAZAEeOo7_Wc1UIK7A" type="4008"/> <children xmi:type="notation:Node" xmi:id="_Z3JicQZAEeOo7_Wc1UIK7A" type="4009"/> <styles xmi:type="notation:ShapeStyle" xmi:id="_Z3I7YQZAEeOo7_Wc1UIK7A" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/> <element xmi:type="ecore:EDataType" href="preferences.ecore#//EscapedString"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z3I7YgZAEeOo7_Wc1UIK7A" x="690" y="60"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z3I7YgZAEeOo7_Wc1UIK7A" x="526" y="365"/> + </children> + <children xmi:type="notation:Node" xmi:id="_0Sa5sDstEeOGq_OsFBGIRA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_0ShAUDstEeOGq_OsFBGIRA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_0ShAUTstEeOGq_OsFBGIRA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_lyxAIAWhEeOo7_Wc1UIK7A" type="2001"> + <element xmi:type="ecore:EAttribute" href="preferences.ecore#//PreferenceItem/name"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_lyxAIQWhEeOo7_Wc1UIK7A"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_0ShAUjstEeOGq_OsFBGIRA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_0ShAUzstEeOGq_OsFBGIRA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_0ShAVDstEeOGq_OsFBGIRA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_0ShAVTstEeOGq_OsFBGIRA" type="5002"> + <children xmi:type="notation:Node" xmi:id="_DLgN0DsuEeOGq_OsFBGIRA" type="2002"> + <element xmi:type="ecore:EOperation" href="preferences.ecore#//PreferenceItem/getParent"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_DLgN0TsuEeOGq_OsFBGIRA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_0ShAVjstEeOGq_OsFBGIRA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_0ShAVzstEeOGq_OsFBGIRA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_0ShAWDstEeOGq_OsFBGIRA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_0Sa5sTstEeOGq_OsFBGIRA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="preferences.ecore#//PreferenceItem"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0Sa5sjstEeOGq_OsFBGIRA" x="325" y="50"/> </children> <styles xmi:type="notation:DiagramStyle" xmi:id="_nIq4kQWgEeOo7_Wc1UIK7A"/> <element xmi:type="ecore:EPackage" href="preferences.ecore#/"/> <edges xmi:type="notation:Edge" xmi:id="_3HgT0AWgEeOo7_Wc1UIK7A" type="3002" source="_xuHNQAWgEeOo7_Wc1UIK7A" target="_xuHNQAWgEeOo7_Wc1UIK7A"> <children xmi:type="notation:Node" xmi:id="_3Hhh8AWgEeOo7_Wc1UIK7A" type="4011"> - <layoutConstraint xmi:type="notation:Location" xmi:id="_3Hhh8QWgEeOo7_Wc1UIK7A" x="-43" y="15"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_3Hhh8QWgEeOo7_Wc1UIK7A" x="15" y="-14"/> </children> <children xmi:type="notation:Node" xmi:id="_3Hhh8gWgEeOo7_Wc1UIK7A" type="4012"> - <layoutConstraint xmi:type="notation:Location" xmi:id="_3Hhh8wWgEeOo7_Wc1UIK7A" x="6" y="25"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_3Hhh8wWgEeOo7_Wc1UIK7A" x="26" y="15"/> </children> <styles xmi:type="notation:ConnectorStyle" xmi:id="_3HgT0QWgEeOo7_Wc1UIK7A" routing="Rectilinear" lineColor="4210752"/> <styles xmi:type="notation:FontStyle" xmi:id="_3HgT0gWgEeOo7_Wc1UIK7A" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> <element xmi:type="ecore:EReference" href="preferences.ecore#//PreferenceNode/children"/> - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3HgT0wWgEeOo7_Wc1UIK7A" points="[294, 45, 156, 45]$[294, 165, 156, 165]$[204, 165, 66, 165]$[204, 45, 66, 45]"/> - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8Y6GUQZAEeOo7_Wc1UIK7A" id="(0.10416666666666667,0.5102040816326531)"/> - <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8Y6GUgZAEeOo7_Wc1UIK7A" id="(0.5,0.5)"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3HgT0wWgEeOo7_Wc1UIK7A" points="[15, 37, -80, 37]$[15, 88, -80, 88]$[-80, 88, -175, 88]$[-80, 1, -175, 1]$[-25, 1, -120, 1]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_sm60UjsyEeOGq_OsFBGIRA" id="(0.10416666666666667,0.5102040816326531)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_sm60UzsyEeOGq_OsFBGIRA" id="(0.5,0.5)"/> </edges> <edges xmi:type="notation:Edge" xmi:id="_7i4S8AWgEeOo7_Wc1UIK7A" type="3002" source="_xuHNQAWgEeOo7_Wc1UIK7A" target="_xuHNQAWgEeOo7_Wc1UIK7A"> <children xmi:type="notation:Node" xmi:id="_7i4S9AWgEeOo7_Wc1UIK7A" type="4011"> - <layoutConstraint xmi:type="notation:Location" xmi:id="_7i4S9QWgEeOo7_Wc1UIK7A" x="-3" y="19"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_7i4S9QWgEeOo7_Wc1UIK7A" x="18" y="29"/> </children> <children xmi:type="notation:Node" xmi:id="_7i46AAWgEeOo7_Wc1UIK7A" type="4012"> <layoutConstraint xmi:type="notation:Location" xmi:id="_7i46AQWgEeOo7_Wc1UIK7A" x="24" y="-26"/> @@ -89,36 +105,77 @@ <styles xmi:type="notation:ConnectorStyle" xmi:id="_7i4S8QWgEeOo7_Wc1UIK7A" routing="Rectilinear" lineColor="4210752"/> <styles xmi:type="notation:FontStyle" xmi:id="_7i4S8gWgEeOo7_Wc1UIK7A" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> <element xmi:type="ecore:EReference" href="preferences.ecore#//PreferenceNode/parent"/> - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_7i4S8wWgEeOo7_Wc1UIK7A" points="[66, 45, 204, 45]$[66, 165, 204, 165]$[156, 165, 294, 165]$[156, 45, 294, 45]"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_7i4S8wWgEeOo7_Wc1UIK7A" points="[-120, 1, -25, 1]$[-175, 1, -80, 1]$[-175, 88, -80, 88]$[-80, 88, 15, 88]$[-80, 37, 15, 37]"/> <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_sGYoUAZnEeOxTbyYFvrvrA" id="(0.5,0.5)"/> <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_sGYoUQZnEeOxTbyYFvrvrA" id="(0.10416666666666667,0.5102040816326531)"/> </edges> <edges xmi:type="notation:Edge" xmi:id="_cXdjUAWhEeOo7_Wc1UIK7A" type="3002" source="_xuHNQAWgEeOo7_Wc1UIK7A" target="_aTA_UAWhEeOo7_Wc1UIK7A"> <children xmi:type="notation:Node" xmi:id="_cXexcAWhEeOo7_Wc1UIK7A" type="4011"> - <layoutConstraint xmi:type="notation:Location" xmi:id="_cXexcQWhEeOo7_Wc1UIK7A" x="-14" y="-66"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_cXexcQWhEeOo7_Wc1UIK7A" x="-18" y="-18"/> </children> <children xmi:type="notation:Node" xmi:id="_cXfYgAWhEeOo7_Wc1UIK7A" type="4012"> - <layoutConstraint xmi:type="notation:Location" xmi:id="_cXfYgQWhEeOo7_Wc1UIK7A" x="-14" y="36"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_cXfYgQWhEeOo7_Wc1UIK7A" x="1" y="14"/> </children> <styles xmi:type="notation:ConnectorStyle" xmi:id="_cXdjUQWhEeOo7_Wc1UIK7A" routing="Rectilinear" lineColor="4210752"/> <styles xmi:type="notation:FontStyle" xmi:id="_cXdjUgWhEeOo7_Wc1UIK7A" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> <element xmi:type="ecore:EReference" href="preferences.ecore#//PreferenceNode/properties"/> - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_cXdjUwWhEeOo7_Wc1UIK7A" points="[-84, 45, 4, -237]$[-84, 270, 4, -12]"/> - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_tbLRAgZnEeOxTbyYFvrvrA" id="(0.5,0.5)"/> - <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_tbLRAwZnEeOxTbyYFvrvrA" id="(0.45098039215686275,0.14285714285714285)"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_cXdjUwWhEeOo7_Wc1UIK7A" points="[125, -16, -228, 28]$[261, -16, -92, 28]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ijhf8Ds2EeOGq_OsFBGIRA" id="(0.5,0.5)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ijhf8Ts2EeOGq_OsFBGIRA" id="(0.45098039215686275,0.14285714285714285)"/> </edges> <edges xmi:type="notation:Edge" xmi:id="_03JlUAWhEeOo7_Wc1UIK7A" type="3002" source="_aTA_UAWhEeOo7_Wc1UIK7A" target="_xuHNQAWgEeOo7_Wc1UIK7A"> <children xmi:type="notation:Node" xmi:id="_03KzcAWhEeOo7_Wc1UIK7A" type="4011"> - <layoutConstraint xmi:type="notation:Location" xmi:id="_03KzcQWhEeOo7_Wc1UIK7A" x="-20" y="-35"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_03KzcQWhEeOo7_Wc1UIK7A" x="-11" y="-14"/> </children> <children xmi:type="notation:Node" xmi:id="_03LagAWhEeOo7_Wc1UIK7A" type="4012"> - <layoutConstraint xmi:type="notation:Location" xmi:id="_03LagQWhEeOo7_Wc1UIK7A" x="-20" y="28"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_03LagQWhEeOo7_Wc1UIK7A" x="-2" y="13"/> </children> <styles xmi:type="notation:ConnectorStyle" xmi:id="_03JlUQWhEeOo7_Wc1UIK7A" routing="Rectilinear" lineColor="4210752"/> <styles xmi:type="notation:FontStyle" xmi:id="_03JlUgWhEeOo7_Wc1UIK7A" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> <element xmi:type="ecore:EReference" href="preferences.ecore#//Property/parent"/> - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_03JlUwWhEeOo7_Wc1UIK7A" points="[4, -12, -84, 270]$[4, -237, -84, 45]"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_03JlUwWhEeOo7_Wc1UIK7A" points="[-92, 28, 261, -16]$[-228, 28, 125, -16]"/> <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5ttEkAWhEeOo7_Wc1UIK7A" id="(0.45098039215686275,0.14285714285714285)"/> <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5ttEkQWhEeOo7_Wc1UIK7A" id="(0.5,0.5)"/> </edges> + <edges xmi:type="notation:Edge" xmi:id="_6dnQoDstEeOGq_OsFBGIRA" type="3003" source="_xuHNQAWgEeOo7_Wc1UIK7A" target="_0Sa5sDstEeOGq_OsFBGIRA"> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_6dnQoTstEeOGq_OsFBGIRA" routing="Rectilinear" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_6dnQojstEeOGq_OsFBGIRA" fontName="Segoe UI"/> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6dnQozstEeOGq_OsFBGIRA" points="[55, -9, -155, 123]$[55, -39, -155, 93]$[204, -39, -6, 93]$[204, -69, -6, 63]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6d5kgDstEeOGq_OsFBGIRA" id="(0.48677248677248675,0.08695652173913043)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_7FM1EDstEeOGq_OsFBGIRA" type="3003" source="_aTA_UAWhEeOo7_Wc1UIK7A" target="_0Sa5sDstEeOGq_OsFBGIRA"> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_7FM1ETstEeOGq_OsFBGIRA" routing="Rectilinear" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_7FM1EjstEeOGq_OsFBGIRA" fontName="Segoe UI"/> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_7FM1EzstEeOGq_OsFBGIRA" points="[18, -16, 160, 123]$[18, -46, 160, 93]$[-148, -46, -6, 93]$[-148, -76, -6, 63]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_7FS7sDstEeOGq_OsFBGIRA" id="(0.432258064516129,0.22058823529411764)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_ELiSADsvEeOGq_OsFBGIRA" type="3002" source="_0Sa5sDstEeOGq_OsFBGIRA" target="_xuHNQAWgEeOo7_Wc1UIK7A"> + <children xmi:type="notation:Node" xmi:id="_ELufQDsvEeOGq_OsFBGIRA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ELufQTsvEeOGq_OsFBGIRA" x="31" y="-18"/> + </children> + <children xmi:type="notation:Node" xmi:id="_EL0l4DsvEeOGq_OsFBGIRA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_EL0l4TsvEeOGq_OsFBGIRA" x="31" y="15"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_ELiSATsvEeOGq_OsFBGIRA" routing="Rectilinear" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_ELiSAjsvEeOGq_OsFBGIRA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="preferences.ecore#//PreferenceItem/root"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ELiSAzsvEeOGq_OsFBGIRA" points="[-18, -7, 159, -190]$[-183, -7, -6, -190]$[-183, 148, -6, -35]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_EL6sgDsvEeOGq_OsFBGIRA" id="(0.09004739336492891,0.5131578947368421)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_EL6sgTsvEeOGq_OsFBGIRA" id="(0.2139917695473251,0.47368421052631576)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_U9RpgDsyEeOGq_OsFBGIRA" type="3002" source="_0Sa5sDstEeOGq_OsFBGIRA" target="_xuHNQAWgEeOo7_Wc1UIK7A"> + <children xmi:type="notation:Node" xmi:id="_U9RphDsyEeOGq_OsFBGIRA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_U9RphTsyEeOGq_OsFBGIRA" x="16" y="-22"/> + </children> + <children xmi:type="notation:Node" xmi:id="_U9XwIDsyEeOGq_OsFBGIRA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_U9XwITsyEeOGq_OsFBGIRA" x="16" y="15"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_U9RpgTsyEeOGq_OsFBGIRA" routing="Rectilinear" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_U9RpgjsyEeOGq_OsFBGIRA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="preferences.ecore#//PreferenceItem/scope"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_U9RpgzsyEeOGq_OsFBGIRA" points="[-22, 6, 90, -157]$[-122, 6, -10, -157]$[-122, 126, -10, -37]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_U9XwIjsyEeOGq_OsFBGIRA" id="(0.1031390134529148,0.6559139784946236)"/> + </edges> </notation:Diagram> diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/model/preferences.genmodel b/plugins/org.eclipse.emf.cdo.releng.preferences/model/preferences.genmodel index 62596def78..c57460841c 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences/model/preferences.genmodel +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/model/preferences.genmodel @@ -2,16 +2,25 @@ <genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.emf.cdo.releng.preferences/src" creationIcons="false" modelPluginID="org.eclipse.emf.cdo.releng.preferences" modelName="Preferences" - rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" importerID="org.eclipse.emf.importer.ecore" - complianceLevel="5.0" copyrightFields="false" operationReflection="true" importOrganizing="true"> + rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" testsDirectory="" + importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false" + operationReflection="true" importOrganizing="true"> <foreignModel>preferences.ecore</foreignModel> <genPackages prefix="Preferences" basePackage="org.eclipse.emf.cdo.releng" disposableProviderFactory="true" multipleEditorPages="false" ecorePackage="preferences.ecore#/"> + <genDataTypes ecoreDataType="preferences.ecore#//EscapedString"/> <genClasses ecoreClass="preferences.ecore#//PreferenceNode"> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference preferences.ecore#//PreferenceNode/children"/> <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference preferences.ecore#//PreferenceNode/parent"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference preferences.ecore#//PreferenceNode/properties"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute preferences.ecore#//PreferenceNode/name"/> + <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute preferences.ecore#//PreferenceNode/location"/> + <genOperations ecoreOperation="preferences.ecore#//PreferenceNode/getNode"> + <genParameters ecoreParameter="preferences.ecore#//PreferenceNode/getNode/name"/> + </genOperations> + <genOperations ecoreOperation="preferences.ecore#//PreferenceNode/getProperty"> + <genParameters ecoreParameter="preferences.ecore#//PreferenceNode/getProperty/name"/> + </genOperations> </genClasses> <genClasses ecoreClass="preferences.ecore#//Property"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute preferences.ecore#//Property/name"/> diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferenceItem.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferenceItem.java new file mode 100644 index 0000000000..edc6ae9f0b --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferenceItem.java @@ -0,0 +1,147 @@ +/** + */ +package org.eclipse.emf.cdo.releng.preferences; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Preference Item</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getRoot <em>Root</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getScope <em>Scope</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getAbsolutePath <em>Absolute Path</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getScopeRelativePath <em>Scope Relative Path</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getName <em>Name</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.cdo.releng.preferences.PreferencesPackage#getPreferenceItem() + * @model abstract="true" + * @generated + */ +public interface PreferenceItem extends EObject +{ + /** + * Returns the value of the '<em><b>Root</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Root</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Root</em>' reference. + * @see org.eclipse.emf.cdo.releng.preferences.PreferencesPackage#getPreferenceItem_Root() + * @model resolveProxies="false" transient="true" changeable="false" volatile="true" derived="true" + * @generated + */ + PreferenceNode getRoot(); + + /** + * Returns the value of the '<em><b>Absolute Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Absolute Path</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Absolute Path</em>' attribute. + * @see org.eclipse.emf.cdo.releng.preferences.PreferencesPackage#getPreferenceItem_AbsolutePath() + * @model required="true" transient="true" changeable="false" volatile="true" derived="true" + * @generated + */ + String getAbsolutePath(); + + /** + * Returns the value of the '<em><b>Scope Relative Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Scope Relative Path</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Scope Relative Path</em>' attribute. + * @see org.eclipse.emf.cdo.releng.preferences.PreferencesPackage#getPreferenceItem_ScopeRelativePath() + * @model required="true" transient="true" changeable="false" volatile="true" derived="true" + * @generated + */ + String getScopeRelativePath(); + + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.releng.preferences.PreferencesPackage#getPreferenceItem_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getName <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Scope</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Scope</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Scope</em>' reference. + * @see org.eclipse.emf.cdo.releng.preferences.PreferencesPackage#getPreferenceItem_Scope() + * @model resolveProxies="false" transient="true" changeable="false" volatile="true" derived="true" + * @generated + */ + PreferenceNode getScope(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @model kind="operation" + * @generated + */ + PreferenceNode getParent(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @model + * @generated + */ + PreferenceItem getItem(String path); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @model + * @generated + */ + PreferenceItem getInScope(String scopeName); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @model kind="operation" + * @generated + */ + PreferenceItem getInScope(); + +} // PreferenceItem diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferenceNode.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferenceNode.java index 9b24a2c5d4..9c1674f3b0 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferenceNode.java +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferenceNode.java @@ -11,7 +11,6 @@ package org.eclipse.emf.cdo.releng.preferences; import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> @@ -21,10 +20,9 @@ import org.eclipse.emf.ecore.EObject; * <p> * The following features are supported: * <ul> - * <li>{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getChildren <em>Children</em>}</li> * <li>{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getParent <em>Parent</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getChildren <em>Children</em>}</li> * <li>{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getProperties <em>Properties</em>}</li> - * <li>{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getName <em>Name</em>}</li> * <li>{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getLocation <em>Location</em>}</li> * </ul> * </p> @@ -33,7 +31,7 @@ import org.eclipse.emf.ecore.EObject; * @model * @generated */ -public interface PreferenceNode extends EObject +public interface PreferenceNode extends PreferenceItem { /** * Returns the value of the '<em><b>Children</b></em>' containment reference list. @@ -48,7 +46,7 @@ public interface PreferenceNode extends EObject * @return the value of the '<em>Children</em>' containment reference list. * @see org.eclipse.emf.cdo.releng.preferences.PreferencesPackage#getPreferenceNode_Children() * @see org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getParent - * @model opposite="parent" containment="true" keys="name" + * @model opposite="parent" containment="true" * @generated */ EList<PreferenceNode> getChildren(); @@ -100,45 +98,35 @@ public interface PreferenceNode extends EObject EList<Property> getProperties(); /** - * Returns the value of the '<em><b>Name</b></em>' attribute. + * Returns the value of the '<em><b>Location</b></em>' attribute. * <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Name</em>' attribute isn't clear, + * If the meaning of the '<em>Location</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Name</em>' attribute. - * @see #setName(String) - * @see org.eclipse.emf.cdo.releng.preferences.PreferencesPackage#getPreferenceNode_Name() - * @model required="true" + * @return the value of the '<em>Location</em>' attribute. + * @see org.eclipse.emf.cdo.releng.preferences.PreferencesPackage#getPreferenceNode_Location() + * @model transient="true" changeable="false" volatile="true" derived="true" * @generated */ - String getName(); + String getLocation(); /** - * Sets the value of the '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getName <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Name</em>' attribute. - * @see #getName() + * @model * @generated */ - void setName(String value); + PreferenceNode getNode(String name); /** - * Returns the value of the '<em><b>Location</b></em>' attribute. * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Location</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Location</em>' attribute. - * @see org.eclipse.emf.cdo.releng.preferences.PreferencesPackage#getPreferenceNode_Location() - * @model transient="true" changeable="false" volatile="true" derived="true" + * @model * @generated */ - String getLocation(); + Property getProperty(String name); /** * <!-- begin-user-doc --> @@ -146,14 +134,14 @@ public interface PreferenceNode extends EObject * @model * @generated */ - PreferenceNode getNode(String name); + PreferenceNode getInScope(String scopeName); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @model + * @model kind="operation" * @generated */ - Property getProperty(String name); + PreferenceNode getInScope(); } // PreferenceNode diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesPackage.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesPackage.java index 60a5a5d17a..442af3445d 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesPackage.java +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesPackage.java @@ -68,6 +68,115 @@ public interface PreferencesPackage extends EPackage PreferencesPackage eINSTANCE = org.eclipse.emf.cdo.releng.preferences.impl.PreferencesPackageImpl.init(); /** + * The meta object id for the '{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceItemImpl <em>Preference Item</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.releng.preferences.impl.PreferenceItemImpl + * @see org.eclipse.emf.cdo.releng.preferences.impl.PreferencesPackageImpl#getPreferenceItem() + * @generated + */ + int PREFERENCE_ITEM = 0; + + /** + * The feature id for the '<em><b>Root</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_ITEM__ROOT = 0; + + /** + * The feature id for the '<em><b>Scope</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_ITEM__SCOPE = 1; + + /** + * The feature id for the '<em><b>Absolute Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_ITEM__ABSOLUTE_PATH = 2; + + /** + * The feature id for the '<em><b>Scope Relative Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_ITEM__SCOPE_RELATIVE_PATH = 3; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_ITEM__NAME = 4; + + /** + * The number of structural features of the '<em>Preference Item</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_ITEM_FEATURE_COUNT = 5; + + /** + * The operation id for the '<em>Get Parent</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_ITEM___GET_PARENT = 0; + + /** + * The operation id for the '<em>Get Item</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_ITEM___GET_ITEM__STRING = 1; + + /** + * The operation id for the '<em>Get In Scope</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_ITEM___GET_IN_SCOPE__STRING = 2; + + /** + * The operation id for the '<em>Get In Scope</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_ITEM___GET_IN_SCOPE = 3; + + /** + * The number of operations of the '<em>Preference Item</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_ITEM_OPERATION_COUNT = 4; + + /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceNodeImpl <em>Preference Node</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -75,34 +184,43 @@ public interface PreferencesPackage extends EPackage * @see org.eclipse.emf.cdo.releng.preferences.impl.PreferencesPackageImpl#getPreferenceNode() * @generated */ - int PREFERENCE_NODE = 0; + int PREFERENCE_NODE = 1; /** - * The feature id for the '<em><b>Children</b></em>' containment reference list. + * The feature id for the '<em><b>Root</b></em>' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int PREFERENCE_NODE__CHILDREN = 0; + int PREFERENCE_NODE__ROOT = PREFERENCE_ITEM__ROOT; /** - * The feature id for the '<em><b>Parent</b></em>' container reference. + * The feature id for the '<em><b>Scope</b></em>' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int PREFERENCE_NODE__PARENT = 1; + int PREFERENCE_NODE__SCOPE = PREFERENCE_ITEM__SCOPE; /** - * The feature id for the '<em><b>Properties</b></em>' containment reference list. + * The feature id for the '<em><b>Absolute Path</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int PREFERENCE_NODE__PROPERTIES = 2; + int PREFERENCE_NODE__ABSOLUTE_PATH = PREFERENCE_ITEM__ABSOLUTE_PATH; + + /** + * The feature id for the '<em><b>Scope Relative Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_NODE__SCOPE_RELATIVE_PATH = PREFERENCE_ITEM__SCOPE_RELATIVE_PATH; /** * The feature id for the '<em><b>Name</b></em>' attribute. @@ -111,7 +229,34 @@ public interface PreferencesPackage extends EPackage * @generated * @ordered */ - int PREFERENCE_NODE__NAME = 3; + int PREFERENCE_NODE__NAME = PREFERENCE_ITEM__NAME; + + /** + * The feature id for the '<em><b>Parent</b></em>' container reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_NODE__PARENT = PREFERENCE_ITEM_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Children</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_NODE__CHILDREN = PREFERENCE_ITEM_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Properties</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_NODE__PROPERTIES = PREFERENCE_ITEM_FEATURE_COUNT + 2; /** * The feature id for the '<em><b>Location</b></em>' attribute. @@ -120,7 +265,7 @@ public interface PreferencesPackage extends EPackage * @generated * @ordered */ - int PREFERENCE_NODE__LOCATION = 4; + int PREFERENCE_NODE__LOCATION = PREFERENCE_ITEM_FEATURE_COUNT + 3; /** * The number of structural features of the '<em>Preference Node</em>' class. @@ -129,7 +274,25 @@ public interface PreferencesPackage extends EPackage * @generated * @ordered */ - int PREFERENCE_NODE_FEATURE_COUNT = 5; + int PREFERENCE_NODE_FEATURE_COUNT = PREFERENCE_ITEM_FEATURE_COUNT + 4; + + /** + * The operation id for the '<em>Get Parent</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_NODE___GET_PARENT = PREFERENCE_ITEM___GET_PARENT; + + /** + * The operation id for the '<em>Get Item</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_NODE___GET_ITEM__STRING = PREFERENCE_ITEM___GET_ITEM__STRING; /** * The operation id for the '<em>Get Node</em>' operation. @@ -138,7 +301,7 @@ public interface PreferencesPackage extends EPackage * @generated * @ordered */ - int PREFERENCE_NODE___GET_NODE__STRING = 0; + int PREFERENCE_NODE___GET_NODE__STRING = PREFERENCE_ITEM_OPERATION_COUNT + 0; /** * The operation id for the '<em>Get Property</em>' operation. @@ -147,7 +310,25 @@ public interface PreferencesPackage extends EPackage * @generated * @ordered */ - int PREFERENCE_NODE___GET_PROPERTY__STRING = 1; + int PREFERENCE_NODE___GET_PROPERTY__STRING = PREFERENCE_ITEM_OPERATION_COUNT + 1; + + /** + * The operation id for the '<em>Get In Scope</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_NODE___GET_IN_SCOPE__STRING = PREFERENCE_ITEM_OPERATION_COUNT + 2; + + /** + * The operation id for the '<em>Get In Scope</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PREFERENCE_NODE___GET_IN_SCOPE = PREFERENCE_ITEM_OPERATION_COUNT + 3; /** * The number of operations of the '<em>Preference Node</em>' class. @@ -156,7 +337,7 @@ public interface PreferencesPackage extends EPackage * @generated * @ordered */ - int PREFERENCE_NODE_OPERATION_COUNT = 2; + int PREFERENCE_NODE_OPERATION_COUNT = PREFERENCE_ITEM_OPERATION_COUNT + 4; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.preferences.impl.PropertyImpl <em>Property</em>}' class. @@ -166,7 +347,43 @@ public interface PreferencesPackage extends EPackage * @see org.eclipse.emf.cdo.releng.preferences.impl.PreferencesPackageImpl#getProperty() * @generated */ - int PROPERTY = 1; + int PROPERTY = 2; + + /** + * The feature id for the '<em><b>Root</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PROPERTY__ROOT = PREFERENCE_ITEM__ROOT; + + /** + * The feature id for the '<em><b>Scope</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PROPERTY__SCOPE = PREFERENCE_ITEM__SCOPE; + + /** + * The feature id for the '<em><b>Absolute Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PROPERTY__ABSOLUTE_PATH = PREFERENCE_ITEM__ABSOLUTE_PATH; + + /** + * The feature id for the '<em><b>Scope Relative Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PROPERTY__SCOPE_RELATIVE_PATH = PREFERENCE_ITEM__SCOPE_RELATIVE_PATH; /** * The feature id for the '<em><b>Name</b></em>' attribute. @@ -175,7 +392,7 @@ public interface PreferencesPackage extends EPackage * @generated * @ordered */ - int PROPERTY__NAME = 0; + int PROPERTY__NAME = PREFERENCE_ITEM__NAME; /** * The feature id for the '<em><b>Parent</b></em>' container reference. @@ -184,7 +401,7 @@ public interface PreferencesPackage extends EPackage * @generated * @ordered */ - int PROPERTY__PARENT = 1; + int PROPERTY__PARENT = PREFERENCE_ITEM_FEATURE_COUNT + 0; /** * The feature id for the '<em><b>Value</b></em>' attribute. @@ -193,7 +410,7 @@ public interface PreferencesPackage extends EPackage * @generated * @ordered */ - int PROPERTY__VALUE = 2; + int PROPERTY__VALUE = PREFERENCE_ITEM_FEATURE_COUNT + 1; /** * The number of structural features of the '<em>Property</em>' class. @@ -202,7 +419,43 @@ public interface PreferencesPackage extends EPackage * @generated * @ordered */ - int PROPERTY_FEATURE_COUNT = 3; + int PROPERTY_FEATURE_COUNT = PREFERENCE_ITEM_FEATURE_COUNT + 2; + + /** + * The operation id for the '<em>Get Parent</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PROPERTY___GET_PARENT = PREFERENCE_ITEM___GET_PARENT; + + /** + * The operation id for the '<em>Get Item</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PROPERTY___GET_ITEM__STRING = PREFERENCE_ITEM___GET_ITEM__STRING; + + /** + * The operation id for the '<em>Get In Scope</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PROPERTY___GET_IN_SCOPE__STRING = PREFERENCE_ITEM_OPERATION_COUNT + 0; + + /** + * The operation id for the '<em>Get In Scope</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PROPERTY___GET_IN_SCOPE = PREFERENCE_ITEM_OPERATION_COUNT + 1; /** * The number of operations of the '<em>Property</em>' class. @@ -211,7 +464,7 @@ public interface PreferencesPackage extends EPackage * @generated * @ordered */ - int PROPERTY_OPERATION_COUNT = 0; + int PROPERTY_OPERATION_COUNT = PREFERENCE_ITEM_OPERATION_COUNT + 2; /** * The meta object id for the '<em>Escaped String</em>' data type. @@ -221,7 +474,112 @@ public interface PreferencesPackage extends EPackage * @see org.eclipse.emf.cdo.releng.preferences.impl.PreferencesPackageImpl#getEscapedString() * @generated */ - int ESCAPED_STRING = 2; + int ESCAPED_STRING = 3; + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem <em>Preference Item</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Preference Item</em>'. + * @see org.eclipse.emf.cdo.releng.preferences.PreferenceItem + * @generated + */ + EClass getPreferenceItem(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getRoot <em>Root</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Root</em>'. + * @see org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getRoot() + * @see #getPreferenceItem() + * @generated + */ + EReference getPreferenceItem_Root(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getAbsolutePath <em>Absolute Path</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Absolute Path</em>'. + * @see org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getAbsolutePath() + * @see #getPreferenceItem() + * @generated + */ + EAttribute getPreferenceItem_AbsolutePath(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getScopeRelativePath <em>Scope Relative Path</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Scope Relative Path</em>'. + * @see org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getScopeRelativePath() + * @see #getPreferenceItem() + * @generated + */ + EAttribute getPreferenceItem_ScopeRelativePath(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getName <em>Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Name</em>'. + * @see org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getName() + * @see #getPreferenceItem() + * @generated + */ + EAttribute getPreferenceItem_Name(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getScope <em>Scope</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Scope</em>'. + * @see org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getScope() + * @see #getPreferenceItem() + * @generated + */ + EReference getPreferenceItem_Scope(); + + /** + * Returns the meta object for the '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getParent() <em>Get Parent</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the '<em>Get Parent</em>' operation. + * @see org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getParent() + * @generated + */ + EOperation getPreferenceItem__GetParent(); + + /** + * Returns the meta object for the '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getItem(java.lang.String) <em>Get Item</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the '<em>Get Item</em>' operation. + * @see org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getItem(java.lang.String) + * @generated + */ + EOperation getPreferenceItem__GetItem__String(); + + /** + * Returns the meta object for the '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getInScope(java.lang.String) <em>Get In Scope</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the '<em>Get In Scope</em>' operation. + * @see org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getInScope(java.lang.String) + * @generated + */ + EOperation getPreferenceItem__GetInScope__String(); + + /** + * Returns the meta object for the '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getInScope() <em>Get In Scope</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the '<em>Get In Scope</em>' operation. + * @see org.eclipse.emf.cdo.releng.preferences.PreferenceItem#getInScope() + * @generated + */ + EOperation getPreferenceItem__GetInScope(); /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode <em>Preference Node</em>}'. @@ -267,17 +625,6 @@ public interface PreferencesPackage extends EPackage EReference getPreferenceNode_Properties(); /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getName <em>Name</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Name</em>'. - * @see org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getName() - * @see #getPreferenceNode() - * @generated - */ - EAttribute getPreferenceNode_Name(); - - /** * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getLocation <em>Location</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -309,25 +656,34 @@ public interface PreferencesPackage extends EPackage EOperation getPreferenceNode__GetProperty__String(); /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.preferences.Property <em>Property</em>}'. + * Returns the meta object for the '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getInScope(java.lang.String) <em>Get In Scope</em>}' operation. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Property</em>'. - * @see org.eclipse.emf.cdo.releng.preferences.Property + * @return the meta object for the '<em>Get In Scope</em>' operation. + * @see org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getInScope(java.lang.String) * @generated */ - EClass getProperty(); + EOperation getPreferenceNode__GetInScope__String(); /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.releng.preferences.Property#getName <em>Name</em>}'. + * Returns the meta object for the '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getInScope() <em>Get In Scope</em>}' operation. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Name</em>'. - * @see org.eclipse.emf.cdo.releng.preferences.Property#getName() - * @see #getProperty() + * @return the meta object for the '<em>Get In Scope</em>' operation. + * @see org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getInScope() + * @generated + */ + EOperation getPreferenceNode__GetInScope(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.preferences.Property <em>Property</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Property</em>'. + * @see org.eclipse.emf.cdo.releng.preferences.Property * @generated */ - EAttribute getProperty_Name(); + EClass getProperty(); /** * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.releng.preferences.Property#getParent <em>Parent</em>}'. @@ -352,6 +708,26 @@ public interface PreferencesPackage extends EPackage EAttribute getProperty_Value(); /** + * Returns the meta object for the '{@link org.eclipse.emf.cdo.releng.preferences.Property#getInScope(java.lang.String) <em>Get In Scope</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the '<em>Get In Scope</em>' operation. + * @see org.eclipse.emf.cdo.releng.preferences.Property#getInScope(java.lang.String) + * @generated + */ + EOperation getProperty__GetInScope__String(); + + /** + * Returns the meta object for the '{@link org.eclipse.emf.cdo.releng.preferences.Property#getInScope() <em>Get In Scope</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the '<em>Get In Scope</em>' operation. + * @see org.eclipse.emf.cdo.releng.preferences.Property#getInScope() + * @generated + */ + EOperation getProperty__GetInScope(); + + /** * Returns the meta object for data type '{@link java.lang.String <em>Escaped String</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -387,6 +763,88 @@ public interface PreferencesPackage extends EPackage interface Literals { /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceItemImpl <em>Preference Item</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.releng.preferences.impl.PreferenceItemImpl + * @see org.eclipse.emf.cdo.releng.preferences.impl.PreferencesPackageImpl#getPreferenceItem() + * @generated + */ + EClass PREFERENCE_ITEM = eINSTANCE.getPreferenceItem(); + + /** + * The meta object literal for the '<em><b>Root</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference PREFERENCE_ITEM__ROOT = eINSTANCE.getPreferenceItem_Root(); + + /** + * The meta object literal for the '<em><b>Absolute Path</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute PREFERENCE_ITEM__ABSOLUTE_PATH = eINSTANCE.getPreferenceItem_AbsolutePath(); + + /** + * The meta object literal for the '<em><b>Scope Relative Path</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute PREFERENCE_ITEM__SCOPE_RELATIVE_PATH = eINSTANCE.getPreferenceItem_ScopeRelativePath(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute PREFERENCE_ITEM__NAME = eINSTANCE.getPreferenceItem_Name(); + + /** + * The meta object literal for the '<em><b>Scope</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference PREFERENCE_ITEM__SCOPE = eINSTANCE.getPreferenceItem_Scope(); + + /** + * The meta object literal for the '<em><b>Get Parent</b></em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EOperation PREFERENCE_ITEM___GET_PARENT = eINSTANCE.getPreferenceItem__GetParent(); + + /** + * The meta object literal for the '<em><b>Get Item</b></em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EOperation PREFERENCE_ITEM___GET_ITEM__STRING = eINSTANCE.getPreferenceItem__GetItem__String(); + + /** + * The meta object literal for the '<em><b>Get In Scope</b></em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EOperation PREFERENCE_ITEM___GET_IN_SCOPE__STRING = eINSTANCE.getPreferenceItem__GetInScope__String(); + + /** + * The meta object literal for the '<em><b>Get In Scope</b></em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EOperation PREFERENCE_ITEM___GET_IN_SCOPE = eINSTANCE.getPreferenceItem__GetInScope(); + + /** * The meta object literal for the '{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceNodeImpl <em>Preference Node</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -421,14 +879,6 @@ public interface PreferencesPackage extends EPackage EReference PREFERENCE_NODE__PROPERTIES = eINSTANCE.getPreferenceNode_Properties(); /** - * The meta object literal for the '<em><b>Name</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute PREFERENCE_NODE__NAME = eINSTANCE.getPreferenceNode_Name(); - - /** * The meta object literal for the '<em><b>Location</b></em>' attribute feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -453,22 +903,30 @@ public interface PreferencesPackage extends EPackage EOperation PREFERENCE_NODE___GET_PROPERTY__STRING = eINSTANCE.getPreferenceNode__GetProperty__String(); /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.releng.preferences.impl.PropertyImpl <em>Property</em>}' class. + * The meta object literal for the '<em><b>Get In Scope</b></em>' operation. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see org.eclipse.emf.cdo.releng.preferences.impl.PropertyImpl - * @see org.eclipse.emf.cdo.releng.preferences.impl.PreferencesPackageImpl#getProperty() * @generated */ - EClass PROPERTY = eINSTANCE.getProperty(); + EOperation PREFERENCE_NODE___GET_IN_SCOPE__STRING = eINSTANCE.getPreferenceNode__GetInScope__String(); /** - * The meta object literal for the '<em><b>Name</b></em>' attribute feature. + * The meta object literal for the '<em><b>Get In Scope</b></em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EOperation PREFERENCE_NODE___GET_IN_SCOPE = eINSTANCE.getPreferenceNode__GetInScope(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.releng.preferences.impl.PropertyImpl <em>Property</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.releng.preferences.impl.PropertyImpl + * @see org.eclipse.emf.cdo.releng.preferences.impl.PreferencesPackageImpl#getProperty() * @generated */ - EAttribute PROPERTY__NAME = eINSTANCE.getProperty_Name(); + EClass PROPERTY = eINSTANCE.getProperty(); /** * The meta object literal for the '<em><b>Parent</b></em>' container reference feature. @@ -487,6 +945,22 @@ public interface PreferencesPackage extends EPackage EAttribute PROPERTY__VALUE = eINSTANCE.getProperty_Value(); /** + * The meta object literal for the '<em><b>Get In Scope</b></em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EOperation PROPERTY___GET_IN_SCOPE__STRING = eINSTANCE.getProperty__GetInScope__String(); + + /** + * The meta object literal for the '<em><b>Get In Scope</b></em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EOperation PROPERTY___GET_IN_SCOPE = eINSTANCE.getProperty__GetInScope(); + + /** * The meta object literal for the '<em>Escaped String</em>' data type. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/Property.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/Property.java index 841a63c39f..3d88adc02d 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/Property.java +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/Property.java @@ -10,8 +10,6 @@ */ package org.eclipse.emf.cdo.releng.preferences; -import org.eclipse.emf.ecore.EObject; - /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Property</b></em>'. @@ -20,7 +18,6 @@ import org.eclipse.emf.ecore.EObject; * <p> * The following features are supported: * <ul> - * <li>{@link org.eclipse.emf.cdo.releng.preferences.Property#getName <em>Name</em>}</li> * <li>{@link org.eclipse.emf.cdo.releng.preferences.Property#getParent <em>Parent</em>}</li> * <li>{@link org.eclipse.emf.cdo.releng.preferences.Property#getValue <em>Value</em>}</li> * </ul> @@ -30,35 +27,9 @@ import org.eclipse.emf.ecore.EObject; * @model * @generated */ -public interface Property extends EObject +public interface Property extends PreferenceItem { /** - * Returns the value of the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Name</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Name</em>' attribute. - * @see #setName(String) - * @see org.eclipse.emf.cdo.releng.preferences.PreferencesPackage#getProperty_Name() - * @model required="true" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.releng.preferences.Property#getName <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Name</em>' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** * Returns the value of the '<em><b>Parent</b></em>' container reference. * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode#getProperties <em>Properties</em>}'. * <!-- begin-user-doc --> @@ -112,4 +83,20 @@ public interface Property extends EObject */ void setValue(String value); + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @model + * @generated + */ + Property getInScope(String scopeName); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @model kind="operation" + * @generated + */ + Property getInScope(); + } // Property diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferenceItemImpl.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferenceItemImpl.java new file mode 100644 index 0000000000..266d11e39f --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferenceItemImpl.java @@ -0,0 +1,450 @@ +/** + */ +package org.eclipse.emf.cdo.releng.preferences.impl; + +import org.eclipse.emf.cdo.releng.preferences.PreferenceItem; +import org.eclipse.emf.cdo.releng.preferences.PreferenceNode; +import org.eclipse.emf.cdo.releng.preferences.PreferencesPackage; +import org.eclipse.emf.cdo.releng.preferences.Property; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; + +import java.lang.reflect.InvocationTargetException; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Preference Item</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceItemImpl#getRoot <em>Root</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceItemImpl#getScope <em>Scope</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceItemImpl#getAbsolutePath <em>Absolute Path</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceItemImpl#getScopeRelativePath <em>Scope Relative Path</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceItemImpl#getName <em>Name</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public abstract class PreferenceItemImpl extends MinimalEObjectImpl.Container implements PreferenceItem +{ + /** + * The default value of the '{@link #getAbsolutePath() <em>Absolute Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAbsolutePath() + * @generated + * @ordered + */ + protected static final String ABSOLUTE_PATH_EDEFAULT = null; + + /** + * The default value of the '{@link #getScopeRelativePath() <em>Scope Relative Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getScopeRelativePath() + * @generated + * @ordered + */ + protected static final String SCOPE_RELATIVE_PATH_EDEFAULT = null; + + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected PreferenceItemImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return PreferencesPackage.Literals.PREFERENCE_ITEM; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public PreferenceNode getRoot() + { + PreferenceNode parent = getParent(); + if (parent == null) + { + if (this instanceof PreferenceNode) + { + return (PreferenceNode)this; + } + + return null; + } + + return parent.getRoot(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public String getAbsolutePath() + { + PreferenceNode parent = getParent(); + if (parent == null) + { + return getName(); + } + + return parent.getAbsolutePath() + "/" + getName(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public String getScopeRelativePath() + { + IPath path = new Path(getAbsolutePath()).removeFirstSegments(1).makeRelative(); + return path.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() + { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + { + eNotify(new ENotificationImpl(this, Notification.SET, PreferencesPackage.PREFERENCE_ITEM__NAME, oldName, name)); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public PreferenceNode getScope() + { + PreferenceNode parent = getParent(); + if (parent != null) + { + PreferenceNode parent2 = parent.getParent(); + if (parent2 == null) + { + return parent; + } + + return parent.getScope(); + } + + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public abstract PreferenceNode getParent(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public PreferenceItem getItem(String path) + { + String name; + int pos = path.indexOf('/'); + if (pos == -1) + { + name = path; + path = null; + } + else + { + name = path.substring(0, pos); + path = path.substring(pos + 1); + } + + if (this instanceof PreferenceNode) + { + PreferenceNode preferenceNode = (PreferenceNode)this; + + // TODO Check whether for the same name a node AND a property exists + for (PreferenceNode node : preferenceNode.getChildren()) + { + if (name.equals(node.getName())) + { + if (path == null) + { + return node; + } + + return node.getNode(path); + } + } + + for (Property property : preferenceNode.getProperties()) + { + if (name.equals(property.getName())) + { + if (path == null) + { + return property; + } + } + } + } + + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public PreferenceItem getInScope(String scopeName) + { + PreferenceNode root = getRoot(); + if (root != null) + { + PreferenceNode scope = root.getNode(scopeName); + if (scope != null) + { + return scope.getItem(getScopeRelativePath()); + } + } + + return null; + } + + private static final String[] SCOPE_NAMES = { "project", "instance", "default", "configuration", "bundle_defaults" }; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public PreferenceItem getInScope() + { + PreferenceNode scope = getScope(); + if (scope != null) + { + PreferenceNode root = scope.getRoot(); + String ownScopeName = scope.getName(); + String scopeRelativePath = getScopeRelativePath(); + if (SCOPE_NAMES[0].equals(ownScopeName)) + { + scopeRelativePath = new Path(scopeRelativePath).removeFirstSegments(1).toString(); + } + + for (int i = 0; i < SCOPE_NAMES.length; i++) + { + String scopeName = SCOPE_NAMES[i]; + if (ownScopeName != null) + { + if (scopeName.equals(ownScopeName)) + { + ownScopeName = null; + } + } + else + { + PreferenceNode defaultScope = root.getNode(scopeName); + if (defaultScope != null) + { + PreferenceItem item = defaultScope.getItem(scopeRelativePath); + if (item != null) + { + return item; + } + } + } + } + } + + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case PreferencesPackage.PREFERENCE_ITEM__ROOT: + return getRoot(); + case PreferencesPackage.PREFERENCE_ITEM__SCOPE: + return getScope(); + case PreferencesPackage.PREFERENCE_ITEM__ABSOLUTE_PATH: + return getAbsolutePath(); + case PreferencesPackage.PREFERENCE_ITEM__SCOPE_RELATIVE_PATH: + return getScopeRelativePath(); + case PreferencesPackage.PREFERENCE_ITEM__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case PreferencesPackage.PREFERENCE_ITEM__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case PreferencesPackage.PREFERENCE_ITEM__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case PreferencesPackage.PREFERENCE_ITEM__ROOT: + return getRoot() != null; + case PreferencesPackage.PREFERENCE_ITEM__SCOPE: + return getScope() != null; + case PreferencesPackage.PREFERENCE_ITEM__ABSOLUTE_PATH: + return ABSOLUTE_PATH_EDEFAULT == null ? getAbsolutePath() != null : !ABSOLUTE_PATH_EDEFAULT + .equals(getAbsolutePath()); + case PreferencesPackage.PREFERENCE_ITEM__SCOPE_RELATIVE_PATH: + return SCOPE_RELATIVE_PATH_EDEFAULT == null ? getScopeRelativePath() != null : !SCOPE_RELATIVE_PATH_EDEFAULT + .equals(getScopeRelativePath()); + case PreferencesPackage.PREFERENCE_ITEM__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException + { + switch (operationID) + { + case PreferencesPackage.PREFERENCE_ITEM___GET_PARENT: + return getParent(); + case PreferencesPackage.PREFERENCE_ITEM___GET_ITEM__STRING: + return getItem((String)arguments.get(0)); + case PreferencesPackage.PREFERENCE_ITEM___GET_IN_SCOPE__STRING: + return getInScope((String)arguments.get(0)); + case PreferencesPackage.PREFERENCE_ITEM___GET_IN_SCOPE: + return getInScope(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} // PreferenceItemImpl diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferenceNodeImpl.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferenceNodeImpl.java index 676f11b81f..07af99ae1c 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferenceNodeImpl.java +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferenceNodeImpl.java @@ -24,7 +24,6 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.util.InternalEList; @@ -44,17 +43,16 @@ import java.util.Collection; * <p> * The following features are implemented: * <ul> - * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceNodeImpl#getChildren <em>Children</em>}</li> * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceNodeImpl#getParent <em>Parent</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceNodeImpl#getChildren <em>Children</em>}</li> * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceNodeImpl#getProperties <em>Properties</em>}</li> - * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceNodeImpl#getName <em>Name</em>}</li> * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PreferenceNodeImpl#getLocation <em>Location</em>}</li> * </ul> * </p> * * @generated */ -public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements PreferenceNode +public class PreferenceNodeImpl extends PreferenceItemImpl implements PreferenceNode { /** * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list. @@ -77,26 +75,6 @@ public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements protected EList<Property> properties; /** - * The default value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** * The default value of the '{@link #getLocation() <em>Location</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -147,6 +125,7 @@ public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements * <!-- end-user-doc --> * @generated */ + @Override public PreferenceNode getParent() { if (eContainerFeatureID() != PreferencesPackage.PREFERENCE_NODE__PARENT) @@ -222,32 +201,7 @@ public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements /** * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ - public String getName() - { - return name; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setName(String newName) - { - String oldName = name; - name = newName; - if (eNotificationRequired()) - { - eNotify(new ENotificationImpl(this, Notification.SET, PreferencesPackage.PREFERENCE_NODE__NAME, oldName, name)); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated + * @generated NOT */ public String getLocation() { @@ -278,6 +232,7 @@ public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements return node; } } + return null; } @@ -295,12 +250,35 @@ public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements return property; } } + return null; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public PreferenceNode getInScope(String scopeName) + { + return (PreferenceNode)super.getInScope(scopeName); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public PreferenceNode getInScope() + { + return (PreferenceNode)super.getInScope(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @@ -309,14 +287,14 @@ public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements { switch (featureID) { - case PreferencesPackage.PREFERENCE_NODE__CHILDREN: - return ((InternalEList<InternalEObject>)(InternalEList<?>)getChildren()).basicAdd(otherEnd, msgs); case PreferencesPackage.PREFERENCE_NODE__PARENT: if (eInternalContainer() != null) { msgs = eBasicRemoveFromContainer(msgs); } return basicSetParent((PreferenceNode)otherEnd, msgs); + case PreferencesPackage.PREFERENCE_NODE__CHILDREN: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getChildren()).basicAdd(otherEnd, msgs); case PreferencesPackage.PREFERENCE_NODE__PROPERTIES: return ((InternalEList<InternalEObject>)(InternalEList<?>)getProperties()).basicAdd(otherEnd, msgs); } @@ -333,10 +311,10 @@ public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements { switch (featureID) { - case PreferencesPackage.PREFERENCE_NODE__CHILDREN: - return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs); case PreferencesPackage.PREFERENCE_NODE__PARENT: return basicSetParent(null, msgs); + case PreferencesPackage.PREFERENCE_NODE__CHILDREN: + return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs); case PreferencesPackage.PREFERENCE_NODE__PROPERTIES: return ((InternalEList<?>)getProperties()).basicRemove(otherEnd, msgs); } @@ -370,14 +348,12 @@ public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements { switch (featureID) { - case PreferencesPackage.PREFERENCE_NODE__CHILDREN: - return getChildren(); case PreferencesPackage.PREFERENCE_NODE__PARENT: return getParent(); + case PreferencesPackage.PREFERENCE_NODE__CHILDREN: + return getChildren(); case PreferencesPackage.PREFERENCE_NODE__PROPERTIES: return getProperties(); - case PreferencesPackage.PREFERENCE_NODE__NAME: - return getName(); case PreferencesPackage.PREFERENCE_NODE__LOCATION: return getLocation(); } @@ -395,20 +371,17 @@ public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements { switch (featureID) { + case PreferencesPackage.PREFERENCE_NODE__PARENT: + setParent((PreferenceNode)newValue); + return; case PreferencesPackage.PREFERENCE_NODE__CHILDREN: getChildren().clear(); getChildren().addAll((Collection<? extends PreferenceNode>)newValue); return; - case PreferencesPackage.PREFERENCE_NODE__PARENT: - setParent((PreferenceNode)newValue); - return; case PreferencesPackage.PREFERENCE_NODE__PROPERTIES: getProperties().clear(); getProperties().addAll((Collection<? extends Property>)newValue); return; - case PreferencesPackage.PREFERENCE_NODE__NAME: - setName((String)newValue); - return; } super.eSet(featureID, newValue); } @@ -423,18 +396,15 @@ public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements { switch (featureID) { - case PreferencesPackage.PREFERENCE_NODE__CHILDREN: - getChildren().clear(); - return; case PreferencesPackage.PREFERENCE_NODE__PARENT: setParent((PreferenceNode)null); return; + case PreferencesPackage.PREFERENCE_NODE__CHILDREN: + getChildren().clear(); + return; case PreferencesPackage.PREFERENCE_NODE__PROPERTIES: getProperties().clear(); return; - case PreferencesPackage.PREFERENCE_NODE__NAME: - setName(NAME_EDEFAULT); - return; } super.eUnset(featureID); } @@ -449,14 +419,12 @@ public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements { switch (featureID) { - case PreferencesPackage.PREFERENCE_NODE__CHILDREN: - return children != null && !children.isEmpty(); case PreferencesPackage.PREFERENCE_NODE__PARENT: return getParent() != null; + case PreferencesPackage.PREFERENCE_NODE__CHILDREN: + return children != null && !children.isEmpty(); case PreferencesPackage.PREFERENCE_NODE__PROPERTIES: return properties != null && !properties.isEmpty(); - case PreferencesPackage.PREFERENCE_NODE__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case PreferencesPackage.PREFERENCE_NODE__LOCATION: return LOCATION_EDEFAULT == null ? getLocation() != null : !LOCATION_EDEFAULT.equals(getLocation()); } @@ -477,6 +445,10 @@ public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements return getNode((String)arguments.get(0)); case PreferencesPackage.PREFERENCE_NODE___GET_PROPERTY__STRING: return getProperty((String)arguments.get(0)); + case PreferencesPackage.PREFERENCE_NODE___GET_IN_SCOPE__STRING: + return getInScope((String)arguments.get(0)); + case PreferencesPackage.PREFERENCE_NODE___GET_IN_SCOPE: + return getInScope(); } return super.eInvoke(operationID, arguments); } @@ -528,24 +500,4 @@ public class PreferenceNodeImpl extends MinimalEObjectImpl.Container implements return super.eObjectForURIFragmentSegment(uriFragmentSegment); } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public String toString() - { - if (eIsProxy()) - { - return super.toString(); - } - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(')'); - return result.toString(); - } - } // PreferenceNodeImpl diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesPackageImpl.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesPackageImpl.java index 1def78d942..b46d1119ec 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesPackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesPackageImpl.java @@ -10,6 +10,7 @@ */ package org.eclipse.emf.cdo.releng.preferences.impl; +import org.eclipse.emf.cdo.releng.preferences.PreferenceItem; import org.eclipse.emf.cdo.releng.preferences.PreferenceNode; import org.eclipse.emf.cdo.releng.preferences.PreferencesFactory; import org.eclipse.emf.cdo.releng.preferences.PreferencesPackage; @@ -36,6 +37,13 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP * <!-- end-user-doc --> * @generated */ + private EClass preferenceItemEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ private EClass preferenceNodeEClass = null; /** @@ -94,7 +102,9 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP public static PreferencesPackage init() { if (isInited) + { return (PreferencesPackage)EPackage.Registry.INSTANCE.getEPackage(PreferencesPackage.eNS_URI); + } // Obtain or create and register package PreferencesPackageImpl thePreferencesPackage = (PreferencesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PreferencesPackageImpl ? EPackage.Registry.INSTANCE @@ -121,6 +131,106 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP * <!-- end-user-doc --> * @generated */ + public EClass getPreferenceItem() + { + return preferenceItemEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getPreferenceItem_Root() + { + return (EReference)preferenceItemEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getPreferenceItem_AbsolutePath() + { + return (EAttribute)preferenceItemEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getPreferenceItem_ScopeRelativePath() + { + return (EAttribute)preferenceItemEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getPreferenceItem_Name() + { + return (EAttribute)preferenceItemEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getPreferenceItem_Scope() + { + return (EReference)preferenceItemEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation getPreferenceItem__GetParent() + { + return preferenceItemEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation getPreferenceItem__GetItem__String() + { + return preferenceItemEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation getPreferenceItem__GetInScope__String() + { + return preferenceItemEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation getPreferenceItem__GetInScope() + { + return preferenceItemEClass.getEOperations().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EClass getPreferenceNode() { return preferenceNodeEClass; @@ -133,7 +243,7 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP */ public EReference getPreferenceNode_Children() { - return (EReference)preferenceNodeEClass.getEStructuralFeatures().get(0); + return (EReference)preferenceNodeEClass.getEStructuralFeatures().get(1); } /** @@ -143,7 +253,7 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP */ public EReference getPreferenceNode_Parent() { - return (EReference)preferenceNodeEClass.getEStructuralFeatures().get(1); + return (EReference)preferenceNodeEClass.getEStructuralFeatures().get(0); } /** @@ -161,7 +271,7 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP * <!-- end-user-doc --> * @generated */ - public EAttribute getPreferenceNode_Name() + public EAttribute getPreferenceNode_Location() { return (EAttribute)preferenceNodeEClass.getEStructuralFeatures().get(3); } @@ -171,9 +281,9 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP * <!-- end-user-doc --> * @generated */ - public EAttribute getPreferenceNode_Location() + public EOperation getPreferenceNode__GetNode__String() { - return (EAttribute)preferenceNodeEClass.getEStructuralFeatures().get(4); + return preferenceNodeEClass.getEOperations().get(0); } /** @@ -181,9 +291,9 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP * <!-- end-user-doc --> * @generated */ - public EOperation getPreferenceNode__GetNode__String() + public EOperation getPreferenceNode__GetProperty__String() { - return preferenceNodeEClass.getEOperations().get(0); + return preferenceNodeEClass.getEOperations().get(1); } /** @@ -191,9 +301,9 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP * <!-- end-user-doc --> * @generated */ - public EOperation getPreferenceNode__GetProperty__String() + public EOperation getPreferenceNode__GetInScope__String() { - return preferenceNodeEClass.getEOperations().get(1); + return preferenceNodeEClass.getEOperations().get(2); } /** @@ -201,9 +311,9 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP * <!-- end-user-doc --> * @generated */ - public EClass getProperty() + public EOperation getPreferenceNode__GetInScope() { - return propertyEClass; + return preferenceNodeEClass.getEOperations().get(3); } /** @@ -211,9 +321,9 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP * <!-- end-user-doc --> * @generated */ - public EAttribute getProperty_Name() + public EClass getProperty() { - return (EAttribute)propertyEClass.getEStructuralFeatures().get(0); + return propertyEClass; } /** @@ -223,7 +333,7 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP */ public EReference getProperty_Parent() { - return (EReference)propertyEClass.getEStructuralFeatures().get(1); + return (EReference)propertyEClass.getEStructuralFeatures().get(0); } /** @@ -233,7 +343,27 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP */ public EAttribute getProperty_Value() { - return (EAttribute)propertyEClass.getEStructuralFeatures().get(2); + return (EAttribute)propertyEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation getProperty__GetInScope__String() + { + return propertyEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation getProperty__GetInScope() + { + return propertyEClass.getEOperations().get(1); } /** @@ -273,23 +403,38 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP public void createPackageContents() { if (isCreated) + { return; + } isCreated = true; // Create classes and their features + preferenceItemEClass = createEClass(PREFERENCE_ITEM); + createEReference(preferenceItemEClass, PREFERENCE_ITEM__ROOT); + createEReference(preferenceItemEClass, PREFERENCE_ITEM__SCOPE); + createEAttribute(preferenceItemEClass, PREFERENCE_ITEM__ABSOLUTE_PATH); + createEAttribute(preferenceItemEClass, PREFERENCE_ITEM__SCOPE_RELATIVE_PATH); + createEAttribute(preferenceItemEClass, PREFERENCE_ITEM__NAME); + createEOperation(preferenceItemEClass, PREFERENCE_ITEM___GET_PARENT); + createEOperation(preferenceItemEClass, PREFERENCE_ITEM___GET_ITEM__STRING); + createEOperation(preferenceItemEClass, PREFERENCE_ITEM___GET_IN_SCOPE__STRING); + createEOperation(preferenceItemEClass, PREFERENCE_ITEM___GET_IN_SCOPE); + preferenceNodeEClass = createEClass(PREFERENCE_NODE); - createEReference(preferenceNodeEClass, PREFERENCE_NODE__CHILDREN); createEReference(preferenceNodeEClass, PREFERENCE_NODE__PARENT); + createEReference(preferenceNodeEClass, PREFERENCE_NODE__CHILDREN); createEReference(preferenceNodeEClass, PREFERENCE_NODE__PROPERTIES); - createEAttribute(preferenceNodeEClass, PREFERENCE_NODE__NAME); createEAttribute(preferenceNodeEClass, PREFERENCE_NODE__LOCATION); createEOperation(preferenceNodeEClass, PREFERENCE_NODE___GET_NODE__STRING); createEOperation(preferenceNodeEClass, PREFERENCE_NODE___GET_PROPERTY__STRING); + createEOperation(preferenceNodeEClass, PREFERENCE_NODE___GET_IN_SCOPE__STRING); + createEOperation(preferenceNodeEClass, PREFERENCE_NODE___GET_IN_SCOPE); propertyEClass = createEClass(PROPERTY); - createEAttribute(propertyEClass, PROPERTY__NAME); createEReference(propertyEClass, PROPERTY__PARENT); createEAttribute(propertyEClass, PROPERTY__VALUE); + createEOperation(propertyEClass, PROPERTY___GET_IN_SCOPE__STRING); + createEOperation(propertyEClass, PROPERTY___GET_IN_SCOPE); // Create data types escapedStringEDataType = createEDataType(ESCAPED_STRING); @@ -312,7 +457,9 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP public void initializePackageContents() { if (isInitialized) + { return; + } isInitialized = true; // Initialize package @@ -325,44 +472,81 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP // Set bounds for type parameters // Add supertypes to classes + preferenceNodeEClass.getESuperTypes().add(getPreferenceItem()); + propertyEClass.getESuperTypes().add(getPreferenceItem()); // Initialize classes, features, and operations; add parameters + initEClass(preferenceItemEClass, PreferenceItem.class, "PreferenceItem", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getPreferenceItem_Root(), getPreferenceNode(), null, "root", null, 0, 1, PreferenceItem.class, + IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + IS_DERIVED, IS_ORDERED); + initEReference(getPreferenceItem_Scope(), getPreferenceNode(), null, "scope", null, 0, 1, PreferenceItem.class, + IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + IS_DERIVED, IS_ORDERED); + initEAttribute(getPreferenceItem_AbsolutePath(), ecorePackage.getEString(), "absolutePath", null, 1, 1, + PreferenceItem.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, + IS_ORDERED); + initEAttribute(getPreferenceItem_ScopeRelativePath(), ecorePackage.getEString(), "scopeRelativePath", null, 1, 1, + PreferenceItem.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, + IS_ORDERED); + initEAttribute(getPreferenceItem_Name(), ecorePackage.getEString(), "name", null, 1, 1, PreferenceItem.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getPreferenceItem__GetParent(), getPreferenceNode(), "getParent", 0, 1, IS_UNIQUE, IS_ORDERED); + + EOperation op = initEOperation(getPreferenceItem__GetItem__String(), getPreferenceItem(), "getItem", 0, 1, + IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "path", 0, 1, IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getPreferenceItem__GetInScope__String(), getPreferenceItem(), "getInScope", 0, 1, IS_UNIQUE, + IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "scopeName", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getPreferenceItem__GetInScope(), getPreferenceItem(), "getInScope", 0, 1, IS_UNIQUE, IS_ORDERED); + initEClass(preferenceNodeEClass, PreferenceNode.class, "PreferenceNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getPreferenceNode_Children(), this.getPreferenceNode(), this.getPreferenceNode_Parent(), "children", - null, 0, -1, PreferenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, - !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - getPreferenceNode_Children().getEKeys().add(this.getPreferenceNode_Name()); - initEReference(getPreferenceNode_Parent(), this.getPreferenceNode(), this.getPreferenceNode_Children(), "parent", - null, 0, 1, PreferenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, - !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getPreferenceNode_Properties(), this.getProperty(), this.getProperty_Parent(), "properties", null, - 0, -1, PreferenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + initEReference(getPreferenceNode_Parent(), getPreferenceNode(), getPreferenceNode_Children(), "parent", null, 0, 1, + PreferenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - getPreferenceNode_Properties().getEKeys().add(this.getProperty_Name()); - initEAttribute(getPreferenceNode_Name(), ecorePackage.getEString(), "name", null, 1, 1, PreferenceNode.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPreferenceNode_Children(), getPreferenceNode(), getPreferenceNode_Parent(), "children", null, 0, + -1, PreferenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPreferenceNode_Properties(), getProperty(), getProperty_Parent(), "properties", null, 0, -1, + PreferenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + getPreferenceNode_Properties().getEKeys().add(getPreferenceItem_Name()); initEAttribute(getPreferenceNode_Location(), ecorePackage.getEString(), "location", null, 0, 1, PreferenceNode.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - EOperation op = initEOperation(getPreferenceNode__GetNode__String(), this.getPreferenceNode(), "getNode", 0, 1, - IS_UNIQUE, IS_ORDERED); + op = initEOperation(getPreferenceNode__GetNode__String(), getPreferenceNode(), "getNode", 0, 1, IS_UNIQUE, + IS_ORDERED); addEParameter(op, ecorePackage.getEString(), "name", 0, 1, IS_UNIQUE, IS_ORDERED); - op = initEOperation(getPreferenceNode__GetProperty__String(), this.getProperty(), "getProperty", 0, 1, IS_UNIQUE, + op = initEOperation(getPreferenceNode__GetProperty__String(), getProperty(), "getProperty", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, ecorePackage.getEString(), "name", 0, 1, IS_UNIQUE, IS_ORDERED); + op = initEOperation(getPreferenceNode__GetInScope__String(), getPreferenceNode(), "getInScope", 0, 1, IS_UNIQUE, + IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "scopeName", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getPreferenceNode__GetInScope(), getPreferenceNode(), "getInScope", 0, 1, IS_UNIQUE, IS_ORDERED); + initEClass(propertyEClass, Property.class, "Property", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getProperty_Name(), ecorePackage.getEString(), "name", null, 1, 1, Property.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getProperty_Parent(), this.getPreferenceNode(), this.getPreferenceNode_Properties(), "parent", null, - 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProperty_Value(), this.getEscapedString(), "value", null, 0, 1, Property.class, !IS_TRANSIENT, + initEReference(getProperty_Parent(), getPreferenceNode(), getPreferenceNode_Properties(), "parent", null, 0, 1, + Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getProperty_Value(), getEscapedString(), "value", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + op = initEOperation(getProperty__GetInScope__String(), getProperty(), "getInScope", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "scopeName", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getProperty__GetInScope(), getProperty(), "getInScope", 0, 1, IS_UNIQUE, IS_ORDERED); + // Initialize data types initEDataType(escapedStringEDataType, String.class, "EscapedString", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PropertyImpl.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PropertyImpl.java index 896a5977a3..d956614549 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PropertyImpl.java +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PropertyImpl.java @@ -16,12 +16,14 @@ import org.eclipse.emf.cdo.releng.preferences.Property; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EcoreUtil; +import java.lang.reflect.InvocationTargetException; + /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Property</b></em>'. @@ -29,7 +31,6 @@ import org.eclipse.emf.ecore.util.EcoreUtil; * <p> * The following features are implemented: * <ul> - * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PropertyImpl#getName <em>Name</em>}</li> * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PropertyImpl#getParent <em>Parent</em>}</li> * <li>{@link org.eclipse.emf.cdo.releng.preferences.impl.PropertyImpl#getValue <em>Value</em>}</li> * </ul> @@ -37,29 +38,9 @@ import org.eclipse.emf.ecore.util.EcoreUtil; * * @generated */ -public class PropertyImpl extends MinimalEObjectImpl.Container implements Property +public class PropertyImpl extends PreferenceItemImpl implements Property { /** - * The default value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** * The default value of the '{@link #getValue() <em>Value</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -105,33 +86,13 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper * <!-- end-user-doc --> * @generated */ - public String getName() - { - return name; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setName(String newName) - { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, PreferencesPackage.PROPERTY__NAME, oldName, name)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + @Override public PreferenceNode getParent() { if (eContainerFeatureID() != PreferencesPackage.PROPERTY__PARENT) + { return null; + } return (PreferenceNode)eInternalContainer(); } @@ -153,23 +114,33 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper */ public void setParent(PreferenceNode newParent) { - if (newParent != eInternalContainer() - || (eContainerFeatureID() != PreferencesPackage.PROPERTY__PARENT && newParent != null)) + if (newParent != eInternalContainer() || eContainerFeatureID() != PreferencesPackage.PROPERTY__PARENT + && newParent != null) { if (EcoreUtil.isAncestor(this, newParent)) + { throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + } NotificationChain msgs = null; if (eInternalContainer() != null) + { msgs = eBasicRemoveFromContainer(msgs); + } if (newParent != null) + { msgs = ((InternalEObject)newParent).eInverseAdd(this, PreferencesPackage.PREFERENCE_NODE__PROPERTIES, PreferenceNode.class, msgs); + } msgs = basicSetParent(newParent, msgs); if (msgs != null) + { msgs.dispatch(); + } } else if (eNotificationRequired()) + { eNotify(new ENotificationImpl(this, Notification.SET, PreferencesPackage.PROPERTY__PARENT, newParent, newParent)); + } } /** @@ -192,7 +163,31 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper String oldValue = value; value = newValue; if (eNotificationRequired()) + { eNotify(new ENotificationImpl(this, Notification.SET, PreferencesPackage.PROPERTY__VALUE, oldValue, value)); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public Property getInScope(String scopeName) + { + return (Property)super.getInScope(scopeName); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public Property getInScope() + { + return (Property)super.getInScope(); } /** @@ -207,7 +202,9 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper { case PreferencesPackage.PROPERTY__PARENT: if (eInternalContainer() != null) + { msgs = eBasicRemoveFromContainer(msgs); + } return basicSetParent((PreferenceNode)otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); @@ -256,8 +253,6 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper { switch (featureID) { - case PreferencesPackage.PROPERTY__NAME: - return getName(); case PreferencesPackage.PROPERTY__PARENT: return getParent(); case PreferencesPackage.PROPERTY__VALUE: @@ -276,9 +271,6 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper { switch (featureID) { - case PreferencesPackage.PROPERTY__NAME: - setName((String)newValue); - return; case PreferencesPackage.PROPERTY__PARENT: setParent((PreferenceNode)newValue); return; @@ -299,9 +291,6 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper { switch (featureID) { - case PreferencesPackage.PROPERTY__NAME: - setName(NAME_EDEFAULT); - return; case PreferencesPackage.PROPERTY__PARENT: setParent((PreferenceNode)null); return; @@ -322,8 +311,6 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper { switch (featureID) { - case PreferencesPackage.PROPERTY__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case PreferencesPackage.PROPERTY__PARENT: return getParent() != null; case PreferencesPackage.PROPERTY__VALUE: @@ -338,15 +325,33 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper * @generated */ @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException + { + switch (operationID) + { + case PreferencesPackage.PROPERTY___GET_IN_SCOPE__STRING: + return getInScope((String)arguments.get(0)); + case PreferencesPackage.PROPERTY___GET_IN_SCOPE: + return getInScope(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override public String toString() { if (eIsProxy()) + { return super.toString(); + } StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(", value: "); + result.append(" (value: "); result.append(value); result.append(')'); return result.toString(); diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesAdapterFactory.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesAdapterFactory.java index c8280c760a..2d2e13d46f 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesAdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesAdapterFactory.java @@ -10,6 +10,7 @@ */ package org.eclipse.emf.cdo.releng.preferences.util; +import org.eclipse.emf.cdo.releng.preferences.PreferenceItem; import org.eclipse.emf.cdo.releng.preferences.PreferenceNode; import org.eclipse.emf.cdo.releng.preferences.PreferencesPackage; import org.eclipse.emf.cdo.releng.preferences.Property; @@ -82,6 +83,12 @@ public class PreferencesAdapterFactory extends AdapterFactoryImpl protected PreferencesSwitch<Adapter> modelSwitch = new PreferencesSwitch<Adapter>() { @Override + public Adapter casePreferenceItem(PreferenceItem object) + { + return createPreferenceItemAdapter(); + } + + @Override public Adapter casePreferenceNode(PreferenceNode object) { return createPreferenceNodeAdapter(); @@ -115,6 +122,21 @@ public class PreferencesAdapterFactory extends AdapterFactoryImpl } /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceItem <em>Preference Item</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.emf.cdo.releng.preferences.PreferenceItem + * @generated + */ + public Adapter createPreferenceItemAdapter() + { + return null; + } + + /** * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode <em>Preference Node</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesSwitch.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesSwitch.java index 14f3e66c56..1588526834 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesSwitch.java +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesSwitch.java @@ -10,6 +10,7 @@ */ package org.eclipse.emf.cdo.releng.preferences.util; +import org.eclipse.emf.cdo.releng.preferences.PreferenceItem; import org.eclipse.emf.cdo.releng.preferences.PreferenceNode; import org.eclipse.emf.cdo.releng.preferences.PreferencesPackage; import org.eclipse.emf.cdo.releng.preferences.Property; @@ -81,12 +82,28 @@ public class PreferencesSwitch<T> extends Switch<T> { switch (classifierID) { + case PreferencesPackage.PREFERENCE_ITEM: + { + PreferenceItem preferenceItem = (PreferenceItem)theEObject; + T result = casePreferenceItem(preferenceItem); + if (result == null) + { + result = defaultCase(theEObject); + } + return result; + } case PreferencesPackage.PREFERENCE_NODE: { PreferenceNode preferenceNode = (PreferenceNode)theEObject; T result = casePreferenceNode(preferenceNode); if (result == null) + { + result = casePreferenceItem(preferenceNode); + } + if (result == null) + { result = defaultCase(theEObject); + } return result; } case PreferencesPackage.PROPERTY: @@ -94,7 +111,13 @@ public class PreferencesSwitch<T> extends Switch<T> Property property = (Property)theEObject; T result = caseProperty(property); if (result == null) + { + result = casePreferenceItem(property); + } + if (result == null) + { result = defaultCase(theEObject); + } return result; } default: @@ -103,6 +126,22 @@ public class PreferencesSwitch<T> extends Switch<T> } /** + * Returns the result of interpreting the object as an instance of '<em>Preference Item</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Preference Item</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePreferenceItem(PreferenceItem object) + { + return null; + } + + /** * Returns the result of interpreting the object as an instance of '<em>Preference Node</em>'. * <!-- begin-user-doc --> * This implementation returns null; diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesUtil.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesUtil.java index 03f8b32b32..f0b0510d4f 100644 --- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesUtil.java +++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesUtil.java @@ -233,22 +233,6 @@ public final class PreferencesUtil return null; } - public static String getAbsolutePath(Property property) - { - return getAbsolutePath(property.getParent()) + "/" + property.getName(); - } - - public static String getAbsolutePath(PreferenceNode node) - { - PreferenceNode parent = node.getParent(); - if (parent == null) - { - return node.getName(); - } - - return getAbsolutePath(parent) + "/" + node.getName(); - } - public static IPath getLocation(Preferences preferences) { if (preferences == null) diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.editor/src/org/eclipse/emf/cdo/releng/setup/presentation/SetupActionBarContributor.java b/plugins/org.eclipse.emf.cdo.releng.setup.editor/src/org/eclipse/emf/cdo/releng/setup/presentation/SetupActionBarContributor.java index a4fa357362..5af9f3f5c8 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup.editor/src/org/eclipse/emf/cdo/releng/setup/presentation/SetupActionBarContributor.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup.editor/src/org/eclipse/emf/cdo/releng/setup/presentation/SetupActionBarContributor.java @@ -596,7 +596,7 @@ public class SetupActionBarContributor extends EditingDomainActionBarContributor if (target instanceof Property) { Property property = (Property)target; - String absolutePath = PreferencesUtil.getAbsolutePath(property); + String absolutePath = property.getAbsolutePath(); if (absolutePath.startsWith("/instance/")) { map.put(property, absolutePath); |