Code regeneration and refactoring for UMA 1.0.5
diff --git a/1.5/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/configuration/MethodConfigurationItemProvider.java b/1.5/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/configuration/MethodConfigurationItemProvider.java
index f9f8e47..af05931 100644
--- a/1.5/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/configuration/MethodConfigurationItemProvider.java
+++ b/1.5/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/configuration/MethodConfigurationItemProvider.java
@@ -187,7 +187,7 @@
private IFilter uncategorizedToolMentorFilter = new IFilter() {
public boolean accept(Object obj) {
return obj instanceof ToolMentor
- && AssociationHelper.getTool((ToolMentor) obj) == null;
+ && AssociationHelper.getTools((ToolMentor) obj).isEmpty();
}
};
diff --git a/1.5/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationFilter.java b/1.5/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationFilter.java
index b25bf7a..fd49e09 100644
--- a/1.5/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationFilter.java
+++ b/1.5/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationFilter.java
@@ -360,7 +360,7 @@
return ( obj instanceof ToolMentor ) &&
ConfigurationHelper.calc0nFeatureValue(
(ToolMentor)obj,
- AssociationHelper.ToolMentor_Tool,
+ AssociationHelper.ToolMentor_Tools,
new DefaultElementRealizer(methodConfig)).isEmpty();
}
};
diff --git a/1.5/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/ToolMentorLayout.java b/1.5/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/ToolMentorLayout.java
index 4ac7f94..0ea4150 100644
--- a/1.5/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/ToolMentorLayout.java
+++ b/1.5/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/ToolMentorLayout.java
@@ -49,9 +49,9 @@
addReferences(AssociationHelper.ToolMentor_Tasks, elementXml, "contentElements", contentElements); //$NON-NLS-1$
MethodElement tool = ConfigurationHelper.calc01FeatureValue(
- super.element, AssociationHelper.ToolMentor_Tool,
+ super.element, AssociationHelper.ToolMentor_Tools,
layoutManager.getElementRealizer());
- addReference(AssociationHelper.ToolMentor_Tool, elementXml, "tool", tool); //$NON-NLS-1$
+ addReference(AssociationHelper.ToolMentor_Tools, elementXml, "tool", tool); //$NON-NLS-1$
}
return elementXml;
diff --git a/1.5/plugins/org.eclipse.epf.uma/src/org/eclipse/epf/uma/util/AssociationHelper.java b/1.5/plugins/org.eclipse.epf.uma/src/org/eclipse/epf/uma/util/AssociationHelper.java
index 186f39c..762e8a6 100644
--- a/1.5/plugins/org.eclipse.epf.uma/src/org/eclipse/epf/uma/util/AssociationHelper.java
+++ b/1.5/plugins/org.eclipse.epf.uma/src/org/eclipse/epf/uma/util/AssociationHelper.java
@@ -354,9 +354,9 @@
* An opposite feature used for retrieving the tool which a tool mentor is
* categorized under.
*/
- public static final OppositeFeature ToolMentor_Tool = new OppositeFeature(
+ public static final OppositeFeature ToolMentor_Tools = new OppositeFeature(
ToolMentor.class,
- "ToolMentor_Tool", UmaPackage.eINSTANCE.getTool_ToolMentors(), false); //$NON-NLS-1$
+ "ToolMentor_Tools", UmaPackage.eINSTANCE.getTool_ToolMentors(), true); //$NON-NLS-1$
/**
* An opposite feature used for retrieving the tasks which a tool mentor is
@@ -826,9 +826,9 @@
* a tool mentor
* @return a tool
*/
- public static Tool getTool(ToolMentor toolMentor) {
- return (Tool) ((MultiResourceEObject) toolMentor)
- .getOppositeFeatureValue(ToolMentor_Tool);
+ public static List<? extends ToolMentor> getTools(ToolMentor toolMentor) {
+ return (List<? extends ToolMentor>) ((MultiResourceEObject) toolMentor)
+ .getOppositeFeatureValue(ToolMentor_Tools);
}
/**