[322261] WTP needs an API on ServerPublishInfo to rebuild the cache for a specific module
diff --git a/features/org.eclipse.wst.server_core.feature.patch/buildnotes_org.eclipse.wst.server_core.feature.patch.html b/features/org.eclipse.wst.server_core.feature.patch/buildnotes_org.eclipse.wst.server_core.feature.patch.html index d10a1bb..6cb47f8 100644 --- a/features/org.eclipse.wst.server_core.feature.patch/buildnotes_org.eclipse.wst.server_core.feature.patch.html +++ b/features/org.eclipse.wst.server_core.feature.patch/buildnotes_org.eclipse.wst.server_core.feature.patch.html
@@ -21,5 +21,6 @@ <p>Bug <a href='https://bugs.eclipse.org/282909'>282922</a>. Server will not change to republish status after web module changed</p> <p>Bug <a href='https://bugs.eclipse.org/285232'>285232</a>. Server will not change to republish status after web module changed</p> <p>Bug <a href='https://bugs.eclipse.org/291261'>291261</a>. Invalid matching rule shows in .log</p> +<p>Bug <a href='https://bugs.eclipse.org/322261'>322261</a>. WTP needs an API on ServerPublishInfo to rebuild the cache for a specific module</p> </body></html> \ No newline at end of file
diff --git a/features/org.eclipse.wst.server_core.feature.patch/feature.properties b/features/org.eclipse.wst.server_core.feature.patch/feature.properties index ad37571..bb93970 100644 --- a/features/org.eclipse.wst.server_core.feature.patch/feature.properties +++ b/features/org.eclipse.wst.server_core.feature.patch/feature.properties
@@ -33,6 +33,7 @@ Bug https://bugs.eclipse.org/282922 Server will not change to republish status after web module changed\n\ Bug https://bugs.eclipse.org/285232 Server will not change to republish status after web module changed\n\ Bug https://bugs.eclipse.org/291261 Invalid matching rule shows in .log\n\ +Bug https://bugs.eclipse.org/322261 WTP needs an API on ServerPublishInfo to rebuild the cache for a specific module\n\ \n\ # "copyright" property - text of the "Feature Update Copyright"
diff --git a/plugins/org.eclipse.wst.server.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.server.core/META-INF/MANIFEST.MF index 6c5306e..f3b58e6 100644 --- a/plugins/org.eclipse.wst.server.core/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.wst.server.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.wst.server.core; singleton:=true -Bundle-Version: 1.1.11.qualifier +Bundle-Version: 1.1.12.qualifier Bundle-Activator: org.eclipse.wst.server.core.internal.ServerPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPublishInfo.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPublishInfo.java index c2ce806..e5eb3f5 100644 --- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPublishInfo.java +++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPublishInfo.java
@@ -531,6 +531,23 @@ } /** + * Recreates the cache for the specified {@link IModule}. + * + * @param module The {@link IModule} + */ + public void rebuildCache(IModule[] module) { + + synchronized (modulePublishInfo) { + final String publishInfoKey = this.getKey(module); + ModulePublishInfo mpi = modulePublishInfo.get(publishInfoKey); + if(mpi != null) { + mpi.startCaching(); // clear out the resource list + mpi.fill(module); // rebuild the resource list + } + } + } + + /** * Clears all caches of current module resources and deltas. */ public void clearCache() {