This commit was manufactured by cvs2svn to create branch 'R102T'.
diff --git a/org.eclipse.epf.authoring.ui/META-INF/MANIFEST.MF b/org.eclipse.epf.authoring.ui/META-INF/MANIFEST.MF
index be1fc93..a0807a5 100644
--- a/org.eclipse.epf.authoring.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.authoring.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.authoring.ui; singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Activator: org.eclipse.epf.authoring.ui.AuthoringUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/policies/DiagramLayoutEditPolicy.java b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/policies/DiagramLayoutEditPolicy.java
index fb9955f..c349dc8 100644
--- a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/policies/DiagramLayoutEditPolicy.java
+++ b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/policies/DiagramLayoutEditPolicy.java
@@ -16,6 +16,7 @@
import org.eclipse.draw2d.AbsoluteBendpoint;
import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.XYLayout;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.epf.authoring.gef.commands.ChangeBoundsCommand;
import org.eclipse.epf.authoring.gef.commands.ChangeHeightCommand;
@@ -26,6 +27,7 @@
import org.eclipse.epf.authoring.gef.edit.LinkEditPart;
import org.eclipse.epf.authoring.gef.edit.RoleTaskCompositeEditPart;
import org.eclipse.epf.authoring.gef.edit.WorkProductCompositeEditPart;
+import org.eclipse.epf.diagram.model.ActivityDetailDiagram;
import org.eclipse.epf.diagram.model.Diagram;
import org.eclipse.epf.diagram.model.Link;
import org.eclipse.epf.diagram.model.Node;
@@ -37,12 +39,17 @@
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy;
import org.eclipse.gef.editpolicies.ResizableEditPolicy;
import org.eclipse.gef.editpolicies.XYLayoutEditPolicy;
import org.eclipse.gef.requests.ChangeBoundsRequest;
import org.eclipse.gef.requests.CreateRequest;
/**
+ * An EditPolicy for use with <code>Figures</code> in {@link XYLayout} of diagram. The constraint for
+ * XYLayout is a {@link org.eclipse.draw2d.geometry.Rectangle}. Implements the changeconstraint, delete,
+ * resize commands of {@link ConstrainedLayoutEditPolicy}
+ *
* @author Phong Nguyen Le
* @since 1.0
*/
@@ -63,9 +70,12 @@
// special for ADD
EditPart parent = child.getParent();
if(parent instanceof ActivityDetailDiagramEditPart){
- GraphicalDataHelper.createProperty(((Node)parent.getModel()).getGraphNode(),
+ String autolayout = GraphicalDataHelper.getAutoLayoutFlag((ActivityDetailDiagram)(Node)parent.getModel());
+ if(autolayout != null){
+ GraphicalDataHelper.createProperty(((Node)parent.getModel()).getGraphNode(),
GraphicalDataHelper.PROP_AUTO_LAYOUT,
- GraphicalDataHelper.PROP_AUTO_LAYOUT_VALUE_FALSE);
+ GraphicalDataHelper.PROP_AUTO_LAYOUT_VALUE_FALSE);
+ }
}
Node node = (Node) child.getModel();
diff --git a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryLockingOperationRunner.java b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryLockingOperationRunner.java
index 784818f..da5b6ae 100644
--- a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryLockingOperationRunner.java
+++ b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryLockingOperationRunner.java
@@ -12,20 +12,24 @@
import java.lang.reflect.InvocationTargetException;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.persistence.util.LibrarySchedulingRule;
import org.eclipse.jface.operation.IRunnableContext;
import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
/**
* Runs operation that locks the library for the duration of its execution
*
- * @author Phong Nguyen Le - Aug 14, 2006
+ * @author Phong Nguyen Le
* @since 1.0
*/
public class LibraryLockingOperationRunner implements IRunnableContext {
@@ -35,33 +39,50 @@
public LibraryLockingOperationRunner() {
}
- private void doRun(final IRunnableWithProgress runnable, boolean workUnknown) throws InvocationTargetException,
+ private void doRun(final IRunnableWithProgress runnable, final boolean workUnknown) throws InvocationTargetException,
InterruptedException {
- IRunnableWithProgress _runnable;
- if(workUnknown) {
- _runnable = new IRunnableWithProgress() {
-
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- monitor.beginTask("", 2); //$NON-NLS-1$
- monitor.worked(1);
- try {
- runnable.run(monitor);
- monitor.worked(2);
- }
- finally {
- monitor.done();
- }
-
- }
-
- };
- }
- else {
- _runnable = runnable;
- }
- WorkspaceModifyDelegatingOperation op = new WorkspaceModifyDelegatingOperation(_runnable,
- new LibrarySchedulingRule(LibraryService.getInstance().getCurrentMethodLibrary()));
- op.run(getProgressMonitor());
+ final InvocationTargetException[] iteHolder = new InvocationTargetException[1];
+ try {
+ IWorkspaceRunnable workspaceRunnable = new IWorkspaceRunnable() {
+ public void run(IProgressMonitor pm) throws CoreException {
+ try {
+ if(workUnknown) {
+ pm.beginTask("", 2); //$NON-NLS-1$
+ pm.worked(1);
+ try {
+ runnable.run(pm);
+ pm.worked(2);
+ }
+ finally {
+ pm.done();
+ }
+ }
+ else {
+ runnable.run(pm);
+ }
+ } catch (InvocationTargetException e) {
+ // Pass it outside the workspace runnable
+ iteHolder[0] = e;
+ } catch (InterruptedException e) {
+ // Re-throw as OperationCanceledException, which will be
+ // caught and re-thrown as InterruptedException below.
+ throw new OperationCanceledException(e.getMessage());
+ }
+ // CoreException and OperationCanceledException are propagated
+ }
+ };
+ ResourcesPlugin.getWorkspace().run(workspaceRunnable,
+ new LibrarySchedulingRule(LibraryService.getInstance().getCurrentMethodLibrary()),
+ IWorkspace.AVOID_UPDATE, getProgressMonitor());
+ } catch (CoreException e) {
+ throw new InvocationTargetException(e);
+ } catch (OperationCanceledException e) {
+ throw new InterruptedException(e.getMessage());
+ }
+ // Re-throw the InvocationTargetException, if any occurred
+ if (iteHolder[0] != null) {
+ throw iteHolder[0];
+ }
}
/* (non-Javadoc)
diff --git a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/NewPluginAction.java b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/NewPluginAction.java
index fe6f0e3..9db81a4 100644
--- a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/NewPluginAction.java
+++ b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/NewPluginAction.java
@@ -42,6 +42,7 @@
* user selects the Finish button.
*
* @author Kelvin Low
+ * @author Phong Nguyen Le
* @since 1.0
*/
public class NewPluginAction extends Action implements
@@ -75,44 +76,13 @@
* @see org.eclipse.ui.IActionDelegate#run(IAction)
*/
public void run(IAction action) {
- execute(window.getWorkbench(), null);
+ run();
}
/**
* @see org.eclipse.jface.action.Action#run()
*/
public void run() {
- LibraryLockingOperationRunner runner = new LibraryLockingOperationRunner();
- runner.run(new IRunnableWithProgress() {
-
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- execute(PlatformUI.getWorkbench(), null);
- }
-
- });
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- }
-
- /**
- * Executes the action.
- *
- * @param workbench
- * The active workbench.
- * @param selection
- * The active selection.
- */
- public static void execute(IWorkbench workbench, ISelection selection) {
MethodLibrary targetLib = LibraryService.getInstance().getCurrentMethodLibrary();
if (targetLib == null) {
AuthoringUIPlugin.getDefault().getMsgDialog().displayError(
@@ -134,12 +104,46 @@
return;
}
+ final IWorkbench workbench = window != null ?
+ (window.getWorkbench() == null ? PlatformUI.getWorkbench() : window.getWorkbench())
+ : PlatformUI.getWorkbench();
+ LibraryLockingOperationRunner runner = new LibraryLockingOperationRunner();
+ runner.run(new IRunnableWithProgress() {
+
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ execute(workbench, null);
+ }
+
+ });
+ }
+
+ /**
+ * @see IWorkbenchWindowActionDelegate#selectionChanged(IAction, ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+ /**
+ * @see IWorkbenchWindowActionDelegate#dispose()
+ */
+ public void dispose() {
+ }
+
+ /**
+ * Executes the action.
+ *
+ * @param workbench
+ * The active workbench.
+ * @param selection
+ * The active selection.
+ */
+ public static void execute(IWorkbench workbench, ISelection selection) {
NewMethodPluginWizard wizard = new NewMethodPluginWizard();
if (selection instanceof IStructuredSelection || selection == null) {
wizard.init(workbench, (IStructuredSelection) selection);
}
- WizardDialog dialog = new WizardDialog(shell, wizard);
+ WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
dialog.create();
dialog.open();
diff --git a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/dialogs/MoveDialog.java b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/dialogs/MoveDialog.java
index 958116f..1e97262 100644
--- a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/dialogs/MoveDialog.java
+++ b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/dialogs/MoveDialog.java
@@ -25,6 +25,7 @@
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
+import org.eclipse.epf.authoring.ui.util.UIHelper;
import org.eclipse.epf.authoring.ui.views.ViewHelper;
import org.eclipse.epf.common.serviceability.MsgDialog;
import org.eclipse.epf.library.LibraryService;
@@ -34,6 +35,7 @@
import org.eclipse.epf.library.edit.command.MethodElementAddCommand.MoveOperation;
import org.eclipse.epf.library.edit.ui.UserInteractionHelper;
import org.eclipse.epf.library.edit.util.TngUtil;
+import org.eclipse.epf.uma.Artifact;
import org.eclipse.epf.uma.ContentCategory;
import org.eclipse.epf.uma.MethodElement;
import org.eclipse.jface.dialogs.Dialog;
@@ -284,6 +286,13 @@
// AuthoringUIPlugin.getDefault().getLogger().logError(ex);
// return false;
// }
+
+ // Sub Artifact circular check code
+ if(destination instanceof Artifact){
+ return UIHelper.checkCircularForArtifacts((Artifact)destination,
+ elements);
+ }
+
Command addCommand = AddCommand.create(editingDomain, destination,
null, elements);
diff --git a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/ProcessEditor.java b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/ProcessEditor.java
index 0a03ae8..c6997d0 100644
--- a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/ProcessEditor.java
+++ b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/ProcessEditor.java
@@ -2617,10 +2617,29 @@
ColumnDescriptor[] cols = toColumnDescriptors(getPreferenceStore().getString(
event.getProperty()));
page.updateColumns(cols);
- if (page == WBSTab) {
+ if (page == WBSTab || page == OBSTab) {
// update consolidated view as well
//
- procTab.updateColumns(cols);
+ // get WBS columns
+ List list = toColumnDescriptorList(getPreferenceStore()
+ .getString(ApplicationPreferenceConstants.PREF_WBS_COLUMNS));
+
+ // get TBS columns
+ ColumnDescriptor[] teamColumnDescriptors = toColumnDescriptors(getPreferenceStore()
+ .getString(ApplicationPreferenceConstants.PREF_TBS_COLUMNS));
+
+ // if TBS columns has TEAM column then add to consolidated view
+ for (int i = 0; i < teamColumnDescriptors.length; i++) {
+ ColumnDescriptor colDesc = teamColumnDescriptors[i];
+ if (colDesc == COL_DESC_TEAM) {
+ list.add(colDesc);
+ break;
+ }
+ }
+
+ ColumnDescriptor[] columns = new ColumnDescriptor[list.size()];
+ list.toArray(columns);
+ procTab.updateColumns(columns);
}
}
}
@@ -2870,9 +2889,31 @@
.setFilter(ProcessAuthoringConfigurator.INSTANCE);
}
procTab.setAdapterFactory(adapterFactory);
- columnDescriptors = toColumnDescriptors(store
+// columnDescriptors = toColumnDescriptors(store
+// .getString(ApplicationPreferenceConstants.PREF_WBS_COLUMNS));
+
+ // get WBS columns
+ List list = toColumnDescriptorList(store
.getString(ApplicationPreferenceConstants.PREF_WBS_COLUMNS));
- procTab.setColumnDescriptors(columnDescriptors);
+
+ // get TBS columns
+ ColumnDescriptor[] teamColumnDescriptors = toColumnDescriptors(store
+ .getString(ApplicationPreferenceConstants.PREF_TBS_COLUMNS));
+
+ // if TBS columns has TEAM column then add to consolidated view
+ for (int i = 0; i < teamColumnDescriptors.length; i++) {
+ ColumnDescriptor colDesc = teamColumnDescriptors[i];
+ if (colDesc == COL_DESC_TEAM) {
+ list.add(colDesc);
+ break;
+ }
+ }
+
+ ColumnDescriptor[] columns = new ColumnDescriptor[list.size()];
+ list.toArray(columns);
+
+
+ procTab.setColumnDescriptors(columns);
id = addPage(procTab.createControl(getContainer()));
setPageText(id, procTab.getTitle());
procTab.setTabIndex(id);
diff --git a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/util/UIHelper.java b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/util/UIHelper.java
index a6a2c23..952b0f9 100644
--- a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/util/UIHelper.java
+++ b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/util/UIHelper.java
@@ -12,6 +12,7 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashSet;
import java.util.Iterator;
import org.eclipse.core.runtime.OperationCanceledException;
@@ -32,6 +33,7 @@
import org.eclipse.epf.library.edit.validation.internal.ValidatorFactory;
import org.eclipse.epf.library.ui.LibraryUIText;
import org.eclipse.epf.uma.Activity;
+import org.eclipse.epf.uma.Artifact;
import org.eclipse.epf.uma.ContentElement;
import org.eclipse.epf.uma.Deliverable;
import org.eclipse.epf.uma.Guidance;
@@ -167,6 +169,73 @@
}
}
+ public static boolean checkCircularForArtifacts(Artifact destination,
+ Collection sourceElements) {
+ HashSet variantSet = new HashSet();
+ collectVariantSet(destination, variantSet, VariabilityType.REPLACES_LITERAL);
+ collectVariantSet(destination, variantSet, VariabilityType.EXTENDS_LITERAL);
+ if (! checkCircularForArtifacts1(destination, sourceElements, variantSet)) {
+ return false;
+ }
+ return checkCircularForArtifacts2(destination, sourceElements);
+ }
+
+ private static boolean checkCircularForArtifacts1(Artifact destination,
+ Collection sourceElements, HashSet variantSet) {
+ if (sourceElements == null) {
+ return true;
+ }
+ for (Iterator iter = sourceElements.iterator(); iter.hasNext();) {
+ Object obj = iter.next();
+ if(obj instanceof Artifact){
+ Artifact artifact = (Artifact) obj;
+ if (variantSet.contains(artifact)) {
+ return false;
+ }
+ if (! checkCircularForArtifacts1(destination, artifact.getContainedArtifacts(), variantSet)) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ private static boolean checkCircularForArtifacts2(Artifact destination,
+ Collection sourceElements) {
+ for (Iterator iter = sourceElements.iterator(); iter.hasNext();) {
+ Object obj = iter.next();
+ if (obj instanceof Artifact && sourceIsOrAboveMe((Artifact) obj, destination)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private static boolean sourceIsOrAboveMe(Artifact source, Artifact me) {
+ if (source == me) {
+ return true;
+ }
+ Object obj = me.getContainerArtifact();
+ if (obj instanceof Artifact && sourceIsOrAboveMe(source, (Artifact) obj)) {
+ return true;
+ }
+ obj = me.getVariabilityBasedOnElement();
+ if (obj instanceof Artifact && sourceIsOrAboveMe(source, (Artifact) obj)) {
+ return true;
+ }
+ return false;
+ }
+
+ //Collect all variants of "a" and "a"s ancestror Artifact objects
+ private static void collectVariantSet(Artifact a, HashSet variantSet, VariabilityType type) {
+ while (a != null) {
+ for (Iterator iter = TngUtil.getGeneralizers(a, type); iter.hasNext();) {
+ variantSet.add(iter.next());
+ }
+ a = a.getContainerArtifact();
+ }
+ }
+
/**
* @param oldGuidance
* @param newGuidance
diff --git a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/LibraryView.java b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/LibraryView.java
index fc02c8c..fd13b25 100644
--- a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/LibraryView.java
+++ b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/LibraryView.java
@@ -23,6 +23,7 @@
import java.util.Iterator;
import java.util.List;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
@@ -77,12 +78,14 @@
import org.eclipse.epf.common.serviceability.MsgBox;
import org.eclipse.epf.library.ILibraryManager;
import org.eclipse.epf.library.LibraryService;
+import org.eclipse.epf.library.LibraryServiceException;
import org.eclipse.epf.library.LibraryServiceUtil;
import org.eclipse.epf.library.edit.TngAdapterFactory;
import org.eclipse.epf.library.edit.ui.UserInteractionHelper;
import org.eclipse.epf.library.edit.util.TngUtil;
import org.eclipse.epf.library.edit.validation.IValidator;
import org.eclipse.epf.library.edit.validation.IValidatorFactory;
+import org.eclipse.epf.library.project.MethodLibraryProjectNature;
import org.eclipse.epf.library.services.SafeUpdateController;
import org.eclipse.epf.library.ui.LibraryUIManager;
import org.eclipse.epf.library.ui.dialogs.SwitchConfigDialog;
@@ -1438,6 +1441,25 @@
}
private void doRefresh(Shell shell) {
+ ArrayList movedResources = new ArrayList(RefreshJob.getInstance().getMovedResources());
+ if (!movedResources.isEmpty()) {
+ for (Iterator iter = movedResources.iterator();iter.hasNext();) {
+ Object o = iter.next();
+ if (o instanceof IProject) {
+ try {
+ if (((IProject)o).hasNature(MethodLibraryProjectNature.NATURE_ID)) {
+ // TODO: safe to assume XMI library?
+ XMILibraryUtil.openMethodLibrary(((IProject)o).getLocation().toString());
+ return;
+ }
+ } catch (LibraryServiceException e) {
+ AuthoringUIPlugin.getDefault().getLogger().logError(e);
+ } catch (CoreException e) {
+ AuthoringUIPlugin.getDefault().getLogger().logError(e);
+ }
+ }
+ }
+ }
final boolean refreshViews = !RefreshJob.getInstance().getReloadedBeforeRefreshResources().isEmpty()
|| !RefreshJob.getInstance().getAddedResources().isEmpty();
ArrayList removedResources = new ArrayList(RefreshJob.getInstance()
diff --git a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/wizards/NewMethodPluginWizard.java b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/wizards/NewMethodPluginWizard.java
index 4f7d50f..2ee5e95 100644
--- a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/wizards/NewMethodPluginWizard.java
+++ b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/wizards/NewMethodPluginWizard.java
@@ -112,13 +112,14 @@
return true;
} catch (Exception e) {
+ String reason = e.getMessage() != null ? e.getMessage() : AuthoringUIResources.newPluginError_reason;
AuthoringUIPlugin
.getDefault()
.getMsgDialog()
.displayError(
AuthoringUIResources.newPluginWizard_title, //$NON-NLS-1$
AuthoringUIResources.newPluginError_msg, //$NON-NLS-1$
- AuthoringUIResources.newPluginError_reason, //$NON-NLS-1$
+ reason,
e);
}
}
diff --git a/org.eclipse.epf.base.feature/feature.xml b/org.eclipse.epf.base.feature/feature.xml
index c0fb620..39e3e17 100644
--- a/org.eclipse.epf.base.feature/feature.xml
+++ b/org.eclipse.epf.base.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.epf.base"
label="%featureName"
- version="1.0.1"
+ version="1.0.2"
provider-name="%providerName"
image="rtFeatUpdate.gif">
@@ -26,14 +26,14 @@
id="org.eclipse.epf.authoring.ui"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.common"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="1.0.2"/>
<plugin
id="org.eclipse.epf.common.win32.win32.x86"
@@ -42,181 +42,181 @@
arch="x86"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.help.doc"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="1.0.2"/>
<plugin
id="org.eclipse.epf.library.ui"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.richtext"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="1.0.2"/>
<plugin
id="org.eclipse.epf.search"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.search.ui"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.publishing.ui"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.diagram"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.library.edit"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.library"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="1.0.2"/>
<plugin
id="org.eclipse.epf.library.xmi"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.library.persistence"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.publishing"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="1.0.2"/>
<plugin
id="org.eclipse.epf.uma"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.uma.ecore"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.uma.edit"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="1.0.2"/>
<plugin
id="org.eclipse.epf.export"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.import"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.rcp"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="1.0.2"/>
<plugin
id="org.eclipse.epf.base"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="1.0.2"/>
<plugin
id="org.eclipse.epf.export.msp"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="1.0.2"/>
<plugin
id="org.eclipse.epf.msproject"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.dataexchange"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.export.xml"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.import.xml"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.xml.uma"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
<plugin
id="org.eclipse.epf.publisher"
download-size="0"
install-size="0"
- version="0.0.0"
+ version="1.0.2"
unpack="false"/>
</feature>
diff --git a/org.eclipse.epf.base/about.properties b/org.eclipse.epf.base/about.properties
index 4a0c85f..c675c5b 100644
--- a/org.eclipse.epf.base/about.properties
+++ b/org.eclipse.epf.base/about.properties
@@ -27,8 +27,8 @@
featureText=EPF Base\n\
\n\
-Version: 1.0.1.00 \n\
-Build Label: 20061015_1635\n\
+Version: 1.0.2.00 \n\
+Build Label: 20070102-1705\n\
\n\
(c) Copyright Eclipse contributors and others 2004, 2006. All Rights Reserved.\n\
\n\
diff --git a/org.eclipse.epf.base/plugin.xml b/org.eclipse.epf.base/plugin.xml
index dfa7ac9..57ca23f 100644
--- a/org.eclipse.epf.base/plugin.xml
+++ b/org.eclipse.epf.base/plugin.xml
@@ -3,7 +3,7 @@
<plugin
id="org.eclipse.epf.base"
name="%featurePluginName"
- version="1.0.1"
+ version="1.0.2"
provider-name="%providerName">
</plugin>
diff --git a/org.eclipse.epf.common.win32.win32.x86/META-INF/MANIFEST.MF b/org.eclipse.epf.common.win32.win32.x86/META-INF/MANIFEST.MF
index 8f4a7ff..d86b0ba 100644
--- a/org.eclipse.epf.common.win32.win32.x86/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.common.win32.win32.x86/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.common.win32.win32.x86
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Localization: plugin
Require-Bundle: org.eclipse.swt
Bundle-Vendor: %providerName
diff --git a/org.eclipse.epf.common/META-INF/MANIFEST.MF b/org.eclipse.epf.common/META-INF/MANIFEST.MF
index b6f85a4..7188038 100644
--- a/org.eclipse.epf.common/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.common/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.common;singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-ClassPath: common.jar, lib/Tidy.jar
Bundle-Activator: org.eclipse.epf.common.CommonPlugin
Bundle-Vendor: %providerName
diff --git a/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/FileUtil.java b/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/FileUtil.java
index 0647fbf..603728f 100644
--- a/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/FileUtil.java
+++ b/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/FileUtil.java
@@ -759,6 +759,9 @@
FileOutputStream input = null;
FileLock lock = null;
+ if (!file.exists()) {
+ return false;
+ }
try {
input = new FileOutputStream(file);
FileChannel fileChannel = input.getChannel();
diff --git a/org.eclipse.epf.dataexchange/META-INF/MANIFEST.MF b/org.eclipse.epf.dataexchange/META-INF/MANIFEST.MF
index ee3f0dc..f45447e 100644
--- a/org.eclipse.epf.dataexchange/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.dataexchange/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.dataexchange
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.epf.library
diff --git a/org.eclipse.epf.diagram.model/META-INF/MANIFEST.MF b/org.eclipse.epf.diagram.model/META-INF/MANIFEST.MF
index 8c32d16..9e976fb 100644
--- a/org.eclipse.epf.diagram.model/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.diagram.model/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.diagram; singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.epf.library.edit,
diff --git a/org.eclipse.epf.diagram.model/src/org/eclipse/epf/diagram/model/impl/RoleTaskCompositeImpl.java b/org.eclipse.epf.diagram.model/src/org/eclipse/epf/diagram/model/impl/RoleTaskCompositeImpl.java
index c669a2c..c48549a 100644
--- a/org.eclipse.epf.diagram.model/src/org/eclipse/epf/diagram/model/impl/RoleTaskCompositeImpl.java
+++ b/org.eclipse.epf.diagram.model/src/org/eclipse/epf/diagram/model/impl/RoleTaskCompositeImpl.java
@@ -762,7 +762,24 @@
Collections.sort(taskNodes, comparator);
}
}else{
- for (Iterator iter = taskDescriptors.iterator(); iter.hasNext();) {
+ // Lame way of doing this, to fix a defect of 1.0 to 1.0.1 migration
+ List graphNodes = getUMADiagram().getContained();
+ List oldTaskDescriptors = new ArrayList();
+ for (Iterator iter = graphNodes.iterator(); iter.hasNext();) {
+ GraphNode element = (GraphNode) iter.next();
+ Object bridge = element.getSemanticModel();
+ if(bridge instanceof UMASemanticModelBridge){
+ Object taskObject = ((UMASemanticModelBridge)bridge).getElement();
+ List list = element.getList(UmaPackage.GRAPH_NODE__PROPERTY);
+ Property property = GraphicalDataHelper.getPropertyByKey(list,
+ GraphicalDataHelper.PROP_WORK_PRODUCT_COMPOSITE_TYPE);
+ if (taskDescriptors.contains(taskObject) && property == null) {
+ oldTaskDescriptors.add(taskObject);
+ }
+ }
+ }
+
+ for (Iterator iter = oldTaskDescriptors.iterator(); iter.hasNext();) {
TaskDescriptor taskDescriptor = (TaskDescriptor) iter.next();
// eliminate descriptor that is duplicate, suppressed or filtered out
diff --git a/org.eclipse.epf.diagram.model/src/org/eclipse/epf/diagram/model/impl/WorkProductCompositeImpl.java b/org.eclipse.epf.diagram.model/src/org/eclipse/epf/diagram/model/impl/WorkProductCompositeImpl.java
index 854b777..6ab65dd 100644
--- a/org.eclipse.epf.diagram.model/src/org/eclipse/epf/diagram/model/impl/WorkProductCompositeImpl.java
+++ b/org.eclipse.epf.diagram.model/src/org/eclipse/epf/diagram/model/impl/WorkProductCompositeImpl.java
@@ -413,7 +413,7 @@
// Set the Type information for workproduct composite.
if (type == TYPE_EDEFAULT) {
List list = graphNode.getList(UmaPackage.GRAPH_NODE__PROPERTY);
- Property property = getPropertyByKey(list,
+ Property property = GraphicalDataHelper.getPropertyByKey(list,
GraphicalDataHelper.PROP_WORK_PRODUCT_COMPOSITE_TYPE);
if (property != null) {
property.setValue(property.getValue());
@@ -421,7 +421,7 @@
}
} else {
List list = graphNode.getList(UmaPackage.GRAPH_NODE__PROPERTY);
- Property property = getPropertyByKey(list,
+ Property property = GraphicalDataHelper.getPropertyByKey(list,
GraphicalDataHelper.PROP_WORK_PRODUCT_COMPOSITE_TYPE);
if (property != null) {
property.setValue(new Integer(getType()).toString());
@@ -578,7 +578,7 @@
.getSemanticModel()).getElement()) {
List list = element.getList(UmaPackage.GRAPH_NODE__PROPERTY);
- Property property = getPropertyByKey(list,
+ Property property = GraphicalDataHelper.getPropertyByKey(list,
GraphicalDataHelper.PROP_WORK_PRODUCT_COMPOSITE_TYPE);
if (property != null) {
String typeString = property.getValue();
@@ -617,25 +617,9 @@
return graphNode;
}
- public Property getPropertyByKey(List list, String key) {
- if (!list.isEmpty()) {
- for (Iterator iror = list.iterator(); iror.hasNext();) {
- Property property = (Property) iror.next();
- if (property != null) {
- if (property.getKey().equals(key)) {
- return property;
- } else {
- return null;
- }
- }
- }
- }
- return null;
- }
-
public void setProperty(List list, String key, String value) {
- Property property = getPropertyByKey(list, key);
+ Property property = GraphicalDataHelper.getPropertyByKey(list, key);
if (property != null) {
property.setValue(value);
diff --git a/org.eclipse.epf.diagram.model/src/org/eclipse/epf/diagram/model/util/GraphicalDataHelper.java b/org.eclipse.epf.diagram.model/src/org/eclipse/epf/diagram/model/util/GraphicalDataHelper.java
index 5d1c9d1..55f6567 100644
--- a/org.eclipse.epf.diagram.model/src/org/eclipse/epf/diagram/model/util/GraphicalDataHelper.java
+++ b/org.eclipse.epf.diagram.model/src/org/eclipse/epf/diagram/model/util/GraphicalDataHelper.java
@@ -1063,4 +1063,25 @@
}
return 10;
}
+
+ /**
+ * @param list the list of {@link Property} objects
+ * @param key
+ * @return
+ */
+ public static Property getPropertyByKey(List list, String key) {
+ if (!list.isEmpty()) {
+ for (Iterator iror = list.iterator(); iror.hasNext();) {
+ Property property = (Property) iror.next();
+ if (property != null) {
+ if (property.getKey().equals(key)) {
+ return property;
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
}
diff --git a/org.eclipse.epf.export.msp/META-INF/MANIFEST.MF b/org.eclipse.epf.export.msp/META-INF/MANIFEST.MF
index 1c96e6c..f5b99d3 100644
--- a/org.eclipse.epf.export.msp/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.export.msp/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.export.msp; singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Activator: org.eclipse.epf.export.msp.ExportMSPPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
diff --git a/org.eclipse.epf.export.msp/src/org/eclipse/epf/export/msp/ExportMSPXMLService.java b/org.eclipse.epf.export.msp/src/org/eclipse/epf/export/msp/ExportMSPXMLService.java
index 5b5d306..bd7dccd 100644
--- a/org.eclipse.epf.export.msp/src/org/eclipse/epf/export/msp/ExportMSPXMLService.java
+++ b/org.eclipse.epf.export.msp/src/org/eclipse/epf/export/msp/ExportMSPXMLService.java
@@ -24,12 +24,17 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
+import java.util.Stack;
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.edit.provider.AdapterFactoryTreeIterator;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.epf.common.utils.XMLUtil;
import org.eclipse.epf.library.configuration.ConfigurationHelper;
@@ -37,11 +42,14 @@
import org.eclipse.epf.library.edit.TngAdapterFactory;
import org.eclipse.epf.library.edit.process.ActivityWrapperItemProvider;
import org.eclipse.epf.library.edit.process.BreakdownElementWrapperItemProvider;
+import org.eclipse.epf.library.edit.process.IBSItemProvider;
import org.eclipse.epf.library.edit.process.RoleDescriptorWrapperItemProvider;
import org.eclipse.epf.library.edit.process.TaskDescriptorWrapperItemProvider;
import org.eclipse.epf.library.edit.ui.UserInteractionHelper;
import org.eclipse.epf.library.edit.util.ConfigurableComposedAdapterFactory;
+import org.eclipse.epf.library.edit.util.PredecessorList;
import org.eclipse.epf.library.edit.util.ProcessUtil;
+import org.eclipse.epf.library.edit.util.Suppression;
import org.eclipse.epf.library.edit.util.TngUtil;
import org.eclipse.epf.library.util.ResourceHelper;
import org.eclipse.epf.msproject.Assignment;
@@ -60,6 +68,7 @@
import org.eclipse.epf.uma.CapabilityPattern;
import org.eclipse.epf.uma.DeliveryProcess;
import org.eclipse.epf.uma.DescribableElement;
+import org.eclipse.epf.uma.Descriptor;
import org.eclipse.epf.uma.MethodConfiguration;
import org.eclipse.epf.uma.MethodElement;
import org.eclipse.epf.uma.Milestone;
@@ -89,6 +98,8 @@
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=156959
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=157321
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=159230
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=162336
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=168801
*
*/
public class ExportMSPXMLService {
@@ -101,12 +112,13 @@
private HashMap rolesToUidMap = new HashMap();
- private HashMap wbsToUidMap = new HashMap();
-
- private HashMap taskToGuidMap = new HashMap();
-
- private HashMap predListMap = new HashMap();
-
+ private HashMap taskUidToWbsWapperPathMap = new HashMap();
+ private HashMap wbsWapperPathToLocalPredListMap = new HashMap();
+
+ private HashMap wbsGuidToTaskUidMap = new HashMap();
+
+ private HashMap wbsWrapperPathToPredListMap = new HashMap();
+
// The name of the content folder. This will be named after the context.
private String contentFolderName;
@@ -128,12 +140,34 @@
private MsprojectFactory projectFactory = MsprojectFactory.eINSTANCE;
+ // The process to be exported.
+ private Process process;
+
+ ConfigurableComposedAdapterFactory wbsAdapterFactory;
+
// The process configurator for filtering breakdown elements in a
// configuration.
private ProcessConfigurator breakdownElementFilter;
- private IStructuredContentProvider contentProvider;
+ private IStructuredContentProvider wbsContentProvider;
+ // Map processes to suppression objects.
+ private Map suppressionMap = new HashMap();
+
+ // The suppression object associated with the selected process to be
+ // exported.
+ private Suppression suppression;
+
+ // The WBS element paths.
+ private Stack elementPaths = new Stack();
+
+ private Object currentElement;
+ private String currentElementPath;
+ private PredecessorList currentPredList;
+
+ public ExportMSPXMLService() {
+ super();
+ }
/**
* Export a process to a Microsoft Project XML file.
*
@@ -310,10 +344,6 @@
// Sets the export options.
setExportOptions(exportOptions);
- // Get the suppression object for the process. Suppressed
- // breakdown elements will be exluded from the export.
- // suppression = new Suppression(process);
-
// Generate the Microsoft Project XML file.
// populate the project's attributes
project.setName(process.getName());
@@ -369,8 +399,8 @@
((ConfigurableComposedAdapterFactory) adapterFactory)
.setFilter(new ProcessConfigurator(config, null));
}
- IStructuredContentProvider contentProvider = new AdapterFactoryContentProvider(
- adapterFactory);
+ IStructuredContentProvider contentProvider = new AdapterFactoryContentProvider(adapterFactory);
+
List elements = process.getBreakdownElements();
if (elements.size() > 0) {
generateProjectResource(contentProvider,
@@ -514,23 +544,35 @@
*/
protected void generateProjectTasks(Process process,
MethodConfiguration config, Project project) throws Exception {
- ComposedAdapterFactory adapterFactory = null;
+// Save the reference to the exported process.
+ this.process = process;
+
+ wbsAdapterFactory = null;
try {
- adapterFactory = TngAdapterFactory.INSTANCE
+ // Add the suppression object associated with the process to be
+ // exported
+ // to the suppression map.
+ suppression = new Suppression(process);
+ suppressionMap.put(process, suppression);
+
+ wbsAdapterFactory = (ConfigurableComposedAdapterFactory)TngAdapterFactory.INSTANCE
.createWBSComposedAdapterFactory();
- if (adapterFactory instanceof ConfigurableComposedAdapterFactory) {
- breakdownElementFilter = new ProcessConfigurator(config, null);
- ((ConfigurableComposedAdapterFactory) adapterFactory)
- .setFilter(breakdownElementFilter);
- }
- contentProvider = new AdapterFactoryContentProvider(adapterFactory);
+ breakdownElementFilter = new ProcessConfigurator(config, null);
+ wbsAdapterFactory.setFilter(breakdownElementFilter);
+
+ wbsContentProvider = new AdapterFactoryContentProvider(wbsAdapterFactory);
+
+ // test
+// enumerateProcessPredecessorLists();
+
+ currentElement = process;
if (process instanceof CapabilityPattern) {
- generateProjectTask(contentProvider,
+ generateProjectTask(wbsContentProvider,
(BreakdownElement) process, 1, project);
} else {
List breakdownElements = process.getBreakdownElements();
if (breakdownElements.size() > 0) {
- generateProjectTask(contentProvider,
+ generateProjectTask(wbsContentProvider,
(BreakdownElement) process, 1, project);
}
}
@@ -538,12 +580,39 @@
e.printStackTrace();
throw e;
} finally {
- if (adapterFactory != null) {
- adapterFactory.dispose();
+ if (wbsAdapterFactory != null) {
+ wbsAdapterFactory.dispose();
+ }
+ if (suppressionMap != null) {
+ suppressionMap.clear();
+ suppressionMap = null;
+ }
+ if (wbsContentProvider != null) {
+ wbsContentProvider.dispose();
}
}
}
+ private void enumerateProcessPredecessorLists() {
+ // WBS tree
+ Iterator wbsTreeIterator = new AdapterFactoryTreeIterator(wbsAdapterFactory, process);
+ Object obj;
+ while(wbsTreeIterator.hasNext()) {
+ obj = wbsTreeIterator.next();
+ System.out.println("treeIterator: " + obj);
+ IBSItemProvider adapter = (IBSItemProvider) wbsAdapterFactory.adapt(obj,
+ ITreeItemContentProvider.class);
+ PredecessorList predList = adapter.getPredecessors();
+ for (Iterator iter = predList.iterator(); iter.hasNext();) {
+ IBSItemProvider e = (IBSItemProvider) iter.next();
+ System.out.println(" predList: " + e);
+ if (e instanceof ItemProviderAdapter) {
+ System.out.println(" unwrappedPredList: " + ((ItemProviderAdapter) e).getTarget());
+ }
+ }
+ }
+ }
+
/**
* Generates the Microsft Project task for a breakdown element.
*
@@ -556,8 +625,12 @@
*/
protected void generateProjectTask(
IStructuredContentProvider contentProvider,
- BreakdownElement breakdownElement, int taskOLevel, Project proj)
+ Object elementOrWrapper, int taskOLevel, Project proj)
throws Exception {
+
+ WorkBreakdownElement breakdownElement = (WorkBreakdownElement)TngUtil.unwrap(elementOrWrapper);
+
+ // not really neccessary here
if (breakdownElement instanceof WorkProductDescriptor
|| breakdownElement instanceof RoleDescriptor
|| breakdownElement.getSuppressed().booleanValue()
@@ -569,7 +642,7 @@
boolean isSubTasksPlanned = false;
if (exportOnlyPlannedElements && breakdownElement instanceof Activity
&& contentProvider != null) {
- Object[] elements = contentProvider.getElements(breakdownElement);
+ Object[] elements = contentProvider.getElements(elementOrWrapper);
for (int i = 0; i < elements.length; i++) {
Object element = elements[i];
if (element instanceof Activity) {
@@ -616,10 +689,13 @@
Task newTask = null;
if (!exportOnlyPlannedElements || exportOnlyPlannedElements
&& isPlannedTask) {
- newTask = addTask((WorkBreakdownElement) breakdownElement,
- taskOLevel, proj);
+ boolean suppressed = isSuppressed(breakdownElement);
+ if (!suppressed) {
+ newTask = addTask(elementOrWrapper, taskOLevel, proj);
+ }
}
+ // if export planned only wbs, then we need to do the role rollup calculation
if (exportOnlyPlannedElements && newTask != null
&& breakdownElement instanceof Activity
&& contentProvider != null && !isSubTasksPlanned) {
@@ -637,22 +713,77 @@
}
}
+ // export the next level wbs
if (contentProvider != null) {
- Object[] elements = contentProvider.getElements(breakdownElement);
- for (int i = 0; i < elements.length; i++) {
- Object element = elements[i];
- if (element instanceof BreakdownElementWrapperItemProvider) {
- BreakdownElementWrapperItemProvider provider = (BreakdownElementWrapperItemProvider) element;
- Object value = provider.getValue();
- generateProjectTask(contentProvider,
- (BreakdownElement) value, taskOLevel + 1, proj);
- } else if (element instanceof WorkBreakdownElement) {
- generateProjectTask(contentProvider,
- (WorkBreakdownElement) element, taskOLevel + 1,
- proj);
+ boolean suppressed = isSuppressed(breakdownElement);
+ if (!suppressed) {
+ elementPaths.push(breakdownElement.getGuid());
+ Object[] elements = contentProvider.getElements(elementOrWrapper);
+ for (int i = 0; i < elements.length; i++) {
+ Object element = elements[i];
+
+ // get the current elementOrWrapper and the hierarcal guid path to it
+ currentElement = element;
+ String[] paths = new String[elementPaths.size()];
+ elementPaths.toArray(paths);
+ StringBuffer pathStr = new StringBuffer();
+ for (int j = 0; j < paths.length; j++) {
+ pathStr.append(paths[j]+ ".");
+ }
+ if (currentElement instanceof BreakdownElementWrapperItemProvider) {
+ Object wrapped = TngUtil.unwrap(element);
+ pathStr.append(((BreakdownElement)wrapped).getGuid());
+ } else {
+ pathStr.append(((BreakdownElement)currentElement).getGuid());
+ }
+ currentElementPath = pathStr.toString();
+// if (debug) System.out.println(" path: " + currentElementPath);
+
+ generateProjectTask(contentProvider, element, taskOLevel + 1, proj);
}
+ generateLinks(process, proj);
+ elementPaths.pop();
}
}
+
+ }
+
+ /**
+ * Checks whether the given object is a suppressed work breakdown element in
+ * its owning process.
+ *
+ * @param object
+ * an object
+ * @return <ocde>true</code> if the object is a suppressed work breakdown
+ * element in its owning process.
+ */
+ protected boolean isSuppressed(Object object) {
+ if (object != null) {
+ if (object instanceof Descriptor) {
+ if (debug) System.out.println("Descriptor = " + ((Descriptor)object).getName());
+ }
+ Process owningProcess = TngUtil.getOwningProcess(object);
+ Suppression owningProcessSuppression = (Suppression) suppressionMap
+ .get(owningProcess);
+ if (owningProcessSuppression == null) {
+ owningProcessSuppression = new Suppression(owningProcess);
+ suppressionMap.put(owningProcess, owningProcessSuppression);
+ }
+ if (owningProcessSuppression.isSuppressed(object)) {
+ return true;
+ }
+ if (owningProcess != process
+ && object instanceof WorkBreakdownElement) {
+ elementPaths.push(((WorkBreakdownElement) object).getGuid());
+ String[] paths = new String[elementPaths.size()];
+ elementPaths.toArray(paths);
+ Object wrapper = suppression.getObjectByPath(paths,
+ wbsAdapterFactory);
+ elementPaths.pop();
+ return suppression.isSuppressed(wrapper);
+ }
+ }
+ return false;
}
/**
@@ -668,12 +799,15 @@
* @throws Exception
* if an error occurrs while performing the operation
*/
- protected Task addTask(WorkBreakdownElement element, int taskOLevel,
+ protected Task addTask(Object elementOrWrapper, int taskOLevel,
Project project) throws Exception {
- if (element == null) {
+
+ if (elementOrWrapper == null) {
return null;
}
+ WorkBreakdownElement element = (WorkBreakdownElement)TngUtil.unwrap(elementOrWrapper);
+
Task task = projectFactory.createTask();
task.setName(getDisplayName(element));
task.setOutlineLevel(BigInteger.valueOf(taskOLevel));
@@ -728,15 +862,42 @@
// aTask.setSummary(false);
// aTask.setConstraintType(new BigInteger("2"));
- // Store the task's predecessors.
- storeTaskPredecessors(element);
-
// Add the task to the Microsoft Project object.
project.getTasks().getTask().add(task);
- wbsToUidMap.put(element.getGuid(), BigInteger.valueOf(task_uid));
- taskToGuidMap.put(BigInteger.valueOf(task_uid), element.getGuid());
+ if (debug) {
+ System.out.println("$$$ theCurrent element: taskUid=" + task_uid + ", " + currentElement);
+ System.out.println(" path: " + currentElementPath);
+ }
+
+ // Store the task's local predecessors.
+ storeTaskPredecessors(element);
+
+ taskUidToWbsWapperPathMap.put(BigInteger.valueOf(task_uid), currentElementPath);
+ wbsGuidToTaskUidMap.put(element.getGuid(), BigInteger.valueOf(task_uid));
+ // get predecessors of a work breakdown element
+ IBSItemProvider adapter = (IBSItemProvider) wbsAdapterFactory.adapt(elementOrWrapper,
+ ITreeItemContentProvider.class);
+ PredecessorList currentPredList = adapter.getPredecessors();
+ List guidPredList = new ArrayList();
+ for (Iterator iter = currentPredList.iterator(); iter.hasNext();) {
+ Object e = (Object) iter.next();
+ if (debug) System.out.println(" wrapperPredListMember: " + e);
+ Object unwrappedE = TngUtil.unwrap(e);
+ if (unwrappedE instanceof WorkBreakdownElement) {
+ guidPredList.add(((WorkBreakdownElement)unwrappedE).getGuid());
+ if (debug) System.out.println(" unwrappedPredListMember: " + unwrappedE);
+ }
+ if (e instanceof ItemProviderAdapter) {
+ unwrappedE = ((ItemProviderAdapter) e).getTarget();
+ guidPredList.add(((BreakdownElement)unwrappedE).getGuid());
+ if (debug) System.out.println(" unwrappedPredListMember: " + unwrappedE);
+ }
+ }
+ wbsWrapperPathToPredListMap.put(currentElementPath, guidPredList);
+ if (debug) System.out.println(" __wrapperPredList: " + guidPredList);
+
task_uid++;
return task;
@@ -880,12 +1041,16 @@
if (element == null) {
return;
}
+
List predecessors = element.getLinkToPredecessor();
- ArrayList predList = new ArrayList();
+ List predList = new ArrayList();
if (predecessors != null && predecessors.size() > 0) {
for (Iterator i = predecessors.iterator(); i.hasNext();) {
WorkOrder workOrder = (WorkOrder) i.next();
BreakdownElement predecessor = workOrder.getPred();
+ if (debug) {
+ System.out.println(" localPredListMember: " + predecessor);
+ }
if (predecessor != null) {
String predGuid = predecessor.getGuid();
if (predGuid != null)
@@ -894,10 +1059,11 @@
}
}
if (debug) {
- System.out.println("$$$ predlist for " + element.getName() + " = "
+ System.out.println(" local predlist for " + element.getName() + " = "
+ predList.toString());
}
- predListMap.put(element.getGuid(), predList);
+
+ wbsWapperPathToLocalPredListMap.put(currentElementPath, predList);
}
protected void generateLinks(Process process, Project project)
@@ -909,19 +1075,31 @@
// skip the MS project hidden task with uid = 0
if (taskUid.intValue() == 0)
continue;
- String wbsGuid = (String) taskToGuidMap.get(taskUid);
- ArrayList predList = (ArrayList) predListMap.get(wbsGuid);
+
+ String wbsPathStr = (String) taskUidToWbsWapperPathMap.get(taskUid);
+
+// List predList = (ArrayList) wbsWapperPathToLocalPredListMap.get(wbsPathStr);
+ List predList = (ArrayList) wbsWrapperPathToPredListMap.get(wbsPathStr);
if (predList != null) {
+ List removeList = new ArrayList();
for (Iterator iterator = predList.iterator(); iterator
.hasNext();) {
String predGuid = (String) iterator.next();
- BigInteger predTaskUid = (BigInteger) wbsToUidMap
+ BigInteger predTaskUid = (BigInteger) wbsGuidToTaskUidMap
.get(predGuid);
if (predTaskUid == null
|| predTaskUid.intValue() == taskUid.intValue()) {
continue;
}
+
+ if (debug) {
+ System.out.println("$$$ taskUid = " + taskUid + ", wbsPathStr = " + wbsPathStr);
+ System.out.println(" localPredList: " + predList);
+ System.out.println(" found pred guid: " + predGuid);
+ }
+
+ removeList.add(predGuid);
PredecessorLink preLink = projectFactory
.createPredecessorLink();
@@ -932,6 +1110,7 @@
preLink.setLinkLag(new BigInteger("0")); //$NON-NLS-1$
preLink.setLagFormat(new BigInteger("7")); //$NON-NLS-1$
}
+ predList.removeAll(removeList);
}
}
}
diff --git a/org.eclipse.epf.export.xml/META-INF/MANIFEST.MF b/org.eclipse.epf.export.xml/META-INF/MANIFEST.MF
index eb7f726..df3e1ae 100644
--- a/org.eclipse.epf.export.xml/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.export.xml/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.export.xml;singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Activator: org.eclipse.epf.export.xml.ExportXMLPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.epf.export/META-INF/MANIFEST.MF b/org.eclipse.epf.export/META-INF/MANIFEST.MF
index 8d14bde..c52192c 100644
--- a/org.eclipse.epf.export/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.export/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.export; singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Activator: org.eclipse.epf.export.ExportPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.epf.export/src/org/eclipse/epf/export/services/ConfigurationExportService.java b/org.eclipse.epf.export/src/org/eclipse/epf/export/services/ConfigurationExportService.java
index 3a7d4a9..e2fba00 100644
--- a/org.eclipse.epf.export/src/org/eclipse/epf/export/services/ConfigurationExportService.java
+++ b/org.eclipse.epf.export/src/org/eclipse/epf/export/services/ConfigurationExportService.java
@@ -25,6 +25,7 @@
import org.eclipse.epf.library.LibraryServiceUtil;
import org.eclipse.epf.library.configuration.ConfigurationClosure;
import org.eclipse.epf.library.layout.LayoutResources;
+import org.eclipse.epf.library.project.MethodLibraryProject;
import org.eclipse.epf.library.util.LibraryUtil;
import org.eclipse.epf.persistence.refresh.RefreshJob;
import org.eclipse.epf.uma.MethodConfiguration;
@@ -167,6 +168,7 @@
if ( libMgr != null ) {
LibraryService.getInstance().removeLibraryManager(libMgr);
libMgr.closeMethodLibrary();
+ MethodLibraryProject.closeProject(filePath, null); //162123
libMgr.dispose();
}
@@ -199,6 +201,7 @@
if ( libMgr != null ) {
LibraryService.getInstance().removeLibraryManager(libMgr);
libMgr.closeMethodLibrary();
+ MethodLibraryProject.closeProject(filePath, null); //162123
libMgr.dispose();
}
return;
@@ -219,6 +222,7 @@
if ( libMgr != null ) {
LibraryService.getInstance().removeLibraryManager(libMgr);
libMgr.closeMethodLibrary();
+ MethodLibraryProject.closeProject(filePath, null); //162123
libMgr.dispose();
}
}
diff --git a/org.eclipse.epf.help.doc/plugin.xml b/org.eclipse.epf.help.doc/plugin.xml
index 7287ca0..d91e3c2 100644
--- a/org.eclipse.epf.help.doc/plugin.xml
+++ b/org.eclipse.epf.help.doc/plugin.xml
@@ -12,7 +12,7 @@
<plugin
id="org.eclipse.epf.help.doc"
name="%pluginName"
- version="1.0.1"
+ version="1.0.2"
provider-name="%providerName"
class="org.eclipse.epf.help.doc.DocPlugin">
diff --git a/org.eclipse.epf.import.xml/META-INF/MANIFEST.MF b/org.eclipse.epf.import.xml/META-INF/MANIFEST.MF
index 662f5f1..822e68d 100644
--- a/org.eclipse.epf.import.xml/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.import.xml/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.import.xml;singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Activator: org.eclipse.epf.importing.xml.ImportXMLPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.epf.import/META-INF/MANIFEST.MF b/org.eclipse.epf.import/META-INF/MANIFEST.MF
index 97814e7..fc1f392 100644
--- a/org.eclipse.epf.import/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.import/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.import; singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Activator: org.eclipse.epf.importing.ImportPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/ConfigurationImportService.java b/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/ConfigurationImportService.java
index 53fb753..8efb6c9 100644
--- a/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/ConfigurationImportService.java
+++ b/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/ConfigurationImportService.java
@@ -18,21 +18,27 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.epf.common.serviceability.VersionUtil;
+import org.eclipse.epf.common.utils.FileUtil;
import org.eclipse.epf.export.services.LibraryDocument;
+import org.eclipse.epf.export.services.PluginExportService;
import org.eclipse.epf.importing.ImportPlugin;
import org.eclipse.epf.importing.ImportResources;
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.library.edit.util.TngUtil;
import org.eclipse.epf.library.project.MethodLibraryProject;
import org.eclipse.epf.library.services.SafeUpdateController;
+import org.eclipse.epf.library.ui.LibraryUIManager;
import org.eclipse.epf.library.util.LibraryUtil;
import org.eclipse.epf.library.util.ResourceUtil;
+import org.eclipse.epf.persistence.migration.UpgradeCallerInfo;
import org.eclipse.epf.persistence.refresh.RefreshJob;
import org.eclipse.epf.uma.MethodElement;
import org.eclipse.epf.uma.MethodLibrary;
import org.eclipse.epf.uma.MethodPlugin;
import org.eclipse.osgi.util.NLS;
+import com.ibm.icu.util.Calendar;
+
/**
* Imports a library configuration.
@@ -42,6 +48,8 @@
*/
public class ConfigurationImportService {
+ private UpgradeCallerInfo upGradeInfo;
+
private ConfigurationImportData data;
LibraryDocument importingLibDoc = null;
@@ -50,11 +58,16 @@
ConfigSpecsImportManager specsMgr = null;
+ /**
+ * Creates a new instance.
+ */
public ConfigurationImportService(ConfigurationImportData data) {
this.data = data;
}
-
+ /**
+ * Analyzes the imported library with respect to the base library.
+ */
public void analyze(IProgressMonitor monitor) {
try {
if (monitor != null) {
@@ -69,9 +82,12 @@
path += File.separator + LibraryDocument.libraryFile;
}
File importingLibPath = new File(path);
+
+ boolean isLibraryFile = true;
if (!importingLibPath.exists()) {
importingLibPath = new File(importingLibPath.getParentFile(),
LibraryDocument.exportFile);
+ isLibraryFile = false;
}
if (!importingLibPath.exists()) {
@@ -82,13 +98,31 @@
return;
}
+ boolean handleVersion = isLibraryFile;
+ if (handleVersion) {
+ upGradeInfo = new ConfigurationImportService.UpgradeInfo(UpgradeCallerInfo.upgradeImportConfig, importingLibPath);
+ if (! handleToolVersion(importingLibPath, upGradeInfo)) {
+ data
+ .getErrorInfo()
+ .addError(
+ NLS.bind(ImportResources.ImportConfigurationWizard_ERR_Import_configuration, importingLibPath.getParent()));
+
+ return;
+ }
+ if (upGradeInfo.getCopiedLibFile() != null) {
+ importingLibPath = upGradeInfo.getCopiedLibFile();
+ }
+ }
+
importingLibDoc = new LibraryDocument(importingLibPath);
- String versionError = versionCheck(importingLibPath.getAbsolutePath(),
- ImportResources.importConfigWizard_title);
- if (versionError != null) {
- data.getErrorInfo().addError(versionError);
- return;
+ if (! handleVersion) {
+ String versionError = versionCheck(importingLibPath.getAbsolutePath(),
+ ImportResources.importConfigWizard_title);
+ if (versionError != null) {
+ data.getErrorInfo().addError(versionError);
+ return;
+ }
}
boolean isConfigSpecs = importingLibDoc.isConfigSpecsOnly();
@@ -101,6 +135,13 @@
data.specs = specsMgr.getConfigSpecs(importingLibDoc);
} else {
+ if (!isLibraryFile) {
+ data
+ .getErrorInfo()
+ .addError(
+ NLS.bind(ImportResources.ConfigurationImportService_MSG1, importingLibPath.getParent()));
+ return;
+ }
data.specs = null;
// Open the library and compare the difference.
@@ -149,22 +190,37 @@
}
+ /**
+ * Returns the import data.
+ */
public ConfigurationImportData getImportData() {
return data;
}
+ /**
+ * Returns spec only attribute.
+ */
public boolean isSpecsOnly() {
return (data.specs != null);
}
+ /**
+ * Returns the diff tree.
+ */
public ElementDiffTree getDiffTree() {
return diffMgr.getDiffTree();
}
+ /**
+ * Returns the import library.
+ */
public MethodLibrary getImportingLibrary() {
return diffMgr.getImportingLibrary();
}
+ /**
+ * Performs the import.
+ */
public void performImport(final IProgressMonitor monitor) {
// need to disable the workspace refreshing
@@ -199,7 +255,11 @@
// re-enable resource refreshing
//
RefreshJob.getInstance().setEnabled(true);
- }
+ }
+ if (upGradeInfo != null) {
+ upGradeInfo.removeCopiedLibrary();
+ upGradeInfo = null;
+ }
}
try {
@@ -211,6 +271,9 @@
}
}
+ /**
+ * Checks the tool version.
+ */
public static String versionCheck(final String xmlPath, final String title) {
final String[] ret = new String[1];
ret[0] = null;
@@ -247,6 +310,9 @@
return ret[0];
}
+ /**
+ * Fixes the imported library's system package guids with those base's.
+ */
public static void fixImportLibrarySystemPackageGUIDs(MethodLibrary baseLibrary, MethodLibrary importLibraty) {
HashMap pluginsMap = new HashMap();
List plugins = baseLibrary.getMethodPlugins();
@@ -295,4 +361,47 @@
}
}
+ public static boolean handleToolVersion(File libFile, final UpgradeCallerInfo info) {
+ final String libFolderPath = libFile.getParentFile().getAbsolutePath();
+ final boolean ret[] = new boolean[1];
+ SafeUpdateController.syncExec(new Runnable() {
+ public void run() {
+ ret[0] = LibraryUIManager.handleToolVersion(libFolderPath, info);
+ }
+ });
+ return ret[0];
+ }
+
+ public static class UpgradeInfo extends UpgradeCallerInfo {
+
+ public UpgradeInfo(int callerType, File libFile) {
+ super(callerType, libFile);
+ }
+
+ public void copyLibrary() {
+ String userHome = System.getProperty("user.home"); //$NON-NLS-1$
+ String desLibFolderPath = userHome + File.separator
+ + "EPF" + File.separator + "Export" + File.separator //$NON-NLS-1$ //$NON-NLS-2$
+ + Long.toHexString(Calendar.getInstance().getTimeInMillis()) + File.separator;
+ File desLibFolder = new File(desLibFolderPath);
+ if (!desLibFolder.exists()) {
+ desLibFolder.mkdirs();
+ } else {
+ FileUtil.deleteAllFiles(desLibFolder.getAbsolutePath());
+ }
+
+ PluginExportService.copyDir(getLibFile().getParentFile(), desLibFolder);
+ setCopiedLibFile(new File(desLibFolderPath + getLibFile().getName()));
+ }
+
+ public void removeCopiedLibrary() {
+ if (getCopiedLibFile() == null) {
+ return;
+ }
+ FileUtil.deleteAllFiles(getCopiedLibFile().getParentFile().getAbsolutePath());
+ getCopiedLibFile().getParentFile().delete();
+ setCopiedLibFile(null);
+ }
+ };
+
}
\ No newline at end of file
diff --git a/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/LibraryImportManager.java b/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/LibraryImportManager.java
index 71d565e..6eeecd2 100644
--- a/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/LibraryImportManager.java
+++ b/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/LibraryImportManager.java
@@ -291,14 +291,7 @@
// clear resources for deleted elements
deleteResoruces();
- final List modifiedFiles = getModifiedResources(baseLibrary);
- modifiedFiles.addAll(resScanner.getFilesTobeReplaced());
-
- SafeUpdateController.syncExec(new Runnable() {
- public void run() {
- fileCheckedOutStatus = FileModifyChecker.checkModify(modifiedFiles);
- }
- });
+ checkModifiedFiles();
if ( fileCheckedOutStatus.isOK() ) {
@@ -871,17 +864,26 @@
if (newObj instanceof MethodPlugin) {
MethodPlugin plugin = (MethodPlugin)newObj;
+ checkModifiedFiles();
+ error = ! fileCheckedOutStatus.isOK();
+
// don't intitialize the storage since this will recreate the global packages
// and such causing two set of global packages
// 145850 - Import Configuration: CP/DPs did not shown in authering
// ModelStorage.initialize(plugin);
// NO, since the global packages are already created
- ((MethodLibrary)owner).getMethodPlugins().add(plugin);
- LibraryUtil.saveLibrary((MethodLibrary)owner, false, false);
+ if (! error) {
+ ((MethodLibrary)owner).getMethodPlugins().add(plugin);
+ LibraryUtil.saveLibrary((MethodLibrary)owner, false, false);
+ }
} else if (newObj instanceof MethodConfiguration ) {
- ((MethodLibrary)owner).getPredefinedConfigurations().add(newObj);
- LibraryUtil.saveLibrary((MethodLibrary)owner, false, false);
+ checkModifiedFiles();
+ error = ! fileCheckedOutStatus.isOK();
+ if (! error) {
+ ((MethodLibrary)owner).getPredefinedConfigurations().add(newObj);
+ LibraryUtil.saveLibrary((MethodLibrary)owner, false, false);
+ }
} else {
error = true;
}
@@ -1481,5 +1483,16 @@
entryVal[1] = newName;
renameElementMap.put(element.getGuid(), entryVal);
}
+
+ private void checkModifiedFiles() {
+ final List modifiedFiles = getModifiedResources(baseLibrary);
+ modifiedFiles.addAll(resScanner.getFilesTobeReplaced());
+
+ SafeUpdateController.syncExec(new Runnable() {
+ public void run() {
+ fileCheckedOutStatus = FileModifyChecker.checkModify(modifiedFiles);
+ }
+ });
+ }
}
\ No newline at end of file
diff --git a/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/PluginImportingService.java b/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/PluginImportingService.java
index 4e0f18d..a440bd2 100644
--- a/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/PluginImportingService.java
+++ b/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/PluginImportingService.java
@@ -41,6 +41,7 @@
import org.eclipse.epf.library.util.ResourceHelper;
import org.eclipse.epf.library.util.ResourceUtil;
import org.eclipse.epf.persistence.MultiFileSaveUtil;
+import org.eclipse.epf.persistence.migration.UpgradeCallerInfo;
import org.eclipse.epf.persistence.refresh.RefreshJob;
import org.eclipse.epf.persistence.util.PersistenceUtil;
import org.eclipse.epf.resourcemanager.ResourceManager;
@@ -64,6 +65,8 @@
*/
public class PluginImportingService {
+ private UpgradeCallerInfo upGradeInfo;
+
//Temp flag indicating use of the new merge scheme
private static boolean newMergeScheme = true;
@@ -110,11 +113,26 @@
return;
}
- String versionError = ConfigurationImportService.versionCheck(importingLibPath.getAbsolutePath(),
- ImportResources.importPluginsWizard_title);
- if (versionError != null) {
- data.getErrorInfo().addError(versionError);
- return;
+ boolean handleVersion = true;
+ if (handleVersion) {
+ upGradeInfo = new ConfigurationImportService.UpgradeInfo(UpgradeCallerInfo.upgradeImportPlugin, importingLibPath);
+ if (! ConfigurationImportService.handleToolVersion(importingLibPath, upGradeInfo)) {
+ data
+ .getErrorInfo()
+ .addError(
+ NLS.bind(ImportResources.importPluginsWizard_ERR_Import_plugin, importingLibPath.toString()));
+ return;
+ }
+ if (upGradeInfo.getCopiedLibFile() != null) {
+ importingLibPath = upGradeInfo.getCopiedLibFile();
+ }
+ } else {
+ String versionError = ConfigurationImportService.versionCheck(importingLibPath.getAbsolutePath(),
+ ImportResources.importPluginsWizard_title);
+ if (versionError != null) {
+ data.getErrorInfo().addError(versionError);
+ return;
+ }
}
importingLibDoc = new LibraryDocument(importingLibPath);
@@ -131,6 +149,9 @@
}
+ /**
+ * Performs import.
+ */
public void performImport(IProgressMonitor monitor) throws Exception {
// need to disable the workspace refreshing
@@ -150,6 +171,10 @@
//
RefreshJob.getInstance().setEnabled(true);
}
+ if (upGradeInfo != null) {
+ upGradeInfo.removeCopiedLibrary();
+ upGradeInfo = null;
+ }
}
}
@@ -421,6 +446,9 @@
return true;
}
+ /**
+ * Copies directories from "fromDir" to "toDir".
+ */
public static void copyDir(File fromDir, File toDir) {
Copy cp = new Copy();
cp.setOverwrite(true);
@@ -467,6 +495,9 @@
// document.removeResourceEntries(removeList);
// }
+ /**
+ * Validates selection.
+ */
public String validateSelection() {
data.getErrorInfo().clear();
@@ -843,9 +874,10 @@
}
}
- private void buildConfigInfoFromFiles() {
- File importingLibPath = new File(data.llData.getParentFolder()
- + File.separator + LibraryDocument.exportFile);
+ private void buildConfigInfoFromFiles() {
+ File copiedLibPath = upGradeInfo == null ? null : upGradeInfo.getCopiedLibFile();
+ File importingLibPath = copiedLibPath == null ? new File(data.llData.getParentFolder()
+ + File.separator + LibraryDocument.exportFile) : copiedLibPath;
File configDir = new File(importingLibPath.getParent(), MultiFileSaveUtil.METHOD_CONFIGURATION_FOLDER_NAME);
LibraryDocument.ConfigDocVisitor visitor = new LibraryDocument.ConfigDocVisitor() {
diff --git a/org.eclipse.epf.library.edit/META-INF/MANIFEST.MF b/org.eclipse.epf.library.edit/META-INF/MANIFEST.MF
index a783506..8c6c741 100644
--- a/org.eclipse.epf.library.edit/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.library.edit/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.library.edit; singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-ClassPath: libedit.jar
Bundle-Activator: org.eclipse.epf.library.edit.LibraryEditPlugin
Bundle-Vendor: %providerName
diff --git a/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/IConfigurator.java b/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/IConfigurator.java
index 6ed937f..ad26c94 100644
--- a/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/IConfigurator.java
+++ b/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/IConfigurator.java
@@ -96,4 +96,19 @@
*/
public IFilter getUncategorizedToolMentorFilter();
+ /**
+ * get filter for disciplines and displine groupings
+ *
+ * @return IFilter
+ */
+ public IFilter getDisciplinesFilter();
+
+ /**
+ * get filter for rolesets and roleset groupings
+ *
+ * @return IFilter
+ */
+ public IFilter getRoleSetsFilter();
+
+
}
diff --git a/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/configuration/MethodConfigurationItemProvider.java b/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/configuration/MethodConfigurationItemProvider.java
index 5432212..0ad3902 100644
--- a/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/configuration/MethodConfigurationItemProvider.java
+++ b/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/configuration/MethodConfigurationItemProvider.java
@@ -50,6 +50,7 @@
* @author Phong Nguyen Le
* @author Shilpa Toraskar
* @author Kelvin Low
+ * @author Jinhua Xi
* @since 1.0
*/
public class MethodConfigurationItemProvider extends
@@ -61,7 +62,7 @@
// changed to protected, extended class can play with children variable.
protected ArrayList children;
- private static final IFilter disciplinesFilter = new IFilter() {
+ private IFilter disciplinesFilter = new IFilter() {
public boolean accept(Object obj) {
ContentCategory element = (ContentCategory) obj;
@@ -103,7 +104,7 @@
};
- private static final IFilter roleSetsFilter = new IFilter() {
+ private IFilter roleSetsFilter = new IFilter() {
public boolean accept(Object obj) {
// Browsing: With categories, replace generalization
@@ -405,6 +406,12 @@
wpTypeUncategorizedWorkProductFilter = configurator.getWpTypeUncategorizedWorkProductFilter();
uncategorizedRoleFilter = configurator.getUncategorizedRoleFilter();
uncategorizedToolMentorFilter = configurator.getUncategorizedToolMentorFilter();
+
+ // [Bug 162603] New: Replacing disciplines do appear inside their replaced elements discipline groupings as well as outside of the discipline grouping
+ // need to customize the filters for disciplines and rolesets
+ disciplinesFilter = configurator.getDisciplinesFilter();
+ roleSetsFilter = configurator.getRoleSetsFilter();
+
}
}
this.filter = filter;
diff --git a/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/command/CreateProcessComponentCommand.java b/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/command/CreateProcessComponentCommand.java
index 87d391a..431e773 100644
--- a/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/command/CreateProcessComponentCommand.java
+++ b/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/command/CreateProcessComponentCommand.java
@@ -13,6 +13,8 @@
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -20,7 +22,6 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
@@ -39,6 +40,7 @@
import org.eclipse.epf.uma.DeliveryProcess;
import org.eclipse.epf.uma.Element;
import org.eclipse.epf.uma.MethodConfiguration;
+import org.eclipse.epf.uma.MethodElement;
import org.eclipse.epf.uma.MethodLibrary;
import org.eclipse.epf.uma.MethodPackage;
import org.eclipse.epf.uma.MethodPlugin;
@@ -57,12 +59,12 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-
/**
* Executes the Create Process Component command.
*
* @author Phong Nguyen Le
* @author Kelvin Low
+ * @author Shilpa Toraskar
* @since 1.0
*/
public class CreateProcessComponentCommand extends CreateChildCommand {
@@ -77,6 +79,15 @@
ECLASSES.add(UmaPackage.eINSTANCE.getMethodPackage());
}
+ public class CompareByName implements Comparator {
+
+ public int compare(Object obj1, Object obj2) {
+ String name1 = ((MethodElement) obj1).getName();
+ String name2 = ((MethodElement) obj2).getName();
+ return name1.compareToIgnoreCase(name2);
+ }
+ }
+
/**
* Creates a new instance.
*/
@@ -92,9 +103,9 @@
public void execute() {
MethodLibrary lib = UmaUtil.getMethodLibrary(owner);
-
+
Shell shell = MsgBox.getDefaultShell();
-
+
// The owner must be updatable.
//
status = UserInteractionHelper.checkModify(owner, shell);
@@ -127,10 +138,13 @@
procClasses.add(DeliveryProcess.class);
procClasses.add(CapabilityPattern.class);
}
- MethodPlugin plugin = UmaUtil.getMethodPlugin((Element) owner);
+ MethodPlugin plugin = UmaUtil.getMethodPlugin((Element) owner);
List baseProcList = TngUtil.getAvailableBaseProcesses(plugin,
procClasses);
+ // sort by name
+ Collections.sort(methodConfigs, new CompareByName());
+
MethodConfiguration[] procCtxs = new MethodConfiguration[methodConfigs
.size()];
methodConfigs.toArray(procCtxs);
@@ -154,12 +168,9 @@
}
if (procComp.getProcess().getDefaultContext() == null) {
- LibraryEditPlugin
- .getDefault()
- .getMsgDialog()
- .displayError(
- LibraryEditResources.createProcess_text, //$NON-NLS-1$
- LibraryEditResources.noDefaultConfigError_msg); //$NON-NLS-1$
+ LibraryEditPlugin.getDefault().getMsgDialog().displayError(
+ LibraryEditResources.createProcess_text, //$NON-NLS-1$
+ LibraryEditResources.noDefaultConfigError_msg); //$NON-NLS-1$
} else {
String msg = IValidatorFactory.INSTANCE.createNameValidator(
owner, procComp).isValid(procComp.getName());
@@ -167,21 +178,21 @@
process = procComp.getProcess();
break;
} else {
- LibraryEditPlugin
- .getDefault()
- .getMsgDialog()
- .displayError(
- LibraryEditResources.createProcess_text, //$NON-NLS-1$
- msg);
+ LibraryEditPlugin.getDefault().getMsgDialog().displayError(
+ LibraryEditResources.createProcess_text, //$NON-NLS-1$
+ msg);
}
}
}
if (canExecute) {
- // create process component need to update the configuration that has been selected as
- // default context of its process. Check if the configuration file is updatable
+ // create process component need to update the configuration that
+ // has been selected as
+ // default context of its process. Check if the configuration file
+ // is updatable
//
- status = UserInteractionHelper.checkModify(procComp.getProcess().getDefaultContext(), shell);
+ status = UserInteractionHelper.checkModify(procComp.getProcess()
+ .getDefaultContext(), shell);
if (!status.isOK()) {
return;
}
@@ -198,9 +209,11 @@
}
final MethodConfiguration procCtx = process.getDefaultContext();
-
- // need to add the parent packages and plugin into the configuration as well
- // New process in new plug-in not automatically visible in configuration view
+
+ // need to add the parent packages and plugin into the configuration
+ // as well
+ // New process in new plug-in not automatically visible in
+ // configuration view
List pkgs = procCtx.getMethodPackageSelection();
for (EObject obj = procComp; obj != null; obj = obj.eContainer()) {
if (obj instanceof MethodPackage) {
@@ -208,7 +221,7 @@
}
}
procCtx.getMethodPluginSelection().add(plugin);
-
+
process.getValidContext().add(procCtx);
process.setPresentation(ContentDescriptionFactory
.createContentDescription(process));
@@ -241,17 +254,24 @@
LibraryEditPlugin.INSTANCE.log(ex);
LibraryEditPlugin.INSTANCE.log(e);
}
-// LibraryEditPlugin
-// .getDefault()
-// .getMsgDialog()
-// .displayError(
-// LibraryEditResources.createProcess_text, //$NON-NLS-1$
-// LibraryEditResources.createProcessError_msg, //$NON-NLS-1$
-// NLS.bind(LibraryEditResources.saveProcessError_reason, procComp.getName()),
-// e);
-
+ // LibraryEditPlugin
+ // .getDefault()
+ // .getMsgDialog()
+ // .displayError(
+ // LibraryEditResources.createProcess_text,
+ // //$NON-NLS-1$
+ // LibraryEditResources.createProcessError_msg,
+ // //$NON-NLS-1$
+ // NLS.bind(LibraryEditResources.saveProcessError_reason,
+ // procComp.getName()),
+ // e);
+
status = Status.CANCEL_STATUS;
- throw new MessageException(NLS.bind(LibraryEditResources.saveProcessError_reason, procComp.getName()), e);
+ throw new MessageException(
+ NLS
+ .bind(
+ LibraryEditResources.saveProcessError_reason,
+ procComp.getName()), e);
}
}
}
@@ -262,7 +282,8 @@
runnable,
MessageFormat
.format(
- LibraryEditResources.creatingProcessComponentTask_name, new Object[] { procComp.getName() })); //$NON-NLS-1$
+ LibraryEditResources.creatingProcessComponentTask_name,
+ new Object[] { procComp.getName() })); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/consolidated/ActivityItemProvider.java b/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/consolidated/ActivityItemProvider.java
index a062d12..94a904b 100644
--- a/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/consolidated/ActivityItemProvider.java
+++ b/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/consolidated/ActivityItemProvider.java
@@ -19,6 +19,7 @@
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.epf.library.edit.process.BSActivityItemProvider;
+import org.eclipse.epf.library.edit.util.Comparators;
import org.eclipse.epf.library.edit.util.ExposedAdapterFactory;
import org.eclipse.epf.library.edit.util.ProcessUtil;
import org.eclipse.epf.library.edit.util.TngUtil;
diff --git a/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/consolidated/RoleDescriptorItemProvider.java b/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/consolidated/RoleDescriptorItemProvider.java
index 6605f1c..5a48955 100644
--- a/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/consolidated/RoleDescriptorItemProvider.java
+++ b/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/consolidated/RoleDescriptorItemProvider.java
@@ -14,6 +14,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
@@ -27,6 +28,7 @@
import org.eclipse.epf.library.edit.process.BreakdownElementWrapperItemProvider;
import org.eclipse.epf.library.edit.process.IBSItemProvider;
import org.eclipse.epf.library.edit.process.IBreakdownElementWrapperItemProviderFactory;
+import org.eclipse.epf.library.edit.util.Comparators;
import org.eclipse.epf.library.edit.util.ProcessUtil;
import org.eclipse.epf.library.edit.util.TngUtil;
import org.eclipse.epf.uma.Process;
@@ -174,7 +176,7 @@
public Collection getChildren(Object obj) {
RoleDescriptor roleDesc = (RoleDescriptor) obj;
- Collection newChildren;
+ List newChildren;
// If roles has any of taskdescriptor linked then don't show any
// children otherwise show it's linked workproduct descriptor
@@ -200,6 +202,10 @@
}
}
}
+
+ // sort the children
+ Collections.sort(newChildren, Comparators.PRESENTATION_NAME_COMPARATOR);
+
updateCachedChildren(newChildren);
return newChildren;
}
diff --git a/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/consolidated/TaskDescriptorItemProvider.java b/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/consolidated/TaskDescriptorItemProvider.java
index 6fd18a2..4c1b618 100644
--- a/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/consolidated/TaskDescriptorItemProvider.java
+++ b/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/consolidated/TaskDescriptorItemProvider.java
@@ -26,9 +26,11 @@
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.emf.edit.provider.WrapperItemProvider;
import org.eclipse.epf.library.edit.IFilter;
+import org.eclipse.epf.library.edit.configuration.GuidanceItemProvider.CompareByName;
import org.eclipse.epf.library.edit.process.BreakdownElementWrapperItemProvider;
import org.eclipse.epf.library.edit.process.IBSItemProvider;
import org.eclipse.epf.library.edit.process.IBreakdownElementWrapperItemProviderFactory;
+import org.eclipse.epf.library.edit.util.Comparators;
import org.eclipse.epf.library.edit.util.ProcessUtil;
import org.eclipse.epf.library.edit.util.TngUtil;
import org.eclipse.epf.uma.Activity;
@@ -59,9 +61,7 @@
super(adapterFactory, delegateItemProvider);
}
- /*
- * (non-Javadoc)
- *
+ /**
* @see com.ibm.library.edit.process.BreakdownElementItemProvider#collectNewChildDescriptors(java.util.Collection,
* java.lang.Object)
*/
@@ -86,9 +86,11 @@
newChildDescriptors.add(createChildParameter(UmaPackage.eINSTANCE
.getTaskDescriptor_OptionalInput(), UmaFactory.eINSTANCE
.createWorkProductDescriptor()));
+
newChildDescriptors.add(createChildParameter(UmaPackage.eINSTANCE
.getTaskDescriptor_ExternalInput(), UmaFactory.eINSTANCE
.createWorkProductDescriptor()));
+
newChildDescriptors.add(createChildParameter(UmaPackage.eINSTANCE
.getTaskDescriptor_Output(), UmaFactory.eINSTANCE
.createWorkProductDescriptor()));
@@ -248,6 +250,13 @@
public Collection getChildren(Object obj) {
Collection children = super.getChildren(obj);
List newChildren = new ArrayList();
+ List primaryPerformers = new ArrayList();
+ List additionalPerformers = new ArrayList();
+ List assitedBy = new ArrayList();
+ List mandatoryInput = new ArrayList();
+ List externalInput = new ArrayList();
+ List optionalInput = new ArrayList();
+ List output = new ArrayList();
IFilter filter = getFilter(obj);
@@ -255,12 +264,61 @@
Object o = itor.next();
if (o instanceof WrapperItemProvider) {
Object child = ((WrapperItemProvider) o).getValue();
+
+
if ((filter != null) && (filter.accept(child))) {
- newChildren.add(o);
+ if (((WrapperItemProvider) o).getFeature().equals(
+ UmaPackage.eINSTANCE
+ .getTaskDescriptor_PerformedPrimarilyBy())) {
+ primaryPerformers.add(o);
+ } else if (((WrapperItemProvider) o)
+ .getFeature()
+ .equals(
+ UmaPackage.eINSTANCE
+ .getTaskDescriptor_AdditionallyPerformedBy())) {
+ additionalPerformers.add(o);
+ } else if (((WrapperItemProvider) o).getFeature()
+ .equals(
+ UmaPackage.eINSTANCE
+ .getTaskDescriptor_AssistedBy())) {
+ assitedBy.add(o);
+ } else if (((WrapperItemProvider) o).getFeature().equals(
+ UmaPackage.eINSTANCE
+ .getTaskDescriptor_MandatoryInput())) {
+ mandatoryInput.add(o);
+ } else if (((WrapperItemProvider) o).getFeature().equals(
+ UmaPackage.eINSTANCE
+ .getTaskDescriptor_ExternalInput())) {
+ externalInput.add(o);
+ } else if (((WrapperItemProvider) o).getFeature().equals(
+ UmaPackage.eINSTANCE
+ .getTaskDescriptor_OptionalInput())) {
+ optionalInput.add(o);
+ } else if (((WrapperItemProvider) o).getFeature().equals(
+ UmaPackage.eINSTANCE.getTaskDescriptor_Output())) {
+ output.add(o);
+ }
}
}
}
+ // sort for all children
+ Collections.sort(primaryPerformers, Comparators.PRESENTATION_NAME_COMPARATOR);
+ Collections.sort(additionalPerformers, Comparators.PRESENTATION_NAME_COMPARATOR);
+ Collections.sort(assitedBy, Comparators.PRESENTATION_NAME_COMPARATOR);
+ Collections.sort(externalInput, Comparators.PRESENTATION_NAME_COMPARATOR);
+ Collections.sort(mandatoryInput, Comparators.PRESENTATION_NAME_COMPARATOR);
+ Collections.sort(optionalInput, Comparators.PRESENTATION_NAME_COMPARATOR);
+ Collections.sort(output, Comparators.PRESENTATION_NAME_COMPARATOR);
+
+ newChildren.addAll(primaryPerformers);
+ newChildren.addAll(additionalPerformers);
+ newChildren.addAll(assitedBy);
+ newChildren.addAll(externalInput);
+ newChildren.addAll(mandatoryInput);
+ newChildren.addAll(optionalInput);
+ newChildren.addAll(output);
+
newChildren = removeSubartifactsFromChildren(newChildren, true);
updateCachedChildren(newChildren);
return newChildren;
diff --git a/org.eclipse.epf.library.persistence/META-INF/MANIFEST.MF b/org.eclipse.epf.library.persistence/META-INF/MANIFEST.MF
index ed31131..9e0a3fb 100644
--- a/org.eclipse.epf.library.persistence/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.library.persistence/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.library.persistence; singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.epf.common;visibility:=reexport,
diff --git a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/FileManager.java b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/FileManager.java
index d140329..c008b28 100644
--- a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/FileManager.java
+++ b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/FileManager.java
@@ -182,8 +182,11 @@
resource = workspaceRoot.getContainerForLocation(destPath);
}
if (resource.exists()) {
- throw new MultiFileIOException(NLS.bind(
- PersistenceResources.moveError_msg, oldPath, newPath));
+ resource.refreshLocal(IResource.DEPTH_ZERO, null);
+ if(resource.exists()) {
+ throw new MultiFileIOException(NLS.bind(
+ PersistenceResources.moveError_msg, oldPath, newPath));
+ }
}
ArrayList foldersToCreate = new ArrayList();
IContainer container;
diff --git a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileResourceSetImpl.java b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileResourceSetImpl.java
index c3bdcf0..617b1bd 100644
--- a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileResourceSetImpl.java
+++ b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileResourceSetImpl.java
@@ -943,25 +943,24 @@
// to go thru all the loaded objects to find proxies with
// unnormalized URIs and report them
//
- for (Iterator iter = getGuidToMethodElementMap().values()
- .iterator(); iter.hasNext();) {
- InternalEObject o = (InternalEObject) iter.next();
- if (o.eIsProxy() && o.eContainer() != null) {
- URI uri = o.eProxyURI();
- URI normalizedURI = getURIConverter().normalize(uri);
- if (normalizedURI == null) {
- // String msg =
- // NLS.bind(PersistenceResources.normalizeURIError_msg,
- // uri);
- // addMarker(new ResolveException(o, msg,
- // o.eContainer()));
-
- // this call will log error about unresolved proxy
- //
- ((InternalEObject) o.eContainer()).eResolveProxy(o);
+ try {
+ for (Iterator iter = new ArrayList(getGuidToMethodElementMap().values())
+ .iterator(); iter.hasNext();) {
+ InternalEObject o = (InternalEObject) iter.next();
+ if (o.eIsProxy() && o.eContainer() != null) {
+ URI uri = o.eProxyURI();
+ URI normalizedURI = getURIConverter().normalize(uri);
+ if (normalizedURI == null) {
+ // this call will log error about unresolved proxy
+ //
+ ((InternalEObject) o.eContainer()).eResolveProxy(o);
+ }
}
}
}
+ catch(Exception e) {
+ PersistencePlugin.getDefault().getLogger().logError(e);
+ }
if(MultiFileSaveUtil.DEBUG) {
System.out
@@ -1568,7 +1567,15 @@
MultiFileSaveUtil.adjustLocation(resource,
modifiedResources);
}
- saveModifiedResources(options);
+ Collection saved = saveModifiedResources(options);
+ if (saved != null) {
+ for (Iterator iter = saved.iterator(); iter.hasNext();) {
+ Resource resource = (Resource) iter.next();
+ if(resource instanceof MultiFileXMIResourceImpl) {
+ ((MultiFileXMIResourceImpl)resource).updateTimeStamps();
+ }
+ }
+ }
}
}
} catch (Exception exception) {
diff --git a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileSaveUtil.java b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileSaveUtil.java
index 3aaad11..3aca9bf 100644
--- a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileSaveUtil.java
+++ b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileSaveUtil.java
@@ -63,6 +63,8 @@
import com.ibm.icu.util.Calendar;
/**
+ * Utility class with static routines for XMI persistence
+ *
* @author Phong Nguyen Le
* @since 1.0
*/
@@ -73,6 +75,8 @@
public static final String DEFAULT_CONTENT_FILENAME = "content.xmi"; //$NON-NLS-1$
public static final String DEFAULT_LIBRARY_MODEL_FILENAME = "library.xmi"; //$NON-NLS-1$
+
+ public static final String DEFAULT_PLUGIN_EXPORT_FILENAME = "export.xmi"; //$NON-NLS-1$
public static final String DEFAULT_PLUGIN_MODEL_FILENAME = "plugin.xmi"; //$NON-NLS-1$
diff --git a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileXMIResourceImpl.java b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileXMIResourceImpl.java
index a884fcf..deeb93b 100644
--- a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileXMIResourceImpl.java
+++ b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileXMIResourceImpl.java
@@ -1033,7 +1033,7 @@
} else {
String msg = "FATAL ERROR: no ResourceDescriptor found in parent resource for " + this; //$NON-NLS-1$
CommonPlugin.INSTANCE.log(msg);
- System.err.println(msg);
+ //System.err.println(msg);
}
// refresh resolve URIs in ResourceDescriptors of the child
diff --git a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/IMigrator.java b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/IMigrator.java
index 5857d47..46611ac 100644
--- a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/IMigrator.java
+++ b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/IMigrator.java
@@ -21,5 +21,6 @@
public interface IMigrator {
void migrate(String libPath, IProgressMonitor monitor) throws Exception;
+ void migrate(String libPath, IProgressMonitor monitor, UpgradeCallerInfo info) throws Exception;
}
diff --git a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/MappingUtil.java b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/MappingUtil.java
index c7acd12..fd33a44 100644
--- a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/MappingUtil.java
+++ b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/MappingUtil.java
@@ -11,7 +11,9 @@
package org.eclipse.epf.persistence.migration;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
+import java.util.Set;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
@@ -24,11 +26,14 @@
import org.osgi.framework.Bundle;
/**
+ * Utility class with static convenience methods to perform library upgrade from
+ * older version.
+ *
* @author Phong Nguyen Le
* @since 1.0
*/
public final class MappingUtil {
-
+
private static class Migrator {
Bundle bundle;
@@ -52,31 +57,7 @@
}
private static Map migrators;
-
- // static {
- // Bundle bundle =
- // Platform.getBundle("org.eclipse.epf.library.persistence"); //$NON-NLS-1$
- // //IPath file = new Path("$nl$/migration/migrators.properties");
- // //$NON-NLS-1$
- // IPath file = new Path("/migration/migrators.properties"); //$NON-NLS-1$
- // InputStream is = null;
- // try {
- // is = FileLocator.openStream(bundle, file, false);
- // migrators.load(is);
- // }
- // catch(Exception e) {
- // CommonPlugin.INSTANCE.log(e);
- // }
- // finally {
- // if(is != null) {
- // try {
- // is.close();
- // } catch (IOException e) {
- // CommonPlugin.INSTANCE.log(e);
- // }
- // }
- // }
- // }
+ private static Set oldNsUris = new HashSet();
public static final IMigrator getMigrator(String libNsURI) {
if (migrators == null) {
@@ -133,21 +114,29 @@
return null;
}
- public static final boolean conversionRequired(String libPath) {
+ public synchronized static final boolean conversionRequired(String libPath) {
String currentNsURI = PersistenceUtil.getUMANsURI();
String libNsURI = PersistenceUtil.getUMANsURI(libPath);
+
+ if (oldNsUris.contains(libNsURI)) {
+ return true;
+ }
if (currentNsURI.equals(libNsURI)) {
return false;
}
- return getMigrator(libNsURI) != null;
+ boolean ret = getMigrator(libNsURI) != null;
+ if (ret) {
+ oldNsUris.add(libNsURI);
+ }
+ return ret;
}
- public static void migrate(String libPath, IProgressMonitor monitor)
+ public static void migrate(String libPath, IProgressMonitor monitor, UpgradeCallerInfo info)
throws Exception {
String nsURI = PersistenceUtil.getUMANsURI(libPath);
IMigrator migrator = getMigrator(nsURI);
if (migrator != null) {
- migrator.migrate(libPath, monitor);
+ migrator.migrate(libPath, monitor, info);
}
}
@@ -156,7 +145,7 @@
System.out
.println("Start migrating method library at '" + libPath + "'..."); //$NON-NLS-1$ //$NON-NLS-2$
try {
- migrate(libPath, null);
+ migrate(libPath, null, null);
System.out.println();
System.out.println("Migration successfull."); //$NON-NLS-1$
} catch (Exception e) {
diff --git a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/MigrationResourceHandler.java b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/MigrationResourceHandler.java
new file mode 100644
index 0000000..b2c38f1
--- /dev/null
+++ b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/MigrationResourceHandler.java
@@ -0,0 +1,152 @@
+//------------------------------------------------------------------------------
+// Copyright (c) 2005, 2006 IBM Corporation and others.
+// All rights reserved. This program and the accompanying materials
+// are made available under the terms of the Eclipse Public License v1.0
+// which accompanies this distribution, and is available at
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Contributors:
+// IBM Corporation - initial implementation
+//------------------------------------------------------------------------------
+package org.eclipse.epf.persistence.migration;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.FeatureMap;
+import org.eclipse.emf.ecore.util.FeatureMap.Entry;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.impl.BasicResourceHandler;
+import org.eclipse.emf.ecore.xml.type.AnyType;
+
+/**
+ * Resource handler for migrating UMA library from one version to another.
+ *
+ * @author Phong Nguyen Le
+ * @since 1.0
+ */
+public abstract class MigrationResourceHandler extends BasicResourceHandler {
+
+ private static final boolean DEBUG = true;
+
+ public MigrationResourceHandler() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.emf.ecore.xmi.impl.BasicResourceHandler#postLoad(org.eclipse.emf.ecore.xmi.XMLResource,
+ * java.io.InputStream, java.util.Map)
+ */
+ public void postLoad(XMLResource resource, InputStream inputStream,
+ Map options) {
+ if (!resource.getEObjectToExtensionMap().isEmpty()) {
+ if (DEBUG) {
+ System.out
+ .println("MigrationResourceHandler.postLoad(): " + resource.getURI()); //$NON-NLS-1$
+ System.out.println("---- Start unknown features ----"); //$NON-NLS-1$
+ }
+ for (Iterator iter = resource.getEObjectToExtensionMap().entrySet()
+ .iterator(); iter.hasNext();) {
+ Map.Entry entry = (Map.Entry) iter.next();
+ if (entry.getKey() instanceof EObject) {
+ // handle moved data
+ //
+ handleUnknownData((EObject) entry.getKey(), (AnyType)entry.getValue());
+ }
+ }
+ if (DEBUG)
+ System.out.println("---- End unknown features ----"); //$NON-NLS-1$
+ }
+ }
+
+ public static String getText(AnyType value) {
+ try {
+ if (value == null)
+ return null;
+ FeatureMap.Entry entry = (FeatureMap.Entry) value.getMixed().get(0);
+ return (String) entry.getValue();
+ } catch (RuntimeException e) {
+ throw e;
+ }
+ }
+
+ protected static EAttribute getEAttribute(EClass eClass, String name) {
+ for (Iterator iterator = eClass.getEAllAttributes().iterator(); iterator
+ .hasNext();) {
+ EAttribute attrib = (EAttribute) iterator.next();
+ if (attrib.getName().equals(name)) {
+ return attrib;
+ }
+ }
+ return null;
+ }
+
+ public static void setValue(EObject eObject, EStructuralFeature feature,
+ Object value) {
+ if (!feature.isMany()) {
+ eObject.eSet(feature, value);
+ } else {
+ Collection values = (Collection) eObject.eGet(feature);
+ if (value instanceof Collection) {
+ values.addAll((Collection) value);
+ } else {
+ values.add(value);
+ }
+ }
+
+ }
+
+ protected abstract boolean handleUnknownFeature(EObject owner, EStructuralFeature feature, Object value);
+
+ private void handleUnknownFeatures(EObject owner, FeatureMap featureMap) {
+ for (Iterator iter = featureMap.iterator(); iter.hasNext();) {
+ FeatureMap.Entry entry = (FeatureMap.Entry) iter.next();
+ EStructuralFeature f = entry.getEStructuralFeature();
+ if(handleUnknownFeature(owner, f, entry.getValue())) {
+ iter.remove();
+ }
+ }
+ }
+
+ /**
+ * @param key
+ * @param value
+ */
+ protected void handleUnknownData(EObject e, AnyType unknownData) {
+ handleUnknownFeatures(e, unknownData.getMixed());
+ handleUnknownFeatures(e, unknownData.getAnyAttribute());
+ }
+
+
+ public static Object getSingleValue(FeatureMap featureMap,
+ String featureName) {
+ for (Iterator iter = featureMap.iterator(); iter.hasNext();) {
+ FeatureMap.Entry entry = (Entry) iter.next();
+ if (entry.getEStructuralFeature().getName().equals(featureName)) {
+ return entry.getValue();
+ }
+ }
+ return null;
+ }
+
+ protected static Collection getValue(FeatureMap featureMap,
+ String featureName) {
+ Collection list = new ArrayList();
+ for (Iterator iter = featureMap.iterator(); iter.hasNext();) {
+ FeatureMap.Entry entry = (Entry) iter.next();
+ if (entry.getEStructuralFeature().getName().equals(featureName)) {
+ list.add(entry.getValue());
+ }
+ }
+ return list;
+ }
+
+}
diff --git a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/UMA2UMAResourceHandler.java b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/UMA2UMAResourceHandler.java
index dc2a998..1425d1b 100644
--- a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/UMA2UMAResourceHandler.java
+++ b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/UMA2UMAResourceHandler.java
@@ -10,40 +10,18 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.persistence.migration;
-import java.io.InputStream;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.FeatureMap.Entry;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.eclipse.emf.ecore.xmi.impl.BasicResourceHandler;
import org.eclipse.emf.ecore.xml.type.AnyType;
-import org.eclipse.epf.persistence.MultiFileResourceSetImpl;
-import org.eclipse.epf.uma.Activity;
-import org.eclipse.epf.uma.ContentDescription;
-import org.eclipse.epf.uma.ContentPackage;
-import org.eclipse.epf.uma.DescribableElement;
-import org.eclipse.epf.uma.ProcessElement;
-import org.eclipse.epf.uma.ProcessPackage;
-import org.eclipse.epf.uma.UmaFactory;
-import org.eclipse.epf.uma.UmaPackage;
-import org.eclipse.epf.uma.WorkBreakdownElement;
-import org.eclipse.epf.uma.WorkOrder;
-import org.eclipse.epf.uma.WorkOrderType;
/**
* Resource handler for migrating UMA library from one version to another.
@@ -51,94 +29,14 @@
* @author Phong Nguyen Le
* @since 1.0
*/
-public class UMA2UMAResourceHandler extends BasicResourceHandler {
+public class UMA2UMAResourceHandler extends MigrationResourceHandler {
private static final boolean DEBUG = true;
private List moveInfos;
- private Set procMovedFeatureNames;
-
- private Map guidToPresentationMap;
-
- private Set classNamesToSavePresentationURI;
-
public UMA2UMAResourceHandler() {
moveInfos = new ArrayList();
-
- guidToPresentationMap = new HashMap();
-
- procMovedFeatureNames = new HashSet(Arrays.asList(new String[] {
- "purpose" //$NON-NLS-1$
- , "keyConsiderations" //$NON-NLS-1$
- , "alternatives" //$NON-NLS-1$
- , "howtoStaff" //$NON-NLS-1$
- , "usageGuidance" //$NON-NLS-1$
- , "externalId" //$NON-NLS-1$
- , "scope" //$NON-NLS-1$
- , "usageNotes" //$NON-NLS-1$
- , "scale" //$NON-NLS-1$
- , "projectCharacteristics" //$NON-NLS-1$
- , "riskLevel" //$NON-NLS-1$
- , "estimatingTechnique" //$NON-NLS-1$
- , "projectMemberExpertise" //$NON-NLS-1$
- , "typeOfContract" //$NON-NLS-1$
- , "techniques" //$NON-NLS-1$
- , "mainDescription" //$NON-NLS-1$
- }));
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.impl.BasicResourceHandler#postLoad(org.eclipse.emf.ecore.xmi.XMLResource,
- * java.io.InputStream, java.util.Map)
- */
- public void postLoad(XMLResource resource, InputStream inputStream,
- Map options) {
- if (!resource.getEObjectToExtensionMap().isEmpty()) {
- if (DEBUG) {
- System.out
- .println("UMA2UMAResourceHandler.postLoad(): " + resource.getURI()); //$NON-NLS-1$
- System.out.println("---- Start unknown features ----"); //$NON-NLS-1$
- }
- // System.out.println(resource.getEObjectToExtensionMap());
- for (Iterator iter = resource.getEObjectToExtensionMap().entrySet()
- .iterator(); iter.hasNext();) {
- Map.Entry entry = (Map.Entry) iter.next();
- if (entry.getKey() instanceof EObject) {
- // handle moved data
- //
- handleMovedData((EObject) entry.getKey(), entry.getValue());
- }
-
- // String str;
- // if(entry.getKey() instanceof MethodElement) {
- // MethodElement e = (MethodElement)entry.getKey();
- // str = e.getGuid() + " - " + e.getName() + "(" +
- // e.getClass().getName() + ")";
- // }
- // else {
- // str = entry.getKey().toString();
- // }
- // str += " = " + entry.getValue();
- // System.out.println(str);
- }
- if (DEBUG)
- System.out.println("---- End unknown features ----"); //$NON-NLS-1$
- }
- }
-
- private static String getText(AnyType value) {
- try {
- if (value == null)
- return null;
- FeatureMap.Entry entry = (FeatureMap.Entry) value.getMixed().get(0);
- return (String) entry.getValue();
- } catch (RuntimeException e) {
- throw e;
- }
}
protected static EAttribute getEAttribute(EClass eClass, String name) {
@@ -160,23 +58,6 @@
* @return
*/
protected EStructuralFeature getNewFeature(EObject owner, String featureName) {
- if ("presentationName".equals(featureName) && owner instanceof ContentDescription) { //$NON-NLS-1$
- return UmaPackage.eINSTANCE
- .getDescribableElement_PresentationName();
- }
- if (procMovedFeatureNames.contains(featureName)) {
- if (owner instanceof ProcessElement) {
- ContentDescription content = ((ProcessElement) owner)
- .getPresentation();
- EAttribute attrib = getEAttribute(content.eClass(), featureName);
- if (attrib != null) {
- return attrib;
- }
- }
- }
- if ("WorkOrder".equals(featureName) && owner instanceof ProcessPackage) { //$NON-NLS-1$
- return UmaPackage.eINSTANCE.getProcessPackage_ProcessElements();
- }
return null;
}
@@ -188,46 +69,12 @@
* @return
*/
protected EObject getNewOwner(EObject oldOwner, String featureName) {
- if ("presentationName".equals(featureName) && oldOwner instanceof ContentDescription) { //$NON-NLS-1$
- DescribableElement de = ((DescribableElement) oldOwner.eContainer());
- if (de instanceof Activity) {
- return null;
- }
- return de;
- }
- if (procMovedFeatureNames.contains(featureName)
- && oldOwner instanceof ProcessElement) {
- return ((ProcessElement) oldOwner).getPresentation();
- }
- if ("WorkOrder".equals(featureName) && oldOwner instanceof ProcessPackage) { //$NON-NLS-1$
- return oldOwner;
- }
-
return null;
}
protected Object getNewValue(EObject oldOwner, String featureName,
AnyType value) {
- if ("WorkOrder".equals(featureName) && oldOwner instanceof ProcessPackage) { //$NON-NLS-1$
- WorkOrder workOrder = UmaFactory.eINSTANCE.createWorkOrder();
- workOrder.setGuid((String) getSingleValue(value.getAnyAttribute(),
- "guid")); //$NON-NLS-1$
- String predGuid = (String) getSingleValue(value.getAnyAttribute(),
- "pred"); //$NON-NLS-1$
- if (predGuid == null) {
- InternalEObject obj = (InternalEObject) getSingleValue(value
- .getMixed(), "pred"); //$NON-NLS-1$
- predGuid = obj.eProxyURI().authority();
- }
- MultiFileResourceSetImpl resourceSet = (MultiFileResourceSetImpl) oldOwner
- .eResource().getResourceSet();
- WorkBreakdownElement pred = (WorkBreakdownElement) resourceSet
- .getEObject(predGuid);
- workOrder.setPred(pred);
- workOrder.setLinkType(WorkOrderType.FINISH_TO_FINISH_LITERAL);
- return workOrder;
- }
- return getText(value);
+ return null;
}
public void moveData() {
@@ -280,71 +127,6 @@
}
}
- private void handleMovedData(EObject owner, FeatureMap featureMap) {
- for (Iterator iter = featureMap.iterator(); iter.hasNext();) {
- FeatureMap.Entry entry = (FeatureMap.Entry) iter.next();
- EStructuralFeature f = entry.getEStructuralFeature();
- EStructuralFeature newFeature = getNewFeature(owner, f.getName());
- // System.out.println("UMA2UMAResourceHandler.handleMovedData():");
- // System.out.println(" feature: " + f.getName());
- // System.out.println(" owner: " + owner);
- if (newFeature != null) {
- MoveInfo moveInfo = new MoveInfo();
- moveInfo.oldOwner = owner;
- moveInfo.oldFeatureName = f.getName();
- moveInfo.newFeature = newFeature;
- moveInfo.value = entry.getValue() instanceof AnyType ? getNewValue(
- owner, f.getName(), (AnyType) entry.getValue())
- : entry.getValue();
- moveInfos.add(moveInfo);
- if (DEBUG) {
- System.out.println(moveInfo);
- System.out.println();
- }
- iter.remove();
- }
- }
- }
-
- /**
- * @param key
- * @param value
- */
- protected void handleMovedData(EObject e, Object movedData) {
- AnyType anyType = (AnyType) movedData;
-
- handleMovedData(e, anyType.getMixed());
-
- handleMovedData(e, anyType.getAnyAttribute());
-
- if (classNamesToSavePresentationURI != null
- && e instanceof ContentPackage) {
- for (Iterator iter = getValue(anyType.getMixed(), "contentElements").iterator(); iter.hasNext();) { //$NON-NLS-1$
- AnyType value = (AnyType) iter.next();
- if (value != null
- && classNamesToSavePresentationURI.contains(value
- .eClass().getName())) {
- Object presentation = getSingleValue(value.getMixed(),
- "presentation"); //$NON-NLS-1$
- if (presentation != null) {
- Object guid = getSingleValue(value.getAnyAttribute(),
- "guid"); //$NON-NLS-1$
- URI uri = ((InternalEObject) presentation).eProxyURI();
- guidToPresentationMap.put(guid, uri);
- }
- }
- }
- }
- }
-
- public void savePresentationURIFor(Set classNames) {
- classNamesToSavePresentationURI = classNames;
- }
-
- public URI getPresentationURI(String guid) {
- return (URI) guidToPresentationMap.get(guid);
- }
-
public static Object getSingleValue(FeatureMap featureMap,
String featureName) {
for (Iterator iter = featureMap.iterator(); iter.hasNext();) {
@@ -371,5 +153,29 @@
public void clearMoveInfos() {
moveInfos.clear();
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.epf.persistence.migration.MigrationResourceHandler#handleUnknownFeature(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature, java.lang.Object)
+ */
+ protected boolean handleUnknownFeature(EObject owner, EStructuralFeature feature, Object value) {
+ String featureName = feature.getName();
+ EStructuralFeature newFeature = getNewFeature(owner, featureName);
+ if (newFeature != null) {
+ MoveInfo moveInfo = new MoveInfo();
+ moveInfo.oldOwner = owner;
+ moveInfo.oldFeatureName = featureName;
+ moveInfo.newFeature = newFeature;
+ moveInfo.value = value instanceof AnyType ? getNewValue(
+ owner, featureName, (AnyType) value)
+ : value;
+ moveInfos.add(moveInfo);
+ if (DEBUG) {
+ System.out.println(moveInfo);
+ System.out.println();
+ }
+ return true;
+ }
+ return false;
+ }
}
diff --git a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/UpgradeCallerInfo.java b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/UpgradeCallerInfo.java
new file mode 100644
index 0000000..43ce675
--- /dev/null
+++ b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/UpgradeCallerInfo.java
@@ -0,0 +1,77 @@
+//------------------------------------------------------------------------------
+// Copyright (c) 2005, 2006 IBM Corporation and others.
+// All rights reserved. This program and the accompanying materials
+// are made available under the terms of the Eclipse Public License v1.0
+// which accompanies this distribution, and is available at
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Contributors:
+// IBM Corporation - initial implementation
+//------------------------------------------------------------------------------
+
+package org.eclipse.epf.persistence.migration;
+
+import java.io.File;
+
+/**
+ * Class representing caller info for calling library upgrade code.
+ *
+ * @author Weiping Lu
+ *
+ * @since 1.0
+ */
+public class UpgradeCallerInfo {
+
+ public static int upgradeLibrary = 0;
+ public static int upgradeImportPlugin = 1;
+ public static int upgradeImportConfig = 2;
+
+ private int callerType = upgradeLibrary;
+ private String errorMsg;
+ File libFile;
+ File copiedLibFile;
+
+ public UpgradeCallerInfo(int callerType, File libFile) {
+ this.callerType = callerType;
+ this.libFile = libFile;
+ }
+
+ public static boolean isUpgradeLibrary(UpgradeCallerInfo info) {
+ return info == null || info.isUpgradeLibrary();
+ }
+
+ public boolean isUpgradeLibrary() {
+ return callerType == upgradeLibrary;
+ }
+
+ public boolean getIsExportedPluginLib() {
+ return callerType == upgradeImportPlugin;
+ }
+
+ public void setErrorMsg(String msg) {
+ errorMsg = msg;
+ }
+
+ public String getErrorMsg() {
+ return errorMsg;
+ }
+
+ public void setCopiedLibFile(File file) {
+ copiedLibFile = file;
+ }
+
+ public File getCopiedLibFile() {
+ return copiedLibFile;
+ }
+
+ protected File getLibFile() {
+ return libFile;
+ }
+
+ public void copyLibrary() {
+ }
+
+ public void removeCopiedLibrary() {
+ }
+
+}
diff --git a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/internal/UMA2UMAResourceHandler0.java b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/internal/UMA2UMAResourceHandler0.java
index 6b8a259..f3d21c2 100644
--- a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/internal/UMA2UMAResourceHandler0.java
+++ b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/migration/internal/UMA2UMAResourceHandler0.java
@@ -23,6 +23,7 @@
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.epf.persistence.MultiFileResourceSetImpl;
import org.eclipse.epf.persistence.migration.UMA2UMAResourceHandler;
import org.eclipse.epf.uma.Activity;
import org.eclipse.epf.uma.ContentDescription;
@@ -30,7 +31,11 @@
import org.eclipse.epf.uma.DescribableElement;
import org.eclipse.epf.uma.ProcessElement;
import org.eclipse.epf.uma.ProcessPackage;
+import org.eclipse.epf.uma.UmaFactory;
import org.eclipse.epf.uma.UmaPackage;
+import org.eclipse.epf.uma.WorkBreakdownElement;
+import org.eclipse.epf.uma.WorkOrder;
+import org.eclipse.epf.uma.WorkOrderType;
/**
* @author Phong Nguyen Le
@@ -121,6 +126,32 @@
return super.getNewOwner(oldOwner, featureName);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.epf.persistence.migration.UMA2UMAResourceHandler#getNewValue(org.eclipse.emf.ecore.EObject, java.lang.String, org.eclipse.emf.ecore.xml.type.AnyType)
+ */
+ protected Object getNewValue(EObject oldOwner, String featureName, AnyType value) {
+ if ("WorkOrder".equals(featureName) && oldOwner instanceof ProcessPackage) { //$NON-NLS-1$
+ WorkOrder workOrder = UmaFactory.eINSTANCE.createWorkOrder();
+ workOrder.setGuid((String) getSingleValue(value.getAnyAttribute(),
+ "guid")); //$NON-NLS-1$
+ String predGuid = (String) getSingleValue(value.getAnyAttribute(),
+ "pred"); //$NON-NLS-1$
+ if (predGuid == null) {
+ InternalEObject obj = (InternalEObject) getSingleValue(value
+ .getMixed(), "pred"); //$NON-NLS-1$
+ predGuid = obj.eProxyURI().authority();
+ }
+ MultiFileResourceSetImpl resourceSet = (MultiFileResourceSetImpl) oldOwner
+ .eResource().getResourceSet();
+ WorkBreakdownElement pred = (WorkBreakdownElement) resourceSet
+ .getEObject(predGuid);
+ workOrder.setPred(pred);
+ workOrder.setLinkType(WorkOrderType.FINISH_TO_FINISH_LITERAL);
+ return workOrder;
+ }
+ return getText(value);
+ }
public void savePresentationURIFor(Set classNames) {
classNamesToSavePresentationURI = classNames;
@@ -129,21 +160,16 @@
public URI getPresentationURI(String guid) {
return (URI) guidToPresentationMap.get(guid);
}
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.epf.persistence.migration.UMA2UMAResourceHandler#handleMovedData(org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
+
+ /* (non-Javadoc)
+ * @see org.eclipse.epf.persistence.migration.MigrationResourceHandler#handleUnknownData(org.eclipse.emf.ecore.EObject, java.lang.Object)
*/
- protected void handleMovedData(EObject e, Object movedData) {
- super.handleMovedData(e, movedData);
-
- if (movedData instanceof AnyType
- && classNamesToSavePresentationURI != null
+ protected void handleUnknownData(EObject e, AnyType unknownData) {
+ super.handleUnknownData(e, unknownData);
+
+ if (classNamesToSavePresentationURI != null
&& e instanceof ContentPackage) {
- AnyType anyType = (AnyType) movedData;
- for (Iterator iter = getValue(anyType.getMixed(), "contentElements").iterator(); iter.hasNext();) { //$NON-NLS-1$
+ for (Iterator iter = getValue(unknownData.getMixed(), "contentElements").iterator(); iter.hasNext();) { //$NON-NLS-1$
AnyType value = (AnyType) iter.next();
if (value != null
&& classNamesToSavePresentationURI.contains(value
@@ -158,6 +184,7 @@
}
}
}
- }
+ }
}
+
}
diff --git a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/refresh/RefreshJob.java b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/refresh/RefreshJob.java
index b6ade3d..d9991b7 100644
--- a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/refresh/RefreshJob.java
+++ b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/refresh/RefreshJob.java
@@ -67,6 +67,8 @@
private Collection removedResources = new UniqueEList();
+ private Collection movedResources = new UniqueEList();
+
private UniqueEList savedResources = new UniqueEList();
private Collection loadedBeforeRefreshResources = new ArrayList();
@@ -74,7 +76,7 @@
private IRefreshHandler refreshHandler;
private boolean enabled = true;
-
+
private Collection addedWorkspaceResources = new UniqueEList();
private RefreshJob() {
@@ -162,6 +164,13 @@
return removedResources;
}
+ /**
+ * @return Returns the movedResources.
+ */
+ public Collection getMovedResources() {
+ return movedResources;
+ }
+
public void resourceSaved(Resource resource) {
synchronized (savedResources) {
savedResources.add(resource);
@@ -178,6 +187,7 @@
public void reset() {
changedResources.clear();
removedResources.clear();
+ movedResources.clear();
savedResources.clear();
loadedBeforeRefreshResources.clear();
addedResources.clear();
@@ -236,7 +246,7 @@
private boolean shouldRefresh() {
return !removedResources.isEmpty() || !changedResources.isEmpty()
- || !addedResources.isEmpty()
+ || !addedResources.isEmpty() || !movedResources.isEmpty()
|| !loadedBeforeRefreshResources.isEmpty()
|| !addedWorkspaceResources.isEmpty();
}
@@ -310,6 +320,8 @@
private Collection removedResources = new ArrayList();
+ private Collection movedResources = new ArrayList();
+
private Collection addedResources = new ArrayList();
private ArrayList addedWorkspaceResources = new ArrayList();
@@ -318,6 +330,7 @@
Resource resource;
IPath path;
String loc;
+
if (delta.getFlags() != IResourceDelta.MARKERS
&& delta.getResource().getType() == IResource.FILE) {
switch (delta.getKind()) {
@@ -351,6 +364,13 @@
case IResourceDelta.REMOVED:
if ((IResourceDelta.MOVED_TO & delta.getFlags()) != 0) {
// handle file move
+ path = delta.getResource().getLocation();
+ if(path != null) {
+ resource = getResource(path.toString());
+ if (resource != null) {
+ movedResources.add(resource);
+ }
+ }
//
if (DEBUG) {
IPath movedFromPath = delta
@@ -391,6 +411,21 @@
break;
}
}
+ // watch for project move
+ else if (delta.getFlags() != IResourceDelta.MARKERS
+ && delta.getResource().getType() == IResource.PROJECT) {
+ // tested using the Move.. command in the Resource Navigator view
+ // the REPLACED flag only seemed to occur when the library was moved
+ // outside of EPF and EPF was re-started, so make sure it's clear, otherwise
+ // we reload the library right after loading it when starting EPF
+ if (delta.getKind() == IResourceDelta.CHANGED &&
+ ((delta.getFlags() & IResourceDelta.REPLACED) == 0) &&
+ ((delta.getFlags() & IResourceDelta.DESCRIPTION) != 0)) {
+ movedResources.add(delta.getResource());
+
+ }
+ return true;
+ }
return true;
}
@@ -402,13 +437,17 @@
return removedResources;
}
- }
- ;
+ public Collection getMovedResources() {
+ return movedResources;
+ }
+
+ };
ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
delta.accept(visitor);
removedResources.addAll(visitor.getRemovedResources());
+ movedResources.addAll(visitor.getMovedResources());
changedResources.addAll(visitor.getChangedResources());
addedResources.addAll(visitor.addedResources);
addedWorkspaceResources.addAll(visitor.addedWorkspaceResources);
@@ -458,5 +497,4 @@
}
private static RefreshJob instance = new RefreshJob();
-
}
diff --git a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/util/PersistenceUtil.java b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/util/PersistenceUtil.java
index d6bcee5..4ea6e92 100644
--- a/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/util/PersistenceUtil.java
+++ b/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/util/PersistenceUtil.java
@@ -49,14 +49,7 @@
* Gets the current namespace URI of UMA.
*/
public static final String getUMANsURI() {
- for (Iterator iter = EPackage.Registry.INSTANCE.entrySet().iterator(); iter
- .hasNext();) {
- Map.Entry entry = (Map.Entry) iter.next();
- if (entry.getValue() instanceof UmaPackage) {
- return entry.getKey().toString();
- }
- }
- return null;
+ return UmaPackage.eNS_URI;
}
public static final String getUMANsURI(String libPath) {
diff --git a/org.eclipse.epf.library.ui/META-INF/MANIFEST.MF b/org.eclipse.epf.library.ui/META-INF/MANIFEST.MF
index 2b1e67f..7f5e486 100644
--- a/org.eclipse.epf.library.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.library.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.library.ui
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Activator: org.eclipse.epf.library.ui.LibraryUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIManager.java b/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIManager.java
index bee180b..9321554 100644
--- a/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIManager.java
+++ b/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIManager.java
@@ -37,6 +37,7 @@
import org.eclipse.epf.persistence.MultiFileResourceSetImpl;
import org.eclipse.epf.persistence.MultiFileSaveUtil;
import org.eclipse.epf.persistence.migration.MappingUtil;
+import org.eclipse.epf.persistence.migration.UpgradeCallerInfo;
import org.eclipse.epf.uma.MethodLibrary;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.ICoolBarManager;
@@ -165,7 +166,7 @@
LibraryUIResources.upgradeLibraryDialog_text)) {
continue;
}
- if (!upgradeLibrary(libPath)) {
+ if (!upgradeLibrary(libPath, null)) {
continue;
}
}
@@ -243,7 +244,7 @@
LibraryUIResources.upgradeLibraryDialog_text)) {
return;
}
- if (!upgradeLibrary(libPath)) {
+ if (!upgradeLibrary(libPath, null)) {
return;
}
}
@@ -448,9 +449,11 @@
* @return <code>true</code> if the given Method Library is sucessfully
* upgraded.
*/
- public static boolean upgradeLibrary(final String libDir) {
+ public static boolean upgradeLibrary(final String libDir, final UpgradeCallerInfo callerInfo) {
Shell shell = Display.getCurrent().getActiveShell();
- LibraryBackupUtil.promptBackupLibrary(shell, new File(libDir));
+ if (UpgradeCallerInfo.isUpgradeLibrary(callerInfo)) {
+ LibraryBackupUtil.promptBackupLibrary(shell, new File(libDir));
+ }
final StringBuffer errMsg = new StringBuffer();
final boolean[] cancelFlagHolder = { false };
@@ -459,13 +462,17 @@
// activity that modifies the workbench.
WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
public void execute(IProgressMonitor monitor) {
+ String libXmi = MultiFileSaveUtil.DEFAULT_LIBRARY_MODEL_FILENAME;
+ if (callerInfo != null && callerInfo.getIsExportedPluginLib()) {
+ libXmi = XMILibraryManager.exportFile;
+ }
monitor.beginTask(LibraryUIResources.upgradingLibraryTask_name, 10);
monitor.worked(1);
try {
MappingUtil
.migrate(
libDir
- + "/" + MultiFileSaveUtil.DEFAULT_LIBRARY_MODEL_FILENAME, monitor); //$NON-NLS-1$
+ + "/" + libXmi, monitor, callerInfo); //$NON-NLS-1$
}
catch(OperationCanceledException e) {
cancelFlagHolder[0] = true;
@@ -595,4 +602,74 @@
public static void setAppName(String appName) {
LibraryUIManager.appName = appName;
}
+
+ /**
+ * Check and handle tool version differences
+ */
+ public static boolean handleToolVersion(String path, UpgradeCallerInfo callerInfo) {
+ String libXmi = XMILibraryManager.LIBRARY_XMI;
+ if (callerInfo != null && callerInfo.getIsExportedPluginLib()) {
+ libXmi = XMILibraryManager.exportFile;
+ }
+ VersionUtil.VersionCheckInfo info = VersionUtil
+ .checkLibraryVersion(new File(path, libXmi));
+ if (info != null && info.result > 0) {
+ String message = ""; //$NON-NLS-1$
+ if (info.toolID.equals(VersionUtil.getPrimaryToolID())) {
+ message = NLS
+ .bind(
+ LibraryUIResources.versionMismatchDialog_text,
+ new Object[] {
+ Platform.getProduct()
+ .getName(),
+ info.toolVersion });
+ } else {
+ message = NLS
+ .bind(
+ LibraryUIResources.versionMismatchDialog_text_unknown,
+ new Object[] { Platform
+ .getProduct().getName() });
+ }
+ if (! isUpgradeLibrary(callerInfo)) {
+ callerInfo.setErrorMsg(message);
+ return false;
+ }
+ LibraryUIPlugin
+ .getDefault()
+ .getMsgDialog()
+ .displayError(
+ LibraryUIResources.openLibraryDialog_title,
+ message);
+ return false;
+ }
+ if (XMILibraryUtil.isMethodLibraryUpgradeRequired(path, libXmi)) {
+ if (isUpgradeLibrary(callerInfo) && !LibraryUIPlugin
+ .getDefault()
+ .getMsgDialog()
+ .displayConfirmation(
+ LibraryUIResources.openLibraryDialog_title,
+ LibraryUIResources.upgradeLibraryDialog_text)) {
+ return false;
+ }
+ if (! isUpgradeLibrary(callerInfo)) {
+ callerInfo.copyLibrary();
+ if (callerInfo.getCopiedLibFile() != null) {
+ path = callerInfo.getCopiedLibFile().getParentFile().getAbsolutePath();
+ }
+ }
+ if (!LibraryUIManager.upgradeLibrary(path, callerInfo)) {
+ if (callerInfo != null) {
+ //callerInfo.setErrorMsg("upgradeLibrary Failed!"); //need new resource string
+ }
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ private static boolean isUpgradeLibrary(UpgradeCallerInfo callerInfo) {
+ return UpgradeCallerInfo.isUpgradeLibrary(callerInfo);
+ }
+
}
diff --git a/org.eclipse.epf.library.xmi/META-INF/MANIFEST.MF b/org.eclipse.epf.library.xmi/META-INF/MANIFEST.MF
index 9422929..316275a 100644
--- a/org.eclipse.epf.library.xmi/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.library.xmi/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.library.xmi; singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Activator: org.eclipse.epf.library.xmi.XMILibraryPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
diff --git a/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryManager.java b/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryManager.java
index 17efc3d..c1d2766 100644
--- a/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryManager.java
+++ b/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryManager.java
@@ -113,6 +113,11 @@
public static final String LIBRARY_XMI = "library.xmi";
/**
+ * The plugin and config spec export file name.
+ */
+ public static final String exportFile = "export.xmi"; //$NON-NLS-1$
+
+ /**
* The library name.
*/
public static final String ARG_LIBRARY_NAME = "library.name";
@@ -148,7 +153,7 @@
private ListenerList resourceChangeListeners = new ListenerList();
// The file lock for the managed library.
- private FileLock lock;
+// private FileLock lock;
// The save library options.
private Map saveOptions;
@@ -965,15 +970,17 @@
/**
* Checks whether the managed method library is locked.
*
+ * @deprecated disable this code for now - see https://bugs.eclipse.org/bugs/show_bug.cgi?id=147106
* @return <code>true</code> if the method library is locked
*/
public boolean isMethodLibraryLocked() {
- if (debug) {
+ return false;
+/* if (debug) {
DebugTrace.print(this, "isMethodLibraryLocked"); //$NON-NLS-1$
}
return XMILibraryUtil.isMethodLibraryLocked(getMethodLibraryPath());
- }
+*/ }
/**
* Checks whether the managed method library is read only.
@@ -1268,20 +1275,23 @@
* The .lock file in the method library folder will be locked. If it does
* not exists, a new .lock file will be created.
*
+ * @deprecated disable this code for now - see https://bugs.eclipse.org/bugs/show_bug.cgi?id=147106
* @param path
* a <code>File</code> object that contains the path to the
* method library.
*/
protected void lockMethodLibrary(File path) {
- File lockFile = new File(path, ResourceUtil.LOCK_FILENAME);
+/* File lockFile = new File(path, ResourceUtil.LOCK_FILENAME);
lock = FileUtil.lockFile(lockFile);
- }
+*/ }
/**
* Unlocks the managed method library.
+ *
+ * @deprecated disable this code for now - see https://bugs.eclipse.org/bugs/show_bug.cgi?id=147106
*/
protected void unlockMethodLibrary() {
- try {
+/* try {
if (lock != null) {
lock.release();
lock.channel().close();
@@ -1292,7 +1302,7 @@
DebugTrace.print(this, "unlockMethodLibrary", e); //$NON-NLS-1$
}
}
- }
+*/ }
/**
* Handles a persistence refresh event.
diff --git a/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryUtil.java b/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryUtil.java
index 502c33b..46850c6 100644
--- a/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryUtil.java
+++ b/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryUtil.java
@@ -24,7 +24,6 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.eclipse.epf.common.utils.FileUtil;
import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.library.LibraryPlugin;
import org.eclipse.epf.library.LibraryResources;
@@ -237,12 +236,14 @@
* Once a method library is locked, it cannot be accessed by another EPF
* Composer instance.
*
+ * @deprecated disable this code for now - see https://bugs.eclipse.org/bugs/show_bug.cgi?id=147106
* @param path
* an absolute path to a method library
* @return <code>true</code> if the method library is locked
*/
public static boolean isMethodLibraryLocked(String path) {
- // check if library is currently opened by this instance
+ return false;
+/* // check if library is currently opened by this instance
// the FileLock mechanism in Java does not seem to properly detect when
// the current JVM has locked the file
// TODO: check all opened libraries (rather than just current) when the API allows it
@@ -251,7 +252,7 @@
return false;
File lockFile = new File(path, ResourceUtil.LOCK_FILENAME);
return FileUtil.isFileLocked(lockFile);
- }
+*/ }
/**
* Checks whether a method library needs to be upgraded to a new format.
@@ -261,12 +262,12 @@
* @return <code>true</code> if the method library needs to be upgraded
*/
public static boolean isMethodLibraryUpgradeRequired(String path) {
- if (true) {
- return org.eclipse.epf.persistence.migration.MappingUtil.conversionRequired(
- path + File.separator + XMILibraryManager.LIBRARY_XMI);
- }
- return PersistenceUtil.conversionRequired(path + File.separator
- + XMILibraryManager.LIBRARY_XMI);
+ return isMethodLibraryUpgradeRequired(path, XMILibraryManager.LIBRARY_XMI);
+ }
+
+ public static boolean isMethodLibraryUpgradeRequired(String path, String libXmi) {
+ return org.eclipse.epf.persistence.migration.MappingUtil.conversionRequired(
+ path + File.separator + libXmi);
}
/**
diff --git a/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/Migrator102.java b/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/Migrator102.java
index 2fbede1..b7960ff 100644
--- a/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/Migrator102.java
+++ b/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/Migrator102.java
@@ -11,6 +11,7 @@
package org.eclipse.epf.library.xmi.internal.migration;
import java.io.File;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -18,6 +19,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.StringTokenizer;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -35,8 +37,11 @@
import org.eclipse.emf.ecore.util.EContentsEList;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.EContentsEList.FeatureIterator;
+import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.diagram.model.util.GraphicalDataHelper;
+import org.eclipse.epf.diagram.model.util.GraphicalDataManager;
import org.eclipse.epf.library.edit.TngAdapterFactory;
import org.eclipse.epf.library.edit.util.ModelStructure;
import org.eclipse.epf.library.edit.util.TngUtil;
@@ -45,16 +50,26 @@
import org.eclipse.epf.library.xmi.XMILibraryResources;
import org.eclipse.epf.persistence.MethodLibraryPersister;
import org.eclipse.epf.persistence.MultiFileResourceSetImpl;
+import org.eclipse.epf.persistence.MultiFileSaveUtil;
import org.eclipse.epf.persistence.MultiFileXMISaveImpl;
import org.eclipse.epf.persistence.migration.IMigrator;
+import org.eclipse.epf.persistence.migration.MigrationResourceHandler;
import org.eclipse.epf.persistence.migration.MigrationUtil;
+import org.eclipse.epf.persistence.migration.UpgradeCallerInfo;
import org.eclipse.epf.persistence.util.PersistenceResources;
import org.eclipse.epf.persistence.util.PersistenceUtil;
import org.eclipse.epf.uma.Activity;
+import org.eclipse.epf.uma.Diagram;
+import org.eclipse.epf.uma.GraphNode;
import org.eclipse.epf.uma.MethodElement;
import org.eclipse.epf.uma.MethodLibrary;
import org.eclipse.epf.uma.MethodPackage;
import org.eclipse.epf.uma.MethodPlugin;
+import org.eclipse.epf.uma.Property;
+import org.eclipse.epf.uma.RoleDescriptor;
+import org.eclipse.epf.uma.SemanticModelBridge;
+import org.eclipse.epf.uma.TaskDescriptor;
+import org.eclipse.epf.uma.UMASemanticModelBridge;
import org.eclipse.epf.uma.UmaPackage;
import org.eclipse.epf.uma.VariabilityType;
import org.eclipse.epf.uma.ecore.impl.MultiResourceEObject;
@@ -64,6 +79,7 @@
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
/**
* @author Phong Nguyen Le - Jun 12, 2006
@@ -99,6 +115,70 @@
private MethodLibrary lib;
+ private MigrationResourceHandler resourceHandler = new MigrationResourceHandler() {
+
+ protected boolean handleUnknownFeature(EObject owner,
+ EStructuralFeature feature, Object value) {
+ // Order graph nodes of task descriptors in ADD based on their order
+ // in the task descriptor list of the role descriptor
+ // old feature: RoleDescriptor.performsAsOwner
+ //
+ if(owner instanceof RoleDescriptor
+ && "performsAsOwner".equals(feature.getName()) //$NON-NLS-1$
+ && value != null)
+ {
+ ArrayList GUIDs = new ArrayList();
+ StringTokenizer tokens = new StringTokenizer((String) value);
+ while(tokens.hasMoreTokens()) {
+ GUIDs.add(tokens.nextToken());
+ }
+ if(GUIDs.size() > 1) {
+ Activity act = ((RoleDescriptor)owner).getSuperActivities();
+ Diagram add = GraphicalDataManager.getInstance().getUMADiagram(act, GraphicalDataHelper.ACTIVITY_DETAIL_DIAGRAM, false);
+ if(add != null) {
+ Map tdGuidToGraphNodeMap = new HashMap();
+ int size = add.getContained().size();
+ for (int i = 0; i < size; i++) {
+ Object element = add.getContained().get(i);
+ if(element instanceof GraphNode) {
+ GraphNode graphNode = ((GraphNode)element);
+ SemanticModelBridge bridge = graphNode.getSemanticModel();
+ if (bridge instanceof UMASemanticModelBridge) {
+ MethodElement me = ((UMASemanticModelBridge) bridge).getElement();
+ if(me instanceof TaskDescriptor) {
+ List list = graphNode.getList(UmaPackage.GRAPH_NODE__PROPERTY);
+ Property property = GraphicalDataHelper.getPropertyByKey(list,
+ GraphicalDataHelper.PROP_WORK_PRODUCT_COMPOSITE_TYPE);
+ if (property == null) {
+ // this is not a GraphNode for WorkProductComposite
+ // it must be a GraphNode for a TaskDescriptor
+ //
+ tdGuidToGraphNodeMap.put(me.getGuid(), graphNode);
+ }
+ }
+ }
+ }
+ }
+
+ // reorder the graph nodes to match order of their linked task descriptors
+ //
+ ArrayList graphNodes = new ArrayList();
+ for(int i = 0; i < GUIDs.size(); i++) {
+ Object graphNode = tdGuidToGraphNodeMap.get(GUIDs.get(i));
+ if(graphNode != null) {
+ graphNodes.add(graphNode);
+ }
+ }
+ add.getContained().removeAll(graphNodes);
+ add.getContained().addAll(graphNodes);
+ }
+ }
+ }
+ return true;
+ }
+
+ };
+
private static final String FILE_PATH = XMILibraryResources.filePath;
/*
@@ -108,8 +188,23 @@
* org.eclipse.core.runtime.IProgressMonitor)
*/
public void migrate(String libPath, IProgressMonitor monitor)
+ throws Exception {
+ migrate(libPath, monitor, null);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.epf.persistence.migration.IMigrator#migrate(java.lang.String, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.epf.persistence.migration.UpgradeCallerInfo)
+ */
+ public void migrate(String libPath, IProgressMonitor monitor, UpgradeCallerInfo info)
throws Exception {
- ResourceUtil.open(new File(libPath).getParent(), monitor);
+ File libFile = new File(libPath);
+
+ boolean toVerify = true;
+ if (info != null && info.getIsExportedPluginLib()) {
+ toVerify = false;
+ }
+
+ ResourceUtil.open(libFile.getParent(), monitor);
MultiFileResourceSetImpl resourceSet = null;
try {
@@ -120,19 +215,53 @@
// load the library
//
updateStatus(monitor, PersistenceResources.loadLibraryTask_name);
- resourceSet = new MultiFileResourceSetImpl(false);
- lib = resourceSet.loadLibrary(libPath);
+ if (toVerify) {
+ resourceSet = new MultiFileResourceSetImpl(false);
+ } else {
+ resourceSet = new MultiFileResourceSetImpl(false) {
+ protected void demandLoad(Resource resource) throws IOException {
+ if (! skipDemandLoad(resource)) {
+ super.demandLoad(resource);
+ }
+ }
+ private boolean skipDemandLoad(Resource res) {
+ File file = new File(res.getURI().toFileString());
+ if (! file.exists() && file.getName().equals(MultiFileSaveUtil.DEFAULT_PLUGIN_MODEL_FILENAME)) {
+ return true;
+ }
+ return false;
+ }
+ };
+ }
+
+ resourceSet.getLoadOptions().put(
+ XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
+ resourceSet.getLoadOptions().put(
+ XMLResource.OPTION_RESOURCE_HANDLER, resourceHandler);
+ lib = resourceSet.loadLibrary(libPath);
+
removeProcessContributions(monitor);
// verify the library
//
// TODO: uncomment after externalize the text
// updateStatus(monitor, "Verifying...");
- verify();
- removeUnresolvedReferences(monitor);
-
+ if (toVerify) {
+ Display dis = Display.getDefault();
+ if (dis == null || dis.getThread() == Thread.currentThread()) {
+ verify();
+ } else {
+ dis.syncExec(new Runnable() {
+ public void run() {
+ verify();
+ }
+ });
+ }
+ removeUnresolvedReferences(monitor);
+ }
+
// load all elements in memory
//
updateStatus(monitor, PersistenceResources.loadResourcesTask_name);
@@ -147,13 +276,16 @@
} catch (Exception e) {
CommonPlugin.INSTANCE.log(e);
if (DEBUG) {
- System.err.println("Error iterate thru cross references of element: " + element); //$NON-NLS-1$
+ System.err
+ .println("Error iterate thru cross references of element: " + element); //$NON-NLS-1$
}
}
update((MethodElement) element, monitor);
}
}
+
+
removeOldDefaultValues();
// check modified resources for writable before saving them
@@ -164,8 +296,10 @@
//
updateStatus(monitor, PersistenceResources.saveLibraryTask_name);
Map saveOptions = resourceSet.getDefaultSaveOptions();
- saveOptions.put(MultiFileXMISaveImpl.DISCARD_UNRESOLVED_REFERENCES,
+ if (toVerify) {
+ saveOptions.put(MultiFileXMISaveImpl.DISCARD_UNRESOLVED_REFERENCES,
Boolean.TRUE);
+ }
resourceSet.save(saveOptions, true);
updateStatus(monitor,
diff --git a/org.eclipse.epf.library/META-INF/MANIFEST.MF b/org.eclipse.epf.library/META-INF/MANIFEST.MF
index 2d7ac3e..fee1e57 100644
--- a/org.eclipse.epf.library/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.library/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.library; singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-ClassPath: library.jar
Bundle-Activator: org.eclipse.epf.library.LibraryPlugin
Bundle-Vendor: %providerName
diff --git a/org.eclipse.epf.library/layout/css/default.css b/org.eclipse.epf.library/layout/css/default.css
index 09f971a..d4bd0cd 100644
--- a/org.eclipse.epf.library/layout/css/default.css
+++ b/org.eclipse.epf.library/layout/css/default.css
@@ -430,6 +430,16 @@
border: #ccc solid 0px;
}
+.stepTable table
+{
+ border: #999999 solid 1px;
+}
+
+.stepTable table td
+{
+ border: #ccc solid 1px;
+}
+
.stepSeparator
{
background-color: #cccccc;
diff --git a/org.eclipse.epf.library/layout/xsl/activity_wbs.xsl b/org.eclipse.epf.library/layout/xsl/activity_wbs.xsl
index 14dd845..7b02bdd 100644
--- a/org.eclipse.epf.library/layout/xsl/activity_wbs.xsl
+++ b/org.eclipse.epf.library/layout/xsl/activity_wbs.xsl
@@ -303,7 +303,7 @@
<xsl:otherwise>false</xsl:otherwise>
</xsl:choose>
</xsl:variable>
-wbsItemHtml.initRow("<xsl:value-of select="$element/@nodeId"/>", "<xsl:value-of select="$parentNodeId"/>", "<xsl:value-of select="$element/@relProcessPath"/>", "<xsl:value-of select="$element/@isSupressed"/>", <xsl:value-of select="$indent"/>, <xsl:value-of select="$hasChildren"/>, "<xsl:value-of select="$element/@Index"/>", "<xsl:value-of select="$element/attribute[@name='prefix']"/>", "<xsl:value-of select="$element/@Name"/>", "<xsl:value-of select="$element/@DisplayName"/>", "<xsl:value-of select="concat(/Element/@BackPath, $element/@Url)"/>", "", "<xsl:value-of select="$element/@Predecessors"/>", "<xsl:value-of select="$element/@ModelInfo"/>", "<xsl:value-of select="$element/@TypeName"/>", "<xsl:value-of select="$element/attribute[@name='isRepeatable']"/>", "<xsl:value-of select="$element/attribute[@name='hasMultipleOccurrences']"/>", "<xsl:value-of select="$element/attribute[@name='isOptional']"/>", "<xsl:value-of select="$element/attribute[@name='isPlanned']"/>", "<xsl:value-of select="$element/attribute[@name='isOngoing']"/>", "<xsl:value-of select="$element/attribute[@name='isEventDriven']"/>", "", "", "","", "<xsl:value-of select="$element/attribute[@name='variabilityType']"/>");<xsl:for-each select="$element/Steps/Step">wbsItemHtml.addStep(<xsl:value-of select="@selected"/>, <xsl:value-of select="position() mod 5 = 0"/>);</xsl:for-each>
+wbsItemHtml.initRow("<xsl:value-of select="$element/@nodeId"/>", "<xsl:value-of select="$parentNodeId"/>", "<xsl:value-of select="$element/@relProcessPath"/>", "<xsl:value-of select="$element/@isSupressed"/>", <xsl:value-of select="$indent"/>, <xsl:value-of select="$hasChildren"/>, "<xsl:value-of select="$element/@Index"/>", "<xsl:value-of select="$element/attribute[@name='prefix']"/>", "<xsl:value-of select="$element/@Name"/>", "<xsl:value-of select="$element/@DisplayName"/>", "<xsl:value-of select="concat(/Element/@BackPath, $element/@Url)"/>", "", "<xsl:value-of select="$element/@Predecessors"/>", "<xsl:value-of select="$element/@ModelInfo"/>", "<xsl:value-of select="$element/@TypeName"/>", "<xsl:value-of select="$element/attribute[@name='isRepeatable']"/>", "<xsl:value-of select="$element/attribute[@name='hasMultipleOccurrences']"/>", "<xsl:value-of select="$element/attribute[@name='isOptional']"/>", "<xsl:value-of select="$element/attribute[@name='isPlanned']"/>", "<xsl:value-of select="$element/attribute[@name='isOngoing']"/>", "<xsl:value-of select="$element/attribute[@name='isEventDriven']"/>", "<xsl:value-of select="$element/@Team"/>", "", "","", "<xsl:value-of select="$element/attribute[@name='variabilityType']"/>");<xsl:for-each select="$element/Steps/Step">wbsItemHtml.addStep(<xsl:value-of select="@selected"/>, <xsl:value-of select="position() mod 5 = 0"/>);</xsl:for-each>
wbsItemHtml.writeRow();
<xsl:if test="count($element/Element) > 0">
<xsl:for-each select="$element/Element">
diff --git a/org.eclipse.epf.library/layout/xsl/artifact_descriptor.xsl b/org.eclipse.epf.library/layout/xsl/artifact_descriptor.xsl
index 74e99fe..8866243 100644
--- a/org.eclipse.epf.library/layout/xsl/artifact_descriptor.xsl
+++ b/org.eclipse.epf.library/layout/xsl/artifact_descriptor.xsl
@@ -237,8 +237,8 @@
<xsl:variable name="impacts" select="referenceList[@name='impacts']/Element[@Type='WorkProductDescriptor']"/>
<xsl:variable name="impactedBy" select="referenceList[@name='impactedBy']/Element[@Type='WorkProductDescriptor']"/>
<xsl:variable name="mandatoryInputTo" select="referenceList[@name='WorkProductDescriptor_MandatoryInputTo_TaskDescriptors']/Element[@Type='TaskDescriptor']"/>
- <xsl:variable name="optionalInputTo" select="referenceList[@name='OptionalInputTo']/Element[@Type='TaskDescriptor']"/>
- <xsl:variable name="externalInputTo" select="referenceList[@name='externalInputTo']/Element[@Type='TaskDescriptor']"/>
+ <xsl:variable name="optionalInputTo" select="referenceList[@name='WorkProductDescriptor_OptionalInputTo_TaskDescriptors']/Element[@Type='TaskDescriptor']"/>
+ <xsl:variable name="externalInputTo" select="referenceList[@name='WorkProductDescriptor_ExternalInputTo_TaskDescriptors']/Element[@Type='TaskDescriptor']"/>
<xsl:variable name="outputFrom" select="referenceList[@name='WorkProductDescriptor_OutputFrom_TaskDescriptors']/Element[@Type='TaskDescriptor']"/>
<xsl:variable name="superActivities" select="referenceList[@name='superActivities']/Element[@Type='Activity']"/>
<xsl:variable name="responsibleRole" select="referenceList[@name='WorkProductDescriptor_ResponsibleRoleDescriptors']/Element[@Type='RoleDescriptor']"/>
@@ -400,4 +400,4 @@
</xsl:if>
</xsl:template>
-</xsl:stylesheet>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/org.eclipse.epf.library/layout/xsl/guidance.xsl b/org.eclipse.epf.library/layout/xsl/guidance.xsl
index 00a5e06..2f1bc44 100644
--- a/org.eclipse.epf.library/layout/xsl/guidance.xsl
+++ b/org.eclipse.epf.library/layout/xsl/guidance.xsl
@@ -116,14 +116,15 @@
<xsl:template name="moreInfoSection">
- <xsl:variable name="checklists" select="referenceList[@name !='contentElements']/Element[@Type='Checklist']"/>
- <xsl:variable name="concepts" select="referenceList[@name !='contentElements']/Element[@Type='Concept']"/>
- <xsl:variable name="guidelines" select="referenceList[@name !='contentElements']/Element[@Type='Guideline']"/>
- <xsl:variable name="supportingMaterials" select="referenceList[@name !='contentElements']/Element[@Type='SupportingMaterial']"/>
+ <!-- use the specific named list, otherwise, the variability base element will be included , bug 163885 -->
+ <xsl:variable name="checklists" select="referenceList[@name ='checklists']/Element[@Type='Checklist']"/>
+ <xsl:variable name="concepts" select="referenceList[@name ='conceptsAndPapers']/Element[@Type='Concept']"/>
+ <xsl:variable name="guidelines" select="referenceList[@name ='guidelines']/Element[@Type='Guideline']"/>
+ <xsl:variable name="supportingMaterials" select="referenceList[@name ='supportingMaterials']/Element"/>
<xsl:variable name="toolMentors" select="referenceList[@name !='contentElements']/Element[@Type='ToolMentor']"/>
- <xsl:variable name="whitePapers" select="referenceList[@name !='contentElements']/Element[@Type='Whitepaper']"/>
- <xsl:variable name="examples" select="referenceList[@name !='contentElements']/Element[@Type='Example']"/>
- <xsl:variable name="reusableAssets" select="referenceList[@name !='contentElements']/Element[@Type='ReusableAsset']"/>
+ <xsl:variable name="whitePapers" select="referenceList[@name ='conceptsAndPapers']/Element[@Type='Whitepaper']"/>
+ <xsl:variable name="examples" select="referenceList[@name ='examples']/Element[@Type='Example']"/>
+ <xsl:variable name="reusableAssets" select="referenceList[@name ='assets']/Element[@Type='ReusableAsset']"/>
<xsl:if test="count($checklists) + count($concepts) + count($guidelines) + count($supportingMaterials) + count($toolMentors) + count($whitePapers) + count($reusableAssets) + count($examples) > 0">
<div class="sectionHeading">
<xsl:value-of select="$moreInfoText"/>
diff --git a/org.eclipse.epf.library/layout/xsl/task_descriptor.xsl b/org.eclipse.epf.library/layout/xsl/task_descriptor.xsl
index b47b1d6..5ef07eb 100644
--- a/org.eclipse.epf.library/layout/xsl/task_descriptor.xsl
+++ b/org.eclipse.epf.library/layout/xsl/task_descriptor.xsl
@@ -202,7 +202,6 @@
<xsl:template name="relationshipsSection">
<xsl:variable name="performingRole" select="reference[@name='performedPrimarilyBy']/Element[@Type='RoleDescriptor']"/>
- <xsl:variable name="performingRoleName" select="$performingRole/@DisplayName"/>
<xsl:variable name="additionallyPerformedBy" select="referenceList[@name='additionallyPerformedBy']/Element"/>
<xsl:variable name="assistedBy" select="referenceList[@name='assistedBy']/Element"/>
<xsl:variable name="mandatoryInputs" select="referenceList[@name='mandatoryInput']/Element"/>
@@ -211,51 +210,49 @@
<xsl:variable name="outputs" select="referenceList[@name='output']/Element"/>
<xsl:variable name="imagePath" select="concat(/Element/@BackPath, 'images/')"/>
- <xsl:if test="$performingRoleName != '' or count($additionallyPerformedBy) + count($mandatoryInputs) + count($optionalInputs) + count($outputs) > 0">
+ <xsl:if test="count($performingRole) + count($additionallyPerformedBy) + count($mandatoryInputs) + count($optionalInputs) + count($outputs) > 0">
<div class="sectionHeading"><xsl:value-of select="$relationshipsText"/></div>
<div class="sectionContent">
- <table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
- <xsl:if test="$performingRoleName != ''">
- <tr valign="top">
- <th class="sectionTableHeading" scope="row"><xsl:value-of select="$rolesText"/></th>
- <td class="sectionTableCell" width="30%">
- <xsl:value-of select="$mainText"/>:
- <xsl:if test="$performingRoleName">
- <ul>
- <li>
- <a><xsl:attribute name="href"><xsl:value-of select="/Element/@BackPath"/><xsl:value-of select="$performingRole/@Url"/></xsl:attribute><xsl:value-of select="$performingRoleName"/></a>
- </li>
- </ul>
- </xsl:if>
- </td>
- <td class="sectionTableCell" width="30%">
- <xsl:value-of select="$additionalText"/>:
- <xsl:if test="count($additionallyPerformedBy) > 0">
+ <table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
+ <tr valign="top">
+ <th class="sectionTableHeading" scope="row"><xsl:value-of select="$rolesText"/></th>
+ <td class="sectionTableCell" width="30%">
+ <xsl:value-of select="$mainText"/>:
+ <xsl:if test="count($performingRole) > 0">
<ul>
- <xsl:for-each select="$additionallyPerformedBy">
- <xsl:sort select="@DisplayName"/>
- <li>
- <a><xsl:attribute name="href"><xsl:value-of select="/Element/@BackPath"/><xsl:value-of select="@Url"/></xsl:attribute><xsl:value-of select="@DisplayName"/></a>
- </li>
- </xsl:for-each>
+ <li>
+ <a><xsl:attribute name="href"><xsl:value-of select="/Element/@BackPath"/><xsl:value-of select="$performingRole/@Url"/></xsl:attribute><xsl:value-of select="$performingRole/@DisplayName"/></a>
+ </li>
</ul>
- </xsl:if>
- </td>
- <td class="sectionTableCell">
- <xsl:value-of select="$assistingText"/>:
- <xsl:if test="count($assistedBy) > 0">
- <ul>
- <xsl:for-each select="$assistedBy">
- <xsl:sort select="@DisplayName"/>
- <li>
- <a><xsl:attribute name="href"><xsl:value-of select="/Element/@BackPath"/><xsl:value-of select="@Url"/></xsl:attribute><xsl:value-of select="@DisplayName"/></a>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- </td>
- </tr>
- </xsl:if>
+ </xsl:if>
+ </td>
+ <td class="sectionTableCell" width="30%">
+ <xsl:value-of select="$additionalText"/>:
+ <xsl:if test="count($additionallyPerformedBy) > 0">
+ <ul>
+ <xsl:for-each select="$additionallyPerformedBy">
+ <xsl:sort select="@DisplayName"/>
+ <li>
+ <a><xsl:attribute name="href"><xsl:value-of select="/Element/@BackPath"/><xsl:value-of select="@Url"/></xsl:attribute><xsl:value-of select="@DisplayName"/></a>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </td>
+ <td class="sectionTableCell">
+ <xsl:value-of select="$assistingText"/>:
+ <xsl:if test="count($assistedBy) > 0">
+ <ul>
+ <xsl:for-each select="$assistedBy">
+ <xsl:sort select="@DisplayName"/>
+ <li>
+ <a><xsl:attribute name="href"><xsl:value-of select="/Element/@BackPath"/><xsl:value-of select="@Url"/></xsl:attribute><xsl:value-of select="@DisplayName"/></a>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </td>
+ </tr>
<xsl:if test="count($mandatoryInputs) + count($optionalInputs) > 0">
<tr valign="top">
<th class="sectionTableHeading" scope="row"><xsl:value-of select="$inputsText"/></th>
@@ -431,4 +428,4 @@
</xsl:if>
</xsl:template>
-</xsl:stylesheet>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/org.eclipse.epf.library/plugin.properties b/org.eclipse.epf.library/plugin.properties
index 833894b..261df50 100644
--- a/org.eclipse.epf.library/plugin.properties
+++ b/org.eclipse.epf.library/plugin.properties
@@ -13,3 +13,11 @@
# Plug-in
pluginName=EPF Library
providerName=Eclipse.org
+
+# to anable the exted-replace feature
+#EnableExtendReplace=true
+
+# for element exteding from another,
+# turn this flag on to ignore the base to-many outgoing associations if the element has its own.
+#IgnoreBaseToManyAssociations=true
+
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/LibraryServiceException.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/LibraryServiceException.java
index a2dfe79..acd1b75 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/LibraryServiceException.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/LibraryServiceException.java
@@ -80,5 +80,18 @@
public Throwable getRootCause() {
return rootCause;
}
-
+
+ /* (non-Javadoc)
+ * @see java.lang.Throwable#getMessage()
+ */
+ public String getMessage() {
+ return errorMsg;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Throwable#getCause()
+ */
+ public Throwable getCause() {
+ return getRootCause();
+ }
}
\ No newline at end of file
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/AttributeFeatureValue.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/AttributeFeatureValue.java
index 1193cfb..315ff30 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/AttributeFeatureValue.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/AttributeFeatureValue.java
@@ -14,6 +14,7 @@
import java.util.LinkedHashMap;
import java.util.Map;
+import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.library.util.LibraryUtil;
import org.eclipse.epf.library.util.ResourceHelper;
import org.eclipse.epf.uma.ContentDescription;
@@ -84,10 +85,17 @@
MethodElement e = (MethodElement)entry.getKey();
Object v = entry.getValue();
-// if (v == null || v.toString().length() == 0) {
-// continue;
-// }
+ if (v == null || v.toString().length() == 0) {
+ continue;
+ }
+ if ( ElementRealizer.isExtendReplaceEnabled() ) {
+ String str = StrUtil.getPlainText(v.toString()).trim();
+ if ( str.equals(_NULL_) ) {
+ continue;
+ }
+ }
+
if (feature == UmaPackage.eINSTANCE
.getDescribableElement_PresentationName()) {
if (size() > 1) {
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationFilter.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationFilter.java
index f04a7ed..a94af29 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationFilter.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationFilter.java
@@ -24,10 +24,14 @@
import org.eclipse.epf.library.services.SafeUpdateController;
import org.eclipse.epf.library.util.LibraryUtil;
import org.eclipse.epf.library.util.Log;
+import org.eclipse.epf.uma.Discipline;
+import org.eclipse.epf.uma.DisciplineGrouping;
import org.eclipse.epf.uma.MethodConfiguration;
import org.eclipse.epf.uma.MethodElement;
import org.eclipse.epf.uma.MethodPackage;
import org.eclipse.epf.uma.Role;
+import org.eclipse.epf.uma.RoleSet;
+import org.eclipse.epf.uma.RoleSetGrouping;
import org.eclipse.epf.uma.Task;
import org.eclipse.epf.uma.ToolMentor;
import org.eclipse.epf.uma.VariabilityElement;
@@ -61,6 +65,12 @@
obj = LibraryUtil.unwrap(obj);
+ if ( ElementRealizer.isExtendReplaceEnabled() &&
+ (obj instanceof MethodElement) &&
+ FeatureValue._NULL_.equals(((MethodElement)obj).getName()) ) {
+ return false;
+ }
+
if (obj instanceof MethodPackage) {
return methodConfig.getMethodPackageSelection().contains(obj);
} else if (obj instanceof MethodElement) {
@@ -318,4 +328,54 @@
}
};
}
+
+
+ /**
+ * get filter for disciplines and displine groupings
+ *
+ * @return IFilter
+ */
+ public IFilter getDisciplinesFilter() {
+ return new IFilter() {
+ public boolean accept(Object obj) {
+ // [Bug 162603] New: Replacing disciplines do appear inside their replaced elements discipline groupings
+ // as well as outside of the discipline grouping
+ if ( obj instanceof DisciplineGrouping ) {
+ return true;
+ }
+
+ return ( obj instanceof Discipline ) &&
+ ConfigurationHelper.calc0nFeatureValue(
+ (MethodElement)obj,
+ AssociationHelper.Discipline_DisciplineGroupings,
+ new DefaultElementRealizer(methodConfig)).isEmpty();
+ }
+ };
+ }
+
+ /**
+ * get filter for rolesets and roleset groupings
+ *
+ * @return IFilter
+ */
+ public IFilter getRoleSetsFilter() {
+ return new IFilter() {
+ public boolean accept(Object obj) {
+ // [Bug 162603] New: Replacing disciplines do appear inside their replaced elements discipline groupings
+ // as well as outside of the discipline grouping
+ // same for roleset grouping
+ if ( obj instanceof RoleSetGrouping ) {
+ return true;
+ }
+
+ return ( obj instanceof RoleSet ) &&
+ ConfigurationHelper.calc0nFeatureValue(
+ (MethodElement)obj,
+ AssociationHelper.RoleSet_RoleSetGrouppings,
+ new DefaultElementRealizer(methodConfig)).isEmpty();
+ }
+ };
+ }
+
+
}
\ No newline at end of file
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationHelper.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationHelper.java
index c044d60..fd2f6c9 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationHelper.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationHelper.java
@@ -66,6 +66,10 @@
private static boolean debug = LibraryPlugin.getDefault().isDebugging();
public static boolean isDescriptionElement(MethodElement element) {
+ if ( element == null ) {
+ return false;
+ }
+
return (element instanceof ContentDescription || element.eContainer() instanceof ContentDescription);
}
@@ -627,10 +631,17 @@
// if the element is an extended element, get the base element's
// properties if needed
- if (isExtender(ve)) {
+ boolean extendReplace = ElementRealizer.isExtendReplaceEnabled() && isReplacer(ve);
+ boolean isExtender = isExtender(ve);
+
+ if (isExtender || extendReplace) {
boolean mergebase = false;
if (is0nFeature(feature)) {
mergebase = true;
+ if ( extendReplace
+ || isExtender && ElementRealizer.ignoreBaseToManyAssociations()) {
+ mergebase = (values.size() == 0);
+ }
} else if (is01Feature(feature)) {
mergebase = (values.size() == 0);
} else {
@@ -643,11 +654,23 @@
// need to get the realized element,
// the base element might be replaced by another one,
// or might be a contributor to another base
- MethodElement e = getCalculatedElement(ve
- .getVariabilityBasedOnElement(), config);
+ MethodElement e = ve.getVariabilityBasedOnElement();
+ if ( !extendReplace ) {
+ e= getCalculatedElement(e, config);
+ }
MethodElement o = e;
- if ((ve != e) && inConfig(e, config)) {
+ // if it's a containment feature, such as sub-artifacts
+ // the base should not be the container
+ // 162154 - Check circular references with parent-/sub-artifacts and practices/sub-practices
+ if ( isContainmentFeature(feature) ) {
+ List containers = getContainers(ve, config);
+ if (containers.contains(e) ) {
+ mergebase = false;
+ }
+ }
+
+ if (mergebase && (ve != e) && inConfig(e, config)) {
// if the current element is a description,
// get the the description object of the base
if (element instanceof ContentDescription) {
@@ -670,7 +693,7 @@
}
}
}
-
+
}
/**
@@ -930,6 +953,21 @@
}
/**
+ * get the target feature for the opposite feature if the target feature is a to-One feature,
+ * otherwise, return null.
+ * @param oFeature
+ * @return EStructuralFeature
+ */
+ public static EStructuralFeature get01Feature(OppositeFeature oFeature) {
+ if ( oFeature == AssociationHelper.Role_Primary_Tasks
+ || oFeature == AssociationHelper.RoleDescriptor_PrimaryTaskDescriptors ) {
+ return oFeature.getTargetFeature();
+ }
+
+ return null;
+ }
+
+ /**
* get the calculated 0..n feature value of the specipied element and
* feature. if the opposite feature on the other end is a to-one feature,
* the feature value item can't be in the value list unless it's opposite
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ElementRealizer.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ElementRealizer.java
index 00d23da..3d60409 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ElementRealizer.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ElementRealizer.java
@@ -13,6 +13,7 @@
import java.util.List;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.epf.library.LibraryPlugin;
import org.eclipse.epf.library.edit.IFilter;
import org.eclipse.epf.library.util.LibraryUtil;
import org.eclipse.epf.uma.MethodConfiguration;
@@ -43,6 +44,22 @@
protected IFilter filter = null;
+ // this is the default setting based on the property setting
+ private static boolean defaultEnableExtendReplace = false;
+ private static boolean defaultIgnoreBaseToManyAssociations = false;
+
+ static {
+ String str = LibraryPlugin.getDefault().getString("EnableExtendReplace");
+ if ( str != null && str.trim().equals("true") ) {
+ defaultEnableExtendReplace = true;
+ }
+
+ str = LibraryPlugin.getDefault().getString("IgnoreBaseToManyAssociations");
+ if ( str != null && str.trim().equals("true") ) {
+ defaultIgnoreBaseToManyAssociations = true;
+ }
+ }
+
public ElementRealizer(MethodConfiguration config) {
this(config, true, true);
}
@@ -54,6 +71,19 @@
this.resolveReplacer = resolveReplacer;
}
+ /**
+ * is extend-replace enabled for replacement
+ *
+ * @return boolean
+ */
+ public static boolean isExtendReplaceEnabled() {
+ return defaultEnableExtendReplace;
+ }
+
+ public static boolean ignoreBaseToManyAssociations() {
+ return defaultIgnoreBaseToManyAssociations;
+ }
+
public void setDiscardContributor(boolean discardContributor) {
this.discardContributor = discardContributor;
}
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/FeatureValue.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/FeatureValue.java
index 5db21fd..4acc931 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/FeatureValue.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/FeatureValue.java
@@ -27,6 +27,8 @@
*/
abstract class FeatureValue {
+ protected static final String _NULL_ = "_NULL_";
+
protected MethodElement element; // the element
protected MethodElement ownerElement; // the container of the element
protected Object feature; // EStructrualFeature or Oppositefeature
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToManyFeatureValue.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToManyFeatureValue.java
index 9abb38b..71ad338 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToManyFeatureValue.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToManyFeatureValue.java
@@ -40,12 +40,15 @@
}
for (Iterator it = ((List) value).iterator(); it.hasNext();) {
- MethodElement e = (MethodElement) it.next();
- MethodElement ce = realizer.realize(e);
-
- // calculated element can be null if it can't show
- if (ce != null && !values.contains(ce)) {
- values.add(ce);
+ Object obj = it.next();
+ if ( obj instanceof MethodElement ) {
+ MethodElement e = (MethodElement) obj;
+ MethodElement ce = realizer.realize(e);
+
+ // calculated element can be null if it can't show
+ if (ce != null && !values.contains(ce)) {
+ values.add(ce);
+ }
}
}
@@ -58,8 +61,25 @@
}
- public Object getValue() {
+ public Object getValue() {
+ if ( ElementRealizer.isExtendReplaceEnabled() ) {
+ List items = new ArrayList();
+
+ // remove the _NULL_ item. that is used as an indicator to blank out the base
+ // for the extend-replace
+ for (Iterator it = values.iterator(); it.hasNext(); ) {
+ Object o = (Object) it.next();
+ if ( (o instanceof MethodElement) && _NULL_.equals(((MethodElement)o).getName()) ){
+ continue;
+ }
+ items.add(o);
+ }
+
+ return items;
+ }
+
return values;
+
}
public int size() {
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToManyOppositeFeatureValue.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToManyOppositeFeatureValue.java
index b9c6800..e3199de 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToManyOppositeFeatureValue.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToManyOppositeFeatureValue.java
@@ -14,6 +14,7 @@
import java.util.Iterator;
import java.util.List;
+import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.epf.uma.MethodElement;
import org.eclipse.epf.uma.VariabilityElement;
import org.eclipse.epf.uma.ecore.util.OppositeFeature;
@@ -66,9 +67,62 @@
// so for A1's responsible role opposite feature,
// the value R1 should be dropped instead of realize to R2
// Jinhua Xi, 10/27/2005
- boolean isValueReplaced = (e instanceof VariabilityElement)
- && (ConfigurationHelper.getReplacer((VariabilityElement) e, realizer.getConfiguration()) != null);
- if (!isValueReplaced) {
+ MethodElement replacer = null;
+ if ( e instanceof VariabilityElement ) {
+ replacer = ConfigurationHelper.getReplacer((VariabilityElement) e, realizer.getConfiguration());
+ }
+ boolean isValueReplaced = (replacer != null);
+
+ boolean keep = !isValueReplaced;
+ if ( isValueReplaced && ElementRealizer.isExtendReplaceEnabled() ) {
+ // if the value is replaced, but the out going feature is inherited by the replacer
+ // then we should keep this value, so we need to calculate the feature value
+ // of the replacer
+ OppositeFeature of = (OppositeFeature)feature;
+ EStructuralFeature f = of.getTargetFeature();
+ if ( f.isMany() ) {
+ List items = ConfigurationHelper.calc0nFeatureValue(replacer, f, realizer);
+ keep = items.contains(owner);
+ } else {
+ MethodElement item = ConfigurationHelper.calc01FeatureValue(replacer, f, realizer);
+ keep = (item == owner);
+ }
+ }
+
+ // if the value's feature to this element is to-one,
+ // then this value's feature value should be the element,
+ // otherwise drop the value
+ // for example,
+ // T1 -> R1 (primary performaer)
+ // T2 -> R2
+ // T2 contributes to T1
+ // since T1 already has R1, so R2 is droped
+ // so when calculating R2's performing tasks, T1 should not be included
+ if ( keep ) {
+ MethodElement ve = ConfigurationHelper.getCalculatedElement(e, realizer);
+ if ( ve != null ) {
+ OppositeFeature of = (OppositeFeature)feature;
+
+ // check if this is a to-one feature, currently only Task->Primary Role and TD -> Primary RD
+ EStructuralFeature f = ConfigurationHelper.get01Feature(of);
+ if ( f != null ) {
+ MethodElement item = ConfigurationHelper.calc01FeatureValue(ve, f, realizer);
+
+ // if the value element's to-one feature value item is not the current element,
+ // then the element's opposite feature value should not contain this value.
+ // say, the value element is a task and the current element is a role,
+ // then if the task's primary performer (item above) is not this role (the current element),
+ // then the role's performing tasks (the opposite feature value)
+ // should not contain this task (the value, ve above)
+ if ( item != element) {
+ keep = false;
+ }
+ }
+ }
+ }
+
+ if ( keep ) {
+
MethodElement ce = ConfigurationHelper.getCalculatedElement(e, realizer);
// calculated element can be null if it can't show
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToOneFeatureValue.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToOneFeatureValue.java
index c9157f2..34af93a 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToOneFeatureValue.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToOneFeatureValue.java
@@ -52,20 +52,32 @@
return null;
}
+ Object v = null;
Object[] entries = valueMap.entrySet().toArray();
if ( size() == 1 ) {
// if just one entry, return it
- return ((Map.Entry)entries[0]).getValue();
+ v = ((Map.Entry)entries[0]).getValue();
} else {
// if more than one entry, if the first entry is from the element itself, then return the value
// otherwise, return null
Map.Entry entry = (Map.Entry)entries[0];
if ( entry.getKey() == super.element ) {
- return entry.getValue();
+ v = entry.getValue();
}
}
- return null;
+ if ( ElementRealizer.isExtendReplaceEnabled() ) {
+ if ( v != null && (v instanceof MethodElement) ) {
+ // remove the _NULL_ item. that is used as an indicator to blank out the base
+ // for the extend-replace
+ MethodElement e = (MethodElement)v;
+ if ( e != null && _NULL_.equals(e.getName()) ) {
+ v = null;
+ }
+ }
+ }
+
+ return v;
}
public int size() {
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToOneOppositeFeatureValue.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToOneOppositeFeatureValue.java
index 52ba2c9..38703de 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToOneOppositeFeatureValue.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ToOneOppositeFeatureValue.java
@@ -79,24 +79,37 @@
}
public Object getValue() {
+ Object v = null;
+
if ( size() == 0 ) {
- return null;
+ return v;
}
Object[] entries = valueMap.entrySet().toArray();
if ( size() == 1 ) {
// if just one entry, return it
- return ((Map.Entry)entries[0]).getValue();
+ v = ((Map.Entry)entries[0]).getValue();
} else {
// if more than one entry, if the first entry is from the element itself, then return the value
// otherwise, return null
Map.Entry entry = (Map.Entry)entries[0];
if ( entry.getKey() == super.element ) {
- return entry.getValue();
+ v = entry.getValue();
}
}
- return null;
+ if ( ElementRealizer.isExtendReplaceEnabled() ) {
+ if ( v != null && (v instanceof MethodElement) ) {
+ // remove the _NULL_ item. that is used as an indicator to blank out the base
+ // for the extend-replace
+ MethodElement e = (MethodElement)v;
+ if ( e != null && _NULL_.equals(e.getName()) ) {
+ v = null;
+ }
+ }
+ }
+
+ return v;
}
}
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/LayoutResources.properties b/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/LayoutResources.properties
index 7aad0ec..e9a45ef 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/LayoutResources.properties
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/LayoutResources.properties
@@ -14,7 +14,7 @@
#externalUrl_startWith=http://|https://|ftp://
# see all the possible protocals at:
# http://www.iana.org/assignments/uri-schemes.html
-externalUrl_startWith=[^file][a-zA-Z0-9\\.]{1,15}://
+externalUrl_startWith=[a-zA-Z0-9\\.]{1,15}://
# XSL Stylesheet Mapping for the Method Elements.
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/AbstractProcessElementLayout.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/AbstractProcessElementLayout.java
index fe04c93..96bd3a6 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/AbstractProcessElementLayout.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/AbstractProcessElementLayout.java
@@ -62,7 +62,7 @@
.getOwningProcess((BreakdownElement) super.element);
}
- if (element instanceof Process) {
+ if (LibraryUtil.isProcess(element)) {
owningProcess = (Process) element;
elementProcessPath = AbstractProcessElementLayout.makePath(null,
element);
@@ -182,9 +182,10 @@
String path = element.getGuid();
BreakdownElement act = element;
-
+ Process proc = TngUtil.getOwningProcess(element);
+
// Check superactivity is process and should owning process (this is useful in deepcopy
- while ( !((act instanceof Process) && act.equals(TngUtil.getOwningProcess(element))) )
+ while ( act != proc )
{
Activity superActs = act.getSuperActivities();
if ( superActs != null )
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/ActivityLayout.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/ActivityLayout.java
index 649dcf1..76a9572 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/ActivityLayout.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/ActivityLayout.java
@@ -12,6 +12,7 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -30,6 +31,7 @@
import org.eclipse.epf.library.configuration.ConfigurationHelper;
import org.eclipse.epf.library.edit.IFilter;
import org.eclipse.epf.library.edit.process.IBSItemProvider;
+import org.eclipse.epf.library.edit.util.Comparators;
import org.eclipse.epf.library.edit.util.PredecessorList;
import org.eclipse.epf.library.edit.util.ProcessUtil;
import org.eclipse.epf.library.edit.util.Suppression;
@@ -866,15 +868,19 @@
additionalTasks.addAll(items);
}
+ Collections.sort(responsibleFor, Comparators.PRESENTATION_NAME_COMPARATOR);
createRoleRollupNodes(parentXml, responsibleFor, TngUtil
.getFeatureText(UmaPackage.eINSTANCE.getRoleDescriptor_ResponsibleFor()));
+ Collections.sort(modifies, Comparators.PRESENTATION_NAME_COMPARATOR);
createRoleRollupNodes(parentXml, modifies, TngUtil
.getFeatureText(UmaPackage.eINSTANCE.getRoleDescriptor_Modifies()));
+ Collections.sort(primaryTasks, Comparators.PRESENTATION_NAME_COMPARATOR);
createRoleRollupNodes(parentXml, primaryTasks,
LibraryResources.ActivityLayout_primaryTasks_text);
+ Collections.sort(additionalTasks, Comparators.PRESENTATION_NAME_COMPARATOR);
createRoleRollupNodes(parentXml, additionalTasks,
LibraryResources.ActivityLayout_additionalTasks_text);
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/ProcessLayoutData.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/ProcessLayoutData.java
index 5ffe0f0..f9027a0 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/ProcessLayoutData.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/elements/ProcessLayoutData.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.library.layout.elements;
-import java.io.PrintStream;
+import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -55,7 +55,7 @@
return activityMap;
}
- public void print(PrintStream ps)
+ public void print(PrintWriter ps)
{
for ( Iterator it = activityMap.entrySet().iterator(); it.hasNext(); )
{
@@ -92,7 +92,7 @@
}
}
- private void printImgFile(PrintStream ps, String key, String fileName)
+ private void printImgFile(PrintWriter ps, String key, String fileName)
{
String line = "imageFiles[\"" + key + "\"]=\"" + fileName + "\"";
ps.println(line);
@@ -100,7 +100,7 @@
}
- private void printSuppressedItem(PrintStream ps, String key)
+ private void printSuppressedItem(PrintWriter ps, String key)
{
String line = "suppressedItems[\"" + key + "\"]=true";
ps.println(line);
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/prefs/PreferenceUtil.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/prefs/PreferenceUtil.java
index e571e5b..34613f1 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/prefs/PreferenceUtil.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/prefs/PreferenceUtil.java
@@ -35,6 +35,10 @@
private static Properties xslParams;
private static Map colIdLabelMap = new HashMap();
+ // quick solution, the team column for the WBS view.
+ // 162783 - Publish team information in WBS for TDs
+ private static BSColumn teamCol = null;
+
private static final String ID_STEPS = "steps";
static {
try {
@@ -76,7 +80,16 @@
}
public static List getWBSColumns() {
- return getPreferenceItems(PreferenceConstants.PREF_WBS_COLUMNS);
+ List cols = getPreferenceItems(PreferenceConstants.PREF_WBS_COLUMNS);
+
+ // if the TBS columns has team, also add to the WBS
+ // 162783 - Publish team information in WBS for TDs
+ teamCol = null;
+ getTBSColumns();
+ if ( teamCol != null ) {
+ cols.add(cols.size(), teamCol);
+ }
+ return cols;
}
public static List getTBSColumns() {
@@ -121,6 +134,12 @@
col = new BSColumn(ID_STEPS, getColText(ID_STEPS));
items.add(col);
}
+
+ // save the team column for WBS
+ // 162783 - Publish team information in WBS for TDs
+ if ( IBSItemProvider.COL_TEAMS.equals(id) ) {
+ teamCol = col;
+ }
}
}
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/util/LibraryUtil.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/util/LibraryUtil.java
index 81a1c7a..1dd9032 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/util/LibraryUtil.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/util/LibraryUtil.java
@@ -591,4 +591,9 @@
return true;
}
+
+ public static boolean isProcess(EObject e) {
+ return (e instanceof org.eclipse.epf.uma.Process) &&
+ (e.eContainer() instanceof ProcessComponent);
+ }
}
\ No newline at end of file
diff --git a/org.eclipse.epf.library/src/org/eclipse/epf/library/util/ResourceHelper.java b/org.eclipse.epf.library/src/org/eclipse/epf/library/util/ResourceHelper.java
index 034a3f0..00c6146 100644
--- a/org.eclipse.epf.library/src/org/eclipse/epf/library/util/ResourceHelper.java
+++ b/org.eclipse.epf.library/src/org/eclipse/epf/library/util/ResourceHelper.java
@@ -1178,18 +1178,25 @@
"(" + EXTERNAL_URL_START_WITH + ")", Pattern.CASE_INSENSITIVE | Pattern.DOTALL); //$NON-NLS-1$
public static boolean isExternalLink(String url) {
- // return url.startsWith("http://") || url.startsWith("www.") ||
- // url.startsWith("ftp://") ; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ // 162969 - Refine external link's regular exp in epf.library/layout/LayoutResources.properties
// file:// should be excluded
if ( url == null ) {
return false;
}
- if ( url.toLowerCase().startsWith("file://") ) { //$NON-NLS-1$
+ url = url.toLowerCase();
+ if ( url.startsWith("file://") ) { //$NON-NLS-1$
return false;
}
+ if ( url.startsWith("http://") //$NON-NLS-1$
+ || url.startsWith("https://") //$NON-NLS-1$
+ || url.startsWith("ftp://") //$NON-NLS-1$
+ || url.startsWith("www.") ) { //$NON-NLS-1$
+ return true;
+ }
+
Matcher m = p_external_url_startWith.matcher(url);
if (m.find()) {
return (m.start(1) == 0);
diff --git a/org.eclipse.epf.msproject/META-INF/MANIFEST.MF b/org.eclipse.epf.msproject/META-INF/MANIFEST.MF
index 2bae44e..0fd83b1 100644
--- a/org.eclipse.epf.msproject/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.msproject/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.msproject; singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.epf.msproject,
diff --git a/org.eclipse.epf.platform.feature/feature.xml b/org.eclipse.epf.platform.feature/feature.xml
index 63d6ed7..1b51887 100644
--- a/org.eclipse.epf.platform.feature/feature.xml
+++ b/org.eclipse.epf.platform.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.epf.platform"
label="%featureName"
- version="1.0.1"
+ version="1.0.2"
provider-name="%providerName"
os="linux,win32"
ws="gtk,win32"
@@ -25,6 +25,12 @@
<update label="%updateSiteName" url="http://update.eclipse.org/updates/3.2"/>
</url>
+ <!--
+ <includes
+ id="org.eclipse.platform.launchers"
+ version="0.0.0"/>
+ -->
+
<plugin
id="com.ibm.icu"
download-size="0"
diff --git a/org.eclipse.epf.platform/about.properties b/org.eclipse.epf.platform/about.properties
index 39c8189..8c83423 100644
--- a/org.eclipse.epf.platform/about.properties
+++ b/org.eclipse.epf.platform/about.properties
@@ -24,12 +24,12 @@
#
# Do not translate any values surrounded by {}
-featureName=Eclipse Platform 3.2.0 with EMF and GEF
+featureName=Eclipse Platform 3.2.1 with EMF and GEF
blurb=Eclipse Platform\n\
\n\
-Version: 3.2.0\n\
-Build id: M20060629-1905\n\
+Version: 3.2.1\n\
+Build id: M20060921-0945\n\
\n\
(c) Copyright Eclipse contributors and others 2000, 2006. All rights reserved.\n\
Visit http://www.eclipse.org/platform\n\
diff --git a/org.eclipse.epf.platform/plugin.xml b/org.eclipse.epf.platform/plugin.xml
index 4e97255..e76071d 100644
--- a/org.eclipse.epf.platform/plugin.xml
+++ b/org.eclipse.epf.platform/plugin.xml
@@ -3,7 +3,7 @@
<plugin
id="org.eclipse.epf.platform"
name="%featurePluginName"
- version="1.0.1"
+ version="1.0.2"
provider-name="%providerName">
</plugin>
diff --git a/org.eclipse.epf.publishing.ui/META-INF/MANIFEST.MF b/org.eclipse.epf.publishing.ui/META-INF/MANIFEST.MF
index 5c7c017..8271924 100644
--- a/org.eclipse.epf.publishing.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.publishing.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.publishing.ui; singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Activator: org.eclipse.epf.publishing.ui.PublishingUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.epf.publishing/META-INF/MANIFEST.MF b/org.eclipse.epf.publishing/META-INF/MANIFEST.MF
index 356f695..1366e42 100644
--- a/org.eclipse.epf.publishing/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.publishing/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.publishing
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-ClassPath: publishing.jar, lib/rpwcore.jar
Bundle-Activator: org.eclipse.epf.publishing.PublishingPlugin
Bundle-Vendor: %providerName
diff --git a/org.eclipse.epf.publishing/docroot/images/splash.gif b/org.eclipse.epf.publishing/docroot/images/splash.gif
index c493bf6..923956e 100644
--- a/org.eclipse.epf.publishing/docroot/images/splash.gif
+++ b/org.eclipse.epf.publishing/docroot/images/splash.gif
Binary files differ
diff --git a/org.eclipse.epf.publishing/docroot/noapplet/toc.js b/org.eclipse.epf.publishing/docroot/noapplet/toc.js
index dc37da9..799786e 100644
--- a/org.eclipse.epf.publishing/docroot/noapplet/toc.js
+++ b/org.eclipse.epf.publishing/docroot/noapplet/toc.js
@@ -512,12 +512,19 @@
var plus_minus = getPlusMinus(clickedNode);
if (plus_minus != null)
{
- if (isCollapsed(plus_minus))
- expand(plus_minus);
- else if (isExpanded(plus_minus))
- collapse(plus_minus);
-
- highlightTopic(plus_minus);
+ if (clickedNode.tagName == "A" && getChildNode(clickedNode.parentNode, "UL") == null)
+ {
+ highlightTopic(plus_minus);
+ }
+ else
+ {
+ if (isCollapsed(plus_minus))
+ expand(plus_minus);
+ else if (isExpanded(plus_minus))
+ collapse(plus_minus);
+
+ highlightTopic(plus_minus);
+ }
}
if (isMozilla)
diff --git a/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/ConfigurationViewBuilder.java b/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/ConfigurationViewBuilder.java
index bda1143..35630ff 100644
--- a/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/ConfigurationViewBuilder.java
+++ b/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/ConfigurationViewBuilder.java
@@ -12,7 +12,8 @@
import java.io.File;
import java.io.FileOutputStream;
-import java.io.PrintStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -149,36 +150,23 @@
protected EObjectComparator nameComparator = new EObjectComparator();
+ /**
+ * constructor
+ *
+ * @param builder HtmlBuilder
+ * @param options PublishOptions
+ */
public ConfigurationViewBuilder(HtmlBuilder builder, PublishOptions options) {
super(builder, options);
}
-// public static ConfigurationViewBuilder getViewBuilder(String pubDir,
-// MethodConfiguration config, PublishOptions options) {
-// boolean validateExternalLinks = (options != null)
-// && options.checkExtLinks;
-//
-// PublishingContentValidator validator = null;
-// ElementRealizer realizer = null;
-// if ((options != null) && options.publishProcess) {
-// validator = new ProcessPublishingContentValidator(pubDir,
-// validateExternalLinks);
-// realizer = new ProcessPublishingElementRealizer(config,
-// (ProcessPublishingContentValidator)validator);
-// } else {
-// validator = new PublishingContentValidator(pubDir,
-// validateExternalLinks);
-// realizer = new PublishingElementRealizer(config, validator);
-// }
-//
-// ElementLayoutManager layoutMgr = new ElementLayoutManager(config,
-// pubDir, validator, true);
-// layoutMgr.setElementRealizer(realizer);
-// HtmlBuilder builder = new HtmlBuilder(layoutMgr);
-//
-// return new ConfigurationViewBuilder(builder, options);
-// }
+ /**
+ * build the views defined in the configuration and publish the related contents
+ *
+ * @param monitor IProgressMonitor
+ * @return List a list of Bookmarks for the views
+ */
public List buildViews(IProgressMonitor monitor)
{
this.monitor = monitor;
@@ -307,7 +295,7 @@
// collect process specific layout info with suppression status
// this will incldue the diagrams and the supression states of
// each item under the current procee
- if (e instanceof org.eclipse.epf.uma.Process) {
+ if ( LibraryUtil.isProcess(e)) {
publishProcessLayout((org.eclipse.epf.uma.Process) e);
}
@@ -377,12 +365,13 @@
if (e instanceof MethodPlugin || e instanceof MethodPackage) {
continue;
}
+
super.publish(monitor, e);
// collect process specific layout info with suppression status
// this will incldue the diagrams and the supression states of
// each item under the current procee
- if (e instanceof org.eclipse.epf.uma.Process) {
+ if ( LibraryUtil.isProcess(e)) {
publishProcessLayout((org.eclipse.epf.uma.Process) e);
}
} catch (Exception ex) {
@@ -446,78 +435,30 @@
private void printLayoutScript(ProcessLayoutData data) {
File outputFile = new File(getLayoutMgr().getPublishDir(),
"/scripts/activitylayout.js"); //$NON-NLS-1$
- PrintStream ps = null;
+ PrintWriter pw = null;
try {
- ps = new PrintStream(new FileOutputStream(outputFile, true), true);
- data.print(ps);
+ // create a stream with append enabled
+ FileOutputStream os = new FileOutputStream(outputFile, true);
+
+ // create a write with utf-8 encoding
+ OutputStreamWriter writer = new OutputStreamWriter(os, "utf-8"); //$NON-NLS-1$
+
+ // create a print writer with auto flush
+ pw = new PrintWriter(writer, true);
+ data.print(pw);
} catch (Exception e) {
+ getValidator()
+ .logError("unable to save process layout data", e); //$NON-NLS-1$
} finally {
- if (ps != null) {
- ps.flush();
- ps.close();
+ if (pw != null) {
+ pw.flush();
+ pw.close();
}
}
}
- // /**
- // * build a closure for the element and fill the list with the elements
- // referenced by this element and it's referenced elements, ..., within the
- // configuration
- // * @param element MethodElement
- // * @param colsureElements List
- // */
- // private void buildElementClosure(MethodElement element,
- // MethodConfiguration config, List closureElements)
- // {
- // if ( monitor != null )
- // {
- // monitor.subTask(PublishingResources.formatString("Publishing.buildingElementClosureTask.name",
- // element.getName()) ); //$NON-NLS-1$
- // }
- //
- // List properties = element.getInstanceProperties();
- // if (properties != null)
- // {
- // // get element references
- // for (int i = 0; i < properties.size(); i++)
- // {
- // EStructuralFeature feature = (EStructuralFeature)properties.get(i);
- // EClassifier type = feature.getEType();
- // if ( !(type instanceof EClass) )
- // {
- // continue;
- // }
- //
- // if ( feature.isMany() )
- // {
- // List items = calc0nFeatureValue(element, feature);
- // if ( items != null && items.size() > 0 )
- // {
- // for ( Iterator it = items.iterator(); it.hasNext(); )
- // {
- // MethodElement e = (MethodElement) it.next();
- // if ( (e != null) && (e != element) && !closureElements.contains(e) )
- // {
- // closureElements.add(e);
- // buildElementClosure(e, config, closureElements);
- // }
- // }
- // }
- // }
- // else
- // {
- // MethodElement e = calc01FeatureValue(element, feature);
- // if ( (e != null) && (e != element) && !closureElements.contains(e) )
- // {
- // closureElements.add(e);
- // buildElementClosure(e, config, closureElements);
- // }
- // }
- // }
- // }
- // }
/**
* Iterate thru tuee
@@ -650,7 +591,7 @@
buildRoleSubTree((Role) element, bm);
} else if (element instanceof WorkProduct) {
buildWorkProductSubTree((WorkProduct) element, bm);
- } else if (element instanceof org.eclipse.epf.uma.Process) {
+ } else if ( LibraryUtil.isProcess(element)) {
buildProcessSubTree(obj, (org.eclipse.epf.uma.Process) element, bm);
} else {
// System.out.println("Not handled: " + element);
@@ -1297,29 +1238,6 @@
List items;
String url = ""; //$NON-NLS-1$
- // Bookmark b;
-
- // // performing roles, 0.1 reference element will be realized in
- // buildItem
- // Role r = AssociationHelper.getResponsibleRole(element);
- // if ( r != null )
- // {
- // items = new ArrayList();
- // items.add(r);
- // createFolderBookmark(element, bm, NODE_Responsible_Role, items,
- // true);
- // }
-
- // WorkProduct wp = ((Artifact)element).getContainerArtifact();
- // createBookmark(NODE_Containing_Work_Product,
- // NODE_Containing_Work_Product, url, "", "");
- // if ( wp != null )
- // {
- // items = new ArrayList();
- // items.add(wp);
- // createFolderBookmark(element, bm, NODE_Containing_Work_Product,
- // items, true);
- // }
// contained work products, need a summary page, TODO
// items = ((Artifact)element).getContainedArtifacts();
@@ -1350,24 +1268,6 @@
}
}
- // // input to tasks
- // items = new ArrayList();
- // items.addAll(ConfigurationHelper.calc0nFeatureValue(element,
- // AssociationHelper.WorkProduct_MandatoryInputTo_Tasks, config));
- // items.addAll(ConfigurationHelper.calc0nFeatureValue(element,
- // AssociationHelper.WorkProduct_OptionalInputTo_Tasks, config));
- // if ( items.size() > 0 )
- // {
- // createFolderBookmark(element, bm, NODE_InputTo_Task, items, true);
- // }
- //
- // // output from tasks
- // items = ConfigurationHelper.calc0nFeatureValue(element,
- // AssociationHelper.WorkProduct_OutputFrom_Tasks, config);
- // if ( items.size() > 0 )
- // {
- // createFolderBookmark(element, bm, NODE_OutputOf_Task, items, true);
- // }
if (!showGuidances) {
return;
@@ -1500,51 +1400,9 @@
Suppression sup = new Suppression(element);
iterateActivity(procItem, bm, adapterFactory, sup);
- // ITreeItemContentProvider provider = null;
- //
- // if ( obj instanceof ITreeItemContentProvider )
- // {
- // provider = (ITreeItemContentProvider)obj;
- // }
- // else
- // {
- // // work breakdown structure
- // ComposedAdapterFactory adapterFactory =
- // TngAdapterFactory.INSTANCE.getWBS_ComposedAdapterFactory();
- // provider = (ITreeItemContentProvider) adapterFactory.adapt(element,
- // ITreeItemContentProvider.class);
- // }
- //
- // if (provider != null )
- // {
- // Collection children = provider.getChildren(element) ;
- // for (Iterator it = children.iterator(); it.hasNext();)
- // {
- // items.add(LibraryUtil.unwrap(it.next()));
- // }
- // }
-
String url;
Bookmark b;
- // if ( items.size() > 0 )
- // {
- // //createFolderBookmark(element, bm, NODE_Work_Break_Down_Structure,
- // items, true);
- // buildItems(items, bm);
- // }
-
- // // included patterns, need a summary page, TODO
- // //items = element.getIncludesPatterns();
- // items = ConfigurationHelper.calc0nFeatureValue(element,
- // UmaPackage.eINSTANCE.getProcess_IncludesPatterns(), config);
- //
- // if ( items.size() > 0 )
- // {
- // createFolderBookmark(element, bm, NODE_Included_Patterns, items,
- // true);
- // }
-
if (monitor.isCanceled()) {
return;
}
@@ -1574,6 +1432,9 @@
}
}
+ /**
+ * dispose the object
+ */
public void dispose() {
super.dispose();
@@ -1611,12 +1472,25 @@
FileUtil.writeUTF8File(f.getAbsolutePath(), html, true);
}
+ /**
+ * data structure to define url of an element
+ *
+ * @author Jinhua Xi
+ *
+ */
public class ElementUrl{
String guid;
String url;
String text;
+ /**
+ * constructor
+ *
+ * @param guid String the guid of the element
+ * @param url String the url of the element
+ * @param text String the text alone with the url
+ */
public ElementUrl(String guid, String url, String text) {
this.guid = guid;
this.url = url;
diff --git a/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/ProcessPublishingContentValidator.java b/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/ProcessPublishingContentValidator.java
index bbabb0b..f8af7d7 100644
--- a/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/ProcessPublishingContentValidator.java
+++ b/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/ProcessPublishingContentValidator.java
@@ -15,6 +15,7 @@
import java.util.Iterator;
import java.util.List;
+import org.eclipse.epf.library.configuration.ConfigurationHelper;
import org.eclipse.epf.library.util.LibraryUtil;
import org.eclipse.epf.publishing.PublishingPlugin;
import org.eclipse.epf.uma.BreakdownElement;
@@ -104,15 +105,20 @@
if ( !hasClosure() ) {
return true;
}
-
- if ( closureElements.contains(e) ) {
- return true;
- }
-
+
if ( e instanceof ContentCategory ) {
return true;
}
+ // 166048 - check-items, task-steps don't appear when using the publishing type "publish the processes selected below"
+ if ( ConfigurationHelper.isDescriptionElement(e) ) {
+ return true;
+ }
+
+ if ( closureElements.contains(e) ) {
+ return true;
+ }
+
if ( !(e instanceof Guidance) ) {
return false;
}
diff --git a/org.eclipse.epf.rcp/beacon.product b/org.eclipse.epf.rcp/beacon.product
index ee4d13a..a54a87d 100644
--- a/org.eclipse.epf.rcp/beacon.product
+++ b/org.eclipse.epf.rcp/beacon.product
@@ -8,7 +8,7 @@
<text>
Eclipse Process Framework Composer
-Version: 1.0.1-N20061017-1717
+Version: 1.0.2-N20070113-2308
(c) Copyright Eclipse contributors and others 2004, 2006. All Rights Reserved.
</text>
@@ -17,7 +17,7 @@
<configIni use="default"/>
<launcherArgs>
- <programArgs>-data @user.home/EPF/workspace.20061017-1717 -defaultlibrary OpenUP</programArgs>
+ <programArgs>-data @user.home/EPF/workspace.20070113-2308 -defaultlibrary OpenUP</programArgs>
<vmArgs>-Xms64m -Xmx512m</vmArgs>
</launcherArgs>
@@ -36,8 +36,8 @@
</plugins>
<features>
- <feature id="org.eclipse.epf.base" version="1.0.1"/>
- <feature id="org.eclipse.epf.platform" version="1.0.1"/>
+ <feature id="org.eclipse.epf.base" version="1.0.2"/>
+ <feature id="org.eclipse.epf.platform" version="1.0.2"/>
</features>
</product>
diff --git a/org.eclipse.epf.rcp/introContent.xml b/org.eclipse.epf.rcp/introContent.xml
index baf46a9..40a76c8 100644
--- a/org.eclipse.epf.rcp/introContent.xml
+++ b/org.eclipse.epf.rcp/introContent.xml
@@ -109,7 +109,7 @@
</link>
<link
label="Configuration and Publishing"
- url="http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.epf.help.doc/html/overview/publishing_overview.html&embedTarget=page-content"
+ url="http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.epf.help.doc/html/overview/method_configurations_overview.html&embedTarget=page-content"
id="epf-ov-configpublish">
<text>Read about configuring and publishing method content and processes in EPF Composer.</text>
</link>
diff --git a/org.eclipse.epf.rcp/plugin.xml b/org.eclipse.epf.rcp/plugin.xml
index 3b744a4..6ff9070 100644
--- a/org.eclipse.epf.rcp/plugin.xml
+++ b/org.eclipse.epf.rcp/plugin.xml
@@ -3,7 +3,7 @@
<plugin
id="org.eclipse.epf.rcp"
name="%pluginName"
- version="1.0.1"
+ version="1.0.2"
provider-name="%providerName"
class="org.eclipse.epf.rcp.MainPlugin">
@@ -54,7 +54,7 @@
value="icons/about.gif"/>
<property
name="aboutText"
- value="Eclipse Process Framework Composer 

Version: 1.0.1-N20061017-1717

(c) Copyright Eclipse contributors and others 2004, 2006. All Rights Reserved."/>
+ value="Eclipse Process Framework Composer 

Version: 1.0.2-N20070113-2308

(c) Copyright Eclipse contributors and others 2004, 2006. All Rights Reserved."/>
<property
name="windowImages"
value="icons/full/obj16/product.gif,icons/full/obj32/product32.gif"/>
@@ -66,9 +66,9 @@
<intro
class="org.eclipse.ui.intro.config.CustomizableIntroPart"
icon="icons/full/obj16/product.gif"
- id="org.eclipse.ui.intro"/>
+ id="org.eclipse.epf.intro"/>
<introProductBinding
- introId="org.eclipse.ui.intro"
+ introId="org.eclipse.epf.intro"
productId="org.eclipse.epf.rcp.beacon"/>
</extension>
@@ -77,7 +77,7 @@
<config
content="$nl$/introContent.xml"
id="org.eclipse.ui.intro.config"
- introId="org.eclipse.ui.intro">
+ introId="org.eclipse.epf.intro">
<presentation home-page-id="root" standby-page-id="standby">
<implementation
ws="win32,gtk"
diff --git a/org.eclipse.epf.rcp/plugin_customization.ini b/org.eclipse.epf.rcp/plugin_customization.ini
index c5d4a24..513ac06 100644
--- a/org.eclipse.epf.rcp/plugin_customization.ini
+++ b/org.eclipse.epf.rcp/plugin_customization.ini
@@ -3,4 +3,5 @@
org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false
org.eclipse.ui/OPEN_NEW_PERSPECTIVE=OPEN_PERSPECTIVE_REPLACE
org.eclipse.epf.library.ui/appname=EPF
-org.eclipse.epf.library.edit/ACTIVITY_DETAIL_DIAGRAM_TASKS_PER_ROW=5
\ No newline at end of file
+org.eclipse.epf.library.edit/ACTIVITY_DETAIL_DIAGRAM_TASKS_PER_ROW=5
+org.eclipse.team.core/ignore_files=.lock\ntrue\n.project\ntrue\n
\ No newline at end of file
diff --git a/org.eclipse.epf.releng/maps/epf.map b/org.eclipse.epf.releng/maps/epf.map
index ab15bc9..ce85711 100644
--- a/org.eclipse.epf.releng/maps/epf.map
+++ b/org.eclipse.epf.releng/maps/epf.map
@@ -1,33 +1,33 @@
-feature@org.eclipse.epf.base=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.base.feature
-feature@org.eclipse.epf.platform=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.platform.feature
-plugin@org.eclipse.epf.authoring.ui=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.authoring.ui
-plugin@org.eclipse.epf.base=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.base
-plugin@org.eclipse.epf.common=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.common
-plugin@org.eclipse.epf.common.win32.win32.x86=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.common.win32.win32.x86
-plugin@org.eclipse.epf.dataexchange=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.dataexchange
-plugin@org.eclipse.epf.diagram=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.diagram
-plugin@org.eclipse.epf.export=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.export
-plugin@org.eclipse.epf.export.msp=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.export.msp
-plugin@org.eclipse.epf.export.xml=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.export.xml
-plugin@org.eclipse.epf.help.doc=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.help.doc
-plugin@org.eclipse.epf.import=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.import
-plugin@org.eclipse.epf.import.xml=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.import.xml
-plugin@org.eclipse.epf.library=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.library
-plugin@org.eclipse.epf.library.edit=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.library.edit
-plugin@org.eclipse.epf.library.persistence=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.library.persistence
-plugin@org.eclipse.epf.library.ui=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.library.ui
-plugin@org.eclipse.epf.library.xmi=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.library.xmi
-plugin@org.eclipse.epf.msproject=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.msproject
-plugin@org.eclipse.epf.platform=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.platform
-plugin@org.eclipse.epf.publisher=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.publisher
-plugin@org.eclipse.epf.publishing=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.publishing
-plugin@org.eclipse.epf.publishing.ui=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.publishing.ui
-plugin@org.eclipse.epf.rcp=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.rcp
-plugin@org.eclipse.epf.releng=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.releng
-plugin@org.eclipse.epf.richtext=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.richtext
-plugin@org.eclipse.epf.search=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.search
-plugin@org.eclipse.epf.search.ui=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.search.ui
-plugin@org.eclipse.epf.uma=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.uma
-plugin@org.eclipse.epf.uma.ecore=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.uma.ecore
-plugin@org.eclipse.epf.uma.edit=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.uma.edit
-plugin@org.eclipse.epf.xml.uma=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.xml.uma
\ No newline at end of file
+feature@org.eclipse.epf.base=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.base.feature
+feature@org.eclipse.epf.platform=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.platform.feature
+plugin@org.eclipse.epf.authoring.ui=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.authoring.ui
+plugin@org.eclipse.epf.base=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.base
+plugin@org.eclipse.epf.common=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.common
+plugin@org.eclipse.epf.common.win32.win32.x86=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.common.win32.win32.x86
+plugin@org.eclipse.epf.dataexchange=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.dataexchange
+plugin@org.eclipse.epf.diagram=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.diagram
+plugin@org.eclipse.epf.export=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.export
+plugin@org.eclipse.epf.export.msp=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.export.msp
+plugin@org.eclipse.epf.export.xml=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.export.xml
+plugin@org.eclipse.epf.help.doc=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.help.doc
+plugin@org.eclipse.epf.import=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.import
+plugin@org.eclipse.epf.import.xml=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.import.xml
+plugin@org.eclipse.epf.library=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.library
+plugin@org.eclipse.epf.library.edit=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.library.edit
+plugin@org.eclipse.epf.library.persistence=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.library.persistence
+plugin@org.eclipse.epf.library.ui=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.library.ui
+plugin@org.eclipse.epf.library.xmi=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.library.xmi
+plugin@org.eclipse.epf.msproject=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.msproject
+plugin@org.eclipse.epf.platform=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.platform
+plugin@org.eclipse.epf.publisher=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.publisher
+plugin@org.eclipse.epf.publishing=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.publishing
+plugin@org.eclipse.epf.publishing.ui=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.publishing.ui
+plugin@org.eclipse.epf.rcp=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.rcp
+plugin@org.eclipse.epf.releng=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.releng
+plugin@org.eclipse.epf.richtext=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.richtext
+plugin@org.eclipse.epf.search=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.search
+plugin@org.eclipse.epf.search.ui=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.search.ui
+plugin@org.eclipse.epf.uma=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.uma
+plugin@org.eclipse.epf.uma.ecore=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.uma.ecore
+plugin@org.eclipse.epf.uma.edit=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.uma.edit
+plugin@org.eclipse.epf.xml.uma=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/plugins/org.eclipse.epf.xml.uma
\ No newline at end of file
diff --git a/org.eclipse.epf.releng/maps/epf_tests.map b/org.eclipse.epf.releng/maps/epf_tests.map
index 0d58fe5..bb9d9ae 100644
--- a/org.eclipse.epf.releng/maps/epf_tests.map
+++ b/org.eclipse.epf.releng/maps/epf_tests.map
@@ -1,4 +1,4 @@
-plugin@org.eclipse.epf.common.tests=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/tests/org.eclipse.epf.common.tests
-plugin@org.eclipse.epf.library.tests=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/tests/org.eclipse.epf.library.tests
-plugin@org.eclipse.epf.richtext.tests=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/tests/org.eclipse.epf.richtext.tests
-plugin@org.eclipse.epf.tests=HEAD,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/tests/org.eclipse.epf.tests
+plugin@org.eclipse.epf.common.tests=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/tests/org.eclipse.epf.common.tests
+plugin@org.eclipse.epf.library.tests=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/tests/org.eclipse.epf.library.tests
+plugin@org.eclipse.epf.richtext.tests=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/tests/org.eclipse.epf.richtext.tests
+plugin@org.eclipse.epf.tests=R1_0_2_BRANCH,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,,org.eclipse.epf/tests/org.eclipse.epf.tests
diff --git a/org.eclipse.epf.richtext/META-INF/MANIFEST.MF b/org.eclipse.epf.richtext/META-INF/MANIFEST.MF
index 62c3368..335317b 100644
--- a/org.eclipse.epf.richtext/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.richtext/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.richtext
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-ClassPath: richtext.jar
Bundle-Activator: org.eclipse.epf.richtext.RichTextPlugin
Bundle-Vendor: %providerName
diff --git a/org.eclipse.epf.search.ui/META-INF/MANIFEST.MF b/org.eclipse.epf.search.ui/META-INF/MANIFEST.MF
index d47717f..285f39a 100644
--- a/org.eclipse.epf.search.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.search.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.search.ui; singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Activator: org.eclipse.epf.search.ui.SearchUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.epf.search.ui/plugin.xml b/org.eclipse.epf.search.ui/plugin.xml
index 248df04..f4dee4b 100644
--- a/org.eclipse.epf.search.ui/plugin.xml
+++ b/org.eclipse.epf.search.ui/plugin.xml
@@ -8,7 +8,7 @@
label="%methodSearchDialogLabel"
icon="icons/full/obj16/MethodSearch.gif"
sizeHint="250,160"
- tabPosition="1"
+ tabPosition="0"
extensions="*:1"
showScopeSection="false"
canSearchEnclosingProjects="false">
diff --git a/org.eclipse.epf.search/META-INF/MANIFEST.MF b/org.eclipse.epf.search/META-INF/MANIFEST.MF
index f4ffab6..191b6ed 100644
--- a/org.eclipse.epf.search/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.search/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.search
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Activator: org.eclipse.epf.search.SearchPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.epf.uma.ecore/META-INF/MANIFEST.MF b/org.eclipse.epf.uma.ecore/META-INF/MANIFEST.MF
index e35e676..07b5a3e 100644
--- a/org.eclipse.epf.uma.ecore/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.uma.ecore/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.uma.ecore
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.resources,
diff --git a/org.eclipse.epf.uma.edit/META-INF/MANIFEST.MF b/org.eclipse.epf.uma.edit/META-INF/MANIFEST.MF
index 6ded986..eec0765 100644
--- a/org.eclipse.epf.uma.edit/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.uma.edit/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.uma.edit;singleton:=true
Bundle-ClassPath: umaedit.jar
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
diff --git a/org.eclipse.epf.uma/META-INF/MANIFEST.MF b/org.eclipse.epf.uma/META-INF/MANIFEST.MF
index eccaf84..83f6574 100644
--- a/org.eclipse.epf.uma/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.uma/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.uma;singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
diff --git a/org.eclipse.epf.xml.uma/META-INF/MANIFEST.MF b/org.eclipse.epf.xml.uma/META-INF/MANIFEST.MF
index 0343958..d068ddc 100644
--- a/org.eclipse.epf.xml.uma/META-INF/MANIFEST.MF
+++ b/org.eclipse.epf.xml.uma/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.epf.xml.uma; singleton:=true
-Bundle-Version: 1.0.1
+Bundle-Version: 1.0.2
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.epf.xml.uma,