wlu: rmc-jazz-adaptor prototyping
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 2e5679b..ccdbb6f 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
@@ -24,6 +24,7 @@
 import org.eclipse.epf.library.edit.ui.UserInteractionHelper;
 import org.eclipse.epf.library.ui.actions.LibraryLockingOperationRunner;
 import org.eclipse.epf.uma.MethodLibrary;
+import org.eclipse.epf.uma.ecore.impl.MultiResourceEObject;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -93,6 +94,7 @@
 		}
 
 		Shell shell = Display.getCurrent().getActiveShell();
+		if (! MultiResourceEObject.jazzMode) {
 		IStatus status = UserInteractionHelper.checkModify(targetLib, shell);
 		if (!status.isOK()) {
 			AuthoringUIPlugin.getDefault().getMsgDialog().display(
@@ -101,6 +103,7 @@
 					status);
 			return;
 		}
+		}
 
 		final IWorkbench workbench = window != null ? (window.getWorkbench() == null ? PlatformUI
 				.getWorkbench()
diff --git a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/wizards/NewLibraryMainPage.java b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/wizards/NewLibraryMainPage.java
index 6f6ac9e..a05a92f 100644
--- a/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/wizards/NewLibraryMainPage.java
+++ b/2.0/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/wizards/NewLibraryMainPage.java
@@ -21,6 +21,7 @@
 import org.eclipse.epf.library.LibraryManagerFactory;
 import org.eclipse.epf.library.ui.preferences.LibraryUIPreferences;
 import org.eclipse.epf.ui.wizards.BaseWizardPage;
+import org.eclipse.epf.uma.ecore.impl.MultiResourceEObject;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
@@ -172,7 +173,11 @@
 	 * Gets the library name.
 	 */
 	public String getLibraryName() {
-		String libPath = getLibraryPath();
+		String libPath = getLibraryPath();		
+		if (MultiResourceEObject.jazzMode) {
+			return libPath;
+		}		
+		
 		String libName = new File(libPath).getName();
 		if (!libPath.equals(libName)) {
 			return libName;
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 b510215..7155c11 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
@@ -77,6 +77,7 @@
 import org.eclipse.epf.uma.ProcessPackage;
 import org.eclipse.epf.uma.UmaPackage;
 import org.eclipse.epf.uma.VariabilityType;
+import org.eclipse.epf.uma.ecore.impl.MultiResourceEObject;
 import org.eclipse.epf.uma.edit.domain.TraceableAdapterFactoryEditingDomain;
 import org.eclipse.epf.uma.util.AssociationHelper;
 import org.eclipse.epf.uma.util.ContentDescriptionFactory;
@@ -187,6 +188,7 @@
 		// Check whether the owner resource can be modified.
 		//
 		Collection resourcesToChange = getModifiedResources();
+		if (! MultiResourceEObject.jazzMode) {
 		IStatus execStatus = UserInteractionHelper.checkModify(
 				resourcesToChange, shell);
 		if (!execStatus.isOK()) {
@@ -199,12 +201,13 @@
 			handleError(execStatus);
 			return;
 		}
+	
 		if (willSaveModifiedResources()
 				&& !UserInteractionHelper.checkOutOfSynch(resourcesToChange)) {
 			status.add(Status.CANCEL_STATUS);
 			return;
 		}
-
+		}
 		// if(!checkFolder(shell)) {
 		// return;
 		// }
@@ -249,6 +252,9 @@
 	 * @return
 	 */
 	private boolean checkFolder(Object shell) {
+		if (MultiResourceEObject.jazzMode) {
+			return true;
+		}
 		// if any of the elements to be added will be saved in its own file
 		// check if the folder to save the file to can be modified
 		//
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 988f6f9..54d10a5 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
@@ -959,7 +959,7 @@
 			File libFile = new File(path);
 			configFolderPath = new Path(new File(libFile.getParentFile(),
 					MultiFileSaveUtil.METHOD_CONFIGURATION_FOLDER_NAME).getCanonicalPath());
-			libFolderPath = new Path(libFile.getParentFile().getCanonicalPath());
+			libFolderPath = MultiResourceEObject.jazzMode ? null : new Path(libFile.getParentFile().getCanonicalPath());
 			Resource res = loadLibraryResource(libFile.getCanonicalPath()); 
 			try {
 				initialize(true);
diff --git a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryManager.java b/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryManager.java
index 9523ff0..541e0bc 100644
--- a/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryManager.java
+++ b/2.0/plugins/org.eclipse.epf.library.xmi/src/org/eclipse/epf/library/xmi/XMILibraryManager.java
@@ -280,8 +280,9 @@
 					.getResourceSet());
 
 			// Load the method library.
-			resourceSet.loadMethodLibraries(URI.createFileURI(libraryXMIFile
-					.getAbsolutePath()), Collections.EMPTY_MAP);
+			String uriStr = MultiResourceEObject.jazzMode ? 
+					path.getName() : libraryXMIFile.getAbsolutePath();
+			resourceSet.loadMethodLibraries(URI.createFileURI(uriStr), Collections.EMPTY_MAP);
 			library = resourceSet.getFirstMethodLibrary();
 
 			// Add a listener to monitor library resource changes.