Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritrimble2006-12-08 01:27:51 +0000
committeritrimble2006-12-08 01:27:51 +0000
commit583295108a928f2d1143b9da631cd680a256ca6b (patch)
treeabee3b013b32e6d0111c0b4bdef64d917ed08ebd
parentf9f6f37c0406511cf106f307f5ab02dc98f4d82c (diff)
downloadwebtools.jsf-583295108a928f2d1143b9da631cd680a256ca6b.tar.gz
webtools.jsf-583295108a928f2d1143b9da631cd680a256ca6b.tar.xz
webtools.jsf-583295108a928f2d1143b9da631cd680a256ca6b.zip
Bug# 166978
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryconfig/JSFLibraryRegistryUtil.java3
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/PluginProvidedJSFLibraryImpl.java30
2 files changed, 31 insertions, 2 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryconfig/JSFLibraryRegistryUtil.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryconfig/JSFLibraryRegistryUtil.java
index d2e619b33..850d947c4 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryconfig/JSFLibraryRegistryUtil.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryconfig/JSFLibraryRegistryUtil.java
@@ -226,8 +226,7 @@ public class JSFLibraryRegistryUtil {
Iterator it = list.iterator();
while (it.hasNext()) {
target = (ArchiveFile) it.next();
- if (target.getName().equals(source.getName()) &&
- target.getResolvedSourceLocation().equals(source.getSourceLocation())) {
+ if (target.equals(source)) {
return true;
}
}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/PluginProvidedJSFLibraryImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/PluginProvidedJSFLibraryImpl.java
index 0e42fa1ef..7a6db77a9 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/PluginProvidedJSFLibraryImpl.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/PluginProvidedJSFLibraryImpl.java
@@ -11,6 +11,7 @@
package org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl;
import java.util.Collection;
+import java.util.Iterator;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
@@ -22,6 +23,9 @@ import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.ArchiveFile;
+import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary;
+import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistryFactory;
import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistryPackage;
import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFVersion;
import org.eclipse.jst.jsf.core.internal.jsflibraryregistry.PluginProvidedJSFLibrary;
@@ -112,6 +116,32 @@ public class PluginProvidedJSFLibraryImpl extends JSFLibraryImpl implements Plug
/**
* <!-- begin-user-doc -->
+ * @return the working copy
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public JSFLibrary getWorkingCopy() {
+ PluginProvidedJSFLibrary workingCopyLib = JSFLibraryRegistryFactory.eINSTANCE.createPluginProvidedJSFLibrary();
+ workingCopyLib.setID(getID());
+ workingCopyLib.setName(getName());
+ workingCopyLib.setJSFVersion(getJSFVersion());
+ workingCopyLib.setDeployed(isDeployed());
+ workingCopyLib.setImplementation(isImplementation());
+ workingCopyLib.setPluginID(getPluginID());
+ Iterator itArchiveFiles = getArchiveFiles().iterator();
+ while (itArchiveFiles.hasNext()) {
+ ArchiveFile srcArchiveFile = (ArchiveFile)itArchiveFiles.next();
+ ArchiveFile destArchiveFile = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
+ destArchiveFile.setRelativeToWorkspace(srcArchiveFile.isRelativeToWorkspace());
+ destArchiveFile.setSourceLocation(srcArchiveFile.getSourceLocation());
+ destArchiveFile.setRelativeDestLocation(srcArchiveFile.getRelativeDestLocation());
+ workingCopyLib.getArchiveFiles().add(destArchiveFile);
+ }
+ return workingCopyLib;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
* @param otherEnd
* @param featureID
* @param baseClass

Back to the top