diff options
author | Eike Stepper | 2013-10-23 16:10:59 +0000 |
---|---|---|
committer | Eike Stepper | 2013-10-23 16:14:53 +0000 |
commit | b790187eb1dc7d56fa6e7bd064452959b0fc124f (patch) | |
tree | 8c063a741d012c960dfb867f717fec3937378312 | |
parent | 669f189e964c25e56a2aeff910a7c90e50316366 (diff) | |
download | cdo-b790187eb1dc7d56fa6e7bd064452959b0fc124f.tar.gz cdo-b790187eb1dc7d56fa6e7bd064452959b0fc124f.tar.xz cdo-b790187eb1dc7d56fa6e7bd064452959b0fc124f.zip |
Fix CompoundSetupTask
3 files changed, 35 insertions, 15 deletions
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 1eefcd5ce7..248215e37b 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 @@ -27,6 +27,7 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; +import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -54,15 +55,16 @@ public class CompoundSetupTaskItemProvider extends SetupTaskItemProvider impleme * This returns the property descriptors for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated + * @generated NOT */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + itemPropertyDescriptors = new ArrayList<IItemPropertyDescriptor>(); + addScopePropertyDescriptor(object); addNamePropertyDescriptor(object); } return itemPropertyDescriptors; diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/CompoundSetupTaskImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/CompoundSetupTaskImpl.java index 72fe19dfa6..438a5aecac 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/CompoundSetupTaskImpl.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/CompoundSetupTaskImpl.java @@ -129,7 +129,9 @@ public class CompoundSetupTaskImpl extends SetupTaskImpl implements CompoundSetu String oldName = name; name = newName; if (eNotificationRequired()) + { eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.COMPOUND_SETUP_TASK__NAME, oldName, name)); + } } /** @@ -277,7 +279,9 @@ public class CompoundSetupTaskImpl extends SetupTaskImpl implements CompoundSetu public String toString() { if (eIsProxy()) + { return super.toString(); + } StringBuffer result = new StringBuffer(super.toString()); result.append(" (name: "); @@ -289,26 +293,17 @@ public class CompoundSetupTaskImpl extends SetupTaskImpl implements CompoundSetu @Override public Object getOverrideToken() { - return createToken(getName()); + throw new UnsupportedOperationException(); } public boolean isNeeded(SetupTaskContext context) throws Exception { - boolean needed = false; - for (SetupTask setupTask : getSetupTasks()) - { - needed |= setupTask.isNeeded(context); - } - - return needed; + throw new UnsupportedOperationException(); } public void perform(SetupTaskContext context) throws Exception { - for (SetupTask setupTask : getSetupTasks()) - { - setupTask.perform(context); - } + throw new UnsupportedOperationException(); } } // CompoundSetupTaskImpl diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupImpl.java index b559eae17b..5637dc98c0 100644 --- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupImpl.java +++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/SetupImpl.java @@ -111,7 +111,9 @@ public class SetupImpl extends MinimalEObjectImpl.Container implements Setup if (branch != oldBranch) { if (eNotificationRequired()) + { eNotify(new ENotificationImpl(this, Notification.RESOLVE, SetupPackage.SETUP__BRANCH, oldBranch, branch)); + } } } return branch; @@ -137,7 +139,9 @@ public class SetupImpl extends MinimalEObjectImpl.Container implements Setup Branch oldBranch = branch; branch = newBranch; if (eNotificationRequired()) + { eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.SETUP__BRANCH, oldBranch, branch)); + } } /** @@ -154,8 +158,10 @@ public class SetupImpl extends MinimalEObjectImpl.Container implements Setup if (eclipseVersion != oldEclipseVersion) { if (eNotificationRequired()) + { eNotify(new ENotificationImpl(this, Notification.RESOLVE, SetupPackage.SETUP__ECLIPSE_VERSION, oldEclipseVersion, eclipseVersion)); + } } } return eclipseVersion; @@ -181,8 +187,10 @@ public class SetupImpl extends MinimalEObjectImpl.Container implements Setup EclipseVersion oldEclipseVersion = eclipseVersion; eclipseVersion = newEclipseVersion; if (eNotificationRequired()) + { eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.SETUP__ECLIPSE_VERSION, oldEclipseVersion, eclipseVersion)); + } } /** @@ -199,8 +207,10 @@ public class SetupImpl extends MinimalEObjectImpl.Container implements Setup if (preferences != oldPreferences) { if (eNotificationRequired()) + { eNotify(new ENotificationImpl(this, Notification.RESOLVE, SetupPackage.SETUP__PREFERENCES, oldPreferences, preferences)); + } } } return preferences; @@ -226,8 +236,10 @@ public class SetupImpl extends MinimalEObjectImpl.Container implements Setup Preferences oldPreferences = preferences; preferences = newPreferences; if (eNotificationRequired()) + { eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.SETUP__PREFERENCES, oldPreferences, preferences)); + } } /** @@ -262,7 +274,12 @@ public class SetupImpl extends MinimalEObjectImpl.Container implements Setup for (SetupTask setupTask : setupTaskContainer.getSetupTasks()) { - if (setupTask.getTriggers().contains(trigger)) + if (setupTask instanceof SetupTaskContainer) + { + SetupTaskContainer container = (SetupTaskContainer)setupTask; + getSetupTasks(filterRestrictions, trigger, setupTasks, container); + } + else if (setupTask.getTriggers().contains(trigger)) { EList<ConfigurableItem> restrictions = setupTask.getRestrictions(); if (!restrictions.isEmpty()) @@ -290,15 +307,21 @@ public class SetupImpl extends MinimalEObjectImpl.Container implements Setup { case SetupPackage.SETUP__BRANCH: if (resolve) + { return getBranch(); + } return basicGetBranch(); case SetupPackage.SETUP__ECLIPSE_VERSION: if (resolve) + { return getEclipseVersion(); + } return basicGetEclipseVersion(); case SetupPackage.SETUP__PREFERENCES: if (resolve) + { return getPreferences(); + } return basicGetPreferences(); } return super.eGet(featureID, resolve, coreType); |