This commit was manufactured by cvs2svn to create tag 'R1_5_5'.
diff --git a/docs/org.eclipse.wst.validation.infopop/META-INF/MANIFEST.MF b/docs/org.eclipse.wst.validation.infopop/META-INF/MANIFEST.MF
index 57cc07c..44e4e45 100644
--- a/docs/org.eclipse.wst.validation.infopop/META-INF/MANIFEST.MF
+++ b/docs/org.eclipse.wst.validation.infopop/META-INF/MANIFEST.MF
@@ -5,3 +5,4 @@
Bundle-Version: 1.0.201.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Plugin.providerName
+Require-Bundle: org.eclipse.help;bundle-version="[3.2.0,3.3.0)"
diff --git a/features/org.eclipse.wst.common_core.feature.patch/.project b/features/org.eclipse.wst.common_core.feature.patch/.project
deleted file mode 100644
index eb1e1ea..0000000
--- a/features/org.eclipse.wst.common_core.feature.patch/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.common_core.feature.patch</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.wst.common_core.feature.patch/description.txt b/features/org.eclipse.wst.common_core.feature.patch/description.txt
deleted file mode 100644
index a1fc6d0..0000000
--- a/features/org.eclipse.wst.common_core.feature.patch/description.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-The HEAD branch of this patch feature is intentionally empty,
-to attempt to try and avoid confusion.
-
-Please load the correct version from the branch of the related patch.
diff --git a/features/org.eclipse.wst.common_core.feature/addPreBuiltComponents.xml b/features/org.eclipse.wst.common_core.feature/addPreBuiltComponents.xml
deleted file mode 100644
index f02a4cf..0000000
--- a/features/org.eclipse.wst.common_core.feature/addPreBuiltComponents.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<!-- ===================================================================== -->
-<!-- Callbacks to use when building this feature -->
-<!-- -->
-<!-- build.properties must have a line that says -->
-<!-- customBuildCallbacks=addPreBuiltComponents.xml -->
-<!-- ===================================================================== -->
-<project name="addPreBuiltComponents" default="noDefault">
- <!--
- Note to be cross-platform, "environment variables" are only appropriate for
- some variables, e.g. ones we set, since properties are case sensitive, even if
- the environment variables on your operating system are not, e.g. it will
- be ${env.Path} not ${env.PATH} on Windows -->
- <property environment="env" />
-
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target gather.bin.parts -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - the directory plugins will be collected to -->
- <!-- feature.directory - the directory containing the resulting feature -->
- <!-- ===================================================================== -->
- <target name="pre.gather.bin.parts">
- <!-- copy our known, pre-built, usually third party pre-reqs into this feature -->
- <echo message="Current basedir during callback: ${basedir}" />
- <echo message="Current destination.temp.folder during callback: ${destination.temp.folder}" />
- <copy
- todir="${destination.temp.folder}"
- overwrite="true">
- <fileset dir="${env.BUILD_HOME}/prebuilt/eclipse/plugins/" includes="org.eclipse.jem*/**" />
- </copy>
- <copy
- todir="${destination.temp.folder}"
- overwrite="true">
- <fileset dir="${env.BUILD_HOME}/prebuilt/eclipse/plugins/" includes="com.ibm.etools.emf.event*/**" />
- </copy>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the target gather.bin.parts -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - the directory plugins will be collected to -->
- <!-- feature.directory - the directory containing the resulting feature -->
- <!-- ===================================================================== -->
- <target name="post.gather.bin.parts">
- </target>
-
-
-
- <!-- ===================================================================== -->
- <!-- No Default target -->
- <!-- ===================================================================== -->
- <target name="noDefault">
- <echo message="This file must be called with explicit targets" />
- </target>
-
-
-</project>
diff --git a/features/org.eclipse.wst.common_core.feature/build.properties b/features/org.eclipse.wst.common_core.feature/build.properties
index d80a54c..7f47694 100644
--- a/features/org.eclipse.wst.common_core.feature/build.properties
+++ b/features/org.eclipse.wst.common_core.feature/build.properties
@@ -3,4 +3,3 @@
epl-v10.html,\
license.html,\
feature.properties
-customBuildCallbacks=addPreBuiltComponents.xml
diff --git a/features/org.eclipse.wst.common_core.feature/feature.xml b/features/org.eclipse.wst.common_core.feature/feature.xml
index b299e7e..5b66728 100644
--- a/features/org.eclipse.wst.common_core.feature/feature.xml
+++ b/features/org.eclipse.wst.common_core.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.common_core.feature"
label="%featureName"
- version="1.6.0.qualifier"
+ version="1.5.5.qualifier"
provider-name="%providerName">
<description>
@@ -21,6 +21,11 @@
<update label="%updateSiteName" url="http://download.eclipse.org/webtools/updates/"/>
</url>
+ <requires>
+ <import feature="org.eclipse.jem" version="1.2" match="equivalent"/>
+ <import feature="org.eclipse.emf" version="2.2" match="equivalent"/>
+ </requires>
+
<plugin
id="org.eclipse.wst.common.emfworkbench.integration"
download-size="0"
@@ -97,59 +102,4 @@
version="0.0.0"
unpack="false"/>
-
- <!-- the following is not built, but depends on the addPreBuiltComponents.xml
- adding it to the plugins directory at the right point. The "pre-built" plugin is
- then added to zips and update jars. -->
-
- <plugin
- id="org.eclipse.jem"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="com.ibm.etools.emf.event"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
- <plugin
- id="org.eclipse.jem.beaninfo"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
- <plugin
- id="org.eclipse.jem.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jem.proxy"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jem.util"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jem.workbench"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-
-
-
</feature>
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/feature.xml b/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/feature.xml
index 880429b..ebb270b 100644
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/feature.xml
+++ b/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.common_core.feature.source"
label="%featureName"
- version="1.6.0.qualifier"
+ version="1.5.5.qualifier"
provider-name="%providerName">
<description>
diff --git a/features/org.eclipse.wst.common_sdk.feature/feature.xml b/features/org.eclipse.wst.common_sdk.feature/feature.xml
index 94e7906..360eb28 100644
--- a/features/org.eclipse.wst.common_sdk.feature/feature.xml
+++ b/features/org.eclipse.wst.common_sdk.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.common_sdk.feature"
label="%featureName"
- version="1.6.0.qualifier"
+ version="1.5.5.qualifier"
provider-name="%providerName">
<description>
@@ -22,10 +22,6 @@
</url>
<includes
- id="org.eclipse.wst.common_ui.feature"
- version="0.0.0"/>
-
- <includes
id="org.eclipse.wst.common_ui.feature.source"
version="0.0.0"/>
diff --git a/features/org.eclipse.wst.common_ui.feature/feature.xml b/features/org.eclipse.wst.common_ui.feature/feature.xml
index c109025..c183d13 100644
--- a/features/org.eclipse.wst.common_ui.feature/feature.xml
+++ b/features/org.eclipse.wst.common_ui.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.common_ui.feature"
label="%featureName"
- version="1.6.0.qualifier"
+ version="1.5.5.qualifier"
provider-name="%providerName">
<description>
@@ -21,11 +21,18 @@
<update label="%updateSiteName" url="http://download.eclipse.org/webtools/updates/"/>
</url>
+ <includes
+ id="org.eclipse.wst.common_userdoc.feature"
+ version="0.0.0"/>
<includes
id="org.eclipse.wst.common_core.feature"
version="0.0.0"/>
+ <requires>
+ <import feature="org.eclipse.gef" version="3.2" match="equivalent"/>
+ </requires>
+
<plugin
id="org.eclipse.wst.command.env.ui"
download-size="0"
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.xml b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.xml
index 4f1a618..13a6d56 100644
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.xml
+++ b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.common_ui.feature.source"
label="%featureName"
- version="1.6.0.qualifier"
+ version="1.5.5.qualifier"
provider-name="%providerName">
<description>
diff --git a/plugins/org.eclipse.jem.util/.classpath b/plugins/org.eclipse.jem.util/.classpath
index d4d58af..25434f7 100644
--- a/plugins/org.eclipse.jem.util/.classpath
+++ b/plugins/org.eclipse.jem.util/.classpath
@@ -3,8 +3,7 @@
<classpathentry kind="src" path="jemutil"/>
<classpathentry kind="src" path="property_files"/>
<classpathentry kind="src" path="jemutil-nonworkbnech"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry sourcepath="org.eclipse.perfmsr.core.stub/perfmsr.jar" kind="lib" path="org.eclipse.perfmsr.core.stub/perfmsr.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/plugins/org.eclipse.jem.util/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.jem.util/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..8c58b56
--- /dev/null
+++ b/plugins/org.eclipse.jem.util/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Sun Apr 15 21:22:05 EDT 2007
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/plugins/org.eclipse.jem.util/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.jem.util/.settings/org.eclipse.jdt.core.prefs
index d78073f..77b1d97 100644
--- a/plugins/org.eclipse.jem.util/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.jem.util/.settings/org.eclipse.jdt.core.prefs
@@ -1,11 +1,15 @@
-#Tue Feb 21 10:09:19 EST 2006
+#Sun Apr 15 21:31:03 EDT 2007
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -41,6 +45,7 @@
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/plugins/org.eclipse.jem.util/META-INF/MANIFEST.MF b/plugins/org.eclipse.jem.util/META-INF/MANIFEST.MF
index 59b2475..429caa0 100644
--- a/plugins/org.eclipse.jem.util/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.jem.util/META-INF/MANIFEST.MF
@@ -23,3 +23,4 @@
org.eclipse.perfmsr.core;bundle-version="1.0.0";resolution:=optional,
com.ibm.icu;bundle-version="[3.4.4.1,4.0.0)"
Eclipse-LazyStart: true
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/plugins/org.eclipse.jem.util/build.properties b/plugins/org.eclipse.jem.util/build.properties
index b40afd0..31b39df 100644
--- a/plugins/org.eclipse.jem.util/build.properties
+++ b/plugins/org.eclipse.jem.util/build.properties
@@ -21,3 +21,4 @@
property_files/,\
jemutil-nonworkbnech/
jars.compile.order = .
+jars.extra.classpath = org.eclipse.perfmsr.core.stub/perfmsr.jar
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchMatch.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchMatch.java
index 11969e5..4890fc5 100644
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchMatch.java
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchMatch.java
@@ -16,6 +16,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.wst.common.core.search.pattern.SearchPattern;
/**
* A search match represents the result of a search query.
@@ -29,7 +30,7 @@
* (repeatedly) as the API evolves.
* </p>
*
- * @see SearchEngine#search(org.eclipse.wst.common.core.search.pattern.SearchPattern, SearchParticipant[], ISearchScope,
+ * @see SearchEngine#search(SearchPattern, SearchParticipant[], ISearchScope,
* SearchRequestor, org.eclipse.core.runtime.IProgressMonitor)
*/
public class SearchMatch implements IAdaptable
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocument.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocument.java
index d9bfcb9..d808f19 100644
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocument.java
+++ b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocument.java
@@ -12,6 +12,7 @@
package org.eclipse.wst.common.core.search.document;
import org.eclipse.wst.common.core.search.SearchParticipant;
+import org.eclipse.wst.common.core.search.SearchRequestor;
/**
* A search document encapsulates a content to be searched in. A search
@@ -37,7 +38,7 @@
* that it can not process, e.g. Java, then XML participant would create
* SearchDocument for that fragment which contains Java compilation unit, and
* pass it to the Java search participant. Passing its own
- * {@link org.eclipse.wst.common.core.search.SearchRequestor} this participant can then map the match positions
+ * {@link SearchRequestor} this participant can then map the match positions
* back to the original contents, create its own matches and report them to the
* original requestor.
* </p>
diff --git a/plugins/org.eclipse.wst.common.emf/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.emf/META-INF/MANIFEST.MF
index 84e5472..b7a0e9a 100644
--- a/plugins/org.eclipse.wst.common.emf/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.common.emf/META-INF/MANIFEST.MF
@@ -2,14 +2,14 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.wst.common.emf; singleton:=true
-Bundle-Version: 1.1.103.qualifier
+Bundle-Version: 1.1.4.qualifier
Bundle-Activator: org.eclipse.wst.common.internal.emf.plugin.EcoreUtilitiesPlugin
Bundle-Vendor: %pluginProvider
Bundle-Localization: plugin
Export-Package: org.eclipse.wst.common.internal.emf.plugin;x-internal:=true,
org.eclipse.wst.common.internal.emf.resource;x-friends:="org.eclipse.wst.common.modulecore",
org.eclipse.wst.common.internal.emf.utilities;x-internal:=true
-Require-Bundle: org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,2.4.0)",
+Require-Bundle: org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,2.3.0)",
org.eclipse.wst.common.frameworks;bundle-version="[1.1.0,1.2.0)",
org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java
index 7b5a265..c6c5a2f 100644
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java
+++ b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java
@@ -221,12 +221,9 @@
}
protected String shortClassName(Object o) {
- if (o != null) {
- String cn = o.getClass().getName();
- int i = cn.lastIndexOf('.');
- return cn.substring(i + 1, cn.length());
- }
- return null;
+ String cn = o.getClass().getName();
+ int i = cn.lastIndexOf('.');
+ return cn.substring(i + 1, cn.length());
}
/*
@@ -443,9 +440,11 @@
}
// Remove any remaining adapters.
- for (; i < mofChildren.size(); i++) {
- removeMOFValue((EObject) mofChildren.get(i), map);
- }
+ //make a copy so we remove all items - bug 192468
+ Object[] childrenArray = mofChildren.toArray();
+ for (; i < childrenArray.length; i++) {
+ removeMOFValue((EObject) childrenArray[i], map);
+ }
// The adapters cannot be updated as they created. We must wait until
// all of the adapters are created and removed before updating,
@@ -1146,6 +1145,7 @@
try {
return map.convertStringToValue(trimmedValue, emfObject);
} catch (FeatureValueConversionException ex) {
+ org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ex);
handleFeatureValueConversionException(ex);
return null;
}
@@ -1709,12 +1709,25 @@
map.clearList(mofObject);
// Go through the list of nodes and update the MOF collection
+ int addIndex = 0;
for (int i = 0; i < nodeChildren.size(); i++) {
Node child = (Node) nodeChildren.get(i);
Object attributeValue = extractValue(child, map, mofObject);
- if (attributeValue != null)
- map.setMOFValue(mofObject, attributeValue, i);
-
+ boolean advanceAddIndex = true;
+ if (attributeValue != null){
+ if(map.getFeature() != null && map.getFeature().isUnique() && mofObject.eGet(map.getFeature()) != null && mofObject.eGet(map.getFeature()) instanceof List && ((List) mofObject.eGet(map.getFeature())).contains(attributeValue)){
+ advanceAddIndex = false;
+ String domName = map.domNameAndPath != null ? map.domNameAndPath : "attribute"; //$NON-NLS-1$
+ org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(new IllegalArgumentException("The 'no duplicates' constraint is violated by "+domName+" = "+attributeValue));
+ handleInvalidMultiNodes(child.getNodeName());
+ } else {
+ map.setMOFValue(mofObject, attributeValue, addIndex);
+ }
+ if(advanceAddIndex){
+ addIndex ++;
+ }
+ }
+
// Adapt the node so update will occur.
addDOMAdapter(child);
}
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIResourceImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIResourceImpl.java
index 5f01fea..1c0e098 100644
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIResourceImpl.java
+++ b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIResourceImpl.java
@@ -24,6 +24,7 @@
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.jem.util.logger.proxy.Logger;
import org.eclipse.wst.common.internal.emf.utilities.IDUtil;
@@ -330,14 +331,13 @@
* The resource has been unloaded, and there are no references. Treat the resource like a new
* Resource
*/
- // never used
-// private void resetAsNew() {
-// readReferenceCount = 1;
-// isNew = true;
-// }
+ private void resetAsNew() {
+ readReferenceCount = 1;
+ isNew = true;
+ }
/**
- * @see org.eclipse.emf.ecore.resource.Resource#save(Object)
+ * @see Resource#save(Object)
*/
public void save(Map options) throws IOException {
notifyAboutToSave();
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RootTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RootTranslator.java
index 1de7966..18f8d84 100644
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RootTranslator.java
+++ b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RootTranslator.java
@@ -10,7 +10,6 @@
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
public class RootTranslator extends Translator {
@@ -29,7 +28,7 @@
* @see com.ibm.etools.emf2xml.impl.Translator#setMOFValue(Notifier, Object, int)
*/
public void setMOFValue(Notifier owner, Object value, int newIndex) {
- ((Resource) owner).getContents().add(newIndex, (EObject)value);
+ ((Resource) owner).getContents().add(newIndex, value);
}
/**
@@ -47,7 +46,7 @@
*/
public void setMOFValue(Resource res, Object value) {
if (res != null && value != null)
- res.getContents().add((EObject)value);
+ res.getContents().add(value);
}
/*
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Translator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Translator.java
index 812b4d0..685181c 100644
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Translator.java
+++ b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Translator.java
@@ -628,7 +628,7 @@
*/
public void setMOFValue(Resource res, Object value) {
if (res != null && value != null)
- res.getContents().add((EObject)value);
+ res.getContents().add(value);
}
public void removeMOFValue(Notifier owner, Object value) {
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CloneablePublic.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CloneablePublic.java
index d996003..b243775 100644
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CloneablePublic.java
+++ b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CloneablePublic.java
@@ -14,13 +14,11 @@
*/
package org.eclipse.wst.common.internal.emf.utilities;
-import org.eclipse.emf.common.notify.Adapter;
-
/**
* Interface that exposes the clone method, for objects that need to generically copy other
* cloneable objects
*/
-public interface CloneablePublic extends Cloneable, Adapter.Internal {
+public interface CloneablePublic extends Cloneable {
Object clone();
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/TranslatorService.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/TranslatorService.java
index 4012a7b..6641b47 100644
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/TranslatorService.java
+++ b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/TranslatorService.java
@@ -28,8 +28,7 @@
/**
* Static empty array used when no extensions found
*/
- // never used
- //private static final Translator[] NO_TRANSLATORS = new Translator[0];
+ private static final Translator[] NO_TRANSLATORS = new Translator[0];
/**
* Singleton instance of the Translator service
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.emfworkbench.integration/META-INF/MANIFEST.MF
index 72b9262..ac5d3c6 100644
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.common.emfworkbench.integration/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.wst.common.emfworkbench.integration; singleton:=true
-Bundle-Version: 1.1.103.qualifier
+Bundle-Version: 1.1.5.qualifier
Bundle-Activator: org.eclipse.wst.common.internal.emfworkbench.integration.EMFWorkbenchEditPlugin
Bundle-Vendor: %pluginVendor
Bundle-Localization: plugin
@@ -12,12 +12,12 @@
org.eclipse.wst.common.internal.emfworkbench.validateedit;x-internal:=true
Require-Bundle: org.eclipse.wst.common.frameworks;bundle-version="[1.1.0,1.2.0)",
org.eclipse.jem.util;bundle-version="[1.2.0,1.3.0)",
- org.eclipse.emf.edit;bundle-version="[2.2.0,2.4.0)",
- org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,2.4.0)",
+ org.eclipse.emf.edit;bundle-version="[2.2.0,2.3.0)",
+ org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,2.3.0)",
org.eclipse.wst.common.emf;bundle-version="[1.1.0,1.2.0)",
org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.xsd;bundle-version="[2.2.0,2.4.0)",
+ org.eclipse.xsd;bundle-version="[2.2.0,2.3.0)",
org.eclipse.wst.validation;bundle-version="[1.1.0,1.2.0)",
org.eclipse.wst.common.project.facet.core;bundle-version="[1.1.0,1.2.0)",
org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)"
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/PassthruResourceSet.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/PassthruResourceSet.java
index 71b536f..863e0dd 100644
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/PassthruResourceSet.java
+++ b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/PassthruResourceSet.java
@@ -47,7 +47,7 @@
return false;
ResourceSet set = WorkbenchResourceHelperBase.getResourceSet(((Resource) object).getURI());
if (set != null)
- return set.getResources().add((Resource)object);
+ return set.getResources().add(object);
return super.add(object);
}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EMFWorkbenchEditContextFactory.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EMFWorkbenchEditContextFactory.java
index 33b554e..4110873 100644
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EMFWorkbenchEditContextFactory.java
+++ b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EMFWorkbenchEditContextFactory.java
@@ -57,7 +57,7 @@
protected static LockManager lockManager = new LockManager();
protected static Map projectLocks = new Hashtable();
- protected static ILock getProjectLockObject(IProject aProject){
+ public static ILock getProjectLockObject(IProject aProject){
if(null == aProject){
return null;
}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRegistry.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRegistry.java
index 0733b32..dcfa367 100644
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRegistry.java
+++ b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRegistry.java
@@ -304,7 +304,7 @@
return this.factory;
}
- private void initializeResources() {
+ private synchronized void initializeResources() {
if (editModelResources == null) {
if (configurationElement != null) {
@@ -328,6 +328,7 @@
discardConfigurationElementIfNecessary();
} else {
editModelResources = Collections.EMPTY_LIST;
+ editModelExtensions = Collections.EMPTY_LIST;
}
}
}
diff --git a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModel.java b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModel.java
index 0b0a6cb..2d077f9 100644
--- a/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModel.java
+++ b/plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModel.java
@@ -35,6 +35,7 @@
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.CommandStack;
import org.eclipse.emf.common.command.CommandStackListener;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.impl.AdapterImpl;
@@ -231,7 +232,7 @@
}
/**
- * This is called with the {@linkorg.eclipse.emf.common.command.CommandStack}'s state has changed.
+ * This is called with the {@link CommandStack}'s state has changed.
*/
public void commandStackChanged(java.util.EventObject event) {
if (dirtyModelEvent == null)
diff --git a/plugins/org.eclipse.wst.common.environment/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.environment/META-INF/MANIFEST.MF
index c7b1123..d2aba54 100644
--- a/plugins/org.eclipse.wst.common.environment/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.common.environment/META-INF/MANIFEST.MF
@@ -11,8 +11,8 @@
org.eclipse.wst.common.internal.environment.plugin;x-internal:=true,
org.eclipse.wst.common.internal.environment.relative;x-internal:=true,
org.eclipse.wst.common.internal.environment.uri.file;x-internal:=true
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,3.4.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,3.3.0)",
+ org.eclipse.core.resources;bundle-version="[3.2.0,3.3.0)",
org.eclipse.osgi.util;bundle-version="[3.1.100,3.2.0)"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.frameworks.ui/META-INF/MANIFEST.MF
index 1e81075..af7d2cf 100644
--- a/plugins/org.eclipse.wst.common.frameworks.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.common.frameworks.ui/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.wst.common.frameworks.ui; singleton:=true
-Bundle-Version: 1.1.1.qualifier
+Bundle-Version: 1.1.2.qualifier
Bundle-Activator: org.eclipse.wst.common.frameworks.internal.ui.WTPUIPlugin
Bundle-Localization: plugin
Export-Package: org.eclipse.wst.common.frameworks.internal.datamodel.ui;x-internal:=true,
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/plugin.xml b/plugins/org.eclipse.wst.common.frameworks.ui/plugin.xml
index e98a3bc..f1e3ab7 100644
--- a/plugins/org.eclipse.wst.common.frameworks.ui/plugin.xml
+++ b/plugins/org.eclipse.wst.common.frameworks.ui/plugin.xml
@@ -49,5 +49,12 @@
id="org.eclipse.wst.common.frameworks.internal.operation.extension.ui.PasteActionOperation"/>
</extension>
-->
+ <extension
+ point="org.eclipse.jem.util.uiContextSensitiveClass">
+ <uiContextSensitiveClass
+ key="ISimpleValidateEditContext"
+ className="org.eclipse.wst.common.frameworks.internal.ui.SimpleValidateEditContextUI"
+ context="UI"/>
+ </extension>
</plugin>
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/SimpleValidateEditContextUI.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/SimpleValidateEditContextUI.java
new file mode 100644
index 0000000..1ddef36
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/SimpleValidateEditContextUI.java
@@ -0,0 +1,22 @@
+package org.eclipse.wst.common.frameworks.internal.ui;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.common.frameworks.internal.ISimpleValidateEditContext;
+import org.eclipse.wst.common.frameworks.internal.SimpleValidateEditContextHeadless;
+
+public class SimpleValidateEditContextUI extends SimpleValidateEditContextHeadless implements ISimpleValidateEditContext {
+
+ protected IStatus validateEditImpl(final IFile[] filesToValidate) {
+ final IStatus [] status = new IStatus[1];
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ status[0] = ResourcesPlugin.getWorkspace().validateEdit(filesToValidate, Display.getCurrent().getActiveShell());
+ }
+ });
+ return status[0];
+ }
+
+}
diff --git a/plugins/org.eclipse.wst.common.frameworks/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.frameworks/META-INF/MANIFEST.MF
index 70fe90a..a6395ac 100644
--- a/plugins/org.eclipse.wst.common.frameworks/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.common.frameworks/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.wst.common.frameworks; singleton:=true
-Bundle-Version: 1.1.102.qualifier
+Bundle-Version: 1.1.4.qualifier
Bundle-Activator: org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin
Bundle-Vendor: %provider
Bundle-Localization: plugin
@@ -20,5 +20,5 @@
org.eclipse.core.commands;bundle-version="[3.2.0,4.0.0)",
org.eclipse.jem.util;bundle-version="[1.2.0,1.3.0)",
org.eclipse.wst.common.environment;bundle-version="[1.0.100,1.1.0)";visibility:=reexport,
- org.eclipse.emf.ecore;bundle-version="[2.2.0,2.4.0)"
+ org.eclipse.emf.ecore;bundle-version="[2.2.0,2.3.0)"
Eclipse-AutoStart: true
diff --git a/plugins/org.eclipse.wst.common.frameworks/plugin.xml b/plugins/org.eclipse.wst.common.frameworks/plugin.xml
index 0f4338a..0ac2055 100644
--- a/plugins/org.eclipse.wst.common.frameworks/plugin.xml
+++ b/plugins/org.eclipse.wst.common.frameworks/plugin.xml
@@ -26,5 +26,13 @@
className="org.eclipse.wst.common.frameworks.internal.enablement.EnablementManager">
</uiContextSensitiveClass>
</extension>
+ <extension
+ point="org.eclipse.jem.util.uiContextSensitiveClass">
+ <uiContextSensitiveClass
+ key="ISimpleValidateEditContext"
+ className="org.eclipse.wst.common.frameworks.internal.SimpleValidateEditContextHeadless"
+ context="Headless">
+ </uiContextSensitiveClass>
+ </extension>
</plugin>
diff --git a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModelOperation.java b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModelOperation.java
index 5d833fb..87cc589 100644
--- a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModelOperation.java
+++ b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModelOperation.java
@@ -11,6 +11,7 @@
package org.eclipse.wst.common.frameworks.datamodel;
import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.wst.common.environment.IEnvironment;
@@ -72,7 +73,7 @@
/**
* <p>
* Returns the ISchedulingRule used for executing this job using
- * {@link org.eclipse.core.resources.IWorkspace#run(org.eclipse.core.resources.IWorkspaceRunnable, ISchedulingRule, int, org.eclipse.core.runtime.IProgressMonitor)}.
+ * {@link IWorkspace#run(org.eclipse.core.resources.IWorkspaceRunnable, ISchedulingRule, int, org.eclipse.core.runtime.IProgressMonitor)}.
* If <code>null</code> is returned, then IWorkspace.getRoot() is used as the ISchedulingRule
* during execution.
* </p>
@@ -80,7 +81,7 @@
* @return the ISchedulingRule
*
* @see #getOperationExecutionFlags()
- * @see org.eclipse.core.resources.IWorkspace#run(org.eclipse.core.resources.IWorkspaceRunnable, ISchedulingRule, int,
+ * @see IWorkspace#run(org.eclipse.core.resources.IWorkspaceRunnable, ISchedulingRule, int,
* org.eclipse.core.runtime.IProgressMonitor)
*/
public ISchedulingRule getSchedulingRule();
@@ -88,13 +89,13 @@
/**
* <p>
* Returns the OperationExecutionFlags used for executing this Operation as a workspace job.
- * {@link org.eclipse.core.resources.IWorkspace#run(org.eclipse.core.resources.IWorkspaceRunnable, ISchedulingRule, int, org.eclipse.core.runtime.IProgressMonitor)}.
+ * {@link IWorkspace#run(org.eclipse.core.resources.IWorkspaceRunnable, ISchedulingRule, int, org.eclipse.core.runtime.IProgressMonitor)}.
* </p>
*
* @return the OperationExecutionFlags
*
* @see #getSchedulingRule()
- * @seeorg.eclipse.core.resources.IWorkspace#run(org.eclipse.core.resources.IWorkspaceRunnable, ISchedulingRule, int,
+ * @see IWorkspace#run(org.eclipse.core.resources.IWorkspaceRunnable, ISchedulingRule, int,
* org.eclipse.core.runtime.IProgressMonitor)
*/
public int getOperationExecutionFlags();
diff --git a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/ISimpleValidateEditContext.java b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/ISimpleValidateEditContext.java
new file mode 100644
index 0000000..c5ffaf9
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/ISimpleValidateEditContext.java
@@ -0,0 +1,12 @@
+package org.eclipse.wst.common.frameworks.internal;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IStatus;
+
+public interface ISimpleValidateEditContext {
+
+ public static final String CLASS_KEY = "ISimpleValidateEditContext"; //$NON-NLS-1$
+
+ public IStatus validateEdit(IFile [] files);
+
+}
diff --git a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SimpleValidateEdit.java b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SimpleValidateEdit.java
new file mode 100644
index 0000000..1dbfa40
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SimpleValidateEdit.java
@@ -0,0 +1,29 @@
+package org.eclipse.wst.common.frameworks.internal;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jem.util.UIContextDetermination;
+
+public class SimpleValidateEdit {
+
+ /**
+ * @param files must contain only {@link IFile}s
+ * @return
+ */
+ public static boolean validateEdit(List files){
+ if(files == null || files.size() == 0){
+ return true;
+ }
+ return validateEdit( (IFile [])files.toArray(new IFile[files.size()]));
+ }
+
+ public static boolean validateEdit(IFile[] files) {
+ if(files == null || files.length == 0){
+ return true;
+ }
+ ISimpleValidateEditContext validator = (ISimpleValidateEditContext) UIContextDetermination.createInstance(ISimpleValidateEditContext.CLASS_KEY);
+ return validator.validateEdit(files).isOK();
+ }
+
+}
diff --git a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SimpleValidateEditContextHeadless.java b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SimpleValidateEditContextHeadless.java
new file mode 100644
index 0000000..d41d601
--- /dev/null
+++ b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SimpleValidateEditContextHeadless.java
@@ -0,0 +1,31 @@
+package org.eclipse.wst.common.frameworks.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
+
+public class SimpleValidateEditContextHeadless implements ISimpleValidateEditContext {
+
+ public IStatus validateEdit(IFile[] files) {
+ final List filesList = new ArrayList();
+ for(int i=0;i<files.length; i++){
+ if(files[i].exists() && files[i].isReadOnly()){
+ filesList.add(files[i]);
+ }
+ }
+ if(filesList.size() > 0){
+ IFile [] filesToValidate = (IFile [])filesList.toArray(new IFile[filesList.size()]);
+ return validateEditImpl(filesToValidate);
+ }
+ return IDataModelProvider.OK_STATUS;
+ }
+
+ protected IStatus validateEditImpl(IFile[] filesToValidate) {
+ return ResourcesPlugin.getWorkspace().validateEdit(filesToValidate, null);
+ }
+
+}
diff --git a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WrappedRuntimeException.java b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WrappedRuntimeException.java
index 35ed923..7d8fc75 100644
--- a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WrappedRuntimeException.java
+++ b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WrappedRuntimeException.java
@@ -73,6 +73,15 @@
}
/**
+ * Added to provide compatibility for the Java 1.4.2 addition of
+ * <code>Throwable.getCause()</code>.
+ * @return The nested exception held by the receiver.
+ */
+ public java.lang.Throwable getCause() {
+ return getNestedException();
+ }
+
+ /**
* Print out a stack trace to the system err.
*/
public void printStackTrace() {
diff --git a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/DataModelPausibleOperationImpl.java b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/DataModelPausibleOperationImpl.java
index 34bb866..bdc6e1a 100644
--- a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/DataModelPausibleOperationImpl.java
+++ b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/DataModelPausibleOperationImpl.java
@@ -385,7 +385,7 @@
if (null == this.getStatus()) {
this.setStatus(Status.OK_STATUS);
}
- } catch (Exception e) {
+ } catch (Throwable e) {
this.setStatus(new Status(IStatus.ERROR, WTPCommonPlugin.PLUGIN_ID, 0, WTPResourceHandler.getString("25", new Object[]{operation.getClass().getName()}), e)); //$NON-NLS-1$
WTPCommonPlugin.getDefault().getLogger().logError(e);
}
diff --git a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/IDataModelPausibleOperation.java b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/IDataModelPausibleOperation.java
index 008a637..86b9cbb 100644
--- a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/IDataModelPausibleOperation.java
+++ b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/IDataModelPausibleOperation.java
@@ -11,15 +11,17 @@
package org.eclipse.wst.common.frameworks.internal.datamodel;
import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.IUndoableOperation;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
/**
* <p>
* IDataModelManagerOperation is an IDataModelOperation returned from
- * {@linkorg.eclipse.wst.common.frameworks.datamodel.IDataModel#getDefaultOperation()}. This Operation wraps the IDataModelOperation returned
+ * {@link IDataModel#getDefaultOperation()}. This Operation wraps the IDataModelOperation returned
* from the IDatModelProvider backing the IDataModel that created it.
* </p>
* <p>
@@ -93,7 +95,7 @@
* This interface is not intended to be implemented by clients.
* </p>
*
- * @seeorg.eclipse.wst.common.frameworks.datamodel.IDataModel#getDefaultOperation()
+ * @see IDataModel#getDefaultOperation()
*
* @since 1.5
*/
@@ -105,7 +107,7 @@
* state it may only be executed.
* </p>
*
- * @see org.eclipse.core.commands.operations.IUndoableOperation#execute(IProgressMonitor, IAdaptable)
+ * @see IUndoableOperation#execute(IProgressMonitor, IAdaptable)
*/
public static final int NOT_STARTED = 0;
/**
@@ -114,7 +116,7 @@
* may only be paused by an {@link IDataModelPausibleOperationListener}.
* </p>
*
- * @see org.eclipse.core.commands.operations.IUndoableOperation#execute(IProgressMonitor, IAdaptable)
+ * @see IUndoableOperation#execute(IProgressMonitor, IAdaptable)
* @see IDataModelPausibleOperationListener
*/
public static final int RUNNING_EXECUTE = 1;
@@ -134,7 +136,7 @@
* may only be paused by an {@link IDataModelPausibleOperationListener}.
* </p>
*
- * @see org.eclipse.core.commands.operations.IUndoableOperation#undo(IProgressMonitor, IAdaptable)
+ * @see IUndoableOperation#undo(IProgressMonitor, IAdaptable)
* @see IDataModelPausibleOperationListener
*/
public static final int RUNNING_UNDO = 3;
@@ -144,7 +146,7 @@
* may only be paused by an {@link IDataModelPausibleOperationListener}.
* </p>
*
- * @see org.eclipse.core.commands.operations.IUndoableOperation#redo(IProgressMonitor, IAdaptable)
+ * @see IUndoableOperation#redo(IProgressMonitor, IAdaptable)
* @see IDataModelPausibleOperationListener
*/
public static final int RUNNING_REDO = 4;
@@ -167,7 +169,7 @@
* </p>
*
* @see #resume(IProgressMonitor, IAdaptable)
- * @see org.eclipse.core.commands.operations.IUndoableOperation#execute(IProgressMonitor, IAdaptable)
+ * @see IUndoableOperation#execute(IProgressMonitor, IAdaptable)
*/
public static final int PAUSED_ROLLBACK = 6;
/**
@@ -194,7 +196,7 @@
* state it may only be undone.
* </p>
*
- * @see org.eclipse.core.commands.operations.IUndoableOperation#undo(IProgressMonitor, IAdaptable)
+ * @see IUndoableOperation#undo(IProgressMonitor, IAdaptable)
*/
public static final int COMPLETE_EXECUTE = 9;
/**
@@ -203,7 +205,7 @@
* state it may only be executed.
* </p>
*
- * @see org.eclipse.core.commands.operations.IUndoableOperation#execute(IProgressMonitor, IAdaptable)
+ * @see IUndoableOperation#execute(IProgressMonitor, IAdaptable)
*/
public static final int COMPLETE_ROLLBACK = 10;
/**
@@ -212,7 +214,7 @@
* it may only be redone.
* </p>
*
- * @see org.eclipse.core.commands.operations.IUndoableOperation#redo(IProgressMonitor, IAdaptable)
+ * @see IUndoableOperation#redo(IProgressMonitor, IAdaptable)
*/
public static final int COMPLETE_UNDO = 11;
/**
@@ -221,7 +223,7 @@
* it may only be udone.
* </p>
*
- * @see org.eclipse.core.commands.operations.IUndoableOperation#undo(IProgressMonitor, IAdaptable)
+ * @see IUndoableOperation#undo(IProgressMonitor, IAdaptable)
*/
public static final int COMPLETE_REDO = 12;
diff --git a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/ProjectCreationDataModelProviderNew.java b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/ProjectCreationDataModelProviderNew.java
index 4cd1cd1..08147d0 100644
--- a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/ProjectCreationDataModelProviderNew.java
+++ b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/ProjectCreationDataModelProviderNew.java
@@ -148,7 +148,7 @@
* @param projectLoc
* @todo Generated comment
*/
- private IStatus validateExisting(String projectName, String projectLoc) {
+ public static IStatus validateExisting(String projectName, String projectLoc) {
if (projectName != null && !projectName.equals("")) {//$NON-NLS-1$
File file = new File(projectLoc);
if (file.exists()) {
diff --git a/plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF
index 4daa11f..b34d92c 100644
--- a/plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
Bundle-Name: Modulecore Plug-in
Bundle-Vendor: %provider
Bundle-SymbolicName: org.eclipse.wst.common.modulecore; singleton:=true
-Bundle-Version: 1.1.102.qualifier
+Bundle-Version: 1.1.54.qualifier
Bundle-Activator: org.eclipse.wst.common.componentcore.internal.ModulecorePlugin
Bundle-Localization: plugin
Export-Package: org.eclipse.wst.common.componentcore,
@@ -19,12 +19,12 @@
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
org.eclipse.wst.common.frameworks;bundle-version="[1.1.0,1.2.0)",
org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.2.0,2.4.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.2.0,2.3.0)",
org.eclipse.wst.common.emfworkbench.integration;bundle-version="[1.1.0,1.2.0)",
org.eclipse.wst.common.emf;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,2.4.0)",
+ org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,2.3.0)",
org.eclipse.core.commands;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.emf.edit;bundle-version="[2.2.0,2.4.0)",
+ org.eclipse.emf.edit;bundle-version="[2.2.0,2.3.0)",
org.eclipse.jem.util;bundle-version="[1.2.0,1.3.0)",
org.eclipse.wst.common.uriresolver;bundle-version="[1.1.0,1.2.0)",
org.eclipse.wst.common.project.facet.core;bundle-version="[1.1.0,1.2.0)",
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FacetInstallDataModelProvider.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FacetInstallDataModelProvider.java
index e9b1901..cb2ab1d 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FacetInstallDataModelProvider.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FacetInstallDataModelProvider.java
@@ -44,8 +44,7 @@
return version.getVersionString();
} else if (FACET_VERSION.equals(propertyName)) {
DataModelPropertyDescriptor[] validVersions = getValidPropertyDescriptors(FACET_VERSION);
- IProjectFacetVersion version = ProjectFacetsManager.getProjectFacet(getStringProperty(FACET_ID)).getDefaultVersion();
- return version;
+ return validVersions[validVersions.length - 1].getPropertyValue();
}
return super.getDefaultProperty(propertyName);
}
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleCoreValidator.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleCoreValidator.java
index b6767ba..556f612 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleCoreValidator.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleCoreValidator.java
@@ -5,14 +5,12 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.xmi.XMIResource;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.common.componentcore.internal.impl.WTPModulesResource;
import org.eclipse.wst.common.internal.emf.resource.TranslatorResource;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
import org.eclipse.wst.common.project.facet.core.internal.FacetedProjectNature;
import org.eclipse.wst.validation.internal.core.Message;
import org.eclipse.wst.validation.internal.core.ValidationException;
@@ -31,24 +29,23 @@
}
public Resource getPrimaryResource(IProject project) {
- // Overriden to handle loading the .component resource in new and old forms
- // First will try to load from .settings/org.eclipse.wst.common.component
- // Second will try to load from the old location(s) .settings/.component or .component
-
- URI uri = (URI) URI.createURI(StructureEdit.MODULE_META_FILE_NAME);
- WTPModulesResource res = (WTPModulesResource)WorkbenchResourceHelper.getOrCreateResource(uri, getResourceSet(project));
- if (res == null || !res.isLoaded()) {
- uri = (URI) URI.createURI(".settings/.component");
- res = (WTPModulesResource)WorkbenchResourceHelper.getOrCreateResource(uri, getResourceSet(project));
- if (res == null || !res.isLoaded()) {
- uri = (URI) URI.createURI(".wtpmodules");
- res = (WTPModulesResource)WorkbenchResourceHelper.getOrCreateResource(uri, getResourceSet(project));
- if (res == null || !res.isLoaded()) {
- res = null;
+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=181334; Changing this method to call ModuleStructuralModel.getPrimaryResource() method instead.
+ // This does two things:
+ // 1. Reorders the locks to prevent deadlock between locking the resource (Bugzilla 181334),
+ // then the edit model and
+ // 2. Reuses code. (The code between this method and MSM.getPrimaryResource() is identical.
+ StructureEdit structureEdit = StructureEdit.getStructureEditForRead(project);
+ if (structureEdit != null) {
+ ModuleStructuralModel structuralModel = structureEdit.getModuleStructuralModel();
+ if (structuralModel != null) {
+ // acquiring the ModuleStructuralModel lock here first because the call to getPrimaryResource()
+ // will cause this lock to be acquired later resulting in a potential deadlock
+ synchronized (structuralModel) {
+ return structuralModel.getPrimaryResource();
}
}
}
- return res;
+ return null;
}
private ResourceSet getResourceSet(IProject proj) {
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleMigratorManager.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleMigratorManager.java
index 8f74f93..51558ab 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleMigratorManager.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleMigratorManager.java
@@ -38,7 +38,6 @@
private static HashMap managerCache = new HashMap();
private static HashSet migrated = new HashSet();
private boolean migrating;
- private HashSet moved = new HashSet();
public ModuleMigratorManager() {
super();
}
@@ -74,9 +73,8 @@
try {
if (aProj.isAccessible() && ModuleCoreNature.isFlexibleProject(aProj)) {
if (aProj.findMember(".wtpmodules") != null) {
- if (!moved.contains(aProj))
- moveOldMetaDataFile(aProj);
- } else moved.add(aProj);
+ moveOldMetaDataFile(aProj);
+ }
if (needsComponentMigration(aProj,multiComps))
migrateComponentsIfNecessary(aProj,multiComps);
}
@@ -119,13 +117,11 @@
private void moveOldMetaDataFile(IProject project) {
try {
- if (!moved.contains(project))
- moveMetaDataFile(project);
+ moveMetaDataFile(project);
IFolder depFolder = project.getFolder(".deployables");
if (depFolder.exists())
depFolder.delete(true, null);
project.refreshLocal(IResource.DEPTH_INFINITE, null);
- moved.add(project);
} catch (Exception e) {
}
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleStructuralModel.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleStructuralModel.java
index 4306d7c..75b0fdd 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleStructuralModel.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleStructuralModel.java
@@ -30,6 +30,9 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
@@ -145,23 +148,68 @@
* @param wbComp
*/
public void cleanupWTPModules(WorkbenchComponent wbComp) {
- ModuleStructuralModel model = new ModuleStructuralModel(getEditModelID(),getEmfContext(),false);
- if (wbComp == null || model == null)
+ if (wbComp == null)
return;
- try {
- model.access(this);
- ResourceTreeRoot root = ResourceTreeRoot.getSourceResourceTreeRoot(wbComp);
- List rootResources = getModuleResources(root);
- // Only if we need to do a clean, do we clear, add all required root resource mappings, and save
- if (!(wbComp.getResources().containsAll(rootResources) && wbComp.getResources().size()==rootResources.size())) {
+ ResourceTreeRoot root = ResourceTreeRoot.getSourceResourceTreeRoot(wbComp);
+ List rootResources = getModuleResources(root);
+ // Only if we need to do a clean, do we clear, add all required root resource mappings, and save
+ if (!(wbComp.getResources().containsAll(rootResources) && wbComp.getResources().size()==rootResources.size())) {
+ final ModuleStructuralModel model = new ModuleStructuralModel(getEditModelID(),getEmfContext(),false);
+ if(model == null){
+ return;
+ }
+ boolean jobScheduled = false;
+ try {
+ final Object key = new Object();
+ model.access(key);
+
wbComp.getResources().clear();
wbComp.getResources().addAll(rootResources);
- model.save(this);
+ URI uri = wbComp.eResource().getURI();
+ //need to get this resource into the model
+ Resource resource = model.getResource(uri);
+ //need to manually dirty this resource in order for it to save.
+ resource.setModified(true);
+ //this job is necessary to avoid the deadlock in
+ //https://bugs.eclipse.org/bugs/show_bug.cgi?id=181253
+ class SaveJob extends Job {
+
+ public SaveJob() {
+ super("Save ModuleStructuralModel Job");
+ }
+
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ model.save(key);
+ return OK_STATUS;
+ } finally {
+ disposeOnce();
+ }
+ }
+
+ private boolean disposedAlready = false;
+
+ public void disposeOnce(){
+ if(!disposedAlready){
+ disposedAlready = true;
+ model.dispose();
+ }
+ }
+ };
+ final SaveJob saveJob = new SaveJob();
+ saveJob.addJobChangeListener(new JobChangeAdapter(){
+ public void done(IJobChangeEvent event) {
+ saveJob.disposeOnce();
+ }
+ });
+ saveJob.setSystem(true);
+ saveJob.schedule();
+ jobScheduled = true;
+ } finally {
+ if (!jobScheduled && model != null)
+ model.dispose();
}
- } finally {
- if (model != null)
- model.dispose();
- }
+ }
}
/**
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/StructureEdit.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/StructureEdit.java
index 4499c71..27586f6 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/StructureEdit.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/StructureEdit.java
@@ -26,6 +26,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.jobs.ILock;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.jem.util.UIContextDetermination;
@@ -42,6 +43,7 @@
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
+import org.eclipse.wst.common.internal.emfworkbench.edit.EMFWorkbenchEditContextFactory;
import org.eclipse.wst.common.internal.emfworkbench.validateedit.IValidateEditContext;
/**
@@ -438,10 +440,21 @@
*/
public ProjectComponents getComponentModelRoot() {
ProjectComponents comps = null;
- synchronized(structuralModel){
- if (!structuralModel.isDisposed())
- comps = (ProjectComponents) structuralModel.getPrimaryRootObject();
+ ILock lock = EMFWorkbenchEditContextFactory.getProjectLockObject(structuralModel.getProject());
+ try{
+ if(null != lock){
+ lock.acquire();
+ }
+ synchronized(structuralModel){
+ if (!structuralModel.isDisposed())
+ comps = (ProjectComponents) structuralModel.getPrimaryRootObject();
+ }
+ } finally{
+ if(null != lock){
+ lock.release();
+ }
}
+
return comps;
}
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphManager.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphManager.java
index 079edf1..3d95164 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphManager.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
+ * 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
@@ -47,6 +47,7 @@
private static final String MANIFEST_URI = "META-INF/MANIFEST.MF";
private HashMap wtpModuleTimeStamps = null;
private HashMap manifestTimeStamps = null;
+ private long modStamp = System.currentTimeMillis();
private DependencyGraphManager() {
super();
@@ -72,8 +73,13 @@
}
private void constructIfNecessary() {
- if (moduleTimeStampsChanged() || manifestTimeStampsChanged())
+ if (metadataChanged()) {
buildDependencyGraph();
+ }
+ }
+
+ private boolean metadataChanged() {
+ return moduleTimeStampsChanged() || manifestTimeStampsChanged();
}
private boolean manifestTimeStampsChanged() {
@@ -223,6 +229,7 @@
DependencyGraph.getInstance().clear();
getWtpModuleTimeStamps().clear();
getManifestTimeStamps().clear();
+ setModStamp(System.currentTimeMillis());
}
/**
@@ -249,4 +256,18 @@
public void forceRefresh() {
buildDependencyGraph();
}
+
+
+ public long getModStamp() {
+ return modStamp;
+ }
+
+
+ private void setModStamp(long modStamp) {
+ this.modStamp = modStamp;
+ }
+
+ public boolean checkIfStillValid(long timeStamp) {
+ return (getModStamp() == timeStamp && !metadataChanged());
+ }
}
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WorkbenchComponentImpl.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WorkbenchComponentImpl.java
index 407d303..940ca63 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WorkbenchComponentImpl.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WorkbenchComponentImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: WorkbenchComponentImpl.java,v 1.13 2006/07/21 18:36:56 cbridgha Exp $
+ * $Id: WorkbenchComponentImpl.java,v 1.12.2.1 2006/09/28 17:01:20 cbridgha Exp $
*/
package org.eclipse.wst.common.componentcore.internal.impl;
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/FacetProjectCreationOperation.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/FacetProjectCreationOperation.java
index 31e3bb4..5873c52 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/FacetProjectCreationOperation.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/FacetProjectCreationOperation.java
@@ -26,11 +26,9 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.frameworks.internal.operations.IProjectCreationPropertiesNew;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
@@ -115,16 +113,12 @@
return OK_STATUS;
}
- private void addDefaultFacets(IFacetedProject facetProj, Set defaultFacets) {
+ private static void addDefaultFacets(IFacetedProject facetProj, Set defaultFacets) {
Set actions = new HashSet();
for (Iterator iter = defaultFacets.iterator(); iter.hasNext();) {
IProjectFacetVersion facetVersion = (IProjectFacetVersion) iter.next();
if (!facetProj.hasProjectFacet(facetVersion.getProjectFacet())) {
- IDataModel dm = DataModelFactory.createDataModel(new FacetInstallDataModelProvider());
- dm.setProperty(IFacetDataModelProperties.FACET_ID, facetVersion.getProjectFacet().getId());
- dm.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, facetProj.getProject().getName());
- dm.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, facetVersion.getVersionString());
- actions.add(new IFacetedProject.Action(Action.Type.INSTALL, facetVersion, dm));
+ actions.add(new IFacetedProject.Action(Action.Type.INSTALL, facetVersion, null));
}
}
@@ -154,52 +148,11 @@
}
return facetProj;
}
-
- private static void addDefaultFacetsInProject(IFacetedProject facetProj, Set defaultFacets) {
- Set actions = new HashSet();
- for (Iterator iter = defaultFacets.iterator(); iter.hasNext();) {
- IProjectFacetVersion facetVersion = (IProjectFacetVersion) iter.next();
- if (!facetProj.hasProjectFacet(facetVersion.getProjectFacet())) {
- IDataModel dm = DataModelFactory.createDataModel(new FacetInstallDataModelProvider());
- dm.setProperty(IFacetDataModelProperties.FACET_ID, facetVersion.getProjectFacet().getId());
- dm.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, facetProj.getProject().getName());
- dm.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, facetVersion.getVersionString());
- actions.add(new IFacetedProject.Action(Action.Type.INSTALL, facetVersion, dm));
- }
- }
-
- try {
- if (!actions.isEmpty())
- facetProj.modify(actions, null);
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- }
-
+
public static void addDefaultFactets(IFacetedProject facetProj, IRuntime runtime) throws ExecutionException {
-
- Set fixedFacets = new HashSet(), newFacetVersions = facetProj.getProjectFacets(), existingFixedFacets = facetProj.getFixedProjectFacets();
- for (Iterator iter = newFacetVersions.iterator(); iter.hasNext();) {
- IProjectFacetVersion facetVersion = (IProjectFacetVersion) iter.next();
- String facetID = facetVersion.getProjectFacet().getId();
- boolean shouldInstallFacet = true;
- for (Iterator existingFacetsIterator = existingFixedFacets.iterator(); shouldInstallFacet && existingFacetsIterator.hasNext();) {
- IProjectFacet facet = (IProjectFacet) existingFacetsIterator.next();
- if (facet.getId().equals(facetID)) {
- shouldInstallFacet = false;
- }
- }
- if (shouldInstallFacet) {
- fixedFacets.add(facetVersion.getProjectFacet());
- }
- }
-
try {
- fixedFacets.addAll(facetProj.getFixedProjectFacets());
- facetProj.setFixedProjectFacets(fixedFacets);
-
if (runtime != null) {
- addDefaultFacetsInProject(facetProj, runtime.getDefaultFacets(fixedFacets));
+ addDefaultFacets(facetProj, runtime.getDefaultFacets(facetProj.getFixedProjectFacets()));
}
} catch (CoreException e) {
Logger.getLogger().logError(e);
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualArchiveComponent.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualArchiveComponent.java
index 2ca339e..0e5410a 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualArchiveComponent.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualArchiveComponent.java
@@ -241,9 +241,11 @@
if(file.exists())
loc = file.getLocation();
else {
- file = ResourcesPlugin.getWorkspace().getRoot().getFile(archivePath);
- if(file.exists())
- loc = file.getLocation();
+ if( archivePath.segmentCount() >= 2 ){
+ file = ResourcesPlugin.getWorkspace().getRoot().getFile(archivePath);
+ if(file.exists())
+ loc = file.getLocation();
+ }
}
// this is a file on the local filesystem
if(loc != null)
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
index 9cd880e..a196265 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
@@ -20,6 +20,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.wst.common.componentcore.ComponentCore;
@@ -27,6 +28,7 @@
import org.eclipse.wst.common.componentcore.internal.ComponentcoreFactory;
import org.eclipse.wst.common.componentcore.internal.ComponentcorePackage;
import org.eclipse.wst.common.componentcore.internal.DependencyType;
+import org.eclipse.wst.common.componentcore.internal.ModulecorePlugin;
import org.eclipse.wst.common.componentcore.internal.Property;
import org.eclipse.wst.common.componentcore.internal.ReferencedComponent;
import org.eclipse.wst.common.componentcore.internal.StructureEdit;
@@ -105,7 +107,15 @@
List propList = component.getProperties();
if(propList != null) {
for (int i = 0; i < propList.size(); i++) {
- props.setProperty(((Property)propList.get(i)).getName(), ((Property)propList.get(i)).getValue());
+ Property property = (Property)propList.get(i);
+ String name = property.getName();
+ String value = property.getValue();
+ if(value == null){
+ value = ""; //$NON-NLS-1$
+ String message = "WARNING: The component file in "+getProject().getName()+" has no value defined for the property: "+name; //$NON-NLS-1$//$NON-NLS-2$
+ ModulecorePlugin.getDefault().logError(IStatus.ERROR, message, null);
+ }
+ props.setProperty(name, value);
}
}
return props;
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/EclipseResourceAdapter.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/EclipseResourceAdapter.java
index 9ca6d48..95f6623 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/EclipseResourceAdapter.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/EclipseResourceAdapter.java
@@ -29,8 +29,7 @@
public class EclipseResourceAdapter extends AdapterImpl implements Adapter {
public static final Class ADAPTER_TYPE = EclipseResourceAdapter.class;
- private IResource resource;
- private boolean hasSearchFailed = false;
+ private IResource resource;
/*
* (non-Javadoc)
@@ -41,17 +40,16 @@
if (aNotification.getFeature() == ComponentcorePackage.eINSTANCE.getComponentResource_SourcePath()) {
if (aNotification.getEventType() == Notification.SET) {
resource = null;
- hasSearchFailed = false;
+
}
}
}
- public IResource getEclipseResource() {
- IProject container = null;
- if (resource != null || hasSearchFailed)
- return resource;
+ public IResource getEclipseResource() {
synchronized (this) {
if (resource == null) {
+
+ IProject container = null;
ComponentResource moduleResource = (ComponentResource) getTarget();
IPath sourcePath = moduleResource.getSourcePath();
if (moduleResource.getOwningProject() != null)
@@ -61,9 +59,7 @@
if (container != null)
resource = container.findMember(sourcePath);
if(resource == null)
- resource = ResourcesPlugin.getWorkspace().getRoot().findMember(sourcePath);
-
- hasSearchFailed = resource == null;
+ resource = ResourcesPlugin.getWorkspace().getRoot().findMember(sourcePath);
}
}
return resource;
diff --git a/plugins/org.eclipse.wst.common.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.ui/META-INF/MANIFEST.MF
index d34dd9c..b558bdd 100644
--- a/plugins/org.eclipse.wst.common.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.common.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.wst.common.ui; singleton:=true
-Bundle-Version: 1.1.200.qualifier
+Bundle-Version: 1.1.101.qualifier
Bundle-Activator: org.eclipse.wst.common.ui.internal.UIPlugin
Bundle-Vendor: %pluginProvider
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchResultPage.java b/plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchResultPage.java
index 318d06d..d67b913 100644
--- a/plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchResultPage.java
+++ b/plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchResultPage.java
@@ -16,13 +16,14 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.DelegatingDragAdapter;
import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
@@ -36,6 +37,8 @@
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.search.internal.ui.SearchMessages;
import org.eclipse.search.internal.ui.SearchPlugin;
+import org.eclipse.search.internal.ui.SearchPreferencePage;
+import org.eclipse.search.internal.ui.text.EditorOpener;
import org.eclipse.search.internal.ui.text.FileLabelProvider;
import org.eclipse.search.internal.ui.text.IFileSearchContentProvider;
import org.eclipse.search.internal.ui.text.ResourceTransferDragAdapter;
@@ -109,8 +112,7 @@
private SortAction fSortByNameAction;
private SortAction fSortByPathAction;
- // never used
- //private EditorOpener fEditorOpener= new EditorOpener();
+ private EditorOpener fEditorOpener= new EditorOpener();
private static final String[] SHOW_IN_TARGETS= new String[] { IPageLayout.ID_RES_NAV };
@@ -126,9 +128,7 @@
// TODO
//fSortByNameAction= new SortAction(SearchMessages.FileSearchPage_sort_name_label, this, FileLabelProvider.SHOW_LABEL_PATH);
//fSortByPathAction= new SortAction(SearchMessages.FileSearchPage_sort_path_label, this, FileLabelProvider.SHOW_PATH_LABEL);
- // cs : I've comment this code out for now. We need to review the changes to the base class and react accordingly.
- // Even more importantly we need to discuss with the base guys to get API lined up for this (see bug 163177).
- /*
+
fPropertyChangeListener= new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
if (SearchPreferencePage.LIMIT_TABLE.equals(event.getProperty()) || SearchPreferencePage.LIMIT_TABLE_TO.equals(event.getProperty()))
@@ -139,7 +139,7 @@
}
};
SearchPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(fPropertyChangeListener);
- */
+
}
public StructuredViewer getViewer() {
diff --git a/plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchResultTableContentProvider.java b/plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchResultTableContentProvider.java
index 0e876e8..981b3b5 100644
--- a/plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchResultTableContentProvider.java
+++ b/plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchResultTableContentProvider.java
@@ -13,6 +13,7 @@
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.search.internal.ui.SearchPreferencePage;
import org.eclipse.search.internal.ui.text.IFileSearchContentProvider;
import org.eclipse.search.ui.text.AbstractTextSearchResult;
@@ -34,15 +35,12 @@
public Object[] getElements(Object inputElement) {
if (inputElement instanceof SearchResult) {
Object[] elements= ((SearchResult)inputElement).getElements();
- // cs : I've comment this code out for now. We need to review the changes to the base class and react accordingly.
- // Even more importantly we need to discuss with the base guys to get API lined up for this (see bug 163177).
- /*
int tableLimit= SearchPreferencePage.getTableLimit();
if (SearchPreferencePage.isTableLimited() && elements.length > tableLimit) {
Object[] shownElements= new Object[tableLimit];
System.arraycopy(elements, 0, shownElements, 0, tableLimit);
return shownElements;
- }*/
+ }
return elements;
}
return EMPTY_ARR;
@@ -56,15 +54,13 @@
public void elementsChanged(Object[] updatedElements) {
TableViewer viewer= getViewer();
- // cs : I've comment 'tableLimited' related code out for now. We need to review the changes to the base class and react accordingly.
- // Even more importantly we need to discuss with the base guys to get API lined up for this (see bug 163177).
- //boolean tableLimited= SearchPreferencePage.isTableLimited();
+ boolean tableLimited= SearchPreferencePage.isTableLimited();
for (int i= 0; i < updatedElements.length; i++) {
if (fResult.getMatchCount(updatedElements[i]) > 0) {
if (viewer.testFindItem(updatedElements[i]) != null)
viewer.update(updatedElements[i], null);
else {
- //if (!tableLimited || viewer.getTable().getItemCount() < SearchPreferencePage.getTableLimit())
+ if (!tableLimited || viewer.getTable().getItemCount() < SearchPreferencePage.getTableLimit())
viewer.add(updatedElements[i]);
}
} else
diff --git a/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/SelectMultiFilePage.java b/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/SelectMultiFilePage.java
index d8a9083..586cf52 100644
--- a/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/SelectMultiFilePage.java
+++ b/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/SelectMultiFilePage.java
@@ -66,10 +66,7 @@
pageContent.setLayout(layout);
pageContent.setLayoutData(new GridData(GridData.FILL_BOTH));
- // variable never used ... is pageContent.getLayoutData() needed?
- //GridData outerFrameGridData = (GridData)
- pageContent.getLayoutData();
-
+ GridData outerFrameGridData = (GridData) pageContent.getLayoutData();
// outerFrameGridData.horizontalAlignment = GridData.HORIZONTAL_ALIGN_FILL;
// outerFrameGridData.verticalAlignment = GridData.VERTICAL_ALIGN_FILL;
@@ -276,7 +273,7 @@
}
public void widgetSelected(SelectionEvent event) {
-
+ java.util.List list;
if (selectedListBox.getSelectionCount() > 0)
setRemoveButtonEnabled(true);
else
diff --git a/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/TableNavigator.java b/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/TableNavigator.java
index 1d037a0..e729cfb 100644
--- a/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/TableNavigator.java
+++ b/plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/TableNavigator.java
@@ -220,7 +220,8 @@
public void addPaintListener(StructuredViewer viewer)
{
-
+ final StructuredViewer tableViewer = viewer;
+
addPaintListener(new PaintListener()
{
public void paintControl(PaintEvent e)
@@ -238,6 +239,7 @@
if (!row.isDisposed())
{
String newText = row.getText(getColumn());
+ TableItem cursorRow = getRow();
if (!newText.equals(cellText) || !(row.getImage(col) == cellImage))
{
redraw();
diff --git a/plugins/org.eclipse.wst.common.uriresolver/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.uriresolver/META-INF/MANIFEST.MF
index e0bba88..639b5aa 100644
--- a/plugins/org.eclipse.wst.common.uriresolver/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.common.uriresolver/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.wst.common.uriresolver; singleton:=true
-Bundle-Version: 1.1.100.qualifier
+Bundle-Version: 1.1.102.qualifier
Bundle-Activator: org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/URIResolverExtensionRegistry.java b/plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/URIResolverExtensionRegistry.java
index d081bf1..1403071 100644
--- a/plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/URIResolverExtensionRegistry.java
+++ b/plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/URIResolverExtensionRegistry.java
@@ -112,24 +112,29 @@
*/
public List getExtensionDescriptors(IProject project)
{
- List result = new ArrayList();
- for (Iterator i = map.keySet().iterator(); i.hasNext();)
- {
- String key = (String) i.next();
- try
- {
- if (key == NULL_PROJECT_NATURE_ID || project == null
- || project.hasNature(key))
- {
- result.addAll((List) ((HashMap) map.get(key)).get(PRIORITY_HIGH));
- result.addAll((List) ((HashMap) map.get(key)).get(PRIORITY_MEDIUM));
- result.addAll((List) ((HashMap) map.get(key)).get(PRIORITY_LOW));
- }
- } catch (CoreException e)
- {
- }
- }
- return result;
+ List result = new ArrayList();
+ List lowPriorityList = new ArrayList();
+ List mediumPriorityList = new ArrayList();
+ List highPriorityList = new ArrayList();
+ for (Iterator i = map.keySet().iterator(); i.hasNext();)
+ {
+ String key = (String) i.next();
+ try
+ {
+ if (key == NULL_PROJECT_NATURE_ID || project == null || project.hasNature(key))
+ {
+ highPriorityList.addAll((List) ((HashMap) map.get(key)).get(PRIORITY_HIGH));
+ mediumPriorityList.addAll((List) ((HashMap) map.get(key)).get(PRIORITY_MEDIUM));
+ lowPriorityList.addAll((List) ((HashMap) map.get(key)).get(PRIORITY_LOW));
+ }
+ } catch (CoreException e)
+ {
+ }
+ }
+ result.addAll(highPriorityList);
+ result.addAll(mediumPriorityList);
+ result.addAll(lowPriorityList);
+ return result;
}
/**
diff --git a/plugins/org.eclipse.wst.internet.cache/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.internet.cache/META-INF/MANIFEST.MF
index 8532d72..cacdc29 100644
--- a/plugins/org.eclipse.wst.internet.cache/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.internet.cache/META-INF/MANIFEST.MF
@@ -2,14 +2,14 @@
Bundle-ManifestVersion: 2
Bundle-Name: %_PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.wst.internet.cache; singleton:=true
-Bundle-Version: 1.0.201.qualifier
+Bundle-Version: 1.0.103.qualifier
Bundle-Activator: org.eclipse.wst.internet.cache.internal.CachePlugin
Bundle-Vendor: %_PLUGIN_PROVIDER
Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,3.3.0)",
+ org.eclipse.core.runtime;bundle-version="[3.2.0,3.3.0)",
org.eclipse.wst.common.uriresolver;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)"
+ org.eclipse.core.resources;bundle-version="[3.2.0,3.3.0)"
Eclipse-LazyStart: true
Export-Package: org.eclipse.wst.internet.cache.internal;x-friends:="org.eclipse.wst.internet.cache.tests",
org.eclipse.wst.internet.cache.internal.preferences;x-internal:=true
diff --git a/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/LicenseAcceptanceDialog.java b/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/LicenseAcceptanceDialog.java
index 562a74e..87f48aa 100644
--- a/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/LicenseAcceptanceDialog.java
+++ b/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/LicenseAcceptanceDialog.java
@@ -154,7 +154,6 @@
// Create the browser.
final Browser browser = new Browser(licenseTextComposite, SWT.BORDER);
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- //gd.heightHint = 400;
// It's important that the license URL is set even if we read
// the contents of the license file ourselves (see below) as
diff --git a/plugins/org.eclipse.wst.validation.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.validation.ui/META-INF/MANIFEST.MF
index d917719..47a42fb 100644
--- a/plugins/org.eclipse.wst.validation.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.validation.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Validation Framework UI
Bundle-SymbolicName: org.eclipse.wst.validation.ui; singleton:=true
-Bundle-Version: 1.1.102.qualifier
+Bundle-Version: 1.1.3.qualifier
Bundle-Activator: org.eclipse.wst.validation.internal.ui.plugin.ValidationUIPlugin
Bundle-Vendor: Eclipse.org
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/DelegatingValidatorPreferencesDialog.java b/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/DelegatingValidatorPreferencesDialog.java
index c02ccee..6316b5e 100644
--- a/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/DelegatingValidatorPreferencesDialog.java
+++ b/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/DelegatingValidatorPreferencesDialog.java
@@ -7,7 +7,6 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
*******************************************************************************/
package org.eclipse.wst.validation.internal.ui;
@@ -139,7 +138,6 @@
Label endSeparator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
GridData endSeparatorData = new GridData(SWT.FILL, SWT.CENTER, true, false);
endSeparator.setLayoutData(endSeparatorData);
- Dialog.applyDialogFont(parent);
return parent;
}
diff --git a/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPreferencePage.java b/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPreferencePage.java
index 3487d6c..b28a9a5 100644
--- a/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPreferencePage.java
+++ b/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPreferencePage.java
@@ -853,7 +853,8 @@
}
public boolean performDefaults() throws InvocationTargetException {
- pagePreferences.resetToDefault();
+ pagePreferences.restoreDefaults();
+ //pagePreferences.resetToDefault();
updateWidgetsForDefaults();
getDefaultsButton().setFocus();
return true;
diff --git a/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPropertiesPage.java b/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPropertiesPage.java
index 0ba4c52..e95b082 100644
--- a/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPropertiesPage.java
+++ b/plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPropertiesPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2004 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
@@ -7,7 +7,6 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
*******************************************************************************/
package org.eclipse.wst.validation.internal.ui;
@@ -27,7 +26,6 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jem.util.logger.LogEntry;
import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -707,7 +705,6 @@
updateWidgets();
- Dialog.applyDialogFont(parent);
page.setSize(page.computeSize(SWT.DEFAULT, SWT.DEFAULT));
return page;
diff --git a/plugins/org.eclipse.wst.validation/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.validation/META-INF/MANIFEST.MF
index 01aeb9b..03348a6 100644
--- a/plugins/org.eclipse.wst.validation/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.validation/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Validation Framework
Bundle-SymbolicName: org.eclipse.wst.validation; singleton:=true
-Bundle-Version: 1.1.2.qualifier
+Bundle-Version: 1.1.5.qualifier
Bundle-Activator: org.eclipse.wst.validation.internal.plugin.ValidationPlugin
Bundle-Vendor: Eclipse.org
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ConfigurationManager.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ConfigurationManager.java
index 2cc1ff8..537d69a 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ConfigurationManager.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ConfigurationManager.java
@@ -17,6 +17,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Preferences;
import org.eclipse.jem.util.logger.LogEntry;
import org.eclipse.jem.util.logger.proxy.Logger;
import org.eclipse.wst.validation.internal.plugin.ValidationPlugin;
@@ -130,6 +131,11 @@
gp = (GlobalConfiguration) root.getSessionProperty(USER_PREFERENCE);
if (gp == null) {
gp = new GlobalConfiguration(root);
+ Preferences prefs = ValidationPlugin.getPlugin().getPluginPreferences();
+ if( prefs != null ){
+ prefs.addPropertyChangeListener(gp);
+ }
+
gp.getVersion(); // initialize the configuration's version attribute
gp.load(); // initialize this instance from the stored values
gp.passivate(); // store this instance as a property on the IResource
@@ -273,4 +279,5 @@
}
return false;
}
+
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/GlobalConfiguration.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/GlobalConfiguration.java
index 3239cb0..3204d26 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/GlobalConfiguration.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/GlobalConfiguration.java
@@ -17,6 +17,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Preferences;
import org.eclipse.jem.util.logger.LogEntry;
import org.eclipse.jem.util.logger.proxy.Logger;
import org.eclipse.wst.validation.internal.plugin.ValidationPlugin;
@@ -73,16 +74,27 @@
_saveAutomatically = save;
}
- public void resetToDefault() throws InvocationTargetException {
+ public void resetToDefault() throws InvocationTargetException {
setDisableAllValidation(getDisableValidationDefault());
setEnabledValidators(getEnabledValidatorsDefault());
setEnabledManualValidators(getManualEnabledValidators());
setEnabledBuildValidators(getBuildEnabledValidators());
setCanProjectsOverride(getCanProjectsOverrideDefault());
setSaveAutomatically(getSaveAutomaticallyDefault());
- setDefaultDelegates(getValidators());
+ setDefaultDelegates(getValidators());
}
+ public void restoreDefaults() throws InvocationTargetException
+ {
+ ValidationPlugin plugin = ValidationPlugin.getPlugin();
+ Preferences pluginPreferences = plugin.getPluginPreferences();
+ deserialize(pluginPreferences.getDefaultString(USER_PREFERENCE));
+ deserializeManual(pluginPreferences.getDefaultString(USER_MANUAL_PREFERENCE));
+ deserializeBuild(pluginPreferences.getDefaultString(USER_BUILD_PREFERENCE));
+ deserializeDelegates(pluginPreferences.getDefaultString(DELEGATES_PREFERENCE));
+ }
+
+
/**
* This method exists only for migration purposes. The root marker must be deleted after
* migration is complete.
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationConfiguration.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationConfiguration.java
index 76a2236..a052d95 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationConfiguration.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationConfiguration.java
@@ -174,7 +174,7 @@
* false, return the enabled non-incremental validators.
*/
public ValidatorMetaData[] getEnabledIncrementalValidators(boolean incremental) throws InvocationTargetException {
- return getEnabledFullBuildValidators(incremental);
+ return getEnabledFullBuildValidators(!incremental);
}
/**
@@ -764,13 +764,28 @@
Preferences prefs = (Preferences) event.getSource();
if (prefs != null && !event.getOldValue().equals(event.getNewValue())) {
try {
- deserializeAllPrefs(prefs);
+ deserializeAllPrefs(event);
+ passivate();
} catch (InvocationTargetException ie) {
Logger.getLogger().log(ie);
}
}
}
+ private void deserializeAllPrefs(PropertyChangeEvent event) throws InvocationTargetException {
+ String storedConfig = (String)event.getNewValue();
+ if( event.getProperty().equals(USER_PREFERENCE) ){
+ deserialize(storedConfig);
+ }else if(event.getProperty().equals(USER_MANUAL_PREFERENCE)){
+ deserializeManual(storedConfig);
+ }else if(event.getProperty().equals(USER_BUILD_PREFERENCE)){
+ deserializeBuild(storedConfig);
+ }else if(event.getProperty().equals(DELEGATES_PREFERENCE)){
+ deserializeDelegates(storedConfig);
+ }
+ }
+
+
protected void deserializeBuild(String storedConfiguration) throws InvocationTargetException {
if (storedConfiguration == null || storedConfiguration.length() == 0 || storedConfiguration.equals("default_value")) {
// Assume that the configuration has never been set (new workspace).