re-factoring to separate UI from non-ui plugins
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.authoring.ui/META-INF/MANIFEST.MF
index 1f94359..1092dfb 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/META-INF/MANIFEST.MF
@@ -26,7 +26,8 @@
org.eclipse.epf.diagram.ui;visibility:=reexport,
org.eclipse.search,
org.eclipse.gmf.runtime.draw2d.ui.render,
- org.eclipse.gmf.runtime.draw2d.ui.render.awt
+ org.eclipse.gmf.runtime.draw2d.ui.render.awt,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.authoring.gef.commands,
org.eclipse.epf.authoring.gef.edit,
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/commands/ChangeNameCommand.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/commands/ChangeNameCommand.java
index 8d5e767..80956ee 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/commands/ChangeNameCommand.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/commands/ChangeNameCommand.java
@@ -13,7 +13,7 @@
import org.eclipse.epf.authoring.gef.edit.NamedNodeEditPart;
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.diagram.model.NamedNode;
import org.eclipse.gef.commands.Command;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/commands/DiagramModifyCommand.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/commands/DiagramModifyCommand.java
index d174577..95f16bd 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/commands/DiagramModifyCommand.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/commands/DiagramModifyCommand.java
@@ -14,7 +14,7 @@
import org.eclipse.emf.ecore.EObject;
import org.eclipse.epf.authoring.gef.util.DiagramUIResources;
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.diagram.model.Diagram;
import org.eclipse.epf.library.edit.ui.UserInteractionHelper;
import org.eclipse.gef.commands.Command;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/FreeTextDirectEditManager.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/FreeTextDirectEditManager.java
index 9f6a15b..7235d00 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/FreeTextDirectEditManager.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/FreeTextDirectEditManager.java
@@ -15,7 +15,7 @@
import org.eclipse.epf.authoring.gef.util.DiagramUIResources;
import org.eclipse.epf.authoring.gef.util.TemplateConstants;
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.diagram.model.Node;
import org.eclipse.epf.diagram.model.TypedNode;
import org.eclipse.epf.diagram.model.WorkBreakdownElementNode;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/TextFigureDirectEditManager.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/TextFigureDirectEditManager.java
index 5658984..976b27c 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/TextFigureDirectEditManager.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/TextFigureDirectEditManager.java
@@ -15,7 +15,7 @@
import org.eclipse.epf.authoring.gef.util.DiagramUIResources;
import org.eclipse.epf.authoring.gef.util.TemplateConstants;
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.diagram.model.NamedNode;
import org.eclipse.epf.diagram.model.WorkBreakdownElementNode;
import org.eclipse.epf.library.edit.util.ProcessUtil;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/ValidatingDirectEditManager.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/ValidatingDirectEditManager.java
index 4952901..372d00f 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/ValidatingDirectEditManager.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/ValidatingDirectEditManager.java
@@ -15,7 +15,7 @@
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.epf.authoring.gef.util.DiagramUIResources;
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.diagram.model.NamedNode;
import org.eclipse.epf.diagram.model.WorkBreakdownElementNode;
import org.eclipse.epf.library.edit.util.ProcessUtil;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/ValidatingFreeTextEditManager.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/ValidatingFreeTextEditManager.java
index 491f1dd..a80e383 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/ValidatingFreeTextEditManager.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/ValidatingFreeTextEditManager.java
@@ -16,7 +16,7 @@
import org.eclipse.epf.authoring.gef.util.DiagramUIResources;
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.diagram.model.Node;
import org.eclipse.epf.uma.GraphNode;
import org.eclipse.epf.uma.Property;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/AuthoringUIPlugin.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/AuthoringUIPlugin.java
index bd56342..ea11cf1 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/AuthoringUIPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/AuthoringUIPlugin.java
@@ -13,7 +13,7 @@
import org.eclipse.epf.authoring.ui.internal.ImageDescriptorRegistry;
import org.eclipse.epf.authoring.ui.internal.ProblemMarkerManager;
import org.eclipse.epf.authoring.ui.preferences.LibraryViewPrefPage;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
@@ -41,7 +41,7 @@
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#start(org.osgi.framework.BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
@@ -51,7 +51,7 @@
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#stop(org.osgi.framework.BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
super.stop(context);
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/AuthoringUIService.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/AuthoringUIService.java
index 41b56fe..0c90493 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/AuthoringUIService.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/AuthoringUIService.java
@@ -122,7 +122,7 @@
Providers.setConfiguratorFactory(new IConfiguratorFactory() {
public IConfigurator createConfigurator(
MethodConfiguration config) {
- return new ProcessConfigurator(config, null, true);
+ return new ProcessConfigurator(config, true);
}
});
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/PerspectiveListUtil.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/PerspectiveListUtil.java
index 0accd81..5f880be 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/PerspectiveListUtil.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/PerspectiveListUtil.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.authoring.ui;
-import org.eclipse.epf.common.utils.PerspectiveUtil;
+import org.eclipse.epf.common.ui.util.PerspectiveUtil;
import org.eclipse.ui.IPageLayout;
/**
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/UIActionDispatcher.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/UIActionDispatcher.java
index b59c723..cd1c666 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/UIActionDispatcher.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/UIActionDispatcher.java
@@ -17,7 +17,7 @@
import org.eclipse.epf.authoring.ui.editors.EditorChooser;
import org.eclipse.epf.authoring.ui.views.ConfigurationView;
import org.eclipse.epf.authoring.ui.views.LibraryView;
-import org.eclipse.epf.common.utils.PerspectiveUtil;
+import org.eclipse.epf.common.ui.util.PerspectiveUtil;
import org.eclipse.epf.library.edit.util.TngUtil;
import org.eclipse.epf.uma.VariabilityElement;
import org.eclipse.jface.viewers.DoubleClickEvent;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/CreateMethodElementCommand.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/CreateMethodElementCommand.java
index 3d9a158..2a81e62 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/CreateMethodElementCommand.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/CreateMethodElementCommand.java
@@ -21,7 +21,7 @@
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.authoring.ui.editors.IEditorKeeper;
import org.eclipse.epf.authoring.ui.views.ViewHelper;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.library.edit.command.CommandStatusChecker;
import org.eclipse.epf.library.edit.command.MethodElementAddCommand;
import org.eclipse.epf.library.edit.process.command.CreateProcessComponentCommand;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryViewCopyAction.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryViewCopyAction.java
index 6f77dc6..e109877 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryViewCopyAction.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryViewCopyAction.java
@@ -16,7 +16,7 @@
import org.eclipse.emf.edit.command.CopyToClipboardCommand;
import org.eclipse.emf.edit.ui.action.CopyAction;
-import org.eclipse.epf.common.utils.ClipboardUtil;
+import org.eclipse.epf.common.ui.util.ClipboardUtil;
import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.library.edit.util.TngUtil;
import org.eclipse.epf.library.util.ResourceHelper;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryViewDeleteAction.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryViewDeleteAction.java
index 5ca2310..cd058ac 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryViewDeleteAction.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryViewDeleteAction.java
@@ -26,7 +26,7 @@
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.authoring.ui.editors.IEditorKeeper;
import org.eclipse.epf.authoring.ui.views.LibraryView;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.library.LibraryServiceUtil;
import org.eclipse.epf.library.edit.FeatureValueWrapperItemProvider;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryViewPasteAction.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryViewPasteAction.java
index acd1c41..17588a4 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryViewPasteAction.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/LibraryViewPasteAction.java
@@ -20,7 +20,7 @@
import org.eclipse.emf.edit.command.PasteFromClipboardCommand;
import org.eclipse.emf.edit.ui.action.PasteAction;
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.library.edit.category.StandardCategoriesItemProvider;
import org.eclipse.epf.library.edit.ui.UserInteractionHelper;
import org.eclipse.epf.library.ui.actions.ILibraryAction;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/NewPluginAction.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/NewPluginAction.java
index 2625eb0..2e5679b 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/NewPluginAction.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/NewPluginAction.java
@@ -19,7 +19,7 @@
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.authoring.ui.PerspectiveListUtil;
import org.eclipse.epf.authoring.ui.wizards.NewPluginWizard;
-import org.eclipse.epf.common.utils.PerspectiveUtil;
+import org.eclipse.epf.common.ui.util.PerspectiveUtil;
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.library.edit.ui.UserInteractionHelper;
import org.eclipse.epf.library.ui.actions.LibraryLockingOperationRunner;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/RenameAction.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/RenameAction.java
index 0df4c80..cbcd53f 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/RenameAction.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/RenameAction.java
@@ -30,7 +30,7 @@
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.authoring.ui.editors.EditorChooser;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.diagram.core.services.DiagramManager;
import org.eclipse.epf.library.LibraryService;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/UserInteractionHandler.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/UserInteractionHandler.java
index 978bcd0..93037de 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/UserInteractionHandler.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/actions/UserInteractionHandler.java
@@ -16,8 +16,8 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.epf.authoring.ui.wizards.NewConfigurationWizard;
-import org.eclipse.epf.common.serviceability.ErrorDialogNoReason;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.ErrorDialogNoReason;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.library.edit.command.IUserInteractionHandler;
import org.eclipse.epf.library.edit.command.MethodElementCreateChildCommand;
import org.eclipse.epf.library.edit.command.UserInput;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/dialogs/MoveDialog.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/dialogs/MoveDialog.java
index ea24e19..09ef59d 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/dialogs/MoveDialog.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/dialogs/MoveDialog.java
@@ -26,7 +26,7 @@
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.authoring.ui.views.ViewHelper;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.library.edit.TngAdapterFactory;
import org.eclipse.epf.library.edit.TransientGroupItemProvider;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/dialogs/SwitchConfigDialog.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/dialogs/SwitchConfigDialog.java
index 555da40..9dda8a4 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/dialogs/SwitchConfigDialog.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/dialogs/SwitchConfigDialog.java
@@ -14,7 +14,7 @@
import org.eclipse.epf.authoring.ui.editors.BreakdownElementEditorInput;
import org.eclipse.epf.authoring.ui.editors.EditorChooser;
import org.eclipse.epf.authoring.ui.editors.ProcessEditor;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.library.LibraryServiceUtil;
import org.eclipse.epf.library.ui.LibraryUIPlugin;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/ActivityDetailDiagramEditor.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/ActivityDetailDiagramEditor.java
index 2295a5e..bfcaca4 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/ActivityDetailDiagramEditor.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/ActivityDetailDiagramEditor.java
@@ -452,7 +452,7 @@
*/
public DiagramAdapterFactoryFilter(MethodConfiguration methodConfig,
ActivityDetailDiagramEditor.BreakdownAdapterFactory factory) {
- super(methodConfig, null);
+ super(methodConfig);
this.factory = factory;
}
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/EditorChooser.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/EditorChooser.java
index 27c583d..665c442 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/EditorChooser.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/EditorChooser.java
@@ -24,7 +24,7 @@
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.authoring.ui.views.ViewHelper;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.diagram.core.part.DiagramEditorInput;
import org.eclipse.epf.diagram.core.part.DiagramEditorInputProxy;
import org.eclipse.epf.library.LibraryPlugin;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/MethodElementEditor.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/MethodElementEditor.java
index 3fd3f62..e626b75 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/MethodElementEditor.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/MethodElementEditor.java
@@ -100,7 +100,7 @@
import org.eclipse.epf.authoring.ui.views.ElementHTMLViewer;
import org.eclipse.epf.authoring.ui.views.LibraryView;
import org.eclipse.epf.authoring.ui.views.ViewHelper;
-import org.eclipse.epf.common.utils.PerspectiveUtil;
+import org.eclipse.epf.common.ui.util.PerspectiveUtil;
import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.library.ILibraryManager;
import org.eclipse.epf.library.LibraryService;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/MethodLibraryEditor.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/MethodLibraryEditor.java
index 638761d..ed5d845 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/MethodLibraryEditor.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/MethodLibraryEditor.java
@@ -15,7 +15,7 @@
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.authoring.ui.forms.MethodLibraryDescriptionFormPage;
import org.eclipse.epf.authoring.ui.views.LibraryView;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.library.ILibraryManager;
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.persistence.MultiFileIOException;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/ProcessEditorActionBarContributor.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/ProcessEditorActionBarContributor.java
index 21efc9c..15e7df0 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/ProcessEditorActionBarContributor.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/ProcessEditorActionBarContributor.java
@@ -1250,7 +1250,7 @@
ActivityDropCommand cmd = new ActivityDropCommand(
selectedActivity, selection, null,
- getAdapterFactory(),new ActivityDeepCopyConfigurator(config,null));
+ getAdapterFactory(),new ActivityDeepCopyConfigurator(config));
cmd.setType(IActionTypeProvider.DEEP_COPY);
getActionManager().execute(cmd);
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/filters/DescriptorConfigurationFilter.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/filters/DescriptorConfigurationFilter.java
index 4f803f3..b91f763 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/filters/DescriptorConfigurationFilter.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/filters/DescriptorConfigurationFilter.java
@@ -14,8 +14,10 @@
import java.util.Collections;
import java.util.Iterator;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.epf.library.configuration.ConfigurationFilter;
import org.eclipse.epf.library.edit.itemsfilter.FilterHelper;
+import org.eclipse.epf.library.services.SafeUpdateController;
import org.eclipse.epf.uma.MethodConfiguration;
import org.eclipse.jface.viewers.Viewer;
@@ -35,17 +37,39 @@
protected FilterHelper helper;
+ protected Viewer viewer;
+
/**
* @param methodConfig
* @param viewer
*/
public DescriptorConfigurationFilter(MethodConfiguration methodConfig,
Viewer viewer, String filterStr) {
- super(methodConfig, viewer);
+ super(methodConfig);
+ this.viewer = viewer;
this.filterStr = filterStr;
this.methodConfiguration = methodConfig;
}
+ public void notifyChanged(final Notification msg) {
+ if (viewer == null) {
+ return;
+ }
+
+ SafeUpdateController.syncExec(new Runnable() {
+ public void run() {
+ switch (msg.getEventType()) {
+ case Notification.ADD:
+ case Notification.ADD_MANY:
+ case Notification.REMOVE:
+ case Notification.REMOVE_MANY:
+ viewer.refresh();
+ }
+ }
+ });
+
+ }
+
public boolean accept(Object obj) {
if (obj instanceof MethodConfiguration) {
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/filters/DescriptorProcessFilter.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/filters/DescriptorProcessFilter.java
index 3bc63db..e6a206a 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/filters/DescriptorProcessFilter.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/filters/DescriptorProcessFilter.java
@@ -116,7 +116,7 @@
}
}
public DescriptorProcessFilter(MethodConfiguration config) {
- setAdditionalFilters(new IFilter[] { new ProcessConfigurator(config, null) });
+ setAdditionalFilters(new IFilter[] { new ProcessConfigurator(config) });
}
}
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/filters/ExProcessAuthoringConfigurator.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/filters/ExProcessAuthoringConfigurator.java
index e180631..c9a2644 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/filters/ExProcessAuthoringConfigurator.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/filters/ExProcessAuthoringConfigurator.java
@@ -3,8 +3,10 @@
*/
package org.eclipse.epf.authoring.ui.filters;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.epf.library.configuration.ProcessAuthoringConfigurator;
import org.eclipse.epf.library.edit.itemsfilter.FilterHelper;
+import org.eclipse.epf.library.services.SafeUpdateController;
import org.eclipse.epf.library.util.LibraryUtil;
import org.eclipse.epf.uma.MethodConfiguration;
import org.eclipse.jface.viewers.Viewer;
@@ -21,7 +23,8 @@
String filterStr;
MethodConfiguration methodConfiguration;
-
+ Viewer viewer;
+
protected FilterHelper helper;
/**
* @param methodConfig
@@ -29,12 +32,35 @@
*/
public ExProcessAuthoringConfigurator(MethodConfiguration methodConfig,
Viewer viewer) {
- super(methodConfig, viewer);
+ super(methodConfig);
+ this.viewer = viewer;
//this.filterStr = filterStr;
this.methodConfiguration = methodConfig;
// TODO Auto-generated constructor stub
}
+ /**
+ * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ */
+ public void notifyChanged(final Notification msg) {
+ if (viewer == null) {
+ return;
+ }
+
+ SafeUpdateController.syncExec(new Runnable() {
+ public void run() {
+ switch (msg.getEventType()) {
+ case Notification.ADD:
+ case Notification.ADD_MANY:
+ case Notification.REMOVE:
+ case Notification.REMOVE_MANY:
+ viewer.refresh();
+ }
+ }
+ });
+
+ }
+
public boolean accept(Object obj) {
if(obj == null) return false;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/forms/ConfigViewPage.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/forms/ConfigViewPage.java
index 78907f7..c85fd6c 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/forms/ConfigViewPage.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/forms/ConfigViewPage.java
@@ -21,15 +21,14 @@
import org.eclipse.epf.authoring.ui.AuthoringUIHelpContexts;
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
-import org.eclipse.epf.authoring.ui.AuthoringUIText;
import org.eclipse.epf.authoring.ui.dialogs.ConfigurationAddViewsDialog;
import org.eclipse.epf.authoring.ui.dialogs.ConfigurationOrderDialog;
import org.eclipse.epf.authoring.ui.editors.ConfigurationEditor;
import org.eclipse.epf.authoring.ui.editors.ConfigurationEditorInput;
import org.eclipse.epf.authoring.ui.filters.ProcessViewFilter;
import org.eclipse.epf.authoring.ui.providers.ConfigurationLabelProvider;
+import org.eclipse.epf.authoring.ui.views.ConfigurationViewFilter;
import org.eclipse.epf.common.serviceability.Logger;
-import org.eclipse.epf.library.configuration.ConfigurationFilter;
import org.eclipse.epf.library.edit.IFilter;
import org.eclipse.epf.library.edit.TngAdapterFactory;
import org.eclipse.epf.library.edit.command.IActionManager;
@@ -61,7 +60,6 @@
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.forms.widgets.TableWrapData;
/**
@@ -408,7 +406,7 @@
treeViewer.getTree().setLayout(new GridLayout());
treeViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
- IFilter configFilter = new ConfigurationFilter(config, treeViewer);
+ IFilter configFilter = new ConfigurationViewFilter(config, treeViewer);
AdapterFactory adapterFactory = TngAdapterFactory.INSTANCE
.getConfigurationView_AdapterFactory(configFilter);
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/forms/DescriptionFormPage.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/forms/DescriptionFormPage.java
index 04aba07..a0b7cb4 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/forms/DescriptionFormPage.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/forms/DescriptionFormPage.java
@@ -42,7 +42,7 @@
import org.eclipse.epf.authoring.ui.util.EditorsContextHelper;
import org.eclipse.epf.authoring.ui.util.UIHelper;
import org.eclipse.epf.authoring.ui.views.LibraryView;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.common.utils.FileUtil;
import org.eclipse.epf.common.utils.NetUtil;
import org.eclipse.epf.common.utils.StrUtil;
@@ -60,7 +60,7 @@
import org.eclipse.epf.library.ui.LibraryUIText;
import org.eclipse.epf.library.ui.LibraryUIUtil;
import org.eclipse.epf.library.ui.actions.MethodElementDeleteAction;
-import org.eclipse.epf.library.util.ConvertGuidanceType;
+import org.eclipse.epf.library.ui.util.ConvertGuidanceType;
import org.eclipse.epf.library.util.ResourceHelper;
import org.eclipse.epf.richtext.RichTextListener;
import org.eclipse.epf.uma.ContentCategory;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/internal/wizards/NewLibraryWizard2.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/internal/wizards/NewLibraryWizard2.java
index f50d51f..1c7d21e 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/internal/wizards/NewLibraryWizard2.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/internal/wizards/NewLibraryWizard2.java
@@ -17,7 +17,7 @@
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.authoring.ui.wizards.NewLibraryMainPage;
import org.eclipse.epf.authoring.ui.wizards.SaveAllEditorsPage;
-import org.eclipse.epf.common.utils.PerspectiveUtil;
+import org.eclipse.epf.common.ui.util.PerspectiveUtil;
import org.eclipse.epf.library.LibraryManagerFactory;
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.library.ui.LibraryUIPlugin;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/AuthoringPreferencePage.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/AuthoringPreferencePage.java
index 5c5d0d4..a5ab573 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/AuthoringPreferencePage.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/AuthoringPreferencePage.java
@@ -13,7 +13,7 @@
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.authoring.ui.AuthoringUIText;
-import org.eclipse.epf.common.preferences.CommonPreferences;
+import org.eclipse.epf.common.ui.util.CommonPreferences;
import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.library.preferences.LibraryPreferences;
import org.eclipse.epf.library.ui.LibraryUIPlugin;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/LibraryLocationData.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/LibraryLocationData.java
index 2233434..57b7400 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/LibraryLocationData.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/LibraryLocationData.java
@@ -12,7 +12,7 @@
import java.io.File;
-import org.eclipse.epf.common.utils.FileUtil;
+import org.eclipse.epf.common.ui.CommonUIPlugin;
import org.eclipse.epf.library.LibraryPlugin;
import org.eclipse.epf.library.prefs.LibraryPreferenceConstants;
import org.eclipse.epf.library.ui.preferences.LibraryUIPreferences;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/ProcessEditorPreferencePage.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/ProcessEditorPreferencePage.java
index 02f6399..d5246fe 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/ProcessEditorPreferencePage.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/ProcessEditorPreferencePage.java
@@ -14,7 +14,6 @@
import java.util.List;
import org.eclipse.emf.common.util.EList;
-import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.authoring.ui.AuthoringUIText;
import org.eclipse.epf.authoring.ui.editors.ColumnDescriptor;
@@ -676,6 +675,7 @@
// change to use LibraryPlugin store
// we need to share the preference in Library browsing and publishing
// Jinhua Xi 08/19/2006
+ // changed to use CommonUIPlugin store
return LibraryPlugin.getDefault().getPreferenceStore();
}
}
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/RootPrefPage.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/RootPrefPage.java
index b569994..cf4ba2b 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/RootPrefPage.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/preferences/RootPrefPage.java
@@ -10,6 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.authoring.ui.preferences;
+import org.eclipse.epf.common.ui.CommonUIPlugin;
import org.eclipse.epf.library.LibraryPlugin;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/AbstractSection.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/AbstractSection.java
index 14ebc2a..ff67e11 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/AbstractSection.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/AbstractSection.java
@@ -60,8 +60,7 @@
protected TabbedPropertySheetPage page;
protected ProcessAuthoringConfigurator configurator = new ProcessAuthoringConfigurator(
- LibraryService.getInstance().getCurrentMethodConfiguration(),
- null);
+ LibraryService.getInstance().getCurrentMethodConfiguration());
protected Logger logger;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/ActivityGeneralSection.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/ActivityGeneralSection.java
index 64b867e..3ec0500 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/ActivityGeneralSection.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/ActivityGeneralSection.java
@@ -517,7 +517,7 @@
VariabilityElement ve = (VariabilityElement) o;
IConfigurator configurator = new ProcessVariabilityConfigurator(
- getDefaultConfiguration(), null);
+ getDefaultConfiguration());
ActivityVariabilityCommand cmd = new ActivityVariabilityCommand(
element, ve, type, configurator);
boolean status = actionMgr.execute(cmd);
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/RoleDescriptorTeamSection.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/RoleDescriptorTeamSection.java
index 0c26d86..737b406 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/RoleDescriptorTeamSection.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/RoleDescriptorTeamSection.java
@@ -22,7 +22,7 @@
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.library.edit.TngAdapterFactory;
import org.eclipse.epf.library.edit.command.IActionManager;
import org.eclipse.epf.library.edit.process.RoleDescriptorWrapperItemProvider;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/WorkBreakdownElementGeneralSection.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/WorkBreakdownElementGeneralSection.java
index 93653ac..375664a 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/WorkBreakdownElementGeneralSection.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/properties/WorkBreakdownElementGeneralSection.java
@@ -24,7 +24,7 @@
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.editors.ColumnDescriptor;
import org.eclipse.epf.authoring.ui.editors.ProcessEditor;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.library.edit.command.IActionManager;
import org.eclipse.epf.library.edit.process.BreakdownElementWrapperItemProvider;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/util/UIHelper.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/util/UIHelper.java
index 8a17bef..9cbb3a7 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/util/UIHelper.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/util/UIHelper.java
@@ -21,7 +21,7 @@
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.authoring.ui.editors.BreakdownElementEditorInput;
import org.eclipse.epf.authoring.ui.editors.EditorChooser;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.diagram.core.part.AbstractDiagramEditor;
import org.eclipse.epf.diagram.core.part.DiagramEditorInput;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ConfigurationView.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ConfigurationView.java
index 27c5b8f..42cef1e 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ConfigurationView.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ConfigurationView.java
@@ -24,7 +24,6 @@
import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.epf.authoring.ui.AuthoringUIHelpContexts;
-import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.authoring.ui.PerspectiveListUtil;
import org.eclipse.epf.authoring.ui.UIActionDispatcher;
@@ -35,12 +34,11 @@
import org.eclipse.epf.authoring.ui.actions.LibraryViewFindElementAction;
import org.eclipse.epf.authoring.ui.dnd.LibraryViewerDragAdapter;
import org.eclipse.epf.authoring.ui.providers.ConfigurationLabelProvider;
-import org.eclipse.epf.common.utils.ClipboardUtil;
+import org.eclipse.epf.common.ui.util.ClipboardUtil;
import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.library.ILibraryManager;
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.library.LibraryServiceUtil;
-import org.eclipse.epf.library.configuration.ConfigurationFilter;
import org.eclipse.epf.library.edit.IFilter;
import org.eclipse.epf.library.edit.TngAdapterFactory;
import org.eclipse.epf.library.edit.util.TngUtil;
@@ -76,9 +74,7 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory;
@@ -331,7 +327,7 @@
if (config != null) {
this.configName = config.getName();
- IFilter configFilter = new ConfigurationFilter(config, treeViewer);
+ IFilter configFilter = new ConfigurationViewFilter(config, treeViewer);
adapterFactory = TngAdapterFactory.INSTANCE
.getConfigurationView_AdapterFactory(configFilter);
editingDomain.setAdapterFactory(adapterFactory);
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ConfigurationViewFilter.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ConfigurationViewFilter.java
new file mode 100644
index 0000000..e5aec4e
--- /dev/null
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ConfigurationViewFilter.java
@@ -0,0 +1,37 @@
+package org.eclipse.epf.authoring.ui.views;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.epf.library.configuration.ConfigurationFilter;
+import org.eclipse.epf.library.services.SafeUpdateController;
+import org.eclipse.epf.uma.MethodConfiguration;
+import org.eclipse.jface.viewers.Viewer;
+
+public class ConfigurationViewFilter extends ConfigurationFilter {
+
+ protected Viewer viewer;
+
+ public ConfigurationViewFilter(MethodConfiguration methodConfig, Viewer viewer) {
+ super(methodConfig);
+ this.viewer = viewer;
+ }
+
+ public void notifyChanged(final Notification msg) {
+ if (viewer == null) {
+ return;
+ }
+
+ SafeUpdateController.syncExec(new Runnable() {
+ public void run() {
+ switch (msg.getEventType()) {
+ case Notification.ADD:
+ case Notification.ADD_MANY:
+ case Notification.REMOVE:
+ case Notification.REMOVE_MANY:
+ viewer.refresh();
+ }
+ }
+ });
+
+ }
+
+}
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ContentView.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ContentView.java
index 29babca..2388ab9 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ContentView.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ContentView.java
@@ -19,7 +19,7 @@
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
import org.eclipse.epf.authoring.ui.BrowsingPerspective;
import org.eclipse.epf.authoring.ui.UIActionDispatcher;
-import org.eclipse.epf.common.utils.PerspectiveUtil;
+import org.eclipse.epf.common.ui.util.PerspectiveUtil;
import org.eclipse.epf.diagram.ui.service.DiagramImageService;
import org.eclipse.epf.library.ILibraryManager;
import org.eclipse.epf.library.ILibraryServiceListener;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/LibraryView.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/LibraryView.java
index 11d6545..787f5a7 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/LibraryView.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/LibraryView.java
@@ -84,7 +84,7 @@
import org.eclipse.epf.authoring.ui.util.LibraryValidationMarkerHelper;
import org.eclipse.epf.authoring.ui.util.RefreshHandler;
import org.eclipse.epf.authoring.ui.util.UIHelper;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.library.ILibraryManager;
import org.eclipse.epf.library.LibraryPlugin;
import org.eclipse.epf.library.LibraryService;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ViewHelper.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ViewHelper.java
index 77bdd72..fcd8d36 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ViewHelper.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/views/ViewHelper.java
@@ -36,9 +36,9 @@
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
-import org.eclipse.epf.common.serviceability.MsgBox;
-import org.eclipse.epf.common.serviceability.MsgDialog;
-import org.eclipse.epf.common.utils.PerspectiveUtil;
+import org.eclipse.epf.common.ui.util.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgDialog;
+import org.eclipse.epf.common.ui.util.PerspectiveUtil;
import org.eclipse.epf.library.ILibraryManager;
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.library.LibraryServiceUtil;
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/wizards/NewLibraryWizard.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/wizards/NewLibraryWizard.java
index 5e4c3d0..410fc69 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/wizards/NewLibraryWizard.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/wizards/NewLibraryWizard.java
@@ -17,7 +17,7 @@
import org.eclipse.epf.authoring.ui.AuthoringPerspective;
import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
import org.eclipse.epf.authoring.ui.AuthoringUIResources;
-import org.eclipse.epf.common.utils.PerspectiveUtil;
+import org.eclipse.epf.common.ui.util.PerspectiveUtil;
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.library.ui.LibraryUIPlugin;
import org.eclipse.epf.library.ui.LibraryUIResources;
diff --git a/2.0/plugins/org.eclipse.epf.common/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.common/META-INF/MANIFEST.MF
index f6af248..1072ac5 100644
--- a/2.0/plugins/org.eclipse.epf.common/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.common/META-INF/MANIFEST.MF
@@ -10,8 +10,8 @@
Require-Bundle: com.ibm.icu;visibility:=reexport,
org.eclipse.core.resources;visibility:=reexport,
org.eclipse.core.runtime;visibility:=reexport,
- org.eclipse.ui;visibility:=reexport,
- org.apache.ant
+ org.apache.ant,
+ org.eclipse.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.common,
org.eclipse.epf.common.html,
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/plugin/AbstractPlugin.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/AbstractActivator.java
similarity index 91%
rename from 2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/plugin/AbstractPlugin.java
rename to 2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/AbstractActivator.java
index dff6b8e..1c1bf5a 100644
--- a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/plugin/AbstractPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/AbstractActivator.java
@@ -8,7 +8,7 @@
// Contributors:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
-package org.eclipse.epf.common.plugin;
+package org.eclipse.epf.common;
import java.io.File;
import java.io.FileInputStream;
@@ -31,12 +31,10 @@
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
import org.eclipse.epf.common.serviceability.Logger;
-import org.eclipse.epf.common.serviceability.MsgDialog;
import org.eclipse.epf.common.utils.FileUtil;
import org.eclipse.epf.common.utils.I18nUtil;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -48,7 +46,7 @@
* @author Jinhua Xi
* @since 1.0
*/
-public abstract class AbstractPlugin extends AbstractUIPlugin {
+public abstract class AbstractActivator extends AbstractUIPlugin {
// The relative path to the icons.
private static final String ICON_PATH = "icons/"; //$NON-NLS-1$;
@@ -57,7 +55,7 @@
private static Map<String, Logger> loggers = new HashMap<String, Logger>();
// The message dialog hash map.
- private static Map<String, MsgDialog> msgDialogs = new HashMap<String, MsgDialog>();
+ //private static Map<String, MsgDialog> msgDialogs = new HashMap<String, MsgDialog>();
// The shared image hash map.
private static Map<String, Image> sharedImages = new HashMap<String, Image>();
@@ -83,7 +81,7 @@
/**
* Default constructor.
*/
- public AbstractPlugin() {
+ public AbstractActivator() {
super();
}
@@ -95,6 +93,7 @@
init(context);
+ // set the
if (isDebugging()) {
getLogger().logInfo("Started " + pluginId); //$NON-NLS-1$
}
@@ -489,32 +488,23 @@
}
return logger;
}
-
+
/**
- * Returns the message dialog given the plug-in ID.
- *
- * @return The new or cached message dialog.
+ * Logs the given object or message.
*/
- public MsgDialog getMsgDialog() {
- MsgDialog msgDialog = (MsgDialog) msgDialogs.get(pluginId);
- if (msgDialog == null) {
- msgDialog = new MsgDialog(this);
- msgDialogs.put(pluginId, msgDialog);
+ public void log(Object logEntry) {
+ if (logEntry instanceof Throwable) {
+ ((Throwable) logEntry).printStackTrace(System.err);
+ } else {
+ System.err.println(logEntry);
}
- return msgDialog;
}
-
- /**
- * Returns the standard display to be used. The method first checks, if the
- * thread calling this method has an associated disaply. If so, this display
- * is returned. Otherwise the method returns the default display.
- */
- public static Display getStandardDisplay() {
- Display display;
- display = Display.getCurrent();
- if (display == null)
- display = Display.getDefault();
- return display;
+
+ public Object getContext() {
+ return CommonPlugin.getDefault().context;
}
-
+
+ public IMessageCallback getMsgCallback() {
+ return CommonPlugin.getDefault().msgCallback;
+ }
}
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/CommonPlugin.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/CommonPlugin.java
index 01452b1..7ef12f2 100644
--- a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/CommonPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/CommonPlugin.java
@@ -10,13 +10,13 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.common;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.preferences.IPreferenceStoreWrapper;
import org.osgi.framework.BundleContext;
/**
* The Common plug-in activator.
*/
-public class CommonPlugin extends AbstractPlugin {
+public class CommonPlugin extends AbstractActivator {
// The shared plug-in instance.
private static CommonPlugin plugin;
@@ -30,14 +30,14 @@
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#start(org.osgi.framework.BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#stop(org.osgi.framework.BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
super.stop(context);
@@ -53,4 +53,25 @@
return plugin;
}
+// /**
+// * set the store wrapper before it's being used.
+// * @param storeWrapper
+// */
+// IPreferenceStoreWrapper storeWrapper = null;
+// public void setPreferenceStore(IPreferenceStoreWrapper storeWrapper) {
+// this.storeWrapper = storeWrapper;
+// }
+
+ // this is the context for message callback
+ // for eclipse client, this is the Shell object
+ Object context = null;
+
+ public void setContext(Object context) {
+ this.context = context;
+ }
+
+ IMessageCallback msgCallback = null;
+ public void setMsgCallback(IMessageCallback msgCallback) {
+ this.msgCallback = msgCallback;
+ }
}
\ No newline at end of file
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/IMessageCallback.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/IMessageCallback.java
new file mode 100644
index 0000000..a807dd1
--- /dev/null
+++ b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/IMessageCallback.java
@@ -0,0 +1,16 @@
+package org.eclipse.epf.common;
+
+
+public interface IMessageCallback {
+
+ public void displayWarning(AbstractActivator plugin, String title, String msg, String reason);
+ public void displayWarning(AbstractActivator plugin, String msg, String reason, Throwable ex);
+ public void displayWarning(AbstractActivator plugin, String msg, String reason, String details, Throwable ex);
+ public void displayWarning(AbstractActivator plugin, String title, String msg, String reason, String details, Throwable ex);
+
+ public void displayError(AbstractActivator plugin, String title, String msg);
+ public void displayError(AbstractActivator plugin, String title, String msg, Throwable ex);
+ public void displayError(AbstractActivator plugin, String title, String msg, String reason, String details, Throwable ex);
+
+
+}
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/CommonPreferences.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/CommonPreferences.java
deleted file mode 100644
index 5fe6301..0000000
--- a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/CommonPreferences.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.epf.common.preferences;
-
-import org.eclipse.epf.common.CommonPlugin;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-/**
- * Manages the common preferences.
- *
- * @author Kelvin Low
- * @since 1.2
- */
-public class CommonPreferences {
-
- /**
- * Preference key for storing the preference history size.
- */
- private static final String PREFERENCE_HISTORY_SIZE = "preferenceHistorySize"; //$NON-NLS-1$
-
- // The plug-in specific preference store.
- private static IPreferenceStore prefStore = CommonPlugin.getDefault()
- .getPreferenceStore();
-
- static {
- // Initialize the default preference values.
- prefStore.setDefault(PREFERENCE_HISTORY_SIZE,
- getDefaultPreferenceHistorySize());
- }
-
- /**
- * Gets the default preference history size.
- */
- public static int getDefaultPreferenceHistorySize() {
- return 10;
- }
-
- /**
- * Gets the preference history size.
- */
- public static int getPreferenceHistorySize() {
- return prefStore.getInt(PREFERENCE_HISTORY_SIZE);
- }
-
- /**
- * Saves the preference history size.
- */
- public static void setPreferenceHistorySize(int value) {
- prefStore.setValue(PREFERENCE_HISTORY_SIZE, value);
- }
-
-}
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPreferenceStoreWrapper.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPreferenceStoreWrapper.java
new file mode 100644
index 0000000..8b2ece2
--- /dev/null
+++ b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPreferenceStoreWrapper.java
@@ -0,0 +1,418 @@
+package org.eclipse.epf.common.preferences;
+
+
+
+public interface IPreferenceStoreWrapper {
+
+
+ /**
+ * Returns the current value of the boolean-valued preference with the
+ * given name.
+ * Returns the default-default value (<code>false</code>) if there
+ * is no preference with the given name, or if the current value
+ * cannot be treated as a boolean.
+ *
+ * @param name the name of the preference
+ * @return the boolean-valued preference
+ */
+ public boolean getBoolean(String name);
+
+ /**
+ * Returns the default value for the boolean-valued preference
+ * with the given name.
+ * Returns the default-default value (<code>false</code>) if there
+ * is no default preference with the given name, or if the default
+ * value cannot be treated as a boolean.
+ *
+ * @param name the name of the preference
+ * @return the default value of the named preference
+ */
+ public boolean getDefaultBoolean(String name);
+
+ /**
+ * Returns the default value for the double-valued preference
+ * with the given name.
+ * Returns the default-default value (<code>0.0</code>) if there
+ * is no default preference with the given name, or if the default
+ * value cannot be treated as a double.
+ *
+ * @param name the name of the preference
+ * @return the default value of the named preference
+ */
+ public double getDefaultDouble(String name);
+
+ /**
+ * Returns the default value for the float-valued preference
+ * with the given name.
+ * Returns the default-default value (<code>0.0f</code>) if there
+ * is no default preference with the given name, or if the default
+ * value cannot be treated as a float.
+ *
+ * @param name the name of the preference
+ * @return the default value of the named preference
+ */
+ public float getDefaultFloat(String name);
+
+ /**
+ * Returns the default value for the integer-valued preference
+ * with the given name.
+ * Returns the default-default value (<code>0</code>) if there
+ * is no default preference with the given name, or if the default
+ * value cannot be treated as an integer.
+ *
+ * @param name the name of the preference
+ * @return the default value of the named preference
+ */
+ public int getDefaultInt(String name);
+
+ /**
+ * Returns the default value for the long-valued preference
+ * with the given name.
+ * Returns the default-default value (<code>0L</code>) if there
+ * is no default preference with the given name, or if the default
+ * value cannot be treated as a long.
+ *
+ * @param name the name of the preference
+ * @return the default value of the named preference
+ */
+ public long getDefaultLong(String name);
+
+ /**
+ * Returns the default value for the string-valued preference
+ * with the given name.
+ * Returns the default-default value (the empty string <code>""</code>)
+ * is no default preference with the given name, or if the default
+ * value cannot be treated as a string.
+ *
+ * @param name the name of the preference
+ * @return the default value of the named preference
+ */
+ public String getDefaultString(String name);
+
+ /**
+ * Returns the current value of the double-valued preference with the
+ * given name.
+ * Returns the default-default value (<code>0.0</code>) if there
+ * is no preference with the given name, or if the current value
+ * cannot be treated as a double.
+ *
+ * @param name the name of the preference
+ * @return the double-valued preference
+ */
+ public double getDouble(String name);
+
+ /**
+ * Returns the current value of the float-valued preference with the
+ * given name.
+ * Returns the default-default value (<code>0.0f</code>) if there
+ * is no preference with the given name, or if the current value
+ * cannot be treated as a float.
+ *
+ * @param name the name of the preference
+ * @return the float-valued preference
+ */
+ public float getFloat(String name);
+
+ /**
+ * Returns the current value of the integer-valued preference with the
+ * given name.
+ * Returns the default-default value (<code>0</code>) if there
+ * is no preference with the given name, or if the current value
+ * cannot be treated as an integter.
+ *
+ * @param name the name of the preference
+ * @return the int-valued preference
+ */
+ public int getInt(String name);
+
+ /**
+ * Returns the current value of the long-valued preference with the
+ * given name.
+ * Returns the default-default value (<code>0L</code>) if there
+ * is no preference with the given name, or if the current value
+ * cannot be treated as a long.
+ *
+ * @param name the name of the preference
+ * @return the long-valued preference
+ */
+ public long getLong(String name);
+
+ /**
+ * Returns the current value of the string-valued preference with the
+ * given name.
+ * Returns the default-default value (the empty string <code>""</code>)
+ * if there is no preference with the given name, or if the current value
+ * cannot be treated as a string.
+ *
+ * @param name the name of the preference
+ * @return the string-valued preference
+ */
+ public String getString(String name);
+
+ /**
+ * Returns whether the current value of the preference with the given name
+ * has the default value.
+ *
+ * @param name the name of the preference
+ * @return <code>true</code> if the preference has a known default value
+ * and its current value is the same, and <code>false</code> otherwise
+ * (including the case where the preference is unknown to this store)
+ */
+ public boolean isDefault(String name);
+
+ /**
+ * Returns whether the current values in this property store
+ * require saving.
+ *
+ * @return <code>true</code> if at least one of values of
+ * the preferences known to this store has changed and
+ * requires saving, and <code>false</code> otherwise.
+ */
+ public boolean needsSaving();
+
+ /**
+ * Sets the current value of the preference with the given name to
+ * the given string value without sending a property change.
+ * <p>
+ * This method does not fire a property change event and
+ * should only be used for setting internal preferences
+ * that are not meant to be processed by listeners.
+ * Normal clients should instead call #setValue.
+ * </p>
+ *
+ * @param name the name of the preference
+ * @param value the new current value of the preference
+ */
+ public void putValue(String name, String value);
+
+ /**
+ * Sets the default value for the double-valued preference with the
+ * given name.
+ * <p>
+ * Note that the current value of the preference is affected if
+ * the preference's current value was its old default value, in which
+ * case it changes to the new default value. If the preference's current
+ * is different from its old default value, its current value is
+ * unaffected. No property change events are reported by changing default
+ * values.
+ * </p>
+ *
+ * @param name the name of the preference
+ * @param value the new default value for the preference
+ */
+ public void setDefault(String name, double value);
+
+ /**
+ * Sets the default value for the float-valued preference with the
+ * given name.
+ * <p>
+ * Note that the current value of the preference is affected if
+ * the preference's current value was its old default value, in which
+ * case it changes to the new default value. If the preference's current
+ * is different from its old default value, its current value is
+ * unaffected. No property change events are reported by changing default
+ * values.
+ * </p>
+ *
+ * @param name the name of the preference
+ * @param value the new default value for the preference
+ */
+ public void setDefault(String name, float value);
+
+ /**
+ * Sets the default value for the integer-valued preference with the
+ * given name.
+ * <p>
+ * Note that the current value of the preference is affected if
+ * the preference's current value was its old default value, in which
+ * case it changes to the new default value. If the preference's current
+ * is different from its old default value, its current value is
+ * unaffected. No property change events are reported by changing default
+ * values.
+ * </p>
+ *
+ * @param name the name of the preference
+ * @param value the new default value for the preference
+ */
+ public void setDefault(String name, int value);
+
+ /**
+ * Sets the default value for the long-valued preference with the
+ * given name.
+ * <p>
+ * Note that the current value of the preference is affected if
+ * the preference's current value was its old default value, in which
+ * case it changes to the new default value. If the preference's current
+ * is different from its old default value, its current value is
+ * unaffected. No property change events are reported by changing default
+ * values.
+ * </p>
+ *
+ * @param name the name of the preference
+ * @param value the new default value for the preference
+ */
+ public void setDefault(String name, long value);
+
+ /**
+ * Sets the default value for the string-valued preference with the
+ * given name.
+ * <p>
+ * Note that the current value of the preference is affected if
+ * the preference's current value was its old default value, in which
+ * case it changes to the new default value. If the preference's current
+ * is different from its old default value, its current value is
+ * unaffected. No property change events are reported by changing default
+ * values.
+ * </p>
+ *
+ * @param name the name of the preference
+ * @param defaultObject the new default value for the preference
+ */
+ public void setDefault(String name, String defaultObject);
+
+ /**
+ * Sets the default value for the boolean-valued preference with the
+ * given name.
+ * <p>
+ * Note that the current value of the preference is affected if
+ * the preference's current value was its old default value, in which
+ * case it changes to the new default value. If the preference's current
+ * is different from its old default value, its current value is
+ * unaffected. No property change events are reported by changing default
+ * values.
+ * </p>
+ *
+ * @param name the name of the preference
+ * @param value the new default value for the preference
+ */
+ public void setDefault(String name, boolean value);
+
+ /**
+ * Sets the current value of the preference with the given name back
+ * to its default value.
+ * <p>
+ * Note that the preferred way of re-initializing a preference to the
+ * appropriate default value is to call <code>setToDefault</code>.
+ * This is implemented by removing the named value from the store,
+ * thereby exposing the default value.
+ * </p>
+ *
+ * @param name the name of the preference
+ */
+ public void setToDefault(String name);
+
+ /**
+ * Sets the current value of the double-valued preference with the
+ * given name.
+ * <p>
+ * A property change event is reported if the current value of the
+ * preference actually changes from its previous value. In the event
+ * object, the property name is the name of the preference, and the
+ * old and new values are wrapped as objects.
+ * </p>
+ * <p>
+ * Note that the preferred way of re-initializing a preference to its
+ * default value is to call <code>setToDefault</code>.
+ * </p>
+ *
+ * @param name the name of the preference
+ * @param value the new current value of the preference
+ */
+ public void setValue(String name, double value);
+
+ /**
+ * Sets the current value of the float-valued preference with the
+ * given name.
+ * <p>
+ * A property change event is reported if the current value of the
+ * preference actually changes from its previous value. In the event
+ * object, the property name is the name of the preference, and the
+ * old and new values are wrapped as objects.
+ * </p>
+ * <p>
+ * Note that the preferred way of re-initializing a preference to its
+ * default value is to call <code>setToDefault</code>.
+ * </p>
+ *
+ * @param name the name of the preference
+ * @param value the new current value of the preference
+ */
+ public void setValue(String name, float value);
+
+ /**
+ * Sets the current value of the integer-valued preference with the
+ * given name.
+ * <p>
+ * A property change event is reported if the current value of the
+ * preference actually changes from its previous value. In the event
+ * object, the property name is the name of the preference, and the
+ * old and new values are wrapped as objects.
+ * </p>
+ * <p>
+ * Note that the preferred way of re-initializing a preference to its
+ * default value is to call <code>setToDefault</code>.
+ * </p>
+ *
+ * @param name the name of the preference
+ * @param value the new current value of the preference
+ */
+ public void setValue(String name, int value);
+
+ /**
+ * Sets the current value of the long-valued preference with the
+ * given name.
+ * <p>
+ * A property change event is reported if the current value of the
+ * preference actually changes from its previous value. In the event
+ * object, the property name is the name of the preference, and the
+ * old and new values are wrapped as objects.
+ * </p>
+ * <p>
+ * Note that the preferred way of re-initializing a preference to its
+ * default value is to call <code>setToDefault</code>.
+ * </p>
+ *
+ * @param name the name of the preference
+ * @param value the new current value of the preference
+ */
+ public void setValue(String name, long value);
+
+ /**
+ * Sets the current value of the string-valued preference with the
+ * given name.
+ * <p>
+ * A property change event is reported if the current value of the
+ * preference actually changes from its previous value. In the event
+ * object, the property name is the name of the preference, and the
+ * old and new values are wrapped as objects.
+ * </p>
+ * <p>
+ * Note that the preferred way of re-initializing a preference to its
+ * default value is to call <code>setToDefault</code>.
+ * </p>
+ *
+ * @param name the name of the preference
+ * @param value the new current value of the preference
+ */
+ public void setValue(String name, String value);
+
+ /**
+ * Sets the current value of the boolean-valued preference with the
+ * given name.
+ * <p>
+ * A property change event is reported if the current value of the
+ * preference actually changes from its previous value. In the event
+ * object, the property name is the name of the preference, and the
+ * old and new values are wrapped as objects.
+ * </p>
+ * <p>
+ * Note that the preferred way of re-initializing a preference to its
+ * default value is to call <code>setToDefault</code>.
+ * </p>
+ *
+ * @param name the name of the preference
+ * @param value the new current value of the preference
+ */
+ public void setValue(String name, boolean value);
+
+}
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPropertyChangeListenerWrapper.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPropertyChangeListenerWrapper.java
new file mode 100644
index 0000000..a11d503
--- /dev/null
+++ b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPropertyChangeListenerWrapper.java
@@ -0,0 +1,5 @@
+package org.eclipse.epf.common.preferences;
+
+public interface IPropertyChangeListenerWrapper {
+
+}
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/ErrorDialogNoReason.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/ErrorDialogNoReason.java
deleted file mode 100644
index 0b4d088..0000000
--- a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/ErrorDialogNoReason.java
+++ /dev/null
@@ -1,598 +0,0 @@
-//------------------------------------------------------------------------------
-// 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.common.serviceability;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IconAndMessageDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Displays an error dialog without the Details button.
- *
- * @author Bingxue Xu
- * @since 1.0
- */
-public class ErrorDialogNoReason extends IconAndMessageDialog {
-
- /**
- * Static to prevent opening of error dialogs for automated testing.
- */
- public static final boolean AUTOMATED_MODE = false;
-
- /**
- * Reserve room for this many list items.
- */
- private static final int LIST_ITEM_COUNT = 7;
-
- /**
- * The nesting indent.
- */
- private static final String NESTING_INDENT = " "; //$NON-NLS-1$
-
- /**
- * The Details button.
- */
- protected Button detailsButton;
-
- /**
- * The title of the dialog.
- */
- private String title;
-
- /**
- * The SWT list control that displays the error details.
- */
- private List list;
-
- /**
- * Indicates whether the error details viewer is currently created.
- */
- private boolean listCreated = false;
-
- /**
- * Filter mask for determining which status items to display.
- */
- private int displayMask = 0xFFFF;
-
- /**
- * The main status object.
- */
- private IStatus status;
-
- /**
- * The current clipboard. To be disposed when closing the dialog.
- */
- private Clipboard clipboard;
-
- private boolean shouldIncludeTopLevelErrorInDetails = false;
-
- /**
- * Creates an error dialog. Note that the dialog will have no visual
- * representation (no widgets) until it is told to open.
- * <p>
- * Normally one should use <code>openError</code> to create and open one
- * of these. This constructor is useful only if the error object being
- * displayed contains child items <it>and </it> you need to specify a mask
- * which will be used to filter the displaying of these children.
- * </p>
- *
- * @param parentShell
- * the shell under which to create this dialog
- * @param dialogTitle
- * the title to use for this dialog, or <code>null</code> to
- * indicate that the default title should be used
- * @param message
- * the message to show in this dialog, or <code>null</code> to
- * indicate that the error's message should be shown as the
- * primary message
- * @param status
- * the error to show to the user
- * @param displayMask
- * the mask to use to filter the displaying of child items, as
- * per <code>IStatus.matches</code>
- * @see org.eclipse.core.runtime.IStatus#matches(int)
- */
- public ErrorDialogNoReason(Shell parentShell, String dialogTitle,
- String message, IStatus status, int displayMask) {
- super(parentShell);
- this.title = dialogTitle == null ? JFaceResources
- .getString("Problem_Occurred") : //$NON-NLS-1$
- dialogTitle;
- this.message = message == null ? status.getMessage() : message;
- this.status = status;
- this.displayMask = displayMask;
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog. Handles the pressing of the Ok
- * or Details button in this dialog. If the Ok button was pressed then close
- * this dialog. If the Details button was pressed then toggle the displaying
- * of the error details area. Note that the Details button will only be
- * visible if the error being displayed specifies child details.
- */
- protected void buttonPressed(int id) {
- if (id == IDialogConstants.DETAILS_ID) {
- // was the details button pressed?
- toggleDetailsArea();
- } else {
- super.buttonPressed(id);
- }
- }
-
- /*
- * (non-Javadoc) Method declared in Window.
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(title);
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- // create OK and Details buttons
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
- true);
- createButton(parent, IDialogConstants.CANCEL_ID,
- IDialogConstants.CANCEL_LABEL, false);
- if (shouldShowDetailsButton()) {
- detailsButton = createButton(parent, IDialogConstants.DETAILS_ID,
- IDialogConstants.SHOW_DETAILS_LABEL, false);
- }
- }
-
- /**
- * This implementation of the <code>Dialog</code> framework method creates
- * and lays out a composite and calls <code>createMessageArea</code> and
- * <code>createCustomArea</code> to populate it. Subclasses should
- * override <code>createCustomArea</code> to add contents below the
- * message.
- */
- protected Control createDialogArea(Composite parent) {
- createMessageArea(parent);
- // create a composite with standard margins and spacing
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData childData = new GridData(GridData.FILL_BOTH);
- childData.horizontalSpan = 2;
- composite.setLayoutData(childData);
- composite.setFont(parent.getFont());
- return composite;
- }
-
- /*
- * @see IconAndMessageDialog#createDialogAndButtonArea(Composite)
- */
- protected void createDialogAndButtonArea(Composite parent) {
- super.createDialogAndButtonArea(parent);
- if (this.dialogArea instanceof Composite) {
- // Create a label if there are no children to force a smaller layout
- Composite dialogComposite = (Composite) dialogArea;
- if (dialogComposite.getChildren().length == 0)
- new Label(dialogComposite, SWT.NULL);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.IconAndMessageDialog#getImage()
- */
- protected Image getImage() {
- if (status != null) {
- if (status.getSeverity() == IStatus.WARNING)
- return getWarningImage();
- if (status.getSeverity() == IStatus.INFO)
- return getInfoImage();
- }
- // If it was not a warning or an error then return the error image
- return getErrorImage();
- }
-
- /**
- * Create this dialog's drop-down list component.
- *
- * @param parent
- * the parent composite
- * @return the drop-down list component
- */
- protected List createDropDownList(Composite parent) {
- // create the list
- list = new List(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
- | SWT.MULTI);
- // fill the list
- populateList(list);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
- | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL
- | GridData.GRAB_VERTICAL);
- data.heightHint = list.getItemHeight() * LIST_ITEM_COUNT;
- data.horizontalSpan = 2;
- list.setLayoutData(data);
- list.setFont(parent.getFont());
- Menu copyMenu = new Menu(list);
- MenuItem copyItem = new MenuItem(copyMenu, SWT.NONE);
- copyItem.addSelectionListener(new SelectionListener() {
- /*
- * @see SelectionListener.widgetSelected (SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
- copyToClipboard();
- }
-
- /*
- * @see SelectionListener.widgetDefaultSelected(SelectionEvent)
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- copyToClipboard();
- }
- });
- copyItem.setText(JFaceResources.getString("copy")); //$NON-NLS-1$
- list.setMenu(copyMenu);
- listCreated = true;
- return list;
- }
-
- /*
- * (non-Javadoc) Method declared on Window.
- */
- /**
- * Extends <code>Window.open()</code>. Opens an error dialog to display
- * the error. If you specified a mask to filter the displaying of these
- * children, the error dialog will only be displayed if there is at least
- * one child status matching the mask.
- */
- public int open() {
- if (!AUTOMATED_MODE && shouldDisplay(status, displayMask)) {
- return super.open();
- }
- setReturnCode(OK);
- return OK;
- }
-
- /**
- * Opens an error dialog to display the given error. Use this method if the
- * error object being displayed does not contain child items, or if you wish
- * to display all such items without filtering.
- *
- * @param parent
- * the parent shell of the dialog, or <code>null</code> if none
- * @param dialogTitle
- * the title to use for this dialog, or <code>null</code> to
- * indicate that the default title should be used
- * @param message
- * the message to show in this dialog, or <code>null</code> to
- * indicate that the error's message should be shown as the
- * primary message
- * @param status
- * the error to show to the user
- * @return the code of the button that was pressed that resulted in this
- * dialog closing. This will be <code>Dialog.OK</code> if the OK
- * button was pressed, or <code>Dialog.CANCEL</code> if this
- * dialog's close window decoration or the ESC key was used.
- */
- public static int openError(Shell parent, String dialogTitle,
- String message, IStatus status) {
- return openError(parent, dialogTitle, message, status, IStatus.OK
- | IStatus.INFO | IStatus.WARNING | IStatus.ERROR);
- }
-
- /**
- * Opens an error dialog to display the given error. Use this method if the
- * error object being displayed contains child items <it>and </it> you wish
- * to specify a mask which will be used to filter the displaying of these
- * children. The error dialog will only be displayed if there is at least
- * one child status matching the mask.
- *
- * @param parentShell
- * the parent shell of the dialog, or <code>null</code> if none
- * @param title
- * the title to use for this dialog, or <code>null</code> to
- * indicate that the default title should be used
- * @param message
- * the message to show in this dialog, or <code>null</code> to
- * indicate that the error's message should be shown as the
- * primary message
- * @param status
- * the error to show to the user
- * @param displayMask
- * the mask to use to filter the displaying of child items, as
- * per <code>IStatus.matches</code>
- * @return the code of the button that was pressed that resulted in this
- * dialog closing. This will be <code>Dialog.OK</code> if the OK
- * button was pressed, or <code>Dialog.CANCEL</code> if this
- * dialog's close window decoration or the ESC key was used.
- * @see org.eclipse.core.runtime.IStatus#matches(int)
- */
- public static int openError(Shell parentShell, String title,
- String message, IStatus status, int displayMask) {
- ErrorDialogNoReason dialog = new ErrorDialogNoReason(parentShell,
- title, message, status, displayMask);
- return dialog.open();
- }
-
- /**
- * Populates the list using this error dialog's status object. This walks
- * the child static of the status object and displays them in a list. The
- * format for each entry is status_path : status_message If the status's
- * path was null then it (and the colon) are omitted.
- *
- * @param listToPopulate
- * The list to fill.
- */
- private void populateList(List listToPopulate) {
- populateList(listToPopulate, status, 0,
- shouldIncludeTopLevelErrorInDetails);
- }
-
- /**
- * Populate the list with the messages from the given status. Traverse the
- * children of the status deeply and also traverse CoreExceptions that
- * appear in the status.
- *
- * @param listToPopulate
- * the list to populate
- * @param buildingStatus
- * the status being displayed
- * @param nesting
- * the nesting level (increases one level for each level of
- * children)
- * @param includeStatus
- * whether to include the buildingStatus in the display or just
- * its children
- */
- private void populateList(List listToPopulate, IStatus buildingStatus,
- int nesting, boolean includeStatus) {
-
- if (!buildingStatus.matches(displayMask)) {
- return;
- }
-
- Throwable t = buildingStatus.getException();
- boolean isCoreException = t instanceof CoreException;
- boolean incrementNesting = false;
-
- if (includeStatus) {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < nesting; i++) {
- sb.append(NESTING_INDENT);
- }
- String message = buildingStatus.getMessage();
- sb.append(message);
- listToPopulate.add(sb.toString());
- incrementNesting = true;
- }
-
- if (!isCoreException && t != null) {
- // Include low-level exception message
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < nesting; i++) {
- sb.append(NESTING_INDENT);
- }
- String message = t.getLocalizedMessage();
- if (message == null)
- message = t.toString();
-
- sb.append(message);
- listToPopulate.add(sb.toString());
- incrementNesting = true;
- }
-
- if (incrementNesting)
- nesting++;
-
- // Look for a nested core exception
- if (isCoreException) {
- CoreException ce = (CoreException) t;
- IStatus eStatus = ce.getStatus();
- // Only print the exception message if it is not contained in the
- // parent message
- if (message == null || message.indexOf(eStatus.getMessage()) == -1) {
- populateList(listToPopulate, eStatus, nesting, true);
- }
- }
-
- // Look for child status
- IStatus[] children = buildingStatus.getChildren();
- for (int i = 0; i < children.length; i++) {
- populateList(listToPopulate, children[i], nesting, true);
- }
- }
-
- /**
- * Returns whether the given status object should be displayed.
- *
- * @param status
- * a status object
- * @param mask
- * a mask as per <code>IStatus.matches</code>
- * @return <code>true</code> if the given status should be displayed, and
- * <code>false</code> otherwise
- * @see org.eclipse.core.runtime.IStatus#matches(int)
- */
- protected static boolean shouldDisplay(IStatus status, int mask) {
- IStatus[] children = status.getChildren();
- if (children == null || children.length == 0) {
- return status.matches(mask);
- }
- for (int i = 0; i < children.length; i++) {
- if (children[i].matches(mask))
- return true;
- }
- return false;
- }
-
- /**
- * Toggles the unfolding of the details area. This is triggered by the user
- * pressing the details button.
- */
- private void toggleDetailsArea() {
- Point windowSize = getShell().getSize();
- Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
- if (listCreated) {
- list.dispose();
- listCreated = false;
- detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
- } else {
- list = createDropDownList((Composite) getContents());
- detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
- }
- Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
- getShell()
- .setSize(
- new Point(windowSize.x, windowSize.y
- + (newSize.y - oldSize.y)));
- }
-
- /**
- * Put the details of the status of the error onto the stream.
- *
- * @param buildingStatus
- * @param buffer
- * @param nesting
- */
- private void populateCopyBuffer(IStatus buildingStatus,
- StringBuffer buffer, int nesting) {
- if (!buildingStatus.matches(displayMask)) {
- return;
- }
- for (int i = 0; i < nesting; i++) {
- buffer.append(NESTING_INDENT);
- }
- buffer.append(buildingStatus.getMessage());
- buffer.append("\n"); //$NON-NLS-1$
-
- // Look for a nested core exception
- Throwable t = buildingStatus.getException();
- if (t instanceof CoreException) {
- CoreException ce = (CoreException) t;
- populateCopyBuffer(ce.getStatus(), buffer, nesting + 1);
- }
-
- IStatus[] children = buildingStatus.getChildren();
- for (int i = 0; i < children.length; i++) {
- populateCopyBuffer(children[i], buffer, nesting + 1);
- }
- }
-
- /**
- * Copy the contents of the statuses to the clipboard.
- */
- private void copyToClipboard() {
- if (clipboard != null)
- clipboard.dispose();
- StringBuffer statusBuffer = new StringBuffer();
- populateCopyBuffer(status, statusBuffer, 0);
- clipboard = new Clipboard(list.getDisplay());
- clipboard.setContents(new Object[] { statusBuffer.toString() },
- new Transfer[] { TextTransfer.getInstance() });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.window.Window#close()
- */
- public boolean close() {
- if (clipboard != null)
- clipboard.dispose();
- return super.close();
- }
-
- /**
- * Show the details portion of the dialog if it is not already visible. This
- * method will only work when it is invoked after the control of the dialog
- * has been set. In other words, after the <code>createContents</code>
- * method has been invoked and has returned the control for the content area
- * of the dialog. Invoking the method before the content area has been set
- * or after the dialog has been disposed will have no effect.
- *
- * @since 3.1
- */
- protected final void showDetailsArea() {
- if (!listCreated) {
- Control control = getContents();
- if (control != null && !control.isDisposed())
- toggleDetailsArea();
- }
- }
-
- /**
- * Return whether the Details button should be included. This method is
- * invoked once when the dialog is built. By default, the Details button is
- * only included if the status used when creating the dialog was a
- * multi-status or if the status contains an exception. Subclasses may
- * override.
- *
- * @return whether the Details button should be included
- * @since 3.1
- */
- protected boolean shouldShowDetailsButton() {
- return status.isMultiStatus() || status.getException() != null;
- }
-
- /**
- * Set the status displayed by this error dialog to the given status. This
- * only affects the status displayed by the Details list. The message, image
- * and title should be updated by the subclass, if desired.
- *
- * @param status
- * the status to be displayed in the details list
- * @since 3.1
- */
- protected final void setStatus(IStatus status) {
- if (this.status != status) {
- this.status = status;
- }
- shouldIncludeTopLevelErrorInDetails = true;
- if (listCreated) {
- repopulateList();
- }
- }
-
- /**
- * Repopulate the supplied list widget.
- */
- private void repopulateList() {
- if (list != null && !list.isDisposed()) {
- list.removeAll();
- populateList(list);
- }
- }
-
-}
\ No newline at end of file
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/Logger.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/Logger.java
index be31bbe..a2037c5 100644
--- a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/Logger.java
+++ b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/Logger.java
@@ -11,8 +11,8 @@
package org.eclipse.epf.common.serviceability;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
/**
* Generic logger used for logging status messages, warning messages, error
@@ -24,7 +24,7 @@
public class Logger {
// The plug-in instance.
- private AbstractPlugin plugin;
+ private Plugin plugin;
// The plug-in ID.
private String pluginId;
@@ -35,9 +35,9 @@
* @param plugin
* The plugin instance.
*/
- public Logger(AbstractPlugin plugin) {
+ public Logger(Plugin plugin) {
this.plugin = plugin;
- this.pluginId = plugin.getId();
+ this.pluginId = plugin.getBundle().getSymbolicName(); //plugin.getId();
}
/**
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/MsgBox.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/MsgBox.java
deleted file mode 100644
index 1fc1529..0000000
--- a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/MsgBox.java
+++ /dev/null
@@ -1,123 +0,0 @@
-//------------------------------------------------------------------------------
-// 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.common.serviceability;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Helper class to display a message box.
- *
- * @author Phong Nguyen Le
- * @author Kelvin Low
- * @since 1.0
- */
-public final class MsgBox {
- /**
- * Use this method to show error message if you don't want long path to be
- * cut off.
- *
- * @param msg
- */
- public static final void nativeShowError(Shell shell, String msg) {
- if (shell == null) {
- shell = getDefaultShell();
- if (shell == null) {
- return;
- }
- }
- MessageBox msgBox = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
- msgBox.setMessage(msg);
- msgBox.setText(shell.getText());
- msgBox.open();
- }
-
- public static final void showError(String msg) {
- showError(getDefaultShell(), msg);
- }
-
- public static final void showError(Shell shell, String msg) {
- WrappedMessageDialog.openError(shell, shell == null ? null : shell
- .getText(), msg);
- }
-
- public static final void showWarning(String msg) {
- showWarning(getDefaultShell(), msg);
- }
-
- public static final void showWarning(Shell shell, String msg) {
- WrappedMessageDialog.openWarning(shell, shell == null ? null : shell
- .getText(), msg);
- }
-
- public static final Shell getDefaultShell() {
- try {
- Display d = Display.getCurrent();
- if (d == null) {
- d = Display.getDefault();
- }
-
- Shell s = null;
- if (d != null) {
- s = d.getActiveShell();
- }
-
- return s;
- } catch (RuntimeException e) {
- return null;
- }
- }
-
- public static final Display getDisplay() {
- try {
- Display d = Display.getCurrent();
- if (d == null) {
- d = Display.getDefault();
- }
-
- return d;
- } catch (RuntimeException e) {
- return null;
- }
- }
-
- public static final int prompt(String msg) {
- return prompt(getDefaultShell(), msg);
- }
-
- public static final int prompt(Shell shell, String msg) {
- return prompt(shell, null, msg, SWT.YES | SWT.NO | SWT.CANCEL);
- }
-
- public static final int prompt(String msg, int buttons) {
- return prompt(getDefaultShell(), null, msg, buttons);
- }
-
- public static final int prompt(String title, String msg, int buttons) {
- return prompt(getDefaultShell(), title, msg, buttons);
- }
-
- public static final int prompt(Shell shell, String msg, int buttons) {
- return prompt(shell, null, msg, buttons);
- }
-
- public static final int prompt(Shell shell, String title, String msg,
- int buttons) {
- MessageBox msgBox = new MessageBox(shell, buttons | SWT.ICON_QUESTION);
- msgBox.setText(title != null && title.length() > 0 ? title : shell
- .getText());
- msgBox.setMessage(msg);
- return msgBox.open();
- }
-
-}
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/MsgDialog.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/MsgDialog.java
deleted file mode 100644
index 6ebd56c..0000000
--- a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/MsgDialog.java
+++ /dev/null
@@ -1,614 +0,0 @@
-//------------------------------------------------------------------------------
-// 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.common.serviceability;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A message dialog used for displaying error, warning, confirmation or
- * informational messages.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class MsgDialog {
-
- // The plug-in instance.
- private AbstractPlugin plugin;
-
- // The plug-in ID.
- private String pluginId;
-
- // The plug-in logger.
- private Logger logger;
-
- /**
- * Create a new instance given the plug-in instance.
- *
- * @param plugin
- * The plugin instance.
- */
- public MsgDialog(AbstractPlugin plugin) {
- this.plugin = plugin;
- this.pluginId = plugin.getId();
- this.logger = plugin.getLogger();
- }
-
- /**
- * Displays the given error message in an error dialog without the error
- * reason and Details button.
- * <p>
- * Note: The error message will be written to the log file.
- *
- * @param title
- * The title for the error dialog.
- * @param msg
- * The error message.
- */
- public void displayError(String title, String msg) {
- display(IStatus.ERROR, title, msg, null, null, null);
- }
-
- /**
- * Displays the given error message in an error dialog without the error
- * reason and Details button.
- * <p>
- * Note: The error message and the exception stack trace will be written to
- * the log file.
- *
- * @param title
- * The title for the error dialog.
- * @param msg
- * The error message.
- * @param ex
- * The exception associated with the error.
- */
- public void displayError(String title, String msg, Throwable ex) {
- display(IStatus.ERROR, title, msg, null, null, ex);
- }
-
- /**
- * Displays the given error message in an error dialog without the Details
- * button.
- * <p>
- * Note: The error message will be written to the log file.
- *
- * @param title
- * The title for the error dialog.
- * @param msg
- * The error message.
- * @param reason
- * The reason for the error.
- */
- public void displayError(String title, String msg, String reason) {
- display(IStatus.ERROR, title, msg, reason, null, null);
- }
-
- /**
- * Displays the given error message in an error dialog without the Details
- * button.
- * <p>
- * Note: The error message and the exception stack trace will be written to
- * the log file.
- *
- * @param title
- * The title for the error dialog.
- * @param msg
- * The error message.
- * @param reason
- * The reason for the error.
- * @param ex
- * The exception associated with the error.
- */
- public void displayError(String title, String msg, String reason,
- Throwable ex) {
- display(IStatus.ERROR, title, msg, reason, null, ex);
- }
-
- /**
- * Displays the given error message in an error dialog. The Details button
- * will be displayed if the <code>details</code> parameter it not null or
- * empty.
- * <p>
- * Note: The error message will be written to the log file.
- *
- * @param title
- * The title for the error dialog.
- * @param msg
- * The error message.
- * @param reason
- * The reason for the error.
- * @param details
- * The error details.
- */
- public void displayError(String title, String msg, String reason,
- String details) {
- display(IStatus.ERROR, title, msg, reason, details, null);
- }
-
- /**
- * Displays the given error message in an error dialog. The Details button
- * will be displayed if the <code>details</code> parameter it not null or
- * empty.
- * <p>
- * Note: The error message and the exception stack trace will be written to
- * the log file.
- *
- * @param title
- * The title for the error dialog.
- * @param msg
- * The error message.
- * @param reason
- * The reason for the error.
- * @param details
- * The error details.
- * @param ex
- * The exception associated with the error.
- */
- public void displayError(String title, String msg, String reason,
- String details, Throwable ex) {
- display(IStatus.ERROR, title, msg, reason, details, ex);
- }
-
- /**
- * Displays the given error status in an error dialog.
- * <p>
- * Note: The error message and the exception stack trace will be written to
- * the log file.
- *
- * @param title
- * The title for the error dialog.
- * @param status
- * The error status.
- */
- public int displayError(String title, IStatus status) {
- return display(title, null, status);
- }
-
- /**
- * Displays the given error status in an error dialog.
- * <p>
- * Note: The error message and the exception stack trace will be written to
- * the log file.
- *
- * @param title
- * The title for the error dialog.
- * @param msg
- * The error message.
- * @param status
- * The error status.
- */
- public int displayError(String title, String msg, IStatus status) {
- return display(title, msg, status);
- }
-
- /**
- * Displays the given warning message in a warning dialog without the
- * warning reason and Details button.
- * <p>
- * Note: The waning message will be written to the log file.
- *
- * @param title
- * The title for the warning dialog.
- * @param msg
- * The warning message.
- */
- public void displayWarning(String title, String msg) {
- display(IStatus.WARNING, title, msg, null, null, null);
- }
-
- /**
- * Displays the given warning message in a warning dialog without the
- * warning reason and Details button.
- * <p>
- * Note: The warning message and the exception stack trace will be written
- * to the log file.
- *
- * @param title
- * The title for the warning dialog.
- * @param msg
- * The warning message.
- * @param ex
- * The exception associated with the warning.
- */
- public void displayWarning(String title, String msg, Throwable ex) {
- display(IStatus.WARNING, title, msg, null, null, ex);
- }
-
- /**
- * Displays the given warning message in a warning dialog without the
- * warning reason and Details button.
- * <p>
- * Note: The waning message will be written to the log file.
- *
- * @param title
- * The title for the warning dialog.
- * @param msg
- * The warning message.
- * @param reason
- * The reason for the warning.
- */
- public void displayWarning(String title, String msg, String reason) {
- display(IStatus.WARNING, title, msg, reason, null, null);
- }
-
- /**
- * Displays the given warning message in a warning dialog without the
- * warning reason and Details button.
- * <p>
- * Note: The warning message and the exception stack trace will be written
- * to the log file.
- *
- * @param title
- * The title for the warning dialog.
- * @param msg
- * The warning message.
- * @param reason
- * The reason for the warning.
- * @param ex
- * The exception associated with the warning.
- */
- public void displayWarning(String title, String msg, String reason,
- Throwable ex) {
- display(IStatus.WARNING, title, msg, reason, null, ex);
- }
-
- /**
- * Displays the given warning message in a warning dialog. The Details
- * button will be displayed if the <code>details</code> parameter it not
- * null or empty.
- * <p>
- * Note: The waning message will be written to the log file.
- *
- * @param title
- * The title for the error dialog.
- * @param msg
- * The warning message.
- * @param reason
- * The reason for the warning.
- * @param details
- * The warning details.
- */
- public void displayWarning(String title, String msg, String reason,
- String details) {
- display(IStatus.WARNING, title, msg, reason, details, null);
- }
-
- /**
- * Displays the given warning message in a warning dialog. The Details
- * button will be displayed if the <code>details</code> parameter it not
- * null or empty.
- * <p>
- * Note: The warning message and the exception stack trace will be written
- * to the log file.
- *
- * @param title
- * The title for the error dialog.
- * @param msg
- * The warning message.
- * @param reason
- * The reason for the warning.
- * @param details
- * The warning details.
- * @param ex
- * The exception associated with the warning.
- */
- public void displayWarning(String title, String msg, String reason,
- String details, Throwable ex) {
- display(IStatus.WARNING, title, msg, reason, details, ex);
- }
-
- /**
- * Displays the given warning status in an error dialog.
- * <p>
- * Note: The warning message and the exception stack trace will be written
- * to the log file.
- *
- * @param title
- * The title for the error dialog.
- * @param status
- * The error status.
- */
- public void displayWarning(String title, IStatus status) {
- display(title, null, status);
- }
-
- /**
- * Displays the given warning status in an error dialog.
- * <p>
- * Note: The warning message and the exception stack trace will be written
- * to the log file.
- *
- * @param title
- * The title for the error dialog.
- * @param msg
- * The error message.
- * @param status
- * The error status.
- */
- public void displayWarning(String title, String msg, IStatus status) {
- display(title, msg, status);
- }
-
- /**
- * Displays the given error or warning message in an error or warning
- * dialog. The Details button will be displayed if the <code>details</code>
- * parameter it not null or empty.
- *
- * @param severity
- * The severity, either IStatus.ERROR or IStatus.WARNING.
- * @param title
- * The title for the error dialog.
- * @param msg
- * The error message.
- * @param reason
- * The reason for the error.
- * @param details
- * The error details.
- * @param ex
- * The exception associated with the error.
- */
- public synchronized void display(int severity, String title, String msg,
- String reason, String details, Throwable ex) {
- if (msg == null && ex != null) {
- msg = ex.getMessage();
- }
-
- if (msg == null) {
- msg = ""; //$NON-NLS-1$
- }
-
- if (severity == IStatus.ERROR || severity == IStatus.WARNING) {
- logger.logMsg(severity, msg, ex);
- } else {
- throw new IllegalArgumentException(
- "severity argument must be IStatus.ERROR or IStatus.WARNING"); //$NON-NLS-1$
- }
-
- Image oldImage = org.eclipse.jface.dialogs.ErrorDialog
- .getDefaultImage();
- Image shellImage = getShellImage();
- if (shellImage != null) {
- ErrorDialog.setDefaultImage(shellImage);
- }
-
- Shell shell = plugin.getWorkbench().getDisplay().getActiveShell();
-
- if (details != null && details.length() > 0) {
- MultiStatus mStatus = new MultiStatus(pluginId, IStatus.OK, reason,
- ex);
- Status status = new Status(severity, pluginId, IStatus.OK, details,
- ex);
- mStatus.add(status);
- org.eclipse.jface.dialogs.ErrorDialog.openError(shell, title, msg,
- mStatus);
- } else if (reason != null && reason.length() > 0) {
- Status status = new Status(severity, pluginId, IStatus.OK, reason,
- ex);
- org.eclipse.jface.dialogs.ErrorDialog.openError(shell, title, msg,
- status);
- } else {
- if (severity == IStatus.ERROR) {
- WrappedMessageDialog.openError(shell, title, msg);
- } else if (severity == IStatus.WARNING) {
- WrappedMessageDialog.openWarning(shell, title, msg);
- }
- }
-
- if (shellImage != null) {
- ErrorDialog.setDefaultImage(oldImage);
- }
- }
-
- /**
- * Displays the given error or warning message in an error or warning
- * dialog. The Details button will be displayed if the <code>details</code>
- * parameter it not null or empty.
- *
- * @param title
- * The title for the error dialog.
- * @param status
- * The error status.
- */
- public synchronized int display(String title, IStatus status) {
- return display(title, null, status);
- }
-
- /**
- * Displays the given error or warning message in an error or warning
- * dialog. The Details button will be displayed if the <code>details</code>
- * parameter it not null or empty.
- *
- * @param title
- * The title for the error dialog.
- * @param msg
- * The error message.
- * @param status
- * The error status.
- */
- public synchronized int display(String title, String msg, IStatus status) {
- if (status == null) {
- throw new IllegalArgumentException("status argument cannot be null"); //$NON-NLS-1$
- }
-
- if (msg == null) {
- msg = status.getMessage();
- }
- if (msg == null) {
- msg = ""; //$NON-NLS-1$
- }
-
- int severity = status.getSeverity();
- if (severity == IStatus.ERROR || severity == IStatus.WARNING) {
- logger.logMsg(severity, msg, status.getException());
- }
-
- Image oldImage = org.eclipse.jface.dialogs.ErrorDialog
- .getDefaultImage();
- Image shellImage = getShellImage();
- if (shellImage != null) {
- ErrorDialog.setDefaultImage(shellImage);
- }
-
- Shell shell = plugin.getWorkbench().getDisplay().getActiveShell();
-
- int rc = org.eclipse.jface.dialogs.ErrorDialog.openError(shell, title,
- msg, status);
-
- if (shellImage != null) {
- ErrorDialog.setDefaultImage(oldImage);
- }
-
- return rc;
- }
-
- /**
- * Displays the given message in a informational dialog with an "OK" button.
- *
- * @param title
- * The title for the information dialog.
- * @param msg
- * The message to display.
- */
- public void displayInfo(String title, String msg) {
- if (msg == null) {
- msg = ""; //$NON-NLS-1$
- }
-
- Image oldImage = WrappedMessageDialog.getDefaultImage();
- Image shellImage = getShellImage();
- if (shellImage != null) {
- WrappedMessageDialog.setDefaultImage(shellImage);
- }
-
- Shell shell = plugin.getWorkbench().getDisplay().getActiveShell();
- WrappedMessageDialog.openInformation(shell, title, msg);
-
- if (shellImage != null) {
- WrappedMessageDialog.setDefaultImage(oldImage);
- }
- }
-
- /**
- * Displays the given message in a question dialog with a "Yes" and "No"
- * button.
- *
- * @param title
- * The title for the information dialog.
- * @param msg
- * The message to display.
- */
- public boolean displayPrompt(String title, String msg) {
- if (msg == null) {
- msg = ""; //$NON-NLS-1$
- }
-
- Image oldImage = WrappedMessageDialog.getDefaultImage();
- Image shellImage = getShellImage();
- if (shellImage != null) {
- WrappedMessageDialog.setDefaultImage(shellImage);
- }
-
- Shell shell = plugin.getWorkbench().getDisplay().getActiveShell();
- boolean result = WrappedMessageDialog.openQuestion(shell, title, msg);
-
- if (shellImage != null) {
- WrappedMessageDialog.setDefaultImage(oldImage);
- }
-
- return result;
- }
-
- /**
- * Displays the given message in a confirmation dialog with a "Yes" and
- * "Cancel" button.
- *
- * @param title
- * The title for the information dialog.
- * @param msg
- * The message to display.
- */
- public boolean displayConfirmation(String title, String msg) {
- if (msg == null) {
- msg = ""; //$NON-NLS-1$
- }
-
- Image oldImage = WrappedMessageDialog.getDefaultImage();
- Image shellImage = getShellImage();
- if (shellImage != null) {
- WrappedMessageDialog.setDefaultImage(shellImage);
- }
-
- Shell shell = plugin.getWorkbench().getDisplay().getActiveShell();
- boolean result = WrappedMessageDialog.openConfirm(shell, title, msg);
-
- if (shellImage != null) {
- WrappedMessageDialog.setDefaultImage(oldImage);
- }
-
- return result;
- }
-
- public int displayConfirmation(String title, String msg, IStatus status) {
- if (status == null) {
- throw new IllegalArgumentException("status argument cannot be null"); //$NON-NLS-1$
- }
-
- if (msg == null) {
- msg = status.getMessage();
- }
- if (msg == null) {
- msg = ""; //$NON-NLS-1$
- }
-
- Image shellImage = getShellImage();
- if (shellImage != null) {
- ErrorDialogNoReason.setDefaultImage(shellImage);
- }
-
- Shell shell = plugin.getWorkbench().getDisplay().getActiveShell();
-
- int rc = ErrorDialogNoReason.openError(shell, title, msg, status);
-
- return rc;
-
- }
-
- /**
- * Returns the image for the current shell.
- *
- * @return The current shell image.
- */
- private Image getShellImage() {
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench != null) {
- IWorkbenchWindow workbenchWindow = workbench
- .getActiveWorkbenchWindow();
- if (workbenchWindow != null) {
- Shell shell = workbenchWindow.getShell();
- if (shell != null) {
- return shell.getImage();
- }
- }
- }
- return null;
- }
-
-}
\ No newline at end of file
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/VersionUtil.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/VersionUtil.java
index 0fbaf4d..54fae22 100644
--- a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/VersionUtil.java
+++ b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/VersionUtil.java
@@ -98,9 +98,14 @@
// read properties file
try {
+
+ // preference store is not accessible here,
+ // should pass the wrapper in when UI plugin is activated.
+ // Jinhua Xi, 01/03/2008
String valueStr = CommonPlugin.getDefault().getPreferenceStore()
.getString(DISABLE_VERSION_CHECKING_PREF);
versionCheckingDisabled = Boolean.valueOf(valueStr).booleanValue();
+
} catch (MissingResourceException e) {
versionCheckingDisabled = false;
}
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/WrappedMessageDialog.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/WrappedMessageDialog.java
deleted file mode 100644
index 1c23202..0000000
--- a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/WrappedMessageDialog.java
+++ /dev/null
@@ -1,150 +0,0 @@
-//------------------------------------------------------------------------------
-// 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.common.serviceability;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Displays a message dialog that displays wrapped text.
- *
- * @author Bingxue Xu
- * @since 1.0
- */
-public class WrappedMessageDialog extends MessageDialog {
-
- public WrappedMessageDialog(Shell parentShell, String dialogTitle,
- Image dialogTitleImage, String dialogMessage, int dialogImageType,
- String[] dialogButtonLabels, int defaultIndex) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage,
- dialogImageType, dialogButtonLabels, defaultIndex);
- }
-
- protected Control createMessageArea(Composite composite) {
-
- Control rComposite = super.createMessageArea(composite);
-
- int minWidth = IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH;// + 300;
- // TO-DO: need to revist the # of dialog display units and margin
- // when in other languages
- int charsPerLine = minWidth / 4 - 15;
- GridData gd = (GridData) messageLabel.getLayoutData();
- gd.minimumWidth = minWidth;
- messageLabel.setText(addLineBreaks(message, charsPerLine));
-
- return rComposite;
- }
-
- String addLineBreaks(String msg, int maxChars) {
- // System.out.println("$$$ DEBUG: original message = " + msg);
-
- if (msg == null)
- return null;
-
- StringBuffer strBuf = new StringBuffer();
- int count = 0;
- for (int i = 0; i < msg.length(); i++) {
- strBuf.append(msg.charAt(i));
- if (Character.isWhitespace(msg.charAt(i)))
- count = 0;
- else
- count++;
-
- if (count >= maxChars) {
- if (!Character.isWhitespace(msg.charAt(i))) {
- strBuf.append("\n"); //$NON-NLS-1$
- }
- count = 0;
- }
- }
-
- // System.out.println("$$$ DEBUG: broken message = " +
- // strBuf.toString());
- return strBuf.toString();
- }
-
- public static boolean openConfirm(Shell parent, String title, String message) {
- WrappedMessageDialog dialog = new WrappedMessageDialog(parent, title,
- null, // accept
- // the
- // default
- // window
- // icon
- message, QUESTION, new String[] { IDialogConstants.OK_LABEL,
- IDialogConstants.CANCEL_LABEL }, 0); // OK is the
- // default
- return dialog.open() == 0;
- }
-
- public static void openError(Shell parent, String title, String message) {
- WrappedMessageDialog dialog = new WrappedMessageDialog(parent, title,
- null, // accept
- // the
- // default
- // window
- // icon
- message, ERROR, new String[] { IDialogConstants.OK_LABEL }, 0); // ok
- // is
- // the
- // default
- dialog.open();
- return;
- }
-
- public static void openInformation(Shell parent, String title,
- String message) {
- WrappedMessageDialog dialog = new WrappedMessageDialog(parent, title,
- null, // accept
- // the
- // default
- // window
- // icon
- message, INFORMATION,
- new String[] { IDialogConstants.OK_LABEL }, 0);
- // ok is the default
- dialog.open();
- return;
- }
-
- public static boolean openQuestion(Shell parent, String title,
- String message) {
- WrappedMessageDialog dialog = new WrappedMessageDialog(parent, title,
- null, // accept
- // the
- // default
- // window
- // icon
- message, QUESTION, new String[] { IDialogConstants.YES_LABEL,
- IDialogConstants.NO_LABEL }, 0); // yes is the
- // default
- return dialog.open() == 0;
- }
-
- public static void openWarning(Shell parent, String title, String message) {
- WrappedMessageDialog dialog = new WrappedMessageDialog(parent, title,
- null, // accept
- // the
- // default
- // window
- // icon
- message, WARNING, new String[] { IDialogConstants.OK_LABEL }, 0); // ok
- // is
- // the
- // default
- dialog.open();
- return;
- }
-}
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ClipboardUtil.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ClipboardUtil.java
deleted file mode 100644
index 0d16aab..0000000
--- a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ClipboardUtil.java
+++ /dev/null
@@ -1,112 +0,0 @@
-//------------------------------------------------------------------------------
-// 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.common.utils;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.HTMLTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.widgets.Display;
-import org.osgi.framework.Bundle;
-
-/**
- * Utility class for retrieving data from the clipboard.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class ClipboardUtil {
-
- /**
- * The current clipboard.
- */
- private static Clipboard clipboard;
-
- private static final String SOURCE_URL = "SourceURL:"; //$NON-NLS-1$
-
- private static Transfer htmlTransfer = null;
-
- static {
- if (SWT.getPlatform().equals("win32")) { //$NON-NLS-1$
- try {
- Bundle bundle = Platform
- .getBundle("org.eclipse.epf.common.win32.win32.x86"); //$NON-NLS-1$
- Class c = bundle
- .loadClass("org.eclipse.epf.common.win32.Win32HTMLTransfer"); //$NON-NLS-1$
- if (c != null) {
- htmlTransfer = (Transfer) c.newInstance();
- }
- } catch (Exception e) {
- htmlTransfer = null;
- }
- }
- }
-
- /**
- * Gets the HTML source URL from the current clipboard.
- *
- * @return the HTML source URL or <code>null</code>
- */
- public static String getHTMLSourceURL() {
- if (htmlTransfer == null) {
- return null;
- }
-
- Clipboard clipboard = new Clipboard(Display.getCurrent());
- String sourceURL = null;
- try {
- String htmlContent = (String) clipboard.getContents(htmlTransfer);
- if (htmlContent != null && htmlContent.length() > 0) {
- int index = htmlContent.indexOf(SOURCE_URL);
- if (index > 0) {
- sourceURL = htmlContent.substring(index
- + SOURCE_URL.length());
- sourceURL = sourceURL.substring(0, sourceURL
- .indexOf(FileUtil.LINE_SEP));
- }
- }
- if (sourceURL != null && sourceURL.indexOf("\\") != -1) { //$NON-NLS-1$
- // IE provides sourceURL in form "file://C:\foo\bar.htm"
- // but when the hrefs are resolved, files look like "file:///C:/foo/bar.htm"
- URL url = new URL(sourceURL);
- sourceURL = url.toExternalForm();
- if (sourceURL.startsWith("file://") && !sourceURL.startsWith("file:///")) { //$NON-NLS-1$ //$NON-NLS-2$
- // need to add a third / so rte.js can match the sourceURL to hrefs
- sourceURL = "file:///" + sourceURL.substring(7); //$NON-NLS-1$
- }
- }
- return sourceURL;
- } catch (MalformedURLException urlEx) {
- return sourceURL;
- } finally {
- clipboard.dispose();
- }
- }
-
- /**
- * Copy the string to the clipboard.
- */
- public static void copyTextHTMLToClipboard(String string) {
- if (clipboard != null)
- clipboard.dispose();
- clipboard = new Clipboard(null);
- clipboard.setContents(new Object[] { string, string },
- new Transfer[] { TextTransfer.getInstance(), HTMLTransfer.getInstance() });
- if (clipboard != null)
- clipboard.dispose();
- }
-
-}
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/MenuUtil.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/MenuUtil.java
deleted file mode 100644
index 85ea141..0000000
--- a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/MenuUtil.java
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-// 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.common.utils;
-
-import org.eclipse.swt.widgets.MenuItem;
-
-/**
- * A helper class for retrieving Eclipse menus.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class MenuUtil {
-
- /**
- * Searches an array of menu items and returns the menu item that matches
- * the given menu text.
- *
- * @param menuItems
- * An array of menu items.
- * @param text
- * The text to look for.
- * @return The menu item if found, <code>null</code> otherwise.
- */
- public static MenuItem getMenuItem(MenuItem[] menuItems, String text) {
- if (menuItems == null || text == null || text.length() == 0) {
- return null;
- }
-
- for (int i = 0; i < menuItems.length; i++) {
- if (menuItems[i].getText().startsWith(text)) {
- return menuItems[i];
- }
- }
-
- return null;
- }
-
-}
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/PerspectiveUtil.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/PerspectiveUtil.java
deleted file mode 100644
index 065cd25..0000000
--- a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/PerspectiveUtil.java
+++ /dev/null
@@ -1,122 +0,0 @@
-//------------------------------------------------------------------------------
-// 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.common.utils;
-
-import org.eclipse.ui.IPerspectiveDescriptor;
-import org.eclipse.ui.IPerspectiveRegistry;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-
-/**
- * Utility class for accessing perspectives.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class PerspectiveUtil {
-
- /**
- * Private constructor to prevent this class from being instantiated. All
- * methods in this class should be static.
- */
- private PerspectiveUtil() {
- }
-
- /**
- * Returns the ID of the active perspective.
- *
- * @return The active perspective ID.
- */
- public static String getActivePerspectiveId() {
- IWorkbenchPage activePage = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage();
- if (activePage != null) {
- IPerspectiveDescriptor activePerspective = activePage
- .getPerspective();
- return activePerspective.getId();
- }
- return null;
- }
-
- /**
- * Opens a perspective.
- *
- * @param perspectiveId
- * The perspective ID.
- * @return The previously active perspective.
- */
- public static IPerspectiveDescriptor openPerspective(String perspectiveId) {
- IWorkbenchPage activePage = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage();
- if (activePage != null) {
- IPerspectiveRegistry registry = PlatformUI.getWorkbench()
- .getPerspectiveRegistry();
- IPerspectiveDescriptor oldPerspective = activePage.getPerspective();
- if (!oldPerspective.getId().equals(perspectiveId)) {
- IPerspectiveDescriptor perspective = registry
- .findPerspectiveWithId(perspectiveId);
- activePage.setPerspective(perspective);
- }
- return oldPerspective;
- } else {
- IWorkbenchWindow activeWindow = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow();
- try {
- PlatformUI.getWorkbench().showPerspective(
- perspectiveId, activeWindow);
- } catch (WorkbenchException e) {
- }
- }
- return null;
- }
-
- /**
- * Returns true if the given perspective is already active.
- *
- * @param perspectiveId
- * The perspective ID.
- * @return
- */
- public static boolean isActivePerspective(String perspectiveId) {
- String activePerspectiveId = PerspectiveUtil.getActivePerspectiveId();
- if (perspectiveId == null || activePerspectiveId == null) {
- return false;
- }
- return activePerspectiveId.equalsIgnoreCase(perspectiveId);
- }
-
- /**
- * Returns the view part with the given view ID.
- *
- * @param viewId
- * The view ID.
- * @return The view part.
- */
- public static IViewPart getView(String viewId) {
- try {
- IWorkbenchPage activePage = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage();
- if (activePage != null) {
- IViewPart view = activePage.findView(viewId);
- if (view == null) {
- view = activePage.showView(viewId);
- }
- return view;
- }
- } catch (Exception e) {
- }
- return null;
- }
-
-}
diff --git a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/PreferenceUtil.java b/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/PreferenceUtil.java
deleted file mode 100644
index 7aa8a4c..0000000
--- a/2.0/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/PreferenceUtil.java
+++ /dev/null
@@ -1,167 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2007 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.common.utils;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.epf.common.preferences.CommonPreferences;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import com.ibm.icu.util.StringTokenizer;
-
-/**
- * Utility class for accessing preferences.
- *
- * @author Kelvin Low
- * @since 1.2
- */
-public class PreferenceUtil {
-
- // The multi-string preference delimiter.
- private static final String PREFERENCE_DELIMITER = ";"; //$NON-NLS-1$
-
- /**
- * Gets a list containing string values associated with a named preference.
- *
- * @param prefStore
- * a preference store
- * @param name
- * the preference name
- * @return a list of string values
- */
- public static List<String> getList(IPreferenceStore prefStore, String name) {
- List<String> values = new ArrayList<String>();
- if (prefStore != null && name != null) {
- String value = prefStore.getString(name);
- StringTokenizer tokenizer = new StringTokenizer(value,
- PREFERENCE_DELIMITER);
- int tokenCount = tokenizer.countTokens();
- for (int i = 0; i < tokenCount; i++) {
- values.add(tokenizer.nextToken());
- }
- }
- return values;
- }
-
- /**
- * Gets the string values associated with a named preference.
- *
- * @param prefStore
- * a preference store
- * @param name
- * the preference name
- * @return a list of string preference values
- */
- public static String[] getStringValues(IPreferenceStore prefStore,
- String name) {
- List<String> list = getList(prefStore, name);
- String[] values = new String[list.size()];
- list.toArray(values);
- return values;
- }
-
- /**
- * Saves a list containing string values associated with a named preference.
- *
- * @param prefStore
- * a preference store
- * @param name
- * the preference name
- * @param values
- * a list of string values
- */
- public static void setList(IPreferenceStore prefStore, String name,
- List values) {
- if (prefStore != null && name != null && values != null) {
- StringBuffer buffer = new StringBuffer();
- for (Iterator it = values.iterator(); it.hasNext();) {
- String value = (String) it.next();
- buffer.append(value);
- buffer.append(PREFERENCE_DELIMITER);
- }
- prefStore.setValue(name, buffer.toString());
- }
- }
-
- /**
- * Adds a string value to a list containing string values associated with a
- * named preference.
- *
- * @param prefStore
- * a preference store
- * @param name
- * the preference name
- * @param value
- * a string value
- * @param defaultValue
- * a default string value that will be added to the end of the
- * list
- */
- public static void addToList(IPreferenceStore prefStore, String name,
- String value, String defaultValue) {
- if (prefStore != null && name != null && value != null) {
- List<String> list = getList(prefStore, name);
- list.remove(value);
- list.add(0, value);
- int preferenceHistorySize = CommonPreferences
- .getPreferenceHistorySize();
- if (list.size() > preferenceHistorySize) {
- list = list.subList(0, 10);
- }
- if (list.size() == preferenceHistorySize && defaultValue != null
- && defaultValue.length() > 0) {
- list.set(9, defaultValue);
- }
- setList(prefStore, name, list);
- }
- }
-
- /**
- * Adds a string value to a list containing string values associated with a
- * named preference.
- *
- * @param prefStore
- * a preference store
- * @param name
- * the preference name
- * @param value
- * a string value
- */
- public static void addToList(IPreferenceStore prefStore, String name,
- String value) {
- addToList(prefStore, name, value, null);
- }
-
- /**
- * Saves an array of string values associated with a named preference.
- *
- * @param prefStore
- * a preference store
- * @param name
- * the preference name
- * @param values
- * an array of string values
- */
- public static void setStringValues(IPreferenceStore prefStore, String name,
- String[] values) {
- if (prefStore != null && name != null && values != null) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < values.length; i++) {
- buffer.append(values[i]);
- buffer.append(PREFERENCE_DELIMITER);
- }
- prefStore.setValue(name, buffer.toString());
- }
- }
-
-}
diff --git a/2.0/plugins/org.eclipse.epf.diagram.ad/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.diagram.ad/META-INF/MANIFEST.MF
index b479584..03fc73f 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.ad/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.diagram.ad/META-INF/MANIFEST.MF
@@ -45,6 +45,7 @@
org.eclipse.gmf.runtime.diagram.ui.actions,
org.eclipse.gmf.runtime.diagram.ui.printing,
org.eclipse.gmf.runtime.diagram.ui.printing.render,
- org.eclipse.epf.diagram.add
+ org.eclipse.epf.diagram.add,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/2.0/plugins/org.eclipse.epf.diagram.ad/src/org/eclipse/epf/diagram/ad/ActivityDiagramPlugin.java b/2.0/plugins/org.eclipse.epf.diagram.ad/src/org/eclipse/epf/diagram/ad/ActivityDiagramPlugin.java
index 8aff252..f85a100 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.ad/src/org/eclipse/epf/diagram/ad/ActivityDiagramPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.diagram.ad/src/org/eclipse/epf/diagram/ad/ActivityDiagramPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.diagram.ad;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
diff --git a/2.0/plugins/org.eclipse.epf.diagram.ad/src/org/eclipse/epf/diagram/ad/commands/NestedCommandProvider.java b/2.0/plugins/org.eclipse.epf.diagram.ad/src/org/eclipse/epf/diagram/ad/commands/NestedCommandProvider.java
index beb24f6..8d385e2 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.ad/src/org/eclipse/epf/diagram/ad/commands/NestedCommandProvider.java
+++ b/2.0/plugins/org.eclipse.epf.diagram.ad/src/org/eclipse/epf/diagram/ad/commands/NestedCommandProvider.java
@@ -32,7 +32,7 @@
import org.eclipse.epf.library.edit.command.INestedCommandProvider;
import org.eclipse.epf.library.edit.util.IDiagramManager;
import org.eclipse.epf.library.edit.util.TngUtil;
-import org.eclipse.epf.library.util.TypeConverter.TypeConversionCommand;
+import org.eclipse.epf.library.ui.util.TypeConverter.TypeConversionCommand;
import org.eclipse.epf.uma.Activity;
import org.eclipse.epf.uma.Process;
import org.eclipse.gmf.runtime.notation.Diagram;
diff --git a/2.0/plugins/org.eclipse.epf.diagram.ad/src/org/eclipse/epf/diagram/ad/part/ActivityDiagramEditorPlugin.java b/2.0/plugins/org.eclipse.epf.diagram.ad/src/org/eclipse/epf/diagram/ad/part/ActivityDiagramEditorPlugin.java
index d3c972e..ad79979 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.ad/src/org/eclipse/epf/diagram/ad/part/ActivityDiagramEditorPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.diagram.ad/src/org/eclipse/epf/diagram/ad/part/ActivityDiagramEditorPlugin.java
@@ -26,7 +26,7 @@
import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.eclipse.epf.diagram.ad.ActivityDiagramPlugin;
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
import org.eclipse.jface.resource.ImageDescriptor;
diff --git a/2.0/plugins/org.eclipse.epf.diagram.add/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.diagram.add/META-INF/MANIFEST.MF
index 5e6493c..625df4c 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.add/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.diagram.add/META-INF/MANIFEST.MF
@@ -41,6 +41,7 @@
org.eclipse.gmf.runtime.draw2d.ui;visibility:=reexport,
org.eclipse.draw2d;visibility:=reexport,
org.eclipse.epf.diagram.core,
- org.eclipse.epf.common
+ org.eclipse.epf.common,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/2.0/plugins/org.eclipse.epf.diagram.add/src/org/eclipse/epf/diagram/add/ActivityDetailDiagramPlugin.java b/2.0/plugins/org.eclipse.epf.diagram.add/src/org/eclipse/epf/diagram/add/ActivityDetailDiagramPlugin.java
index 310ebb3..4b5c7ad 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.add/src/org/eclipse/epf/diagram/add/ActivityDetailDiagramPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.diagram.add/src/org/eclipse/epf/diagram/add/ActivityDetailDiagramPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.diagram.add;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
diff --git a/2.0/plugins/org.eclipse.epf.diagram.core/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.diagram.core/META-INF/MANIFEST.MF
index 697b7bb..ae8ab19 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.core/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.diagram.core/META-INF/MANIFEST.MF
@@ -10,7 +10,8 @@
org.eclipse.gmf.runtime.diagram.ui.properties,
org.eclipse.gmf.runtime.diagram.ui.providers,
org.eclipse.epf.library.ui;visibility:=reexport,
- org.eclipse.gmf.runtime.diagram.ui.actions
+ org.eclipse.gmf.runtime.diagram.ui.actions,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.diagram.core,
org.eclipse.epf.diagram.core.actions,
diff --git a/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/DiagramCorePlugin.java b/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/DiagramCorePlugin.java
index 99b74ba..058c7d4 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/DiagramCorePlugin.java
+++ b/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/DiagramCorePlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.diagram.core;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
diff --git a/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/part/AbstractDiagramEditor.java b/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/part/AbstractDiagramEditor.java
index 408e788..a02fa85 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/part/AbstractDiagramEditor.java
+++ b/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/part/AbstractDiagramEditor.java
@@ -501,10 +501,21 @@
// .getShell());
return;
}
- CommonPlugin.getDefault().getMsgDialog().displayWarning(
- getSite().getShell().getText(),
+
+ /*
+ * NO UI module should not involve with UI classes
+ * use callback to handle such kind of situation
+ * Jinhua Xi, 01/13/08
+ */
+// CommonPlugin.getDefault().getMsgDialog().displayWarning(
+// getSite().getShell().getText(),
+// DiagramCoreResources.Warning_Saving_Diagram, e.getMessage(),
+// e);
+ CommonPlugin.getDefault().getMsgCallback().displayWarning(
+ CommonPlugin.getDefault(),
DiagramCoreResources.Warning_Saving_Diagram, e.getMessage(),
e);
+
return;
}
diff --git a/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/providers/SharedResourceDiagramDocumentProvider.java b/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/providers/SharedResourceDiagramDocumentProvider.java
index 34e09aa..67582f7 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/providers/SharedResourceDiagramDocumentProvider.java
+++ b/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/providers/SharedResourceDiagramDocumentProvider.java
@@ -34,7 +34,7 @@
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
import org.eclipse.epf.common.CommonPlugin;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.diagram.core.DiagramCorePlugin;
import org.eclipse.epf.diagram.core.part.DiagramEditorInputProxy;
import org.eclipse.epf.diagram.core.part.IDiagramFileEditorInputProxy;
diff --git a/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/util/ValidatingTextDirectEditManager.java b/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/util/ValidatingTextDirectEditManager.java
index e3bb91b..8ccac84 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/util/ValidatingTextDirectEditManager.java
+++ b/2.0/plugins/org.eclipse.epf.diagram.core/src/org/eclipse/epf/diagram/core/util/ValidatingTextDirectEditManager.java
@@ -15,7 +15,7 @@
import org.eclipse.emf.ecore.EModelElement;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.diagram.core.DiagramCorePlugin;
import org.eclipse.epf.diagram.core.DiagramCoreResources;
import org.eclipse.epf.diagram.core.bridge.BridgeHelper;
diff --git a/2.0/plugins/org.eclipse.epf.diagram.model/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.diagram.model/META-INF/MANIFEST.MF
index d9d79c0..e19fba2 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.model/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.diagram.model/META-INF/MANIFEST.MF
@@ -9,7 +9,8 @@
org.eclipse.core.runtime,
org.eclipse.draw2d,
org.eclipse.emf.transaction,
- org.eclipse.emf.workspace
+ org.eclipse.emf.workspace,
+ org.eclipse.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.diagram.model,
org.eclipse.epf.diagram.model.impl,
diff --git a/2.0/plugins/org.eclipse.epf.diagram.ui/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.diagram.ui/META-INF/MANIFEST.MF
index e8d1397..e261965 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.ui/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.diagram.ui/META-INF/MANIFEST.MF
@@ -13,7 +13,8 @@
org.eclipse.epf.diagram.add,
org.eclipse.epf.diagram.wpdd,
org.eclipse.epf.diagram.ad;visibility:=reexport,
- org.eclipse.gmf.runtime.diagram.ui.actions;visibility:=reexport
+ org.eclipse.gmf.runtime.diagram.ui.actions;visibility:=reexport,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.diagram.ui,
org.eclipse.epf.diagram.ui.service,
diff --git a/2.0/plugins/org.eclipse.epf.diagram.ui/src/org/eclipse/epf/diagram/ui/DiagramUIPlugin.java b/2.0/plugins/org.eclipse.epf.diagram.ui/src/org/eclipse/epf/diagram/ui/DiagramUIPlugin.java
index 80a04e3..5e2fabe 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.ui/src/org/eclipse/epf/diagram/ui/DiagramUIPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.diagram.ui/src/org/eclipse/epf/diagram/ui/DiagramUIPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.diagram.ui;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
diff --git a/2.0/plugins/org.eclipse.epf.diagram.ui/src/org/eclipse/epf/diagram/ui/viewer/AbstractDiagramGraphicalViewerEx.java b/2.0/plugins/org.eclipse.epf.diagram.ui/src/org/eclipse/epf/diagram/ui/viewer/AbstractDiagramGraphicalViewerEx.java
index d1f3c46..9ce7863 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.ui/src/org/eclipse/epf/diagram/ui/viewer/AbstractDiagramGraphicalViewerEx.java
+++ b/2.0/plugins/org.eclipse.epf.diagram.ui/src/org/eclipse/epf/diagram/ui/viewer/AbstractDiagramGraphicalViewerEx.java
@@ -440,7 +440,7 @@
(org.eclipse.epf.diagram.model.Diagram) model.getElement();
d.setSuppression(sup);
if(filter == null && configuration != null){
- ProcessConfigurator p = new ProcessConfigurator(config, null);
+ ProcessConfigurator p = new ProcessConfigurator(config);
d.setFilter(p);
}else{
d.setFilter(filter);
diff --git a/2.0/plugins/org.eclipse.epf.diagram.wpdd/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.diagram.wpdd/META-INF/MANIFEST.MF
index 86791b2..0dd0414 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.wpdd/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.diagram.wpdd/META-INF/MANIFEST.MF
@@ -38,6 +38,7 @@
org.eclipse.gmf.runtime.draw2d.ui;visibility:=reexport,
org.eclipse.draw2d;visibility:=reexport,
org.eclipse.epf.diagram.core,
- org.eclipse.epf.diagram.model
+ org.eclipse.epf.diagram.model,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/2.0/plugins/org.eclipse.epf.diagram.wpdd/src/org/eclipse/epf/diagram/wpdd/part/WPDDiagramEditorPlugin.java b/2.0/plugins/org.eclipse.epf.diagram.wpdd/src/org/eclipse/epf/diagram/wpdd/part/WPDDiagramEditorPlugin.java
index 6260f41..9391fac 100644
--- a/2.0/plugins/org.eclipse.epf.diagram.wpdd/src/org/eclipse/epf/diagram/wpdd/part/WPDDiagramEditorPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.diagram.wpdd/src/org/eclipse/epf/diagram/wpdd/part/WPDDiagramEditorPlugin.java
@@ -30,7 +30,7 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.eclipse.epf.diagram.model.provider.ModelItemProviderAdapterFactory;
import org.eclipse.epf.uma.provider.UmaItemProviderAdapterFactory;
diff --git a/2.0/plugins/org.eclipse.epf.export.msp.ui/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.export.msp.ui/META-INF/MANIFEST.MF
index ecb9fb4..5474b21 100644
--- a/2.0/plugins/org.eclipse.epf.export.msp.ui/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.export.msp.ui/META-INF/MANIFEST.MF
@@ -9,7 +9,8 @@
org.eclipse.epf.export;visibility:=reexport,
org.eclipse.epf.export.msp;visibility:=reexport,
org.eclipse.epf.publishing.ui;visibility:=reexport,
- org.eclipse.ui
+ org.eclipse.ui,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Bundle-Vendor: %providerName
Bundle-ClassPath: exportmspui.jar
diff --git a/2.0/plugins/org.eclipse.epf.export.msp.ui/src/org/eclipse/epf/export/msp/ui/ExportMSPUIPlugin.java b/2.0/plugins/org.eclipse.epf.export.msp.ui/src/org/eclipse/epf/export/msp/ui/ExportMSPUIPlugin.java
index b45392f..fcf633b 100644
--- a/2.0/plugins/org.eclipse.epf.export.msp.ui/src/org/eclipse/epf/export/msp/ui/ExportMSPUIPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.export.msp.ui/src/org/eclipse/epf/export/msp/ui/ExportMSPUIPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.export.msp.ui;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
diff --git a/2.0/plugins/org.eclipse.epf.export.msp.ui/src/org/eclipse/epf/export/msp/ui/preferences/ExportMSPUIPreferences.java b/2.0/plugins/org.eclipse.epf.export.msp.ui/src/org/eclipse/epf/export/msp/ui/preferences/ExportMSPUIPreferences.java
index d6905ab..467783f 100644
--- a/2.0/plugins/org.eclipse.epf.export.msp.ui/src/org/eclipse/epf/export/msp/ui/preferences/ExportMSPUIPreferences.java
+++ b/2.0/plugins/org.eclipse.epf.export.msp.ui/src/org/eclipse/epf/export/msp/ui/preferences/ExportMSPUIPreferences.java
@@ -5,8 +5,8 @@
import java.util.List;
+import org.eclipse.epf.common.ui.util.PreferenceUtil;
import org.eclipse.epf.common.utils.FileUtil;
-import org.eclipse.epf.common.utils.PreferenceUtil;
import org.eclipse.epf.export.msp.ui.ExportMSPUIPlugin;
import org.eclipse.epf.library.ui.preferences.LibraryUIPreferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/2.0/plugins/org.eclipse.epf.export.msp/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.export.msp/META-INF/MANIFEST.MF
index bca99c4..de6ab5b 100644
--- a/2.0/plugins/org.eclipse.epf.export.msp/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.export.msp/META-INF/MANIFEST.MF
@@ -10,7 +10,8 @@
org.eclipse.epf.msproject;visibility:=reexport,
org.eclipse.epf.publishing,
org.eclipse.epf.publishing.ui;visibility:=reexport,
- org.eclipse.ui
+ org.eclipse.ui,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Bundle-Vendor: %providerName
Bundle-ClassPath: exportmsp.jar
diff --git a/2.0/plugins/org.eclipse.epf.export.msp/src/org/eclipse/epf/export/msp/ExportMSPPlugin.java b/2.0/plugins/org.eclipse.epf.export.msp/src/org/eclipse/epf/export/msp/ExportMSPPlugin.java
index 28d6b2d..b134d24 100644
--- a/2.0/plugins/org.eclipse.epf.export.msp/src/org/eclipse/epf/export/msp/ExportMSPPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.export.msp/src/org/eclipse/epf/export/msp/ExportMSPPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.export.msp;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
diff --git a/2.0/plugins/org.eclipse.epf.export.msp/src/org/eclipse/epf/export/msp/ExportMSPXMLService.java b/2.0/plugins/org.eclipse.epf.export.msp/src/org/eclipse/epf/export/msp/ExportMSPXMLService.java
index 38471fd..55ce725 100644
--- a/2.0/plugins/org.eclipse.epf.export.msp/src/org/eclipse/epf/export/msp/ExportMSPXMLService.java
+++ b/2.0/plugins/org.eclipse.epf.export.msp/src/org/eclipse/epf/export/msp/ExportMSPXMLService.java
@@ -431,7 +431,7 @@
.createTBSComposedAdapterFactory();
if (adapterFactory instanceof ConfigurableComposedAdapterFactory) {
((ConfigurableComposedAdapterFactory) adapterFactory)
- .setFilter(new ProcessConfigurator(config, null));
+ .setFilter(new ProcessConfigurator(config));
}
IStructuredContentProvider contentProvider = new AdapterFactoryContentProvider(
adapterFactory);
@@ -592,7 +592,7 @@
wbsAdapterFactory = (ConfigurableComposedAdapterFactory) TngAdapterFactory.INSTANCE
.createWBSComposedAdapterFactory();
- breakdownElementFilter = new ProcessConfigurator(config, null);
+ breakdownElementFilter = new ProcessConfigurator(config);
wbsAdapterFactory.setFilter(breakdownElementFilter);
wbsContentProvider = new AdapterFactoryContentProvider(
diff --git a/2.0/plugins/org.eclipse.epf.export.xml/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.export.xml/META-INF/MANIFEST.MF
index d3b757a..0487b23 100644
--- a/2.0/plugins/org.eclipse.epf.export.xml/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.export.xml/META-INF/MANIFEST.MF
@@ -11,7 +11,8 @@
org.eclipse.epf.dataexchange;visibility:=reexport,
org.eclipse.epf.export;visibility:=reexport,
org.eclipse.epf.xml.uma;visibility:=reexport,
- org.eclipse.ui
+ org.eclipse.ui,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.export.xml,
org.eclipse.epf.export.xml.preferences,
diff --git a/2.0/plugins/org.eclipse.epf.export.xml/src/org/eclipse/epf/export/xml/ExportXMLPlugin.java b/2.0/plugins/org.eclipse.epf.export.xml/src/org/eclipse/epf/export/xml/ExportXMLPlugin.java
index 2ec318c..2c8c1f8 100644
--- a/2.0/plugins/org.eclipse.epf.export.xml/src/org/eclipse/epf/export/xml/ExportXMLPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.export.xml/src/org/eclipse/epf/export/xml/ExportXMLPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.export.xml;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
diff --git a/2.0/plugins/org.eclipse.epf.export.xml/src/org/eclipse/epf/export/xml/wizards/ExportXMLWizard.java b/2.0/plugins/org.eclipse.epf.export.xml/src/org/eclipse/epf/export/xml/wizards/ExportXMLWizard.java
index c912851..7604285 100644
--- a/2.0/plugins/org.eclipse.epf.export.xml/src/org/eclipse/epf/export/xml/wizards/ExportXMLWizard.java
+++ b/2.0/plugins/org.eclipse.epf.export.xml/src/org/eclipse/epf/export/xml/wizards/ExportXMLWizard.java
@@ -14,7 +14,7 @@
import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.export.services.ConfigurationExportData;
import org.eclipse.epf.export.services.PluginExportData;
import org.eclipse.epf.export.xml.ExportXMLPlugin;
diff --git a/2.0/plugins/org.eclipse.epf.export/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.export/META-INF/MANIFEST.MF
index feba768..bb707a7 100644
--- a/2.0/plugins/org.eclipse.epf.export/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.export/META-INF/MANIFEST.MF
@@ -15,5 +15,6 @@
org.eclipse.core.runtime,
org.eclipse.epf.authoring.ui,
org.eclipse.epf.library,
- org.eclipse.epf.publishing
+ org.eclipse.epf.publishing,
+ org.eclipse.epf.common.ui
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/2.0/plugins/org.eclipse.epf.export/src/org/eclipse/epf/export/ExportPlugin.java b/2.0/plugins/org.eclipse.epf.export/src/org/eclipse/epf/export/ExportPlugin.java
index 0996879..b12f5c8 100644
--- a/2.0/plugins/org.eclipse.epf.export/src/org/eclipse/epf/export/ExportPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.export/src/org/eclipse/epf/export/ExportPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.export;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
diff --git a/2.0/plugins/org.eclipse.epf.export/src/org/eclipse/epf/export/wizards/ExportUIPreferences.java b/2.0/plugins/org.eclipse.epf.export/src/org/eclipse/epf/export/wizards/ExportUIPreferences.java
index 6df7384..6498ee6 100644
--- a/2.0/plugins/org.eclipse.epf.export/src/org/eclipse/epf/export/wizards/ExportUIPreferences.java
+++ b/2.0/plugins/org.eclipse.epf.export/src/org/eclipse/epf/export/wizards/ExportUIPreferences.java
@@ -12,8 +12,8 @@
import java.util.List;
+import org.eclipse.epf.common.ui.util.PreferenceUtil;
import org.eclipse.epf.common.utils.FileUtil;
-import org.eclipse.epf.common.utils.PreferenceUtil;
import org.eclipse.epf.export.ExportPlugin;
import org.eclipse.epf.library.ui.preferences.LibraryUIPreferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/2.0/plugins/org.eclipse.epf.import.xml/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.import.xml/META-INF/MANIFEST.MF
index 31da3c3..2a1a1c5 100644
--- a/2.0/plugins/org.eclipse.epf.import.xml/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.import.xml/META-INF/MANIFEST.MF
@@ -9,7 +9,8 @@
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.epf.export.xml,
org.eclipse.ui,
- org.eclipse.epf.import
+ org.eclipse.epf.import,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.importing.xml,
org.eclipse.epf.importing.xml.preferences,
diff --git a/2.0/plugins/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/ImportXMLPlugin.java b/2.0/plugins/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/ImportXMLPlugin.java
index 794c4c8..99d8107 100644
--- a/2.0/plugins/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/ImportXMLPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/ImportXMLPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.importing.xml;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
diff --git a/2.0/plugins/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/services/ImportXMLService.java b/2.0/plugins/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/services/ImportXMLService.java
index 41642b3..a23c42a 100644
--- a/2.0/plugins/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/services/ImportXMLService.java
+++ b/2.0/plugins/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/services/ImportXMLService.java
@@ -27,9 +27,9 @@
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.sdo.EDataObject;
-import org.eclipse.epf.common.serviceability.MsgBox;
-import org.eclipse.epf.common.serviceability.MsgDialog;
import org.eclipse.epf.common.serviceability.VersionUtil;
+import org.eclipse.epf.common.ui.util.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.dataexchange.util.ContentProcessor;
import org.eclipse.epf.dataexchange.util.IResourceHandler;
import org.eclipse.epf.export.services.DiagramHandler;
diff --git a/2.0/plugins/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/wizards/ImportXMLWizard.java b/2.0/plugins/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/wizards/ImportXMLWizard.java
index b4d42e2..615aa90 100644
--- a/2.0/plugins/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/wizards/ImportXMLWizard.java
+++ b/2.0/plugins/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/wizards/ImportXMLWizard.java
@@ -16,7 +16,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.epf.authoring.ui.wizards.SaveAllEditorsPage;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.export.xml.ExportXMLPlugin;
import org.eclipse.epf.importing.xml.ImportXMLPlugin;
import org.eclipse.epf.importing.xml.ImportXMLResources;
diff --git a/2.0/plugins/org.eclipse.epf.import/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.import/META-INF/MANIFEST.MF
index dbb01d3..612e6dd 100644
--- a/2.0/plugins/org.eclipse.epf.import/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.import/META-INF/MANIFEST.MF
@@ -16,5 +16,6 @@
org.eclipse.epf.dataexchange,
org.eclipse.epf.export,
org.eclipse.epf.services,
- org.eclipse.epf.library.xmi
+ org.eclipse.epf.library.xmi,
+ org.eclipse.epf.common.ui
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/ImportPlugin.java b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/ImportPlugin.java
index 39b2b53..a93bb85 100644
--- a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/ImportPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/ImportPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.importing;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
diff --git a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/ConfigurationImportService.java b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/ConfigurationImportService.java
index 9108e7a..03373a8 100644
--- a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/ConfigurationImportService.java
+++ b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/ConfigurationImportService.java
@@ -19,8 +19,8 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.epf.common.serviceability.MsgBox;
import org.eclipse.epf.common.serviceability.VersionUtil;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.common.utils.FileUtil;
import org.eclipse.epf.export.services.LibraryDocument;
import org.eclipse.epf.export.services.PluginExportService;
@@ -30,11 +30,11 @@
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.util.ConvertGuidanceType;
+import org.eclipse.epf.library.ui.util.TypeConverter;
import org.eclipse.epf.library.ui.wizards.OpenLibraryWizard;
-import org.eclipse.epf.library.util.ConvertGuidanceType;
import org.eclipse.epf.library.util.LibraryUtil;
import org.eclipse.epf.library.util.ResourceUtil;
-import org.eclipse.epf.library.util.TypeConverter;
import org.eclipse.epf.persistence.migration.UpgradeCallerInfo;
import org.eclipse.epf.persistence.refresh.RefreshJob;
import org.eclipse.epf.uma.Activity;
diff --git a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/FileModifyChecker.java b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/FileModifyChecker.java
index 4ee40ab..699828a 100644
--- a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/FileModifyChecker.java
+++ b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/FileModifyChecker.java
@@ -19,8 +19,8 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.epf.common.serviceability.MsgBox;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.importing.ImportPlugin;
import org.eclipse.epf.importing.ImportResources;
import org.eclipse.epf.library.services.SafeUpdateController;
diff --git a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/LibraryImportManager.java b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/LibraryImportManager.java
index 2da7161..cf5a676 100644
--- a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/LibraryImportManager.java
+++ b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/LibraryImportManager.java
@@ -29,7 +29,7 @@
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.epf.authoring.ui.views.LibraryView;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.export.services.DiagramHandler;
import org.eclipse.epf.importing.ImportPlugin;
import org.eclipse.epf.importing.ImportResources;
diff --git a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/PluginImportingService.java b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/PluginImportingService.java
index 8608fce..1d418dc 100644
--- a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/PluginImportingService.java
+++ b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/services/PluginImportingService.java
@@ -32,7 +32,7 @@
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.epf.authoring.ui.views.LibraryView;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.common.utils.FileUtil;
import org.eclipse.epf.common.utils.XMLUtil;
import org.eclipse.epf.export.services.ConfigurationExportService;
diff --git a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/wizards/ImportConfigurationWizard.java b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/wizards/ImportConfigurationWizard.java
index 7ad7af9..809aaa4 100644
--- a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/wizards/ImportConfigurationWizard.java
+++ b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/wizards/ImportConfigurationWizard.java
@@ -14,7 +14,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.epf.authoring.ui.wizards.SaveAllEditorsPage;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.importing.ImportPlugin;
import org.eclipse.epf.importing.ImportResources;
import org.eclipse.epf.importing.services.ConfigurationImportData;
diff --git a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/wizards/ImportPluginWizard.java b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/wizards/ImportPluginWizard.java
index 605c5af..4adce31 100644
--- a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/wizards/ImportPluginWizard.java
+++ b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/wizards/ImportPluginWizard.java
@@ -17,7 +17,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.epf.authoring.ui.wizards.SaveAllEditorsPage;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.importing.ImportPlugin;
import org.eclipse.epf.importing.ImportResources;
import org.eclipse.epf.importing.services.PluginImportData;
diff --git a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/wizards/ImportUIPreferences.java b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/wizards/ImportUIPreferences.java
index 105d9e5..f082930 100644
--- a/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/wizards/ImportUIPreferences.java
+++ b/2.0/plugins/org.eclipse.epf.import/src/org/eclipse/epf/importing/wizards/ImportUIPreferences.java
@@ -12,8 +12,8 @@
import java.util.List;
+import org.eclipse.epf.common.ui.util.PreferenceUtil;
import org.eclipse.epf.common.utils.FileUtil;
-import org.eclipse.epf.common.utils.PreferenceUtil;
import org.eclipse.epf.importing.ImportPlugin;
import org.eclipse.epf.library.ui.preferences.LibraryUIPreferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/2.0/plugins/org.eclipse.epf.library.edit/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.library.edit/META-INF/MANIFEST.MF
index 015629d..81399fc 100644
--- a/2.0/plugins/org.eclipse.epf.library.edit/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.library.edit/META-INF/MANIFEST.MF
@@ -11,9 +11,11 @@
org.eclipse.epf.uma.edit;visibility:=reexport,
org.eclipse.core.runtime,
org.eclipse.core.resources,
- org.eclipse.emf.common.ui;visibility:=reexport,
+ org.eclipse.epf.services;visibility:=reexport,
+ org.eclipse.emf.common.ui,
org.eclipse.emf.edit.ui,
- org.eclipse.epf.services;visibility:=reexport
+ org.eclipse.epf.ui,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.library.edit,
org.eclipse.epf.library.edit.category,
diff --git a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/LibraryEditPlugin.java b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/LibraryEditPlugin.java
index b07bb08..0f2bc55 100644
--- a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/LibraryEditPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/LibraryEditPlugin.java
@@ -14,7 +14,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.AbstractActivator;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.osgi.framework.BundleContext;
@@ -25,7 +25,7 @@
* @author Kelvin Low
* @since 1.0
*/
-public class LibraryEditPlugin extends AbstractPlugin {
+public class LibraryEditPlugin extends AbstractActivator {
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.epf.library.edit"; //$NON-NLS-1$
@@ -86,14 +86,14 @@
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#getImage(String)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#getImage(String)
*/
public Image getImage(String relativePath) {
return super.getSharedImage(relativePath + ".gif"); //$NON-NLS-1$
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#getSharedImage(String)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#getSharedImage(String)
*/
public Image getSharedImage(String relativePath) {
return super.getSharedImage(relativePath + ".gif"); //$NON-NLS-1$
@@ -141,15 +141,4 @@
return image;
}
- /**
- * Logs the given object or message.
- */
- public void log(Object logEntry) {
- if (logEntry instanceof Throwable) {
- ((Throwable) logEntry).printStackTrace(System.err);
- } else {
- System.err.println(logEntry);
- }
- }
-
}
\ No newline at end of file
diff --git a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/Providers.java b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/Providers.java
index f930065..ff9f370 100644
--- a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/Providers.java
+++ b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/Providers.java
@@ -20,7 +20,7 @@
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.AbstractActivator;
import org.eclipse.jface.preference.IPreferenceStore;
import org.osgi.framework.Bundle;
@@ -37,7 +37,7 @@
private static IPreferenceStore preferenceStore;
- private static AbstractPlugin authoringPlugin;
+ private static AbstractActivator authoringPlugin;
private static Map commandTypeToListenersMap = new HashMap();
@@ -71,11 +71,11 @@
Providers.preferenceStore = preferenceStore;
}
- public static AbstractPlugin getAuthoringPlugin() {
+ public static AbstractActivator getAuthoringPlugin() {
return authoringPlugin;
}
- public static void setAuthoringPlugin(AbstractPlugin plugin) {
+ public static void setAuthoringPlugin(AbstractActivator plugin) {
authoringPlugin = plugin;
}
diff --git a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/command/DeleteMethodElementCommand.java b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/command/DeleteMethodElementCommand.java
index 978fd36..932fc09 100644
--- a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/command/DeleteMethodElementCommand.java
+++ b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/command/DeleteMethodElementCommand.java
@@ -40,7 +40,7 @@
import org.eclipse.emf.ecore.util.EContentsEList;
import org.eclipse.emf.edit.command.RemoveCommand;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.library.edit.ICommandListener;
import org.eclipse.epf.library.edit.IReferencer;
diff --git a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/command/MethodElementAddCommand.java b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/command/MethodElementAddCommand.java
index 676fff6..74bcacc 100644
--- a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/command/MethodElementAddCommand.java
+++ b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/command/MethodElementAddCommand.java
@@ -45,7 +45,7 @@
import org.eclipse.emf.ecore.xml.type.XMLTypePackage.Literals;
import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.library.edit.LibraryEditPlugin;
import org.eclipse.epf.library.edit.LibraryEditResources;
diff --git a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/internal/TngAdapterFactoryImpl.java b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/internal/TngAdapterFactoryImpl.java
index 924a89f..eb8c8cc 100644
--- a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/internal/TngAdapterFactoryImpl.java
+++ b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/internal/TngAdapterFactoryImpl.java
@@ -37,7 +37,8 @@
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.AbstractActivator;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.eclipse.epf.library.edit.IConfigurable;
import org.eclipse.epf.library.edit.IConfigurator;
import org.eclipse.epf.library.edit.IFilter;
@@ -702,7 +703,7 @@
*/
public ComposedAdapterFactory createProcessComposedAdapterFactory() {
org.eclipse.epf.library.edit.process.consolidated.ItemProviderAdapterFactory adapterFactory = new org.eclipse.epf.library.edit.process.consolidated.ItemProviderAdapterFactory();
- AbstractPlugin authoringPlugin = Providers.getAuthoringPlugin();
+ AbstractActivator authoringPlugin = Providers.getAuthoringPlugin();
if (authoringPlugin != null) {
IPreferenceStore prefStore = authoringPlugin.getPreferenceStore();
adapterFactory.setColumnIndexToNameMap(ProcessUtil
@@ -883,7 +884,7 @@
// remove adapter factory as property change listener from
// preference store
//
- AbstractPlugin authoringPlugin = Providers.getAuthoringPlugin();
+ AbstractActivator authoringPlugin = Providers.getAuthoringPlugin();
if (authoringPlugin != null) {
IPreferenceStore prefStore = authoringPlugin
.getPreferenceStore();
diff --git a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/command/CreateProcessComponentCommand.java b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/command/CreateProcessComponentCommand.java
index 10bb0f7..42a0650 100644
--- a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/command/CreateProcessComponentCommand.java
+++ b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/process/command/CreateProcessComponentCommand.java
@@ -29,7 +29,7 @@
import org.eclipse.emf.edit.command.CreateChildCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.library.edit.LibraryEditPlugin;
import org.eclipse.epf.library.edit.LibraryEditResources;
import org.eclipse.epf.library.edit.TngAdapterFactory;
diff --git a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/ui/NewProcessComponentDialog.java b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/ui/NewProcessComponentDialog.java
index b4384a3..b0e4d6b 100644
--- a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/ui/NewProcessComponentDialog.java
+++ b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/ui/NewProcessComponentDialog.java
@@ -291,7 +291,7 @@
name = StrUtil.makeValidFileName(name);
String msg = validator.isValid(name);
if (msg != null) {
- LibraryEditPlugin.getDefault().getMsgDialog().displayError(
+ LibraryEditPlugin.getDefault().getMsgCallback().displayError(LibraryEditPlugin.getDefault(),
LibraryEditResources.createProcess_text,
msg);
ctrl_name.setFocus();
@@ -302,7 +302,7 @@
IStructuredSelection selected = (IStructuredSelection) configComboViewer
.getSelection();
if (selected.isEmpty()) {
- LibraryEditPlugin.getDefault().getMsgDialog().displayError(
+ LibraryEditPlugin.getDefault().getMsgCallback().displayError(LibraryEditPlugin.getDefault(),
LibraryEditResources.createProcess_text,
LibraryEditResources.noDefaultConfigError_msg);
return;
diff --git a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/ui/UserInteractionHelper.java b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/ui/UserInteractionHelper.java
index 4d7dff5..e353e14 100644
--- a/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/ui/UserInteractionHelper.java
+++ b/2.0/plugins/org.eclipse.epf.library.edit/src/org/eclipse/epf/library/edit/ui/UserInteractionHelper.java
@@ -45,7 +45,7 @@
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.library.edit.IConfigurator;
import org.eclipse.epf.library.edit.IFilter;
import org.eclipse.epf.library.edit.LibraryEditPlugin;
diff --git a/2.0/plugins/org.eclipse.epf.library.persistence/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.library.persistence/META-INF/MANIFEST.MF
index bdcb8dd..e7e3318 100644
--- a/2.0/plugins/org.eclipse.epf.library.persistence/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.library.persistence/META-INF/MANIFEST.MF
@@ -31,3 +31,4 @@
org.eclipse.epf.resourcemanager.util
Bundle-Activator: org.eclipse.epf.persistence.PersistencePlugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.eclipse.ui
diff --git a/2.0/plugins/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileResourceSetImpl.java b/2.0/plugins/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileResourceSetImpl.java
index 8e02f76..66dc74d 100644
--- a/2.0/plugins/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileResourceSetImpl.java
+++ b/2.0/plugins/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileResourceSetImpl.java
@@ -53,7 +53,6 @@
import org.eclipse.emf.ecore.xmi.impl.XMLInfoImpl;
import org.eclipse.emf.ecore.xmi.impl.XMLMapImpl;
import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
-import org.eclipse.epf.common.serviceability.MsgBox;
import org.eclipse.epf.common.utils.FileUtil;
import org.eclipse.epf.library.persistence.ILibraryResourceSet;
import org.eclipse.epf.library.persistence.LibraryResourceException;
@@ -2453,7 +2452,7 @@
if(!resources.isEmpty()) {
Resource[] resourceArray = new Resource[resources.size()];
resources.toArray(resourceArray);
- checkModify(resourceArray, MsgBox.getDefaultShell());
+ checkModify(resourceArray, PersistencePlugin.getDefault().getContext()/*MsgBox.getDefaultShell()*/);
}
}
diff --git a/2.0/plugins/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileSaveUtil.java b/2.0/plugins/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileSaveUtil.java
index cc51a49..33864e6 100644
--- a/2.0/plugins/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileSaveUtil.java
+++ b/2.0/plugins/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/MultiFileSaveUtil.java
@@ -38,7 +38,6 @@
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
-import org.eclipse.epf.common.serviceability.MsgBox;
import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.library.persistence.ILibraryResourceSet;
import org.eclipse.epf.library.persistence.LibraryResourceException;
@@ -70,6 +69,7 @@
* Utility class with static routines for XMI persistence
*
* @author Phong Nguyen Le
+ * @author Jinhua Xi
* @since 1.0
*/
public final class MultiFileSaveUtil {
@@ -463,7 +463,7 @@
String[] paths = new String[pathList.size()];
pathList.toArray(paths);
IStatus status = FileManager.getInstance().checkModify(paths,
- MsgBox.getDefaultShell());
+ PersistencePlugin.getDefault().getContext()/*MsgBox.getDefaultShell()*/);
if (!status.isOK()) {
String msg = UmaUtil.getMessage(status);
if (msg == null) {
@@ -500,7 +500,7 @@
Resource[] resourceArray = new Resource[entry.getValue().size()];
entry.getValue().toArray(resourceArray);
try {
- resourceSet.checkModify(resourceArray, MsgBox.getDefaultShell());
+ resourceSet.checkModify(resourceArray, PersistencePlugin.getDefault().getContext()/*MsgBox.getDefaultShell()*/);
} catch (LibraryResourceException e) {
throw new MultiFileIOException(e.getMessage());
}
diff --git a/2.0/plugins/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/PersistencePlugin.java b/2.0/plugins/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/PersistencePlugin.java
index fc0cb86..c98f666 100644
--- a/2.0/plugins/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/PersistencePlugin.java
+++ b/2.0/plugins/org.eclipse.epf.library.persistence/src/org/eclipse/epf/persistence/PersistencePlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.persistence;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.AbstractActivator;
import org.osgi.framework.BundleContext;
/**
@@ -19,7 +19,7 @@
* @author Kelvin Low
* @since 1.0
*/
-public class PersistencePlugin extends AbstractPlugin {
+public class PersistencePlugin extends AbstractActivator {
// The shared plug-in instance.
private static PersistencePlugin plugin;
diff --git a/2.0/plugins/org.eclipse.epf.library.ui.xmi/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.library.ui.xmi/META-INF/MANIFEST.MF
index a06bd7a..3fa20fa 100644
--- a/2.0/plugins/org.eclipse.epf.library.ui.xmi/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.library.ui.xmi/META-INF/MANIFEST.MF
@@ -11,7 +11,9 @@
org.eclipse.epf.library.ui,
org.eclipse.epf.library.xmi,
org.eclipse.epf.ui,
- org.eclipse.ui
+ org.eclipse.ui,
+ org.eclipse.epf.common.ui,
+ org.eclipse.emf.edit.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.library.ui.xmi
Bundle-Vendor: %providerName
diff --git a/2.0/plugins/org.eclipse.epf.library.ui.xmi/plugin.xml b/2.0/plugins/org.eclipse.epf.library.ui.xmi/plugin.xml
index 746bb87..07bee93 100644
--- a/2.0/plugins/org.eclipse.epf.library.ui.xmi/plugin.xml
+++ b/2.0/plugins/org.eclipse.epf.library.ui.xmi/plugin.xml
@@ -22,4 +22,13 @@
</openLibraryWizardPage>
</extension>
+ <extension
+ point="org.eclipse.epf.library.persistence.migrators">
+ <migrator
+ class="org.eclipse.epf.library.ui.xmi.internal.migration.Migrator102_103"
+ libNsURI="http://www.ibm.com/uma/1.0.2/uma.ecore"/>
+ <migrator
+ class="org.eclipse.epf.library.ui.xmi.internal.migration.Migrator103"
+ libNsURI="http://www.eclipse.org/epf/uma/1.0.3/uma.ecore"/>
+ </extension>
</plugin>
diff --git a/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/XMILibraryUIPlugin.java b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/XMILibraryUIPlugin.java
index 4a835c4..ceae35d 100644
--- a/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/XMILibraryUIPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/XMILibraryUIPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.library.ui.xmi;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
diff --git a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/MigrationUtil.java b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/MigrationUtil.java
similarity index 98%
rename from 2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/MigrationUtil.java
rename to 2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/MigrationUtil.java
index 0d53756..5085334 100644
--- a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/MigrationUtil.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/MigrationUtil.java
@@ -8,7 +8,7 @@
// Contributors:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
-package org.eclipse.epf.library.xmi.internal.migration;
+package org.eclipse.epf.library.ui.xmi.internal.migration;
import java.io.UnsupportedEncodingException;
import java.util.HashSet;
diff --git a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/Migrator102.java b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/Migrator102.java
similarity index 99%
rename from 2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/Migrator102.java
rename to 2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/Migrator102.java
index a8885aa..6a04ef8 100644
--- a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/Migrator102.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/Migrator102.java
@@ -8,7 +8,7 @@
// Contributors:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
-package org.eclipse.epf.library.xmi.internal.migration;
+package org.eclipse.epf.library.ui.xmi.internal.migration;
import java.io.File;
import java.io.IOException;
@@ -39,7 +39,7 @@
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.common.ui.util.MsgBox;
import org.eclipse.epf.diagram.model.util.GraphicalDataHelper;
import org.eclipse.epf.diagram.model.util.GraphicalDataManager;
import org.eclipse.epf.library.edit.TngAdapterFactory;
diff --git a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/Migrator102_103.java b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/Migrator102_103.java
similarity index 95%
rename from 2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/Migrator102_103.java
rename to 2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/Migrator102_103.java
index 6ea89a8..c4f796a 100644
--- a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/Migrator102_103.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/Migrator102_103.java
@@ -8,7 +8,7 @@
// Contributors:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
-package org.eclipse.epf.library.xmi.internal.migration;
+package org.eclipse.epf.library.ui.xmi.internal.migration;
import java.util.LinkedHashMap;
import java.util.Map;
diff --git a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/Migrator103.java b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/Migrator103.java
similarity index 98%
rename from 2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/Migrator103.java
rename to 2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/Migrator103.java
index 967111e..32f0552 100644
--- a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/Migrator103.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/Migrator103.java
@@ -8,7 +8,7 @@
// Contributors:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
-package org.eclipse.epf.library.xmi.internal.migration;
+package org.eclipse.epf.library.ui.xmi.internal.migration;
import java.io.File;
import java.net.URI;
diff --git a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/MigratorBase.java b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/MigratorBase.java
similarity index 97%
rename from 2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/MigratorBase.java
rename to 2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/MigratorBase.java
index 042f429..f2a16c1 100644
--- a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/MigratorBase.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/MigratorBase.java
@@ -8,7 +8,7 @@
// Contributors:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
-package org.eclipse.epf.library.xmi.internal.migration;
+package org.eclipse.epf.library.ui.xmi.internal.migration;
import java.util.Iterator;
diff --git a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/SelectionDialog.java b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/SelectionDialog.java
similarity index 97%
rename from 2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/SelectionDialog.java
rename to 2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/SelectionDialog.java
index d664dfb..7db78bc 100644
--- a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/SelectionDialog.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/SelectionDialog.java
@@ -8,7 +8,7 @@
// Contributors:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
-package org.eclipse.epf.library.xmi.internal.migration;
+package org.eclipse.epf.library.ui.xmi.internal.migration;
import java.util.List;
diff --git a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/package.html b/2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/package.html
similarity index 100%
rename from 2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/internal/migration/package.html
rename to 2.0/plugins/org.eclipse.epf.library.ui.xmi/src/org/eclipse/epf/library/ui/xmi/internal/migration/package.html
diff --git a/2.0/plugins/org.eclipse.epf.library.ui/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.library.ui/META-INF/MANIFEST.MF
index bebcaca..f0a3184 100644
--- a/2.0/plugins/org.eclipse.epf.library.ui/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.library.ui/META-INF/MANIFEST.MF
@@ -13,12 +13,15 @@
org.eclipse.epf.ui;visibility:=reexport,
org.eclipse.jface.text;visibility:=reexport,
org.eclipse.ui;visibility:=reexport,
- org.eclipse.ui.ide;visibility:=reexport
+ org.eclipse.ui.ide;visibility:=reexport,
+ org.eclipse.epf.common.ui,
+ org.eclipse.emf.edit.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.library.ui,
org.eclipse.epf.library.ui.actions,
org.eclipse.epf.library.ui.dialogs,
org.eclipse.epf.library.ui.preferences,
+ org.eclipse.epf.library.ui.util,
org.eclipse.epf.library.ui.views,
org.eclipse.epf.library.ui.wizards
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIPlugin.java b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIPlugin.java
index 170fee9..becfdb5 100644
--- a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.library.ui;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.eclipse.epf.library.layout.BrowsingLayoutSettings;
import org.eclipse.epf.library.preferences.LibraryPreferences;
import org.eclipse.epf.library.ui.preferences.LibraryUIPreferences;
@@ -39,14 +39,14 @@
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#start(org.osgi.framework.BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#stop(org.osgi.framework.BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
super.stop(context);
diff --git a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIUtil.java b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIUtil.java
index 3f8ec3e..fae4d44 100644
--- a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIUtil.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIUtil.java
@@ -16,8 +16,8 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.epf.common.serviceability.MsgBox;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.common.utils.FileUtil;
import org.eclipse.epf.library.ILibraryManager;
import org.eclipse.epf.library.LibraryPlugin;
diff --git a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/dialogs/ConvertActivityDialog.java b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/dialogs/ConvertActivityDialog.java
index 185549d..8a34f07 100644
--- a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/dialogs/ConvertActivityDialog.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/dialogs/ConvertActivityDialog.java
@@ -21,8 +21,8 @@
import org.eclipse.epf.library.ui.LibraryUIPlugin;
import org.eclipse.epf.library.ui.LibraryUIResources;
import org.eclipse.epf.library.ui.LibraryUIText;
+import org.eclipse.epf.library.ui.util.TypeConverter;
import org.eclipse.epf.library.util.ConvertActivityType;
-import org.eclipse.epf.library.util.TypeConverter;
import org.eclipse.epf.uma.Activity;
import org.eclipse.epf.uma.UmaPackage;
import org.eclipse.jface.dialogs.Dialog;
diff --git a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/internal/wizards/OpenLibraryWizard2.java b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/internal/wizards/OpenLibraryWizard2.java
index 8a4b521..17146ee 100644
--- a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/internal/wizards/OpenLibraryWizard2.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/internal/wizards/OpenLibraryWizard2.java
@@ -16,8 +16,8 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.eclipse.epf.common.serviceability.MsgDialog;
import org.eclipse.epf.common.serviceability.VersionUtil;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.library.LibraryManagerFactory;
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.library.ui.LibraryUIManager;
diff --git a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/preferences/LibraryUIPreferences.java b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/preferences/LibraryUIPreferences.java
index 7a02aec..70206c6 100644
--- a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/preferences/LibraryUIPreferences.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/preferences/LibraryUIPreferences.java
@@ -14,8 +14,8 @@
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.epf.common.ui.util.PreferenceUtil;
import org.eclipse.epf.common.utils.FileUtil;
-import org.eclipse.epf.common.utils.PreferenceUtil;
import org.eclipse.epf.library.ui.LibraryUIPlugin;
import org.eclipse.epf.persistence.MultiFileSaveUtil;
import org.eclipse.epf.uma.UmaPackage;
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/ConvertGuidanceType.java b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/util/ConvertGuidanceType.java
similarity index 96%
rename from 2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/ConvertGuidanceType.java
rename to 2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/util/ConvertGuidanceType.java
index 62621c3..d86e667 100644
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/ConvertGuidanceType.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/util/ConvertGuidanceType.java
@@ -8,7 +8,7 @@
// Contributors:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
-package org.eclipse.epf.library.util;
+package org.eclipse.epf.library.ui.util;
import java.util.ArrayList;
import java.util.Iterator;
@@ -20,9 +20,8 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.common.utils.StrUtil;
-import org.eclipse.epf.library.LibraryPlugin;
import org.eclipse.epf.library.LibraryResources;
import org.eclipse.epf.library.LibraryServiceUtil;
import org.eclipse.epf.library.edit.LibraryEditPlugin;
@@ -33,6 +32,7 @@
import org.eclipse.epf.library.edit.validation.IValidator;
import org.eclipse.epf.library.edit.validation.internal.ContentElementNameValidator;
import org.eclipse.epf.library.edit.validation.internal.ValidatorFactory;
+import org.eclipse.epf.library.ui.LibraryUIPlugin;
import org.eclipse.epf.services.ILibraryPersister;
import org.eclipse.epf.uma.ContentElement;
import org.eclipse.epf.uma.Guidance;
@@ -136,7 +136,7 @@
});
List newGuidanceTypeList = getValidNewGuidanceTypes(oldGuidance);
if (newGuidanceTypeList == null) {
- LibraryPlugin
+ LibraryUIPlugin
.getDefault()
.getMsgDialog()
.displayError(
@@ -185,7 +185,7 @@
}
}
if (multiStatus.getChildren().length > 0 &&
- LibraryPlugin
+ LibraryUIPlugin
.getDefault()
.getMsgDialog()
.displayConfirmation(
@@ -198,7 +198,7 @@
IStatus status = UserInteractionHelper.checkModify(cmd.getModifiedResources(), shell);
if(!status.isOK()) {
- LibraryPlugin.getDefault().getMsgDialog().display(LibraryResources.convertGuidanceDialog_title, status);
+ LibraryUIPlugin.getDefault().getMsgDialog().display(LibraryResources.convertGuidanceDialog_title, status);
return null;
}
cmd.execute();
@@ -222,7 +222,7 @@
} catch (Exception e) {
persister.rollback();
- LibraryPlugin.getDefault().getMsgDialog().displayError(
+ LibraryUIPlugin.getDefault().getMsgDialog().displayError(
LibraryResources.convertGuidanceError_title,
NLS.bind(LibraryResources.saveConvertedGuidanceError_msg,
newGuidance.getName()),
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/TypeConverter.java b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/util/TypeConverter.java
similarity index 98%
rename from 2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/TypeConverter.java
rename to 2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/util/TypeConverter.java
index e74a255..04e4abc 100644
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/TypeConverter.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/util/TypeConverter.java
@@ -8,7 +8,7 @@
// Contributors:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
-package org.eclipse.epf.library.util;
+package org.eclipse.epf.library.ui.util;
import java.io.File;
import java.util.ArrayList;
@@ -35,9 +35,8 @@
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.edit.command.RemoveCommand;
import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.common.utils.StrUtil;
-import org.eclipse.epf.library.LibraryPlugin;
import org.eclipse.epf.library.LibraryResources;
import org.eclipse.epf.library.LibraryServiceUtil;
import org.eclipse.epf.library.edit.LibraryEditResources;
@@ -49,6 +48,9 @@
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.ui.LibraryUIPlugin;
+import org.eclipse.epf.library.util.ContentResourceScanner;
+import org.eclipse.epf.library.util.ResourceHelper;
import org.eclipse.epf.persistence.util.PersistenceUtil;
import org.eclipse.epf.services.ILibraryPersister;
import org.eclipse.epf.services.Services;
@@ -556,7 +558,7 @@
persister.commit();
} catch (Exception e) {
- LibraryPlugin
+ LibraryUIPlugin
.getDefault()
.getMsgDialog()
.displayError(
diff --git a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/wizards/LibraryBackupUtil.java b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/wizards/LibraryBackupUtil.java
index 4525d44..2b7e8a0 100644
--- a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/wizards/LibraryBackupUtil.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/wizards/LibraryBackupUtil.java
@@ -12,7 +12,7 @@
import java.io.File;
-import org.eclipse.epf.common.serviceability.MsgBox;
+import org.eclipse.epf.common.ui.util.MsgBox;
import org.eclipse.epf.library.ILibraryService;
import org.eclipse.epf.library.edit.ui.UserInteractionHelper;
import org.eclipse.epf.library.layout.LayoutResources;
diff --git a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/wizards/OpenLibraryWizard.java b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/wizards/OpenLibraryWizard.java
index e4e4b63..2af05da 100644
--- a/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/wizards/OpenLibraryWizard.java
+++ b/2.0/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/wizards/OpenLibraryWizard.java
@@ -23,8 +23,8 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.eclipse.epf.common.serviceability.MsgDialog;
import org.eclipse.epf.common.serviceability.VersionUtil;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.common.utils.NetUtil;
import org.eclipse.epf.library.edit.ui.UserInteractionHelper;
import org.eclipse.epf.library.layout.LayoutResources;
diff --git a/2.0/plugins/org.eclipse.epf.library.xmi/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.library.xmi/META-INF/MANIFEST.MF
index 3dccd82..604f2bd 100644
--- a/2.0/plugins/org.eclipse.epf.library.xmi/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.library.xmi/META-INF/MANIFEST.MF
@@ -6,9 +6,12 @@
Bundle-Activator: org.eclipse.epf.library.xmi.XMILibraryPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.epf.library
+ org.eclipse.epf.library,
+ org.eclipse.emf.edit.ui
Eclipse-LazyStart: true
Bundle-Vendor: %providerName
Export-Package: org.eclipse.epf.library.xmi,
org.eclipse.epf.library.xmi.preferences
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.eclipse.jface.preference,
+ org.eclipse.ui
diff --git a/2.0/plugins/org.eclipse.epf.library.xmi/plugin.xml b/2.0/plugins/org.eclipse.epf.library.xmi/plugin.xml
index eb934cd..d3e6989 100644
--- a/2.0/plugins/org.eclipse.epf.library.xmi/plugin.xml
+++ b/2.0/plugins/org.eclipse.epf.library.xmi/plugin.xml
@@ -12,15 +12,6 @@
</libraryManager>
</extension>
<extension
- point="org.eclipse.epf.library.persistence.migrators">
- <migrator
- class="org.eclipse.epf.library.xmi.internal.migration.Migrator102_103"
- libNsURI="http://www.ibm.com/uma/1.0.2/uma.ecore"/>
- <migrator
- class="org.eclipse.epf.library.xmi.internal.migration.Migrator103"
- libNsURI="http://www.eclipse.org/epf/uma/1.0.3/uma.ecore"/>
- </extension>
- <extension
point="org.eclipse.epf.library.edit.oppositeFeatureLoaders">
<oppositeFeatureLoader class="org.eclipse.epf.library.xmi.internal.XMIOppositeFeatureLoader"/>
</extension>
diff --git a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryPlugin.java b/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryPlugin.java
index fb18b58..4216b9c 100644
--- a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryPlugin.java
@@ -1,6 +1,6 @@
package org.eclipse.epf.library.xmi;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.AbstractActivator;
import org.osgi.framework.BundleContext;
/**
@@ -9,7 +9,7 @@
* @author Kelvin Low
* @since 1.0
*/
-public class XMILibraryPlugin extends AbstractPlugin {
+public class XMILibraryPlugin extends AbstractActivator {
// The shared plug-in instance.
private static XMILibraryPlugin plugin;
diff --git a/2.0/plugins/org.eclipse.epf.library/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.library/META-INF/MANIFEST.MF
index a827012..382bd9e 100644
--- a/2.0/plugins/org.eclipse.epf.library/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.library/META-INF/MANIFEST.MF
@@ -28,5 +28,6 @@
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.emf.ecore.xmi;visibility:=reexport,
- org.eclipse.emf.edit.ui;visibility:=reexport
+ org.eclipse.ui,
+ org.eclipse.emf.edit.ui
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/LibraryPlugin.java b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/LibraryPlugin.java
index bbb78f5..ebacd0c 100644
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/LibraryPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/LibraryPlugin.java
@@ -14,7 +14,7 @@
import java.net.URL;
import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.AbstractActivator;
import org.eclipse.epf.library.layout.LayoutResources;
import org.osgi.framework.BundleContext;
@@ -24,7 +24,7 @@
* @author Kelvin Low
* @since 1.0
*/
-public class LibraryPlugin extends AbstractPlugin {
+public class LibraryPlugin extends AbstractActivator {
private static final String LAYOUT_PATH = "layout/"; //$NON-NLS-1$;
@@ -49,7 +49,7 @@
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#start(BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#start(BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
@@ -69,7 +69,7 @@
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#start(BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#start(BundleContext)
*/
public void stop(BundleContext context) throws Exception {
super.stop(context);
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ActivityDeepCopyConfigurator.java b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ActivityDeepCopyConfigurator.java
index 5558b78..31fd0a3 100644
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ActivityDeepCopyConfigurator.java
+++ b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ActivityDeepCopyConfigurator.java
@@ -4,7 +4,6 @@
import org.eclipse.epf.uma.MethodConfiguration;
import org.eclipse.epf.uma.MethodElement;
import org.eclipse.epf.uma.VariabilityElement;
-import org.eclipse.jface.viewers.Viewer;
/**
* A configurator used by activity deep copy command to resovle and deep copy contributors and
@@ -19,9 +18,8 @@
* @param methodConfig a <code>MethodConfiguration</code>
* @param viewer a <code>Viewer</code>
*/
- public ActivityDeepCopyConfigurator(MethodConfiguration methodConfig,
- Viewer viewer) {
- super(methodConfig, viewer);
+ public ActivityDeepCopyConfigurator(MethodConfiguration methodConfig) {
+ super(methodConfig);
}
@@ -29,7 +27,7 @@
* Constructs with null methodConfig which could be set later.
*/
public ActivityDeepCopyConfigurator() {
- this(null, null);
+ this(null);
}
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationContentProvider.java b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationContentProvider.java
deleted file mode 100644
index ab62ea2..0000000
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationContentProvider.java
+++ /dev/null
@@ -1,149 +0,0 @@
-//------------------------------------------------------------------------------
-// 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.library.configuration;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.epf.uma.MethodConfiguration;
-import org.eclipse.epf.uma.MethodElement;
-import org.eclipse.epf.uma.MethodPackage;
-import org.eclipse.epf.uma.MethodPlugin;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-
-/**
- * @author Jinhua Xi
- * @since 1.0
- */
-public class ConfigurationContentProvider implements ITreeContentProvider {
-
- private MethodConfiguration config = null;
-
- /**
- * constructor
- *
- */
- public ConfigurationContentProvider() {
- }
-
- /**
- * get the children
- * @param parentElement Object
- * @return an array of Objects for the given parent object
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof MethodConfiguration) {
- List sels = ((MethodConfiguration) parentElement)
- .getMethodPluginSelection();
- if (sels != null) {
- return sels.toArray();
- } else {
- return null;
- }
- } else if (parentElement instanceof MethodPlugin) {
- List sels = ((MethodPlugin) parentElement).getMethodPackages();
- if (sels != null) {
- List items = new ArrayList();
- List selectedPackages = config.getMethodPackageSelection();
-
- for (Iterator it = sels.iterator(); it.hasNext();) {
- MethodPackage pkg = (MethodPackage) it.next();
- if (selectedPackages != null
- && selectedPackages.contains(pkg)) {
- items.add(pkg);
- }
- }
-
- return items.toArray();
- }
- } else if (parentElement instanceof EObject) {
- List children = ((EObject) parentElement).eContents();
- if (children != null) {
- List showItems = new ArrayList();
- for (Iterator it = children.iterator(); it.hasNext();) {
- Object child = it.next();
- if ((!(child instanceof MethodElement))
- || ConfigurationHelper.canShow(
- (MethodElement) child, config)) {
- showItems.add(child);
- }
- }
- return showItems.toArray();
- }
- }
-
- return null;
- }
-
- /**
- * get the elements assiciated with the given element. same as getChildren()
- * @param inputElement Object
- * @return an array of Objects
- */
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- /**
- * get the parant object for the given element
- * @param element Object
- * @return Object
- */
- public Object getParent(Object element) {
- if (element instanceof MethodConfiguration) {
- return null;
- } else if (element instanceof EObject) {
- return ((EObject) element).eContainer();
- } else {
- return null;
- }
- }
-
- /**
- * check if there are children for the given element
- * @param element Object
- * @return boolean
- */
- public boolean hasChildren(Object element) {
- if (element instanceof MethodConfiguration
- || element instanceof MethodPlugin) {
- return true;
- } else if (element instanceof EObject) {
- List children = ((EObject) element).eContents();
- return children != null && children.size() > 0;
- } else {
- return false;
- }
- }
-
- /**
- * notify input changed
- * @param viewer Viewer
- * @param oldInput Object
- * @param newInput Object
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (newInput instanceof MethodConfiguration) {
- config = (MethodConfiguration) newInput;
- }
- }
-
- /**
- * dispose the resources allocated by this object
- */
- public void dispose() {
- }
-
-}
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationFilter.java b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationFilter.java
index 90753d2..b25bf7a 100644
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationFilter.java
+++ b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ConfigurationFilter.java
@@ -37,7 +37,6 @@
import org.eclipse.epf.uma.VariabilityElement;
import org.eclipse.epf.uma.WorkProduct;
import org.eclipse.epf.uma.util.AssociationHelper;
-import org.eclipse.jface.viewers.Viewer;
/**
* A method configuration filter to allow filtering element
@@ -50,7 +49,7 @@
public class ConfigurationFilter extends AdapterImpl implements IConfigurator {
protected MethodConfiguration methodConfig;
- private Viewer viewer;
+ //private Viewer viewer;
// set the default behavior for configuration view to true, i.e. contributors are discarded.
private boolean discardContributors = true;
@@ -61,13 +60,13 @@
* @param methodConfig a <code>MethodConfiguration</code>
* @param viewer a <code>Viewer</code>
*/
- public ConfigurationFilter(MethodConfiguration methodConfig, Viewer viewer) {
+ public ConfigurationFilter(MethodConfiguration methodConfig) {
this.methodConfig = methodConfig;
- this.viewer = viewer;
+ //this.viewer = viewer;
}
- public ConfigurationFilter(MethodConfiguration methodConfig, Viewer viewer, boolean discardContributors) {
- this(methodConfig, viewer);
+ public ConfigurationFilter(MethodConfiguration methodConfig, boolean discardContributors) {
+ this(methodConfig);
this.discardContributors = discardContributors;
}
@@ -133,24 +132,24 @@
/**
* @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification)
*/
- public void notifyChanged(final Notification msg) {
- if (viewer == null) {
- return;
- }
-
- SafeUpdateController.syncExec(new Runnable() {
- public void run() {
- switch (msg.getEventType()) {
- case Notification.ADD:
- case Notification.ADD_MANY:
- case Notification.REMOVE:
- case Notification.REMOVE_MANY:
- viewer.refresh();
- }
- }
- });
-
- }
+// public void notifyChanged(final Notification msg) {
+// if (viewer == null) {
+// return;
+// }
+//
+// SafeUpdateController.syncExec(new Runnable() {
+// public void run() {
+// switch (msg.getEventType()) {
+// case Notification.ADD:
+// case Notification.ADD_MANY:
+// case Notification.REMOVE:
+// case Notification.REMOVE_MANY:
+// viewer.refresh();
+// }
+// }
+// });
+//
+// }
/**
* @see org.eclipse.epf.library.edit.IConfigurator#getMethodConfiguration()
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ProcessAuthoringConfigurator.java b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ProcessAuthoringConfigurator.java
index a17a180..84a887c 100644
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ProcessAuthoringConfigurator.java
+++ b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ProcessAuthoringConfigurator.java
@@ -15,7 +15,6 @@
import org.eclipse.epf.uma.MethodConfiguration;
import org.eclipse.epf.uma.MethodLibrary;
import org.eclipse.epf.uma.VariabilityElement;
-import org.eclipse.jface.viewers.Viewer;
/**
@@ -29,7 +28,7 @@
public static final ProcessAuthoringConfigurator INSTANCE = new ProcessAuthoringConfigurator();
private ProcessAuthoringConfigurator() {
- super(null, null);
+ super(null);
LibraryService.getInstance().addListener(new ILibraryServiceListener() {
public void configurationSet(MethodConfiguration config) {
@@ -58,9 +57,8 @@
* @param methodConfig
* @param viewer
*/
- public ProcessAuthoringConfigurator(MethodConfiguration methodConfig,
- Viewer viewer) {
- super(methodConfig, viewer);
+ public ProcessAuthoringConfigurator(MethodConfiguration methodConfig) {
+ super(methodConfig);
}
/*
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ProcessConfigurator.java b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ProcessConfigurator.java
index 3753a63..f475e00 100644
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ProcessConfigurator.java
+++ b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ProcessConfigurator.java
@@ -12,7 +12,6 @@
import org.eclipse.epf.library.edit.IFilter;
import org.eclipse.epf.library.edit.util.ProcessUtil;
-import org.eclipse.epf.library.edit.util.TngUtil;
import org.eclipse.epf.uma.Activity;
import org.eclipse.epf.uma.BreakdownElement;
import org.eclipse.epf.uma.Descriptor;
@@ -20,8 +19,6 @@
import org.eclipse.epf.uma.MethodElement;
import org.eclipse.epf.uma.Milestone;
import org.eclipse.epf.uma.TeamProfile;
-import org.eclipse.epf.uma.VariabilityType;
-import org.eclipse.jface.viewers.Viewer;
/**
@@ -39,8 +36,8 @@
* @param methodConfig
* @param viewer
*/
- public ProcessConfigurator(MethodConfiguration methodConfig, Viewer viewer) {
- super(methodConfig, viewer);
+ public ProcessConfigurator(MethodConfiguration methodConfig) {
+ super(methodConfig);
}
/**
@@ -49,8 +46,8 @@
* @param checkOwningProcess if true will check on owning process of activities whether it is in the configuration.
* This check is not required in process editor and skipping it helps the performance.
*/
- public ProcessConfigurator(MethodConfiguration methodConfig, Viewer viewer, boolean checkOwningProcess) {
- this(methodConfig, viewer);
+ public ProcessConfigurator(MethodConfiguration methodConfig, boolean checkOwningProcess) {
+ this(methodConfig);
this.checkOwningProcess = checkOwningProcess;
}
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ProcessVariabilityConfigurator.java b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ProcessVariabilityConfigurator.java
index 9085c71..3e9395c 100644
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ProcessVariabilityConfigurator.java
+++ b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/configuration/ProcessVariabilityConfigurator.java
@@ -14,7 +14,6 @@
import org.eclipse.epf.uma.Activity;
import org.eclipse.epf.uma.BreakdownElement;
import org.eclipse.epf.uma.MethodConfiguration;
-import org.eclipse.jface.viewers.Viewer;
/**
*
@@ -28,9 +27,8 @@
* @param methodConfig
* @param viewer
*/
- public ProcessVariabilityConfigurator(MethodConfiguration methodConfig,
- Viewer viewer) {
- super(methodConfig, viewer);
+ public ProcessVariabilityConfigurator(MethodConfiguration methodConfig) {
+ super(methodConfig);
}
public void setMethodConfiguration(MethodConfiguration newConfig) {
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/ProcessAdapterFactoryFilter.java b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/ProcessAdapterFactoryFilter.java
index b18d477..6f8b7b5 100644
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/ProcessAdapterFactoryFilter.java
+++ b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/layout/ProcessAdapterFactoryFilter.java
@@ -35,7 +35,7 @@
* @param factory
*/
public ProcessAdapterFactoryFilter(MethodConfiguration methodConfig, ElementLayoutManager.LayoutAdapterFactory factory) {
- super(methodConfig, null);
+ super(methodConfig);
this.factory = factory;
}
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/prefs/PreferenceUtil.java b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/prefs/PreferenceUtil.java
index f90fe93..23af3a9 100644
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/prefs/PreferenceUtil.java
+++ b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/prefs/PreferenceUtil.java
@@ -17,6 +17,7 @@
import java.util.Map;
import java.util.Properties;
+import org.eclipse.epf.common.preferences.IPreferenceStoreWrapper;
import org.eclipse.epf.library.LibraryPlugin;
import org.eclipse.epf.library.edit.process.IBSItemProvider;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/services/LibraryModificationHelper.java b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/services/LibraryModificationHelper.java
index db47803..97bfde9 100644
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/services/LibraryModificationHelper.java
+++ b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/services/LibraryModificationHelper.java
@@ -96,7 +96,7 @@
} else {
String msg = NLS.bind(LibraryResources.LibraryModificationHelper_cannotUpdate, TngUtil.getTypeText(object), object
.eGet(UmaPackage.eINSTANCE.getNamedElement_Name()));
- LibraryPlugin.getDefault().getMsgDialog().displayWarning(
+ LibraryPlugin.getDefault().getMsgCallback().displayWarning(LibraryPlugin.getDefault(),
LibraryResources.warningDlg_title
, msg, TngUtil.getMessage(status));
@@ -131,7 +131,7 @@
} catch (Exception e) {
String msg = NLS.bind(LibraryResources.errorDlg_saveError
, resource.getURI().isFile() ? resource.getURI().toFileString() : resource.getURI().toString());
- LibraryPlugin.getDefault().getMsgDialog().displayError(
+ LibraryPlugin.getDefault().getMsgCallback().displayError(LibraryPlugin.getDefault(),
LibraryResources.errorDlg_title
, msg, e);
}
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/LibraryUtil.java b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/LibraryUtil.java
index 1c43a4f..c0e6b0d 100644
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/LibraryUtil.java
+++ b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/LibraryUtil.java
@@ -35,7 +35,6 @@
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.library.configuration.ConfigurationHelper;
import org.eclipse.epf.library.edit.IFilter;
-import org.eclipse.epf.library.edit.LibraryEditPlugin;
import org.eclipse.epf.library.edit.TransientGroupItemProvider;
import org.eclipse.epf.library.edit.command.IActionManager;
import org.eclipse.epf.library.edit.util.TngUtil;
@@ -453,9 +452,8 @@
MethodPlugin plugin = (MethodPlugin) iter.next();
TngUtil.getAllProcesses(plugin);
} catch (Exception e) {
- LibraryEditPlugin.INSTANCE.log(e);
+ LibraryPlugin.getDefault().log(e);
}
-
}
}
diff --git a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/MigrationUtil.java b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/MigrationUtil.java
index e572ba5..5bf0937 100644
--- a/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/MigrationUtil.java
+++ b/2.0/plugins/org.eclipse.epf.library/src/org/eclipse/epf/library/util/MigrationUtil.java
@@ -210,7 +210,7 @@
public static Map getActivities(Process process, boolean linkedHashMap){
Map result = linkedHashMap ? new LinkedHashMap() : new TreeMap();
MethodConfiguration defaultContext = process.getDefaultContext();
- ProcessConfigurator filter = new ProcessConfigurator(defaultContext, null);
+ ProcessConfigurator filter = new ProcessConfigurator(defaultContext);
getActivities(process, result, filter);
return result;
}
diff --git a/2.0/plugins/org.eclipse.epf.migration.diagram/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.migration.diagram/META-INF/MANIFEST.MF
index 141f352..580467a 100644
--- a/2.0/plugins/org.eclipse.epf.migration.diagram/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.migration.diagram/META-INF/MANIFEST.MF
@@ -15,7 +15,8 @@
org.eclipse.epf.diagram.core,
org.eclipse.epf.diagram.add,
org.eclipse.epf.diagram.wpdd,
- org.eclipse.epf.library.xmi
+ org.eclipse.epf.library.xmi,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Bundle-Vendor: %providerName
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/2.0/plugins/org.eclipse.epf.migration.diagram/src/org/eclipse/epf/migration/diagram/DiagramMigrationPlugin.java b/2.0/plugins/org.eclipse.epf.migration.diagram/src/org/eclipse/epf/migration/diagram/DiagramMigrationPlugin.java
index e9e3a7c..3516f9d 100644
--- a/2.0/plugins/org.eclipse.epf.migration.diagram/src/org/eclipse/epf/migration/diagram/DiagramMigrationPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.migration.diagram/src/org/eclipse/epf/migration/diagram/DiagramMigrationPlugin.java
@@ -1,6 +1,6 @@
package org.eclipse.epf.migration.diagram;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
diff --git a/2.0/plugins/org.eclipse.epf.migration.diagram/src/org/eclipse/epf/migration/diagram/util/MigrationUtil.java b/2.0/plugins/org.eclipse.epf.migration.diagram/src/org/eclipse/epf/migration/diagram/util/MigrationUtil.java
index 85e53cc..b8e2d70 100644
--- a/2.0/plugins/org.eclipse.epf.migration.diagram/src/org/eclipse/epf/migration/diagram/util/MigrationUtil.java
+++ b/2.0/plugins/org.eclipse.epf.migration.diagram/src/org/eclipse/epf/migration/diagram/util/MigrationUtil.java
@@ -211,7 +211,7 @@
public static Map getActivities(Process process, boolean linkedHashMap){
Map result = linkedHashMap ? new LinkedHashMap() : new TreeMap();
MethodConfiguration defaultContext = process.getDefaultContext();
- ProcessConfigurator filter = new ProcessConfigurator(defaultContext, null);
+ ProcessConfigurator filter = new ProcessConfigurator(defaultContext);
getActivities(process, result, filter);
return result;
}
diff --git a/2.0/plugins/org.eclipse.epf.publishing.ui/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.publishing.ui/META-INF/MANIFEST.MF
index 7ad913b..773454d 100644
--- a/2.0/plugins/org.eclipse.epf.publishing.ui/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.publishing.ui/META-INF/MANIFEST.MF
@@ -12,7 +12,8 @@
org.eclipse.epf.publishing;visibility:=reexport,
org.eclipse.jface.text,
org.eclipse.help.base,
- org.eclipse.ui.browser
+ org.eclipse.ui.browser,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.publishing.ui,
org.eclipse.epf.publishing.ui.preferences,
diff --git a/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/PublishingUIPlugin.java b/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/PublishingUIPlugin.java
index 7cc1705..9603944 100644
--- a/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/PublishingUIPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/PublishingUIPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.publishing.ui;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.eclipse.epf.library.layout.BrowsingLayoutSettings;
import org.eclipse.epf.library.preferences.LibraryPreferences;
import org.eclipse.epf.library.ui.LibraryUIPlugin;
diff --git a/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/internal/wizards/PublishConfigOperation.java b/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/internal/wizards/PublishConfigOperation.java
index 2428b43..bf3739f 100644
--- a/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/internal/wizards/PublishConfigOperation.java
+++ b/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/internal/wizards/PublishConfigOperation.java
@@ -14,7 +14,7 @@
import java.text.MessageFormat;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.library.services.SafeUpdateController;
import org.eclipse.epf.publishing.PublishingResources;
import org.eclipse.epf.publishing.services.AbstractPublishManager;
diff --git a/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/preferences/PublishingPreferencePage.java b/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/preferences/PublishingPreferencePage.java
index 4f48150..29199d0 100644
--- a/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/preferences/PublishingPreferencePage.java
+++ b/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/preferences/PublishingPreferencePage.java
@@ -14,7 +14,6 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.epf.authoring.ui.AuthoringUIText;
import org.eclipse.epf.common.utils.StrUtil;
-import org.eclipse.epf.library.layout.DefaultContentValidator;
import org.eclipse.epf.publishing.PublishingPlugin;
import org.eclipse.epf.publishing.ui.PublishingUIPlugin;
import org.eclipse.epf.publishing.ui.PublishingUIResources;
diff --git a/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/wizards/PublishingOperation.java b/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/wizards/PublishingOperation.java
index 64b93e4..9a2bb28 100644
--- a/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/wizards/PublishingOperation.java
+++ b/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/wizards/PublishingOperation.java
@@ -17,7 +17,7 @@
import java.text.MessageFormat;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.epf.common.serviceability.MsgDialog;
+import org.eclipse.epf.common.ui.util.MsgDialog;
import org.eclipse.epf.library.services.SafeUpdateController;
import org.eclipse.epf.publishing.PublishingResources;
import org.eclipse.epf.publishing.services.AbstractPublishManager;
diff --git a/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/wizards/SelectDestinationPage.java b/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/wizards/SelectDestinationPage.java
index 2d4bf24..f04db2e 100644
--- a/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/wizards/SelectDestinationPage.java
+++ b/2.0/plugins/org.eclipse.epf.publishing.ui/src/org/eclipse/epf/publishing/ui/wizards/SelectDestinationPage.java
@@ -17,7 +17,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.epf.authoring.ui.AuthoringUIText;
-import org.eclipse.epf.common.preferences.CommonPreferences;
+import org.eclipse.epf.common.ui.util.CommonPreferences;
import org.eclipse.epf.common.utils.StrUtil;
import org.eclipse.epf.publishing.ui.PublishingUIPlugin;
import org.eclipse.epf.publishing.ui.PublishingUIResources;
diff --git a/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/PublishingPlugin.java b/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/PublishingPlugin.java
index 07ee83c..7838854 100644
--- a/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/PublishingPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/PublishingPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.publishing;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.AbstractActivator;
import org.osgi.framework.BundleContext;
/**
@@ -20,7 +20,7 @@
* @author Jinhua Xi
* @since 1.0
*/
-public class PublishingPlugin extends AbstractPlugin {
+public class PublishingPlugin extends AbstractActivator {
/**
* The plug-in ID.
@@ -41,14 +41,14 @@
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#start(BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#start(BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#stop(BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#stop(BundleContext)
*/
public void stop(BundleContext context) throws Exception {
super.stop(context);
diff --git a/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/ConfigurationViewBuilder.java b/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/ConfigurationViewBuilder.java
index 726fc8a..6516d28 100644
--- a/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/ConfigurationViewBuilder.java
+++ b/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/ConfigurationViewBuilder.java
@@ -202,7 +202,7 @@
// create a filter that does not discard the contributors.
// so we get the contributors in to show in the navigation tree
- IFilter configFilter = new ConfigurationFilter(config, null, false);
+ IFilter configFilter = new ConfigurationFilter(config, false);
adapterFactory = TngAdapterFactory.INSTANCE
.getConfigurationView_AdapterFactory(configFilter);
diff --git a/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/GlossaryBuilder.java b/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/GlossaryBuilder.java
index 5bfdd96..e11e1fc 100644
--- a/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/GlossaryBuilder.java
+++ b/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/GlossaryBuilder.java
@@ -94,7 +94,7 @@
glossaryItems = new GlossaryList(pubDir);
glossaryItems.clear();
- IFilter configFilter = new ConfigurationFilter(config, null);
+ IFilter configFilter = new ConfigurationFilter(config);
adapterFactory = TngAdapterFactory.INSTANCE
.getConfigurationView_AdapterFactory(configFilter);
// iterate thru configuration to get all glossary items
diff --git a/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/IndexBuilder.java b/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/IndexBuilder.java
index 4cee9e8..42f9b0b 100644
--- a/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/IndexBuilder.java
+++ b/2.0/plugins/org.eclipse.epf.publishing/src/org/eclipse/epf/publishing/services/IndexBuilder.java
@@ -78,7 +78,7 @@
public void execute(MethodConfiguration config, String pubDir,
String title, IProgressMonitor monitor) {
indexItems.clear();
- IFilter configFilter = new ConfigurationFilter(config, null);
+ IFilter configFilter = new ConfigurationFilter(config);
adapterFactory = TngAdapterFactory.INSTANCE
.getConfigurationView_AdapterFactory(configFilter);
// iterate thru configuration to get all glossary items
diff --git a/2.0/plugins/org.eclipse.epf.rcp.ui/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.rcp.ui/META-INF/MANIFEST.MF
index 8fcaa8a..ddce581 100644
--- a/2.0/plugins/org.eclipse.epf.rcp.ui/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.rcp.ui/META-INF/MANIFEST.MF
@@ -22,5 +22,6 @@
org.eclipse.help.ui,
org.eclipse.help.webapp,
org.eclipse.tomcat,
- org.eclipse.epf.publishing.ui
+ org.eclipse.epf.publishing.ui,
+ org.eclipse.epf.common.ui
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/2.0/plugins/org.eclipse.epf.rcp.ui/src/org/eclipse/epf/rcp/ui/RCPUIPlugin.java b/2.0/plugins/org.eclipse.epf.rcp.ui/src/org/eclipse/epf/rcp/ui/RCPUIPlugin.java
index 2bcf312..92ad3fa 100644
--- a/2.0/plugins/org.eclipse.epf.rcp.ui/src/org/eclipse/epf/rcp/ui/RCPUIPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.rcp.ui/src/org/eclipse/epf/rcp/ui/RCPUIPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.rcp.ui;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
@@ -33,14 +33,14 @@
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#start(BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#start(BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#stop(BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#stop(BundleContext)
*/
public void stop(BundleContext context) throws Exception {
super.stop(context);
diff --git a/2.0/plugins/org.eclipse.epf.rcp.ui/src/org/eclipse/epf/rcp/ui/actions/UIOpenPerspectiveDialogAction.java b/2.0/plugins/org.eclipse.epf.rcp.ui/src/org/eclipse/epf/rcp/ui/actions/UIOpenPerspectiveDialogAction.java
index 8828533..1b17d39 100644
--- a/2.0/plugins/org.eclipse.epf.rcp.ui/src/org/eclipse/epf/rcp/ui/actions/UIOpenPerspectiveDialogAction.java
+++ b/2.0/plugins/org.eclipse.epf.rcp.ui/src/org/eclipse/epf/rcp/ui/actions/UIOpenPerspectiveDialogAction.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.rcp.ui.actions;
-import org.eclipse.epf.common.utils.PerspectiveUtil;
+import org.eclipse.epf.common.ui.util.PerspectiveUtil;
import org.eclipse.jface.window.Window;
import org.eclipse.ui.IPerspectiveDescriptor;
import org.eclipse.ui.IWorkbenchWindow;
diff --git a/2.0/plugins/org.eclipse.epf.richtext/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.richtext/META-INF/MANIFEST.MF
index f5bf743..5d19c4b 100644
--- a/2.0/plugins/org.eclipse.epf.richtext/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.richtext/META-INF/MANIFEST.MF
@@ -13,7 +13,8 @@
org.eclipse.ui.forms,
org.eclipse.jface.text,
org.eclipse.ui.workbench.texteditor,
- org.eclipse.epf.ui
+ org.eclipse.epf.ui,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.richtext,
org.eclipse.epf.richtext.actions,
diff --git a/2.0/plugins/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextPlugin.java b/2.0/plugins/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextPlugin.java
index 68e057d..46a3cad 100644
--- a/2.0/plugins/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextPlugin.java
@@ -12,7 +12,7 @@
import java.util.Date;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
diff --git a/2.0/plugins/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PasteAction.java b/2.0/plugins/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PasteAction.java
index ad54d39..5918dfd 100644
--- a/2.0/plugins/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PasteAction.java
+++ b/2.0/plugins/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PasteAction.java
@@ -17,7 +17,7 @@
import java.util.regex.Pattern;
import org.eclipse.epf.common.serviceability.Logger;
-import org.eclipse.epf.common.utils.ClipboardUtil;
+import org.eclipse.epf.common.ui.util.ClipboardUtil;
import org.eclipse.epf.common.utils.FileUtil;
import org.eclipse.epf.common.utils.NetUtil;
import org.eclipse.epf.richtext.IRichText;
diff --git a/2.0/plugins/org.eclipse.epf.search.ui/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.search.ui/META-INF/MANIFEST.MF
index f1ecdf1..4715ccf 100644
--- a/2.0/plugins/org.eclipse.epf.search.ui/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.search.ui/META-INF/MANIFEST.MF
@@ -9,7 +9,8 @@
Require-Bundle: org.eclipse.epf.authoring.ui,
org.eclipse.core.runtime,
org.eclipse.jface.text,
- org.eclipse.search
+ org.eclipse.search,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.search.ui
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/2.0/plugins/org.eclipse.epf.search.ui/src/org/eclipse/epf/search/ui/MethodSearchResultPage.java b/2.0/plugins/org.eclipse.epf.search.ui/src/org/eclipse/epf/search/ui/MethodSearchResultPage.java
index 568a1c4..63ab51e 100644
--- a/2.0/plugins/org.eclipse.epf.search.ui/src/org/eclipse/epf/search/ui/MethodSearchResultPage.java
+++ b/2.0/plugins/org.eclipse.epf.search.ui/src/org/eclipse/epf/search/ui/MethodSearchResultPage.java
@@ -14,7 +14,7 @@
import org.eclipse.epf.authoring.ui.BrowsingPerspective;
import org.eclipse.epf.authoring.ui.editors.EditorChooser;
import org.eclipse.epf.authoring.ui.views.ContentView;
-import org.eclipse.epf.common.utils.PerspectiveUtil;
+import org.eclipse.epf.common.ui.util.PerspectiveUtil;
import org.eclipse.epf.library.LibraryService;
import org.eclipse.epf.library.LibraryServiceListener;
import org.eclipse.epf.search.ui.internal.MethodElementViewSorter;
diff --git a/2.0/plugins/org.eclipse.epf.search.ui/src/org/eclipse/epf/search/ui/SearchUIPlugin.java b/2.0/plugins/org.eclipse.epf.search.ui/src/org/eclipse/epf/search/ui/SearchUIPlugin.java
index bfe468c..4c337fb 100644
--- a/2.0/plugins/org.eclipse.epf.search.ui/src/org/eclipse/epf/search/ui/SearchUIPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.search.ui/src/org/eclipse/epf/search/ui/SearchUIPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.search.ui;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
diff --git a/2.0/plugins/org.eclipse.epf.search/src/org/eclipse/epf/search/SearchPlugin.java b/2.0/plugins/org.eclipse.epf.search/src/org/eclipse/epf/search/SearchPlugin.java
index 9b6eab6..131d9cb 100644
--- a/2.0/plugins/org.eclipse.epf.search/src/org/eclipse/epf/search/SearchPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.search/src/org/eclipse/epf/search/SearchPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.search;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.AbstractActivator;
import org.osgi.framework.BundleContext;
/**
@@ -19,7 +19,7 @@
* @author Kelvin Low
* @since 1.0
*/
-public final class SearchPlugin extends AbstractPlugin {
+public final class SearchPlugin extends AbstractActivator {
// The shared plug-in instance.
private static SearchPlugin plugin;
diff --git a/2.0/plugins/org.eclipse.epf.ui/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.ui/META-INF/MANIFEST.MF
index dbfb2c6..657555a 100644
--- a/2.0/plugins/org.eclipse.epf.ui/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.ui/META-INF/MANIFEST.MF
@@ -8,7 +8,8 @@
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.epf.common,
org.eclipse.jface.text,
- org.eclipse.ui
+ org.eclipse.ui,
+ org.eclipse.epf.common.ui
Eclipse-LazyStart: true
Bundle-Vendor: %providerName
Export-Package: org.eclipse.epf.ui,
diff --git a/2.0/plugins/org.eclipse.epf.ui/src/org/eclipse/epf/ui/EPFUIPlugin.java b/2.0/plugins/org.eclipse.epf.ui/src/org/eclipse/epf/ui/EPFUIPlugin.java
index 450f824..d7e1804 100644
--- a/2.0/plugins/org.eclipse.epf.ui/src/org/eclipse/epf/ui/EPFUIPlugin.java
+++ b/2.0/plugins/org.eclipse.epf.ui/src/org/eclipse/epf/ui/EPFUIPlugin.java
@@ -10,7 +10,7 @@
//------------------------------------------------------------------------------
package org.eclipse.epf.ui;
-import org.eclipse.epf.common.plugin.AbstractPlugin;
+import org.eclipse.epf.common.ui.AbstractPlugin;
import org.osgi.framework.BundleContext;
/**
@@ -33,14 +33,14 @@
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#start(org.osgi.framework.BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
}
/**
- * @see org.eclipse.epf.common.plugin.AbstractPlugin#stop(org.osgi.framework.BundleContext)
+ * @see org.eclipse.epf.common.ui.AbstractPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
super.stop(context);
diff --git a/2.0/plugins/org.eclipse.epf.validation/META-INF/MANIFEST.MF b/2.0/plugins/org.eclipse.epf.validation/META-INF/MANIFEST.MF
index 039748e..ccb0a45 100644
--- a/2.0/plugins/org.eclipse.epf.validation/META-INF/MANIFEST.MF
+++ b/2.0/plugins/org.eclipse.epf.validation/META-INF/MANIFEST.MF
@@ -8,7 +8,8 @@
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.validation;visibility:=reexport,
org.eclipse.epf.uma,
- org.eclipse.epf.library.edit
+ org.eclipse.epf.library.edit,
+ org.eclipse.ui
Eclipse-LazyStart: true
Export-Package: org.eclipse.epf.validation,
org.eclipse.epf.validation.constraints,