Author: dgolovin
Date: 2007-12-19 19:11:50 -0500 (Wed, 19 Dec 2007)
New Revision: 5383
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/DeleteTLDHandler.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java
Log:
Cleanup the code:
1. new Long(value) replaced for Long.valueOf(value)
2. new String() removed
3. new Boolean(true/false) replaced to Boolean.TRUE/FALSE
4. Unused packages were removed from seam.plugins
5. Throwing of NullPointerException replaced to IllegalArgument Exception
6. catch Exception replaced to particular Exception types in several places
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/DeleteTLDHandler.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/DeleteTLDHandler.java 2007-12-20
00:11:44 UTC (rev 5382)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/DeleteTLDHandler.java 2007-12-20
00:11:50 UTC (rev 5383)
@@ -28,7 +28,7 @@
String message = WebUIMessages.DELETE + FileAnyImpl.toFileName(object);
pd.setProperty(ServiceDialog.DIALOG_MESSAGE, message);
pd.setProperty(ServiceDialog.CHECKBOX_MESSAGE, checkboxMessage);
- pd.put(ServiceDialog.CHECKED, new Boolean(true));
+ pd.put(ServiceDialog.CHECKED, Boolean.TRUE);
if(!d.openConfirm(pd)) return;
Boolean b = (Boolean)pd.get(ServiceDialog.CHECKED);
unregister = b.booleanValue();
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java 2007-12-20
00:11:44 UTC (rev 5382)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java 2007-12-20
00:11:50 UTC (rev 5383)
@@ -195,9 +195,22 @@
runRegisterInServerJob(p, new IServer[]{server}, null);
}
- public static void runRegisterInServerJob(IProject p, IServer[] servers, String
contextRoot) {
- RegisterServerJob job = new RegisterServerJob(p, servers, contextRoot);
- job.schedule(100);
+ public static void runRegisterInServerJob(final IProject p, final IServer[] servers,
final String contextRoot) {
+ Job startRegistration = new Job("Starting deployment to server") {
+ /* (non-Javadoc)
+ * @see
org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ RegisterServerJob job = new RegisterServerJob(p, servers, contextRoot);
+ job.schedule(100);
+ return Status.OK_STATUS;
+ }
+ };
+ startRegistration.setUser(true);
+ startRegistration.setRule(p);
+ startRegistration.setPriority(Job.DECORATE);
+ startRegistration.schedule();
}
// registerInJob
Show replies by date