[166208] Code cleanup
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/FacetUtil.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/FacetUtil.java
index 9dcbda7..7867aaf 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/FacetUtil.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/FacetUtil.java
@@ -30,13 +30,24 @@
/**
* Utility class for converting between facet runtimes and server runtimes.
* <p>
+ * This class provides all its functionality through static members.
+ * It is not intended to be subclassed or instantiated.
+ * </p>
+ * <p>
* <b>Provisional API:</b> This class/interface is part of an interim API that is still under development and expected to
* change significantly before reaching stability. It is being made available at this early stage to solicit feedback
* from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
* (repeatedly) as the API evolves.
* </p>
*/
-public class FacetUtil {
+public final class FacetUtil {
+ /**
+ * Static utility class - cannot create an instance.
+ */
+ private FacetUtil() {
+ // can't create
+ }
+
/**
* Returns the server runtime that corresponds to a facet runtime, or null
* if none could be found.
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/PublishUtil.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/PublishUtil.java
index c11087f..c26d722 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/PublishUtil.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/PublishUtil.java
@@ -31,7 +31,10 @@
import org.eclipse.wst.server.core.model.IModuleResourceDelta;
/**
* Utility class with an assortment of useful file methods.
- *
+ * <p>
+ * This class provides all its functionality through static members.
+ * It is not intended to be subclassed or instantiated.
+ * </p>
* <p>
* <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
* change significantly before reaching stability. It is being made available at this early stage to solicit feedback
@@ -40,7 +43,7 @@
* </p>
* @plannedfor 2.0
*/
-public class PublishUtil {
+public final class PublishUtil {
// size of the buffer
private static final int BUFFER = 65536;
@@ -54,10 +57,10 @@
private static final String TEMPFILE_PREFIX = "tmp";
/**
- * FileUtil cannot be created. Use static methods.
+ * PublishUtil cannot be created. Use static methods.
*/
private PublishUtil() {
- super();
+ // can't create
}
/**
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerCore.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerCore.java
index 869d91f..5ab3d14 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerCore.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerCore.java
@@ -29,7 +29,7 @@
*
* @since 1.0
*/
-public class ServerCore {
+public final class ServerCore {
private static final String EXTENSION_SERVER_TYPE = "serverTypes";
private static final String EXTENSION_RUNTIME_TYPE = "runtimeTypes";
@@ -64,7 +64,7 @@
}
/**
- * Cannot create ServerCore - use static methods.
+ * Cannot instantiate ServerCore - use static methods.
*/
private ServerCore() {
// can't create
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerUtil.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerUtil.java
index b7491b3..e043f39 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerUtil.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerUtil.java
@@ -23,7 +23,10 @@
/**
* Server utility methods. These static methods can be used to perform
* common operations on server artifacts.
- *
+ * <p>
+ * This class provides all its functionality through static members.
+ * It is not intended to be subclassed or instantiated.
+ * </p>
* @since 1.0
*/
public class ServerUtil {
@@ -31,7 +34,7 @@
* Static utility class - cannot create an instance.
*/
private ServerUtil() {
- // do nothing
+ // can't create
}
/**
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java
index 932a637..cfeeb9d 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java
@@ -313,7 +313,9 @@
* @throws CoreException if there is a problem publishing the module
*/
protected void publishModule(int kind, int deltaKind, IModule[] module, IProgressMonitor monitor) throws CoreException {
- // do nothing
+ // by default, assume the module has published successfully.
+ // this will update the publish state and delta correctly
+ setModulePublishState(module, IServer.PUBLISH_STATE_NONE);
}
/**
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/ServerUICore.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/ServerUICore.java
index 0465c70..4aab376 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/ServerUICore.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/ServerUICore.java
@@ -15,15 +15,18 @@
import org.eclipse.wst.server.ui.internal.ServerLabelProvider;
/**
* Server UI core.
- *
+ * <p>
+ * This class provides all its functionality through static members.
+ * It is not intended to be subclassed or instantiated.
+ * </p>
* @since 1.0
*/
-public class ServerUICore {
+public final class ServerUICore {
/**
- * ServerUICore constructor comment.
+ * Cannot instantiate ServerUICore - use static methods.
*/
private ServerUICore() {
- super();
+ // can't create
}
/**
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/ServerUIUtil.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/ServerUIUtil.java
index 9cc2bb2..b417223 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/ServerUIUtil.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/ServerUIUtil.java
@@ -15,15 +15,18 @@
import org.eclipse.swt.widgets.Shell;
/**
* Server UI utility methods.
- *
+ * <p>
+ * This class provides all its functionality through static members.
+ * It is not intended to be subclassed or instantiated.
+ * </p>
* @since 1.0
*/
-public class ServerUIUtil {
+public final class ServerUIUtil {
/**
- * ServerUIUtil constructor comment.
+ * Cannot instantiate ServerUIUtil - use static methods.
*/
private ServerUIUtil() {
- super();
+ // can't create
}
/**