diff options
author | Eike Stepper | 2014-03-05 09:30:39 +0000 |
---|---|---|
committer | Eike Stepper | 2014-03-05 09:51:55 +0000 |
commit | dbcd34266afa9338e4a24996855d727286b22c61 (patch) | |
tree | 4c0f68f5483c2571b9536bdf4361dedb43f68fac /plugins | |
parent | 4667ac85a8138f08813551ffdc4d572299ce0704 (diff) | |
download | cdo-dbcd34266afa9338e4a24996855d727286b22c61.tar.gz cdo-dbcd34266afa9338e4a24996855d727286b22c61.tar.xz cdo-dbcd34266afa9338e4a24996855d727286b22c61.zip |
[429644] [Oomph] Add FileAssociationsTask
https://bugs.eclipse.org/bugs/show_bug.cgi?id=429644
Diffstat (limited to 'plugins')
26 files changed, 1908 insertions, 46 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/icons/full/obj16/FileAssociationsTask.gif b/plugins/org.eclipse.emf.cdo.releng.setup.edit/icons/full/obj16/FileAssociationsTask.gif Binary files differnew file mode 100644 index 0000000000..d2a2cdb924 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/icons/full/obj16/FileAssociationsTask.gif diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/icons/full/obj16/FileMapping.gif b/plugins/org.eclipse.emf.cdo.releng.setup.edit/icons/full/obj16/FileMapping.gif Binary files differnew file mode 100644 index 0000000000..b64775883f --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/icons/full/obj16/FileMapping.gif diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.releng.setup.edit/plugin.properties index 414228cfbe..2afcf6c876 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/plugin.properties +++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/plugin.properties @@ -94,11 +94,18 @@ _UI_FileAssociationTask_defaultEditorID_feature = Default Editor ID _UI_FileAssociationTask_editors_feature = Editors _UI_FileAssociationTask_filePattern_feature = File Pattern _UI_FileAssociationTask_type = File Association +_UI_FileAssociationsTask_mappings_feature = Mappings +_UI_FileAssociationsTask_type = File Associations _UI_FileEditor_iD_feature = ID _UI_FileEditor_type = File Editor +_UI_FileMapping_defaultEditorID_feature = Default Editor ID +_UI_FileMapping_editors_feature = Editors +_UI_FileMapping_filePattern_feature = File Pattern +_UI_FileMapping_type = File Mapping _UI_GitCloneTask_checkoutBranch_feature = Checkout Branch _UI_GitCloneTask_location_feature = Location _UI_GitCloneTask_name_feature = Name +_UI_GitCloneTask_pushURI_feature = Push URI _UI_GitCloneTask_remoteName_feature = Remote Name _UI_GitCloneTask_remoteURI_feature = Remote URI _UI_GitCloneTask_type = Git Clone @@ -284,4 +291,3 @@ _UI_VariableType_URI_literal = URI _UI_WorkingSetTask_type = Working Sets _UI_WorkingSetTask_workingSetGroup_feature = Working Sets _UI_WorkingSetTask_workingSets_feature = Working Sets -_UI_GitCloneTask_pushURI_feature = Push URI diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/CompoundSetupTaskItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/CompoundSetupTaskItemProvider.java index 20292b33d1..d6369e7bc0 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/CompoundSetupTaskItemProvider.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/CompoundSetupTaskItemProvider.java @@ -245,6 +245,9 @@ public class CompoundSetupTaskItemProvider extends SetupTaskItemProvider impleme SetupFactory.eINSTANCE.createFileAssociationTask())); newChildDescriptors.add(createChildParameter(SetupPackage.Literals.SETUP_TASK_CONTAINER__SETUP_TASKS, + SetupFactory.eINSTANCE.createFileAssociationsTask())); + + newChildDescriptors.add(createChildParameter(SetupPackage.Literals.SETUP_TASK_CONTAINER__SETUP_TASKS, SetupFactory.eINSTANCE.createWorkingSetTask())); newChildDescriptors.add(createChildParameter(SetupPackage.Literals.SETUP_TASK_CONTAINER__SETUP_TASKS, diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/FileAssociationTaskItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/FileAssociationTaskItemProvider.java index 19c6a61be9..d96e947e97 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/FileAssociationTaskItemProvider.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/FileAssociationTaskItemProvider.java @@ -33,9 +33,11 @@ import java.util.List; /** * This is the item provider adapter for a {@link org.eclipse.emf.cdo.releng.setup.FileAssociationTask} object. * <!-- begin-user-doc --> + * @deprecated Use {@link FileAssociationsTaskItemProvider}. * <!-- end-user-doc --> * @generated */ +@Deprecated public class FileAssociationTaskItemProvider extends SetupTaskItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/FileAssociationsTaskItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/FileAssociationsTaskItemProvider.java new file mode 100644 index 0000000000..9a6692b774 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/FileAssociationsTaskItemProvider.java @@ -0,0 +1,165 @@ +/** + */ +package org.eclipse.emf.cdo.releng.setup.provider; + +import org.eclipse.emf.cdo.releng.setup.FileAssociationsTask; +import org.eclipse.emf.cdo.releng.setup.SetupFactory; +import org.eclipse.emf.cdo.releng.setup.SetupPackage; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +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.ViewerNotification; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.eclipse.emf.cdo.releng.setup.FileAssociationsTask} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ +public class FileAssociationsTaskItemProvider extends SetupTaskItemProvider implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FileAssociationsTaskItemProvider(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); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) + { + if (childrenFeatures == null) + { + super.getChildrenFeatures(object); + childrenFeatures.add(SetupPackage.Literals.FILE_ASSOCIATIONS_TASK__MAPPINGS); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) + { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns FileAssociationsTask.gif. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/FileAssociationsTask")); + } + + /** + * <!-- 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 NOT + */ + @Override + public String getText(Object object) + { + return getString("_UI_FileAssociationsTask_type"); + } + + /** + * 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(FileAssociationsTask.class)) + { + case SetupPackage.FILE_ASSOCIATIONS_TASK__MAPPINGS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + 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); + + newChildDescriptors.add(createChildParameter(SetupPackage.Literals.FILE_ASSOCIATIONS_TASK__MAPPINGS, + SetupFactory.eINSTANCE.createFileMapping())); + } + +} diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/FileMappingItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/FileMappingItemProvider.java new file mode 100644 index 0000000000..1f2194c27a --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/FileMappingItemProvider.java @@ -0,0 +1,233 @@ +/** + */ +package org.eclipse.emf.cdo.releng.setup.provider; + +import org.eclipse.emf.cdo.releng.setup.FileMapping; +import org.eclipse.emf.cdo.releng.setup.SetupFactory; +import org.eclipse.emf.cdo.releng.setup.SetupPackage; + +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.IChildCreationExtender; +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.setup.FileMapping} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ +public class FileMappingItemProvider 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 FileMappingItemProvider(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); + + addFilePatternPropertyDescriptor(object); + addDefaultEditorIDPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the File Pattern feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addFilePatternPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_FileMapping_filePattern_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_FileMapping_filePattern_feature", "_UI_FileMapping_type"), + SetupPackage.Literals.FILE_MAPPING__FILE_PATTERN, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Default Editor ID feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addDefaultEditorIDPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_FileMapping_defaultEditorID_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_FileMapping_defaultEditorID_feature", + "_UI_FileMapping_type"), SetupPackage.Literals.FILE_MAPPING__DEFAULT_EDITOR_ID, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) + { + if (childrenFeatures == null) + { + super.getChildrenFeatures(object); + childrenFeatures.add(SetupPackage.Literals.FILE_MAPPING__EDITORS); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) + { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns FileMapping.gif. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/FileMapping")); + } + + /** + * <!-- 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 NOT + */ + @Override + public String getText(Object object) + { + String label = ((FileMapping)object).getFilePattern(); + return label == null || label.length() == 0 ? getString("_UI_FileMapping_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(FileMapping.class)) + { + case SetupPackage.FILE_MAPPING__FILE_PATTERN: + case SetupPackage.FILE_MAPPING__DEFAULT_EDITOR_ID: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case SetupPackage.FILE_MAPPING__EDITORS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + 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); + + newChildDescriptors.add(createChildParameter(SetupPackage.Literals.FILE_MAPPING__EDITORS, + SetupFactory.eINSTANCE.createFileEditor())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return ((IChildCreationExtender)adapterFactory).getResourceLocator(); + } + +} diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/SetupItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/SetupItemProviderAdapterFactory.java index e7bff06123..91506b7f98 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/SetupItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/SetupItemProviderAdapterFactory.java @@ -45,6 +45,7 @@ import java.util.List; * <!-- end-user-doc --> * @generated */ +@SuppressWarnings("deprecation") public class SetupItemProviderAdapterFactory extends SetupAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable, IChildCreationExtender { @@ -602,7 +603,6 @@ public class SetupItemProviderAdapterFactory extends SetupAdapterFactory impleme * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("deprecation") protected MylynQueryTaskItemProvider mylynQueryTaskItemProvider; /** @@ -611,7 +611,6 @@ public class SetupItemProviderAdapterFactory extends SetupAdapterFactory impleme * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("deprecation") @Override public Adapter createMylynQueryTaskAdapter() { @@ -874,6 +873,56 @@ public class SetupItemProviderAdapterFactory extends SetupAdapterFactory impleme } /** + * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.releng.setup.FileAssociationsTask} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FileAssociationsTaskItemProvider fileAssociationsTaskItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.emf.cdo.releng.setup.FileAssociationsTask}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createFileAssociationsTaskAdapter() + { + if (fileAssociationsTaskItemProvider == null) + { + fileAssociationsTaskItemProvider = new FileAssociationsTaskItemProvider(this); + } + + return fileAssociationsTaskItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.releng.setup.FileMapping} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FileMappingItemProvider fileMappingItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.emf.cdo.releng.setup.FileMapping}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createFileMappingAdapter() + { + if (fileMappingItemProvider == null) + { + fileMappingItemProvider = new FileMappingItemProvider(this); + } + + return fileMappingItemProvider; + } + + /** * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.releng.setup.FileEditor} instances. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1625,6 +1674,14 @@ public class SetupItemProviderAdapterFactory extends SetupAdapterFactory impleme { fileAssociationTaskItemProvider.dispose(); } + if (fileAssociationsTaskItemProvider != null) + { + fileAssociationsTaskItemProvider.dispose(); + } + if (fileMappingItemProvider != null) + { + fileMappingItemProvider.dispose(); + } if (fileEditorItemProvider != null) { fileEditorItemProvider.dispose(); diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/SetupTaskContainerItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/SetupTaskContainerItemProvider.java index 9d2a73e94d..eca514b7c4 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/SetupTaskContainerItemProvider.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/SetupTaskContainerItemProvider.java @@ -219,6 +219,9 @@ public class SetupTaskContainerItemProvider extends ItemProviderAdapter implemen SetupFactory.eINSTANCE.createFileAssociationTask())); newChildDescriptors.add(createChildParameter(SetupPackage.Literals.SETUP_TASK_CONTAINER__SETUP_TASKS, + SetupFactory.eINSTANCE.createFileAssociationsTask())); + + newChildDescriptors.add(createChildParameter(SetupPackage.Literals.SETUP_TASK_CONTAINER__SETUP_TASKS, SetupFactory.eINSTANCE.createWorkingSetTask())); newChildDescriptors.add(createChildParameter(SetupPackage.Literals.SETUP_TASK_CONTAINER__SETUP_TASKS, diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.editor/src/org/eclipse/emf/cdo/releng/setup/presentation/actions/PerformSetupAction.java b/plugins/org.eclipse.emf.cdo.releng.setup.editor/src/org/eclipse/emf/cdo/releng/setup/presentation/actions/PerformSetupAction.java index 8f613d89a1..3a6e5d1a88 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup.editor/src/org/eclipse/emf/cdo/releng/setup/presentation/actions/PerformSetupAction.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup.editor/src/org/eclipse/emf/cdo/releng/setup/presentation/actions/PerformSetupAction.java @@ -18,7 +18,7 @@ import org.eclipse.emf.cdo.releng.internal.setup.ui.ProgressDialog; import org.eclipse.emf.cdo.releng.internal.setup.util.UpdateUtil.UpdatingException; import org.eclipse.emf.cdo.releng.setup.Branch; import org.eclipse.emf.cdo.releng.setup.Eclipse; -import org.eclipse.emf.cdo.releng.setup.FileAssociationTask; +import org.eclipse.emf.cdo.releng.setup.KeyBindingTask; import org.eclipse.emf.cdo.releng.setup.Setup; import org.eclipse.emf.cdo.releng.setup.SetupFactory; import org.eclipse.emf.cdo.releng.setup.SetupTask; @@ -187,13 +187,13 @@ public class PerformSetupAction extends AbstractSetupAction private SetupTask createTestTask() { - // KeyBindingTask task = SetupFactory.eINSTANCE.createKeyBindingTask(); - // task.setKeys("F12"); - // task.setCommand("org.eclipse.emf.cdo.releng.OpenManifest"); + KeyBindingTask task = SetupFactory.eINSTANCE.createKeyBindingTask(); + task.setKeys("F12"); + task.setCommand("org.eclipse.emf.cdo.releng.OpenManifest"); - FileAssociationTask task = SetupFactory.eINSTANCE.createFileAssociationTask(); - task.setFilePattern(".project"); - task.setDefaultEditorID("com.objfac.xmleditor.XMLEditor"); + // FileAssociationTask task = SetupFactory.eINSTANCE.createFileAssociationTask(); + // task.setFilePattern(".project"); + // task.setDefaultEditorID("com.objfac.xmleditor.XMLEditor"); return task; } diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/Setup (IDE).launch b/plugins/org.eclipse.emf.cdo.releng.setup/Setup (IDE).launch index b310764fe5..d46a8b6bbd 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/Setup (IDE).launch +++ b/plugins/org.eclipse.emf.cdo.releng.setup/Setup (IDE).launch @@ -15,10 +15,6 @@ <booleanAttribute key="includeOptional" value="true"/> <stringAttribute key="location" value="C:\develop\aaa\cdo.releng\master\ws"/> <stringAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_ENCODING" value="UTF-8"/> -<listAttribute key="org.eclipse.debug.ui.favoriteGroups"> -<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/> -<listEntry value="org.eclipse.debug.ui.launchGroup.run"/> -</listAttribute> <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/> diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.ecore b/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.ecore index b8166114e4..7786fb43e8 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.ecore +++ b/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.ecore @@ -283,6 +283,17 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="editors" upperBound="-1" eType="#//FileEditor" containment="true"/> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="FileAssociationsTask" eSuperTypes="#//SetupTask"> + <eStructuralFeatures xsi:type="ecore:EReference" name="mappings" lowerBound="1" + upperBound="-1" eType="#//FileMapping" containment="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="FileMapping"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="filePattern" lowerBound="1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="defaultEditorID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="editors" upperBound="-1" + eType="#//FileEditor" containment="true"/> + </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="FileEditor"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="iD" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.ecorediag b/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.ecorediag index 9ce9f9772f..162f99f0f7 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.ecorediag +++ b/plugins/org.eclipse.emf.cdo.releng.setup/model/setup.ecorediag @@ -195,10 +195,6 @@ <element xmi:type="ecore:EAttribute" href="setup.ecore#//Preferences/installFolder"/> <layoutConstraint xmi:type="notation:Location" xmi:id="_cVkD8eoYEeKpRf481yfX-g"/> </children> - <children xmi:type="notation:Node" xmi:id="_eISl0OoYEeKpRf481yfX-g" type="2001"> - <element xmi:type="ecore:EAttribute" href="setup.ecore#//Preferences/bundlePoolFolder"/> - <layoutConstraint xmi:type="notation:Location" xmi:id="_eISl0eoYEeKpRf481yfX-g"/> - </children> <children xmi:type="notation:Node" xmi:id="_BmNJME3gEeOxHbNrs8xY6g" type="2001"> <element xmi:type="ecore:EAttribute" href="setup.ecore#//Preferences/acceptedLicenses"/> <layoutConstraint xmi:type="notation:Location" xmi:id="_BmNJMU3gEeOxHbNrs8xY6g"/> @@ -910,6 +906,10 @@ <element xmi:type="ecore:EAttribute" href="setup.ecore#//GitCloneTask/remoteURI"/> <layoutConstraint xmi:type="notation:Location" xmi:id="_7MWC9VA2EeO-7YaO3XD0uQ"/> </children> + <children xmi:type="notation:Node" xmi:id="_ybumYKQ_EeOS_IuPw3O-Ig" type="2001"> + <element xmi:type="ecore:EAttribute" href="setup.ecore#//GitCloneTask/pushURI"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ybumYaQ_EeOS_IuPw3O-Ig"/> + </children> <children xmi:type="notation:Node" xmi:id="_7MS_oFA2EeO-7YaO3XD0uQ" type="2001"> <element xmi:type="ecore:EAttribute" href="setup.ecore#//GitCloneTask/userID"/> <layoutConstraint xmi:type="notation:Location" xmi:id="_7MS_oVA2EeO-7YaO3XD0uQ"/> @@ -1383,6 +1383,38 @@ <element xmi:type="ecore:EClass" href="platform:/resource/org.eclipse.emf.cdo.releng.predicates/model/predicates.ecore#//Predicate"/> <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4TqP4oshEeOIvIZg4xhMDA" x="523" y="1293"/> </children> + <children xmi:type="notation:Node" xmi:id="_rPUNkKRAEeOS_IuPw3O-Ig" type="1001"> + <children xmi:type="notation:Node" xmi:id="_rPaUMKRAEeOS_IuPw3O-Ig" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_rPaUMaRAEeOS_IuPw3O-Ig" type="5001"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_rPaUMqRAEeOS_IuPw3O-Ig"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_rPaUM6RAEeOS_IuPw3O-Ig"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_rPaUNKRAEeOS_IuPw3O-Ig"/> + </children> + <children xmi:type="notation:Node" xmi:id="_rPaUNaRAEeOS_IuPw3O-Ig" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_rPaUNqRAEeOS_IuPw3O-Ig"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_rPaUN6RAEeOS_IuPw3O-Ig"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_rPaUOKRAEeOS_IuPw3O-Ig"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_rPUNkaRAEeOS_IuPw3O-Ig" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15053796" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="setup.ecore#//FileAssociationsTask"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rPUNkqRAEeOS_IuPw3O-Ig" x="1696" y="872"/> + </children> + <children xmi:type="notation:Node" xmi:id="_Uo92UKRBEeOS_IuPw3O-Ig" type="1001"> + <children xmi:type="notation:Node" xmi:id="_Uo92U6RBEeOS_IuPw3O-Ig" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_Uo92VKRBEeOS_IuPw3O-Ig" type="5001"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_Uo92VaRBEeOS_IuPw3O-Ig"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_Uo92VqRBEeOS_IuPw3O-Ig"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_Uo92V6RBEeOS_IuPw3O-Ig"/> + </children> + <children xmi:type="notation:Node" xmi:id="_Uo92WKRBEeOS_IuPw3O-Ig" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_Uo92WaRBEeOS_IuPw3O-Ig"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_Uo92WqRBEeOS_IuPw3O-Ig"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_Uo92W6RBEeOS_IuPw3O-Ig"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_Uo92UaRBEeOS_IuPw3O-Ig" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="8047085" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="setup.ecore#//FileMapping"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Uo92UqRBEeOS_IuPw3O-Ig" x="1674" y="973"/> + </children> <styles xmi:type="notation:DiagramStyle" xmi:id="_u_e_seoIEeKpRf481yfX-g"/> <element xmi:type="ecore:EPackage" href="setup.ecore#/"/> <edges xmi:type="notation:Edge" xmi:id="_4esFEOoIEeKpRf481yfX-g" type="3002" source="_zoytIOoIEeKpRf481yfX-g" target="_2Y42MOoIEeKpRf481yfX-g"> @@ -2065,4 +2097,36 @@ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_BvIr04siEeOIvIZg4xhMDA" points="[-5, 33, 9, -72]$[-13, 89, 1, -16]"/> <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_BvOycIsiEeOIvIZg4xhMDA" id="(0.43005181347150256,0.2)"/> </edges> + <edges xmi:type="notation:Edge" xmi:id="_7VSyoKRAEeOS_IuPw3O-Ig" visible="false" type="3003" source="_rPUNkKRAEeOS_IuPw3O-Ig" target="_7oaMoAVzEeORNPhE9cWxTA"> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_7VSyoaRAEeOS_IuPw3O-Ig" routing="Rectilinear" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_7VSyoqRAEeOS_IuPw3O-Ig" fontName="Segoe UI"/> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_7VSyo6RAEeOS_IuPw3O-Ig" points="[-36, -20, 1296, 733]$[-1330, -710, 2, 43]"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_7VY5QKRAEeOS_IuPw3O-Ig" id="(0.8498498498498499,0.7828282828282829)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_UpoksKRBEeOS_IuPw3O-Ig" type="3002" source="_Uo92UKRBEeOS_IuPw3O-Ig" target="_jwY0sGAiEeOi3KKYWgSxGA"> + <children xmi:type="notation:Node" xmi:id="_UqNMcKRBEeOS_IuPw3O-Ig" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_UqNMcaRBEeOS_IuPw3O-Ig" x="-10" y="-10"/> + </children> + <children xmi:type="notation:Node" xmi:id="_UqNMcqRBEeOS_IuPw3O-Ig" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_UqNMc6RBEeOS_IuPw3O-Ig" x="10" y="10"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_UpoksaRBEeOS_IuPw3O-Ig" routing="Rectilinear" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_UpoksqRBEeOS_IuPw3O-Ig" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="setup.ecore#//FileMapping/editors"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Upoks6RBEeOS_IuPw3O-Ig" points="[7, 33, 214, -88]$[7, 121, 214, 0]$[-157, 121, 50, 0]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_Yz-eMKRBEeOS_IuPw3O-Ig" type="3002" source="_rPUNkKRAEeOS_IuPw3O-Ig" target="_Uo92UKRBEeOS_IuPw3O-Ig"> + <children xmi:type="notation:Node" xmi:id="_Y0Ek0KRBEeOS_IuPw3O-Ig" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_Y0Ek0aRBEeOS_IuPw3O-Ig" x="-7" y="-31"/> + </children> + <children xmi:type="notation:Node" xmi:id="_Y0Ek0qRBEeOS_IuPw3O-Ig" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_Y0Ek06RBEeOS_IuPw3O-Ig" x="-7" y="16"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_Yz-eMaRBEeOS_IuPw3O-Ig" routing="Rectilinear" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_Yz-eMqRBEeOS_IuPw3O-Ig" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="setup.ecore#//FileAssociationsTask/mappings"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Yz-eM6RBEeOS_IuPw3O-Ig" points="[9, 21, 2, -75]$[9, 81, 2, -15]"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Y0KrcKRBEeOS_IuPw3O-Ig" id="(0.5823529411764706,0.23529411764705882)"/> + </edges> </notation:Diagram> diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/FileAssociationTask.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/FileAssociationTask.java index 938d9970c6..432505c4d1 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/FileAssociationTask.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/FileAssociationTask.java @@ -15,6 +15,7 @@ import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>File Association Task</b></em>'. + * @deprecated Use {@link FileAssociationsTask}. * <!-- end-user-doc --> * * <p> @@ -30,6 +31,7 @@ import org.eclipse.emf.common.util.EList; * @model * @generated */ +@Deprecated public interface FileAssociationTask extends SetupTask { /** diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/FileAssociationsTask.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/FileAssociationsTask.java new file mode 100644 index 0000000000..a505e06cec --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/FileAssociationsTask.java @@ -0,0 +1,41 @@ +/** + */ +package org.eclipse.emf.cdo.releng.setup; + +import org.eclipse.emf.common.util.EList; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>File Associations Task</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.releng.setup.FileAssociationsTask#getMappings <em>Mappings</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.cdo.releng.setup.SetupPackage#getFileAssociationsTask() + * @model + * @generated + */ +public interface FileAssociationsTask extends SetupTask +{ + /** + * Returns the value of the '<em><b>Mappings</b></em>' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.releng.setup.FileMapping}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Mappings</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Mappings</em>' containment reference list. + * @see org.eclipse.emf.cdo.releng.setup.SetupPackage#getFileAssociationsTask_Mappings() + * @model containment="true" resolveProxies="true" required="true" + * @generated + */ + EList<FileMapping> getMappings(); + +} // FileAssociationsTask diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/FileMapping.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/FileMapping.java new file mode 100644 index 0000000000..87a6919113 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/FileMapping.java @@ -0,0 +1,96 @@ +/** + */ +package org.eclipse.emf.cdo.releng.setup; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>File Mapping</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.releng.setup.FileMapping#getFilePattern <em>File Pattern</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.setup.FileMapping#getDefaultEditorID <em>Default Editor ID</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.setup.FileMapping#getEditors <em>Editors</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.cdo.releng.setup.SetupPackage#getFileMapping() + * @model + * @generated + */ +public interface FileMapping extends EObject +{ + /** + * Returns the value of the '<em><b>File Pattern</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>File Pattern</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>File Pattern</em>' attribute. + * @see #setFilePattern(String) + * @see org.eclipse.emf.cdo.releng.setup.SetupPackage#getFileMapping_FilePattern() + * @model required="true" + * @generated + */ + String getFilePattern(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.releng.setup.FileMapping#getFilePattern <em>File Pattern</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>File Pattern</em>' attribute. + * @see #getFilePattern() + * @generated + */ + void setFilePattern(String value); + + /** + * Returns the value of the '<em><b>Default Editor ID</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Default Editor ID</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Default Editor ID</em>' attribute. + * @see #setDefaultEditorID(String) + * @see org.eclipse.emf.cdo.releng.setup.SetupPackage#getFileMapping_DefaultEditorID() + * @model + * @generated + */ + String getDefaultEditorID(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.releng.setup.FileMapping#getDefaultEditorID <em>Default Editor ID</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Default Editor ID</em>' attribute. + * @see #getDefaultEditorID() + * @generated + */ + void setDefaultEditorID(String value); + + /** + * Returns the value of the '<em><b>Editors</b></em>' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.releng.setup.FileEditor}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Editors</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Editors</em>' containment reference list. + * @see org.eclipse.emf.cdo.releng.setup.SetupPackage#getFileMapping_Editors() + * @model containment="true" resolveProxies="true" + * @generated + */ + EList<FileEditor> getEditors(); + +} // FileMapping diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupFactory.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupFactory.java index d40a3de022..d4b3a54ac0 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupFactory.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupFactory.java @@ -304,13 +304,33 @@ public interface SetupFactory extends EFactory /** * Returns a new object of class '<em>File Association Task</em>'. * <!-- begin-user-doc --> + * @deprecated Use {@link #createFileAssociationsTask()}. * <!-- end-user-doc --> * @return a new object of class '<em>File Association Task</em>'. * @generated */ + @Deprecated FileAssociationTask createFileAssociationTask(); /** + * Returns a new object of class '<em>File Associations Task</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>File Associations Task</em>'. + * @generated + */ + FileAssociationsTask createFileAssociationsTask(); + + /** + * Returns a new object of class '<em>File Mapping</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>File Mapping</em>'. + * @generated + */ + FileMapping createFileMapping(); + + /** * Returns a new object of class '<em>File Editor</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupPackage.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupPackage.java index 3960cc568b..31d9f70370 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupPackage.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/SetupPackage.java @@ -688,7 +688,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getWorkingSetTask() * @generated */ - int WORKING_SET_TASK = 42; + int WORKING_SET_TASK = 44; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.CompoundSetupTaskImpl <em>Compound Setup Task</em>}' class. @@ -819,7 +819,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getResourceCopyTask() * @generated */ - int RESOURCE_COPY_TASK = 43; + int RESOURCE_COPY_TASK = 45; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.TextModifyTaskImpl <em>Text Modify Task</em>}' class. @@ -829,7 +829,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getTextModifyTask() * @generated */ - int TEXT_MODIFY_TASK = 45; + int TEXT_MODIFY_TASK = 47; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.TextModificationImpl <em>Text Modification</em>}' class. @@ -839,7 +839,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getTextModification() * @generated */ - int TEXT_MODIFICATION = 46; + int TEXT_MODIFICATION = 48; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.KeyBindingTaskImpl <em>Key Binding Task</em>}' class. @@ -849,7 +849,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getKeyBindingTask() * @generated */ - int KEY_BINDING_TASK = 47; + int KEY_BINDING_TASK = 49; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.CommandParameterImpl <em>Command Parameter</em>}' class. @@ -859,7 +859,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getCommandParameter() * @generated */ - int COMMAND_PARAMETER = 49; + int COMMAND_PARAMETER = 51; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.ContextVariableTaskImpl <em>Context Variable Task</em>}' class. @@ -879,7 +879,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getResourceCreationTask() * @generated */ - int RESOURCE_CREATION_TASK = 44; + int RESOURCE_CREATION_TASK = 46; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.MaterializationTaskImpl <em>Materialization Task</em>}' class. @@ -919,7 +919,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getMylynQueryTask() * @generated */ - int MYLYN_QUERY_TASK = 50; + int MYLYN_QUERY_TASK = 52; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.AutomaticSourceLocatorImpl <em>Automatic Source Locator</em>}' class. @@ -1864,7 +1864,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getKeyBindingContext() * @generated */ - int KEY_BINDING_CONTEXT = 48; + int KEY_BINDING_CONTEXT = 50; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.TargetPlatformTaskImpl <em>Target Platform Task</em>}' class. @@ -1884,7 +1884,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getJRETask() * @generated */ - int JRE_TASK = 56; + int JRE_TASK = 58; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.FileAssociationTaskImpl <em>File Association Task</em>}' class. @@ -1904,7 +1904,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getFileEditor() * @generated */ - int FILE_EDITOR = 41; + int FILE_EDITOR = 43; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.MylynQueriesTaskImpl <em>Mylyn Queries Task</em>}' class. @@ -1914,7 +1914,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getMylynQueriesTask() * @generated */ - int MYLYN_QUERIES_TASK = 51; + int MYLYN_QUERIES_TASK = 53; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.QueryImpl <em>Query</em>}' class. @@ -1924,7 +1924,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getQuery() * @generated */ - int QUERY = 52; + int QUERY = 54; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.QueryAttributeImpl <em>Query Attribute</em>}' class. @@ -1934,7 +1934,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getQueryAttribute() * @generated */ - int QUERY_ATTRIBUTE = 53; + int QUERY_ATTRIBUTE = 55; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.MylynBuildsTaskImpl <em>Mylyn Builds Task</em>}' class. @@ -1944,7 +1944,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getMylynBuildsTask() * @generated */ - int MYLYN_BUILDS_TASK = 54; + int MYLYN_BUILDS_TASK = 56; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.BuildPlanImpl <em>Build Plan</em>}' class. @@ -1954,7 +1954,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getBuildPlan() * @generated */ - int BUILD_PLAN = 55; + int BUILD_PLAN = 57; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.ComponentExtensionImpl <em>Component Extension</em>}' class. @@ -3050,6 +3050,134 @@ public interface SetupPackage extends EPackage int FILE_ASSOCIATION_TASK_FEATURE_COUNT = SETUP_TASK_FEATURE_COUNT + 3; /** + * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.FileAssociationsTaskImpl <em>File Associations Task</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.releng.setup.impl.FileAssociationsTaskImpl + * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getFileAssociationsTask() + * @generated + */ + int FILE_ASSOCIATIONS_TASK = 41; + + /** + * The feature id for the '<em><b>Requirements</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FILE_ASSOCIATIONS_TASK__REQUIREMENTS = SETUP_TASK__REQUIREMENTS; + + /** + * The feature id for the '<em><b>Restrictions</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FILE_ASSOCIATIONS_TASK__RESTRICTIONS = SETUP_TASK__RESTRICTIONS; + + /** + * The feature id for the '<em><b>Disabled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FILE_ASSOCIATIONS_TASK__DISABLED = SETUP_TASK__DISABLED; + + /** + * The feature id for the '<em><b>Scope</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FILE_ASSOCIATIONS_TASK__SCOPE = SETUP_TASK__SCOPE; + + /** + * The feature id for the '<em><b>Excluded Triggers</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FILE_ASSOCIATIONS_TASK__EXCLUDED_TRIGGERS = SETUP_TASK__EXCLUDED_TRIGGERS; + + /** + * The feature id for the '<em><b>Documentation</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FILE_ASSOCIATIONS_TASK__DOCUMENTATION = SETUP_TASK__DOCUMENTATION; + + /** + * The feature id for the '<em><b>Mappings</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FILE_ASSOCIATIONS_TASK__MAPPINGS = SETUP_TASK_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>File Associations Task</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FILE_ASSOCIATIONS_TASK_FEATURE_COUNT = SETUP_TASK_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.impl.FileMappingImpl <em>File Mapping</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.releng.setup.impl.FileMappingImpl + * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getFileMapping() + * @generated + */ + int FILE_MAPPING = 42; + + /** + * The feature id for the '<em><b>File Pattern</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FILE_MAPPING__FILE_PATTERN = 0; + + /** + * The feature id for the '<em><b>Default Editor ID</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FILE_MAPPING__DEFAULT_EDITOR_ID = 1; + + /** + * The feature id for the '<em><b>Editors</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FILE_MAPPING__EDITORS = 2; + + /** + * The number of structural features of the '<em>File Mapping</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FILE_MAPPING_FEATURE_COUNT = 3; + + /** * The feature id for the '<em><b>ID</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -4092,7 +4220,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getSetupTaskScope() * @generated */ - int SETUP_TASK_SCOPE = 57; + int SETUP_TASK_SCOPE = 59; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.Trigger <em>Trigger</em>}' enum. @@ -4102,7 +4230,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getTrigger() * @generated */ - int TRIGGER = 58; + int TRIGGER = 60; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.ComponentType <em>Component Type</em>}' enum. @@ -4112,7 +4240,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getComponentType() * @generated */ - int COMPONENT_TYPE = 59; + int COMPONENT_TYPE = 61; /** * The meta object id for the '{@link org.eclipse.emf.cdo.releng.setup.VariableType <em>Variable Type</em>}' enum. @@ -4122,7 +4250,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getVariableType() * @generated */ - int VARIABLE_TYPE = 60; + int VARIABLE_TYPE = 62; /** * The meta object id for the '<em>URI</em>' data type. @@ -4132,7 +4260,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getURI() * @generated */ - int URI = 63; + int URI = 65; /** * The meta object id for the '<em>License Info</em>' data type. @@ -4142,7 +4270,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getLicenseInfo() * @generated */ - int LICENSE_INFO = 64; + int LICENSE_INFO = 66; /** * The meta object id for the '<em>Version</em>' data type. @@ -4152,7 +4280,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getVersion() * @generated */ - int VERSION = 65; + int VERSION = 67; /** * The meta object id for the '<em>Version Range</em>' data type. @@ -4162,7 +4290,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getVersionRange() * @generated */ - int VERSION_RANGE = 66; + int VERSION_RANGE = 68; /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.setup.MetaIndex <em>Meta Index</em>}'. @@ -4268,7 +4396,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getException() * @generated */ - int EXCEPTION = 62; + int EXCEPTION = 64; /** * The meta object id for the '<em>Trigger Set</em>' data type. @@ -4278,7 +4406,7 @@ public interface SetupPackage extends EPackage * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getTriggerSet() * @generated */ - int TRIGGER_SET = 61; + int TRIGGER_SET = 63; /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.setup.Configuration <em>Configuration</em>}'. @@ -5497,6 +5625,70 @@ public interface SetupPackage extends EPackage EReference getFileAssociationTask_Editors(); /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.setup.FileAssociationsTask <em>File Associations Task</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>File Associations Task</em>'. + * @see org.eclipse.emf.cdo.releng.setup.FileAssociationsTask + * @generated + */ + EClass getFileAssociationsTask(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.releng.setup.FileAssociationsTask#getMappings <em>Mappings</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Mappings</em>'. + * @see org.eclipse.emf.cdo.releng.setup.FileAssociationsTask#getMappings() + * @see #getFileAssociationsTask() + * @generated + */ + EReference getFileAssociationsTask_Mappings(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.setup.FileMapping <em>File Mapping</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>File Mapping</em>'. + * @see org.eclipse.emf.cdo.releng.setup.FileMapping + * @generated + */ + EClass getFileMapping(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.releng.setup.FileMapping#getFilePattern <em>File Pattern</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>File Pattern</em>'. + * @see org.eclipse.emf.cdo.releng.setup.FileMapping#getFilePattern() + * @see #getFileMapping() + * @generated + */ + EAttribute getFileMapping_FilePattern(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.releng.setup.FileMapping#getDefaultEditorID <em>Default Editor ID</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Default Editor ID</em>'. + * @see org.eclipse.emf.cdo.releng.setup.FileMapping#getDefaultEditorID() + * @see #getFileMapping() + * @generated + */ + EAttribute getFileMapping_DefaultEditorID(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.releng.setup.FileMapping#getEditors <em>Editors</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Editors</em>'. + * @see org.eclipse.emf.cdo.releng.setup.FileMapping#getEditors() + * @see #getFileMapping() + * @generated + */ + EReference getFileMapping_Editors(); + + /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.setup.FileEditor <em>File Editor</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -7478,6 +7670,58 @@ public interface SetupPackage extends EPackage EReference FILE_ASSOCIATION_TASK__EDITORS = eINSTANCE.getFileAssociationTask_Editors(); /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.releng.setup.impl.FileAssociationsTaskImpl <em>File Associations Task</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.releng.setup.impl.FileAssociationsTaskImpl + * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getFileAssociationsTask() + * @generated + */ + EClass FILE_ASSOCIATIONS_TASK = eINSTANCE.getFileAssociationsTask(); + + /** + * The meta object literal for the '<em><b>Mappings</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference FILE_ASSOCIATIONS_TASK__MAPPINGS = eINSTANCE.getFileAssociationsTask_Mappings(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.releng.setup.impl.FileMappingImpl <em>File Mapping</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.releng.setup.impl.FileMappingImpl + * @see org.eclipse.emf.cdo.releng.setup.impl.SetupPackageImpl#getFileMapping() + * @generated + */ + EClass FILE_MAPPING = eINSTANCE.getFileMapping(); + + /** + * The meta object literal for the '<em><b>File Pattern</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FILE_MAPPING__FILE_PATTERN = eINSTANCE.getFileMapping_FilePattern(); + + /** + * The meta object literal for the '<em><b>Default Editor ID</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FILE_MAPPING__DEFAULT_EDITOR_ID = eINSTANCE.getFileMapping_DefaultEditorID(); + + /** + * The meta object literal for the '<em><b>Editors</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference FILE_MAPPING__EDITORS = eINSTANCE.getFileMapping_Editors(); + + /** * The meta object literal for the '{@link org.eclipse.emf.cdo.releng.setup.impl.FileEditorImpl <em>File Editor</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/FileAssociationTaskImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/FileAssociationTaskImpl.java index b078641be4..7834e3cf16 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/FileAssociationTaskImpl.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/FileAssociationTaskImpl.java @@ -45,6 +45,7 @@ import java.util.Set; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>File Association Task</b></em>'. + * @deprecated Use {@link FileAssociationsTaskImpl}. * <!-- end-user-doc --> * <p> * The following features are implemented: @@ -57,6 +58,7 @@ import java.util.Set; * * @generated */ +@Deprecated @SuppressWarnings("restriction") public class FileAssociationTaskImpl extends SetupTaskImpl implements FileAssociationTask { @@ -422,7 +424,7 @@ public class FileAssociationTaskImpl extends SetupTaskImpl implements FileAssoci public void run(SetupTaskContext context) throws Exception { registry.setFileEditorMappings(mappings.values().toArray(new FileEditorMapping[mappings.size()])); - registry.saveAssociations(); // TODO This call takes comparingly long. Optimize! + registry.saveAssociations(); // This call takes comparingly long. Use FileAssociationsTaskImpl. PrefUtil.savePrefs(); } diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/FileAssociationsTaskImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/FileAssociationsTaskImpl.java new file mode 100644 index 0000000000..3714c5191d --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/FileAssociationsTaskImpl.java @@ -0,0 +1,382 @@ +/** + */ +package org.eclipse.emf.cdo.releng.setup.impl; + +import org.eclipse.emf.cdo.releng.setup.FileAssociationsTask; +import org.eclipse.emf.cdo.releng.setup.FileEditor; +import org.eclipse.emf.cdo.releng.setup.FileMapping; +import org.eclipse.emf.cdo.releng.setup.SetupPackage; +import org.eclipse.emf.cdo.releng.setup.SetupTask; +import org.eclipse.emf.cdo.releng.setup.SetupTaskContext; +import org.eclipse.emf.cdo.releng.setup.Trigger; + +import org.eclipse.net4j.util.ObjectUtil; +import org.eclipse.net4j.util.StringUtil; + +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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.ui.IEditorDescriptor; +import org.eclipse.ui.IFileEditorMapping; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.internal.registry.EditorDescriptor; +import org.eclipse.ui.internal.registry.EditorRegistry; +import org.eclipse.ui.internal.registry.FileEditorMapping; +import org.eclipse.ui.internal.util.PrefUtil; + +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>File Associations Task</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.releng.setup.impl.FileAssociationsTaskImpl#getMappings <em>Mappings</em>}</li> + * </ul> + * </p> + * + * @generated + */ +@SuppressWarnings("restriction") +public class FileAssociationsTaskImpl extends SetupTaskImpl implements FileAssociationsTask +{ + /** + * The cached value of the '{@link #getMappings() <em>Mappings</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMappings() + * @generated + * @ordered + */ + protected EList<FileMapping> mappings; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FileAssociationsTaskImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return SetupPackage.Literals.FILE_ASSOCIATIONS_TASK; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<FileMapping> getMappings() + { + if (mappings == null) + { + mappings = new EObjectContainmentEList.Resolving<FileMapping>(FileMapping.class, this, + SetupPackage.FILE_ASSOCIATIONS_TASK__MAPPINGS); + } + return mappings; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case SetupPackage.FILE_ASSOCIATIONS_TASK__MAPPINGS: + return ((InternalEList<?>)getMappings()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case SetupPackage.FILE_ASSOCIATIONS_TASK__MAPPINGS: + return getMappings(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case SetupPackage.FILE_ASSOCIATIONS_TASK__MAPPINGS: + getMappings().clear(); + getMappings().addAll((Collection<? extends FileMapping>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case SetupPackage.FILE_ASSOCIATIONS_TASK__MAPPINGS: + getMappings().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case SetupPackage.FILE_ASSOCIATIONS_TASK__MAPPINGS: + return mappings != null && !mappings.isEmpty(); + } + return super.eIsSet(featureID); + } + + @Override + public Set<Trigger> getValidTriggers() + { + return Trigger.IDE_TRIGGERS; + } + + @Override + public Object getOverrideToken() + { + return getClass(); + } + + @Override + public void overrideFor(SetupTask overriddenSetupTask) + { + super.overrideFor(overriddenSetupTask); + + FileAssociationsTask overriddenFileAssociationsTask = (FileAssociationsTask)overriddenSetupTask; + getMappings().addAll(overriddenFileAssociationsTask.getMappings()); + } + + @Override + public void consolidate() + { + Map<String, FileMapping> existingMappings = new HashMap<String, FileMapping>(); + for (Iterator<FileMapping> it = getMappings().iterator(); it.hasNext();) + { + FileMapping mapping = it.next(); + String filePattern = mapping.getFilePattern(); + + FileMapping existingMapping = existingMappings.get(filePattern); + if (existingMapping != null) + { + EList<FileEditor> existingEditors = existingMapping.getEditors(); + + LinkedHashSet<FileEditor> editors = new LinkedHashSet<FileEditor>(existingEditors); + editors.addAll(mapping.getEditors()); + + existingEditors.clear(); + existingEditors.addAll(editors); + + String defaultEditorID = mapping.getDefaultEditorID(); + if (!StringUtil.isEmpty(defaultEditorID)) + { + existingMapping.setDefaultEditorID(defaultEditorID); + } + + it.remove(); + } + else + { + existingMappings.put(filePattern, mapping); + } + } + } + + public boolean isNeeded(SetupTaskContext context) throws Exception + { + Map<String, FileEditorMapping> fileEditorMappings = getFileEditorMappings(); + + for (FileMapping mapping : getMappings()) + { + FileEditorMapping fileEditorMapping = fileEditorMappings.get(mapping.getFilePattern()); + if (fileEditorMapping == null) + { + return true; + } + + EditorRegistry registry = (EditorRegistry)PlatformUI.getWorkbench().getEditorRegistry(); + + String defaultEditorID = mapping.getDefaultEditorID(); + if (!StringUtil.isEmpty(defaultEditorID)) + { + IEditorDescriptor defaultEditor = registry.findEditor(defaultEditorID); + if (defaultEditor != null) + { + IEditorDescriptor mappingDefaultEditor = fileEditorMapping.getDefaultEditor(); + String mappingDefaultEditorID = mappingDefaultEditor == null ? null : mappingDefaultEditor.getId(); + if (!ObjectUtil.equals(mappingDefaultEditorID, defaultEditorID)) + { + return true; + } + } + } + + Set<String> editorIDs = getEditorIDs(fileEditorMapping); + for (FileEditor fileEditor : mapping.getEditors()) + { + String editorID = fileEditor.getID(); + if (registry.findEditor(editorID) != null && !editorIDs.contains(editorID)) + { + return true; + } + } + } + + return false; + } + + public void perform(SetupTaskContext context) throws Exception + { + final EditorRegistry registry = (EditorRegistry)PlatformUI.getWorkbench().getEditorRegistry(); + final Map<String, FileEditorMapping> fileEditorMappings = getFileEditorMappings(); + + for (FileMapping mapping : getMappings()) + { + String filePattern = mapping.getFilePattern(); + FileEditorMapping fileEditorMapping = fileEditorMappings.get(filePattern); + if (fileEditorMapping == null) + { + int lastDot = filePattern.lastIndexOf('.'); + String name = lastDot == -1 ? filePattern : filePattern.substring(0, lastDot); + String extension = lastDot == -1 ? null : filePattern.substring(lastDot + 1); + + if (StringUtil.isEmpty(name)) + { + name = "." + extension; + extension = null; + } + + fileEditorMapping = new FileEditorMapping(name, extension); + fileEditorMappings.put(filePattern, fileEditorMapping); + } + + Set<String> editorIDs = getEditorIDs(fileEditorMapping); + for (FileEditor fileEditor : mapping.getEditors()) + { + String editorID = fileEditor.getID(); + if (!editorIDs.contains(editorID)) + { + IEditorDescriptor editor = registry.findEditor(editorID); + if (editor instanceof EditorDescriptor) + { + fileEditorMapping.addEditor((EditorDescriptor)editor); + } + } + } + + String defaultEditorID = mapping.getDefaultEditorID(); + if (!StringUtil.isEmpty(defaultEditorID)) + { + IEditorDescriptor defaultEditor = registry.findEditor(defaultEditorID); + if (defaultEditor instanceof EditorDescriptor) + { + fileEditorMapping.setDefaultEditor((EditorDescriptor)defaultEditor); + } + } + } + + performUI(context, new RunnableWithContext() + { + public void run(SetupTaskContext context) throws Exception + { + registry.setFileEditorMappings(fileEditorMappings.values().toArray( + new FileEditorMapping[fileEditorMappings.size()])); + registry.saveAssociations(); + + PrefUtil.savePrefs(); + } + }); + } + + private static Map<String, FileEditorMapping> getFileEditorMappings() + { + Map<String, FileEditorMapping> result = new HashMap<String, FileEditorMapping>(); + IFileEditorMapping[] mappings = PlatformUI.getWorkbench().getEditorRegistry().getFileEditorMappings(); + for (int i = 0; i < mappings.length; i++) + { + IFileEditorMapping mapping = mappings[i]; + if (mapping instanceof FileEditorMapping) + { + String name = mapping.getName(); + String extension = mapping.getExtension(); + + String pattern = name + (StringUtil.isEmpty(extension) ? "" : "." + extension); + result.put(pattern, (FileEditorMapping)mapping); + } + } + + return result; + } + + private Set<String> getEditorIDs(IFileEditorMapping mapping) + { + Set<String> ids = new HashSet<String>(); + + IEditorDescriptor[] editors = mapping.getEditors(); + for (int i = 0; i < editors.length; i++) + { + IEditorDescriptor editor = editors[i]; + String editorID = editor.getId(); + ids.add(editorID); + } + + return ids; + } + +} // FileAssociationsTaskImpl diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/FileMappingImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/FileMappingImpl.java new file mode 100644 index 0000000000..a5fb62f72b --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/FileMappingImpl.java @@ -0,0 +1,303 @@ +/** + */ +package org.eclipse.emf.cdo.releng.setup.impl; + +import org.eclipse.emf.cdo.releng.setup.FileEditor; +import org.eclipse.emf.cdo.releng.setup.FileMapping; +import org.eclipse.emf.cdo.releng.setup.SetupPackage; + +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.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>File Mapping</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.releng.setup.impl.FileMappingImpl#getFilePattern <em>File Pattern</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.setup.impl.FileMappingImpl#getDefaultEditorID <em>Default Editor ID</em>}</li> + * <li>{@link org.eclipse.emf.cdo.releng.setup.impl.FileMappingImpl#getEditors <em>Editors</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class FileMappingImpl extends MinimalEObjectImpl.Container implements FileMapping +{ + /** + * The default value of the '{@link #getFilePattern() <em>File Pattern</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFilePattern() + * @generated + * @ordered + */ + protected static final String FILE_PATTERN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFilePattern() <em>File Pattern</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFilePattern() + * @generated + * @ordered + */ + protected String filePattern = FILE_PATTERN_EDEFAULT; + + /** + * The default value of the '{@link #getDefaultEditorID() <em>Default Editor ID</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDefaultEditorID() + * @generated + * @ordered + */ + protected static final String DEFAULT_EDITOR_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDefaultEditorID() <em>Default Editor ID</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDefaultEditorID() + * @generated + * @ordered + */ + protected String defaultEditorID = DEFAULT_EDITOR_ID_EDEFAULT; + + /** + * The cached value of the '{@link #getEditors() <em>Editors</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEditors() + * @generated + * @ordered + */ + protected EList<FileEditor> editors; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FileMappingImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return SetupPackage.Literals.FILE_MAPPING; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getFilePattern() + { + return filePattern; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFilePattern(String newFilePattern) + { + String oldFilePattern = filePattern; + filePattern = newFilePattern; + if (eNotificationRequired()) + { + eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.FILE_MAPPING__FILE_PATTERN, oldFilePattern, + filePattern)); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDefaultEditorID() + { + return defaultEditorID; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDefaultEditorID(String newDefaultEditorID) + { + String oldDefaultEditorID = defaultEditorID; + defaultEditorID = newDefaultEditorID; + if (eNotificationRequired()) + { + eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.FILE_MAPPING__DEFAULT_EDITOR_ID, + oldDefaultEditorID, defaultEditorID)); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<FileEditor> getEditors() + { + if (editors == null) + { + editors = new EObjectContainmentEList.Resolving<FileEditor>(FileEditor.class, this, + SetupPackage.FILE_MAPPING__EDITORS); + } + return editors; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case SetupPackage.FILE_MAPPING__EDITORS: + return ((InternalEList<?>)getEditors()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case SetupPackage.FILE_MAPPING__FILE_PATTERN: + return getFilePattern(); + case SetupPackage.FILE_MAPPING__DEFAULT_EDITOR_ID: + return getDefaultEditorID(); + case SetupPackage.FILE_MAPPING__EDITORS: + return getEditors(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case SetupPackage.FILE_MAPPING__FILE_PATTERN: + setFilePattern((String)newValue); + return; + case SetupPackage.FILE_MAPPING__DEFAULT_EDITOR_ID: + setDefaultEditorID((String)newValue); + return; + case SetupPackage.FILE_MAPPING__EDITORS: + getEditors().clear(); + getEditors().addAll((Collection<? extends FileEditor>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case SetupPackage.FILE_MAPPING__FILE_PATTERN: + setFilePattern(FILE_PATTERN_EDEFAULT); + return; + case SetupPackage.FILE_MAPPING__DEFAULT_EDITOR_ID: + setDefaultEditorID(DEFAULT_EDITOR_ID_EDEFAULT); + return; + case SetupPackage.FILE_MAPPING__EDITORS: + getEditors().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case SetupPackage.FILE_MAPPING__FILE_PATTERN: + return FILE_PATTERN_EDEFAULT == null ? filePattern != null : !FILE_PATTERN_EDEFAULT.equals(filePattern); + case SetupPackage.FILE_MAPPING__DEFAULT_EDITOR_ID: + return DEFAULT_EDITOR_ID_EDEFAULT == null ? defaultEditorID != null : !DEFAULT_EDITOR_ID_EDEFAULT + .equals(defaultEditorID); + case SetupPackage.FILE_MAPPING__EDITORS: + return editors != null && !editors.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (filePattern: "); + result.append(filePattern); + result.append(", defaultEditorID: "); + result.append(defaultEditorID); + result.append(')'); + return result.toString(); + } + +} // FileMappingImpl diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/P2TaskImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/P2TaskImpl.java index 784b90d0d3..065747251f 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/P2TaskImpl.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/P2TaskImpl.java @@ -488,7 +488,6 @@ public class P2TaskImpl extends SetupTaskImpl implements P2Task super.overrideFor(overriddenSetupTask); P2Task overriddenP2Task = (P2Task)overriddenSetupTask; - getInstallableUnits().addAll(overriddenP2Task.getInstallableUnits()); getP2Repositories().addAll(overriddenP2Task.getP2Repositories()); } diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupFactoryImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupFactoryImpl.java index 60bb6a050c..8bfc844b19 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupFactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupFactoryImpl.java @@ -27,7 +27,9 @@ import org.eclipse.emf.cdo.releng.setup.Eclipse; import org.eclipse.emf.cdo.releng.setup.EclipseIniTask; import org.eclipse.emf.cdo.releng.setup.EclipsePreferenceTask; import org.eclipse.emf.cdo.releng.setup.FileAssociationTask; +import org.eclipse.emf.cdo.releng.setup.FileAssociationsTask; import org.eclipse.emf.cdo.releng.setup.FileEditor; +import org.eclipse.emf.cdo.releng.setup.FileMapping; import org.eclipse.emf.cdo.releng.setup.GitCloneTask; import org.eclipse.emf.cdo.releng.setup.Index; import org.eclipse.emf.cdo.releng.setup.InstallableUnit; @@ -208,6 +210,10 @@ public class SetupFactoryImpl extends EFactoryImpl implements SetupFactory return createEclipsePreferenceTask(); case SetupPackage.FILE_ASSOCIATION_TASK: return createFileAssociationTask(); + case SetupPackage.FILE_ASSOCIATIONS_TASK: + return createFileAssociationsTask(); + case SetupPackage.FILE_MAPPING: + return createFileMapping(); case SetupPackage.FILE_EDITOR: return createFileEditor(); case SetupPackage.WORKING_SET_TASK: @@ -697,6 +703,28 @@ public class SetupFactoryImpl extends EFactoryImpl implements SetupFactory * <!-- end-user-doc --> * @generated */ + public FileAssociationsTask createFileAssociationsTask() + { + FileAssociationsTaskImpl fileAssociationsTask = new FileAssociationsTaskImpl(); + return fileAssociationsTask; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FileMapping createFileMapping() + { + FileMappingImpl fileMapping = new FileMappingImpl(); + return fileMapping; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public FileEditor createFileEditor() { FileEditorImpl fileEditor = new FileEditorImpl(); diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupPackageImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupPackageImpl.java index 5cf71248e2..a2b6ba3f57 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupPackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupPackageImpl.java @@ -30,7 +30,9 @@ import org.eclipse.emf.cdo.releng.setup.Eclipse; import org.eclipse.emf.cdo.releng.setup.EclipseIniTask; import org.eclipse.emf.cdo.releng.setup.EclipsePreferenceTask; import org.eclipse.emf.cdo.releng.setup.FileAssociationTask; +import org.eclipse.emf.cdo.releng.setup.FileAssociationsTask; import org.eclipse.emf.cdo.releng.setup.FileEditor; +import org.eclipse.emf.cdo.releng.setup.FileMapping; import org.eclipse.emf.cdo.releng.setup.GitCloneTask; import org.eclipse.emf.cdo.releng.setup.Index; import org.eclipse.emf.cdo.releng.setup.InstallableUnit; @@ -329,6 +331,20 @@ public class SetupPackageImpl extends EPackageImpl implements SetupPackage * <!-- end-user-doc --> * @generated */ + private EClass fileAssociationsTaskEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass fileMappingEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ private EClass fileEditorEClass = null; /** @@ -1863,6 +1879,66 @@ public class SetupPackageImpl extends EPackageImpl implements SetupPackage * <!-- end-user-doc --> * @generated */ + public EClass getFileAssociationsTask() + { + return fileAssociationsTaskEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getFileAssociationsTask_Mappings() + { + return (EReference)fileAssociationsTaskEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFileMapping() + { + return fileMappingEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFileMapping_FilePattern() + { + return (EAttribute)fileMappingEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFileMapping_DefaultEditorID() + { + return (EAttribute)fileMappingEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getFileMapping_Editors() + { + return (EReference)fileMappingEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EClass getFileEditor() { return fileEditorEClass; @@ -2929,6 +3005,14 @@ public class SetupPackageImpl extends EPackageImpl implements SetupPackage createEAttribute(fileAssociationTaskEClass, FILE_ASSOCIATION_TASK__DEFAULT_EDITOR_ID); createEReference(fileAssociationTaskEClass, FILE_ASSOCIATION_TASK__EDITORS); + fileAssociationsTaskEClass = createEClass(FILE_ASSOCIATIONS_TASK); + createEReference(fileAssociationsTaskEClass, FILE_ASSOCIATIONS_TASK__MAPPINGS); + + fileMappingEClass = createEClass(FILE_MAPPING); + createEAttribute(fileMappingEClass, FILE_MAPPING__FILE_PATTERN); + createEAttribute(fileMappingEClass, FILE_MAPPING__DEFAULT_EDITOR_ID); + createEReference(fileMappingEClass, FILE_MAPPING__EDITORS); + fileEditorEClass = createEClass(FILE_EDITOR); createEAttribute(fileEditorEClass, FILE_EDITOR__ID); @@ -3089,6 +3173,7 @@ public class SetupPackageImpl extends EPackageImpl implements SetupPackage targetPlatformTaskEClass.getESuperTypes().add(getSetupTask()); eclipsePreferenceTaskEClass.getESuperTypes().add(getSetupTask()); fileAssociationTaskEClass.getESuperTypes().add(getSetupTask()); + fileAssociationsTaskEClass.getESuperTypes().add(getSetupTask()); workingSetTaskEClass.getESuperTypes().add(getSetupTask()); resourceCopyTaskEClass.getESuperTypes().add(getSetupTask()); resourceCreationTaskEClass.getESuperTypes().add(getSetupTask()); @@ -3488,6 +3573,24 @@ public class SetupPackageImpl extends EPackageImpl implements SetupPackage FileAssociationTask.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(fileAssociationsTaskEClass, FileAssociationsTask.class, "FileAssociationsTask", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFileAssociationsTask_Mappings(), getFileMapping(), null, "mappings", null, 1, -1, + FileAssociationsTask.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(fileMappingEClass, FileMapping.class, "FileMapping", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFileMapping_FilePattern(), ecorePackage.getEString(), "filePattern", null, 1, 1, + FileMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + initEAttribute(getFileMapping_DefaultEditorID(), ecorePackage.getEString(), "defaultEditorID", null, 0, 1, + FileMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + initEReference(getFileMapping_Editors(), getFileEditor(), null, "editors", null, 0, -1, FileMapping.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEClass(fileEditorEClass, FileEditor.class, "FileEditor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getFileEditor_ID(), ecorePackage.getEString(), "iD", null, 1, 1, FileEditor.class, !IS_TRANSIENT, diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/util/SetupAdapterFactory.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/util/SetupAdapterFactory.java index b77975d40e..98b9736df1 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/util/SetupAdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/util/SetupAdapterFactory.java @@ -28,7 +28,9 @@ import org.eclipse.emf.cdo.releng.setup.Eclipse; import org.eclipse.emf.cdo.releng.setup.EclipseIniTask; import org.eclipse.emf.cdo.releng.setup.EclipsePreferenceTask; import org.eclipse.emf.cdo.releng.setup.FileAssociationTask; +import org.eclipse.emf.cdo.releng.setup.FileAssociationsTask; import org.eclipse.emf.cdo.releng.setup.FileEditor; +import org.eclipse.emf.cdo.releng.setup.FileMapping; import org.eclipse.emf.cdo.releng.setup.GitCloneTask; import org.eclipse.emf.cdo.releng.setup.Index; import org.eclipse.emf.cdo.releng.setup.InstallableUnit; @@ -385,6 +387,18 @@ public class SetupAdapterFactory extends AdapterFactoryImpl } @Override + public Adapter caseFileAssociationsTask(FileAssociationsTask object) + { + return createFileAssociationsTaskAdapter(); + } + + @Override + public Adapter caseFileMapping(FileMapping object) + { + return createFileMappingAdapter(); + } + + @Override public Adapter caseFileEditor(FileEditor object) { return createFileEditorAdapter(); @@ -982,6 +996,36 @@ public class SetupAdapterFactory extends AdapterFactoryImpl } /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.releng.setup.FileAssociationsTask <em>File Associations Task</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.setup.FileAssociationsTask + * @generated + */ + public Adapter createFileAssociationsTaskAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.releng.setup.FileMapping <em>File Mapping</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.setup.FileMapping + * @generated + */ + public Adapter createFileMappingAdapter() + { + return null; + } + + /** * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.releng.setup.FileEditor <em>File Editor</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.setup/src/org/eclipse/emf/cdo/releng/setup/util/SetupSwitch.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/util/SetupSwitch.java index e4f1929ef6..9a23c09fd6 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/util/SetupSwitch.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/util/SetupSwitch.java @@ -28,7 +28,9 @@ import org.eclipse.emf.cdo.releng.setup.Eclipse; import org.eclipse.emf.cdo.releng.setup.EclipseIniTask; import org.eclipse.emf.cdo.releng.setup.EclipsePreferenceTask; import org.eclipse.emf.cdo.releng.setup.FileAssociationTask; +import org.eclipse.emf.cdo.releng.setup.FileAssociationsTask; import org.eclipse.emf.cdo.releng.setup.FileEditor; +import org.eclipse.emf.cdo.releng.setup.FileMapping; import org.eclipse.emf.cdo.releng.setup.GitCloneTask; import org.eclipse.emf.cdo.releng.setup.Index; import org.eclipse.emf.cdo.releng.setup.InstallableUnit; @@ -712,6 +714,30 @@ public class SetupSwitch<T> extends Switch<T> } return result; } + case SetupPackage.FILE_ASSOCIATIONS_TASK: + { + FileAssociationsTask fileAssociationsTask = (FileAssociationsTask)theEObject; + T result = caseFileAssociationsTask(fileAssociationsTask); + if (result == null) + { + result = caseSetupTask(fileAssociationsTask); + } + if (result == null) + { + result = defaultCase(theEObject); + } + return result; + } + case SetupPackage.FILE_MAPPING: + { + FileMapping fileMapping = (FileMapping)theEObject; + T result = caseFileMapping(fileMapping); + if (result == null) + { + result = defaultCase(theEObject); + } + return result; + } case SetupPackage.FILE_EDITOR: { FileEditor fileEditor = (FileEditor)theEObject; @@ -1507,6 +1533,38 @@ public class SetupSwitch<T> extends Switch<T> } /** + * Returns the result of interpreting the object as an instance of '<em>File Associations Task</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>File Associations Task</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFileAssociationsTask(FileAssociationsTask object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>File Mapping</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>File Mapping</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFileMapping(FileMapping object) + { + return null; + } + + /** * Returns the result of interpreting the object as an instance of '<em>File Editor</em>'. * <!-- begin-user-doc --> * This implementation returns null; |