Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/FormatActionDelegate.java')
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/FormatActionDelegate.java23
1 files changed, 10 insertions, 13 deletions
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/FormatActionDelegate.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/FormatActionDelegate.java
index 742f7c0e1e..52a01d2bee 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/FormatActionDelegate.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/FormatActionDelegate.java
@@ -13,7 +13,6 @@
package org.eclipse.wst.sse.ui.edit.util;
import java.io.IOException;
-import java.text.MessageFormat;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
@@ -29,10 +28,8 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.wst.common.encoding.exceptions.MalformedInputExceptionWithDetail;
import org.eclipse.wst.sse.core.format.IStructuredFormatProcessor;
import org.eclipse.wst.sse.ui.extension.FormatProcessorsExtensionReader;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.Logger;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
public class FormatActionDelegate extends ResourceActionDelegate {
@@ -102,7 +99,7 @@ public class FormatActionDelegate extends ResourceActionDelegate {
if (fErrorStatus.getChildren().length > 0) {
status = fErrorStatus;
- fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, ResourceHandler.getString("FormatActionDelegate.errorStatusMessage"), null); //$NON-NLS-1$
+ fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, SSEUIPlugin.getResourceString("%FormatActionDelegate.errorStatusMessage"), null); //$NON-NLS-1$
}
return status;
@@ -110,7 +107,7 @@ public class FormatActionDelegate extends ResourceActionDelegate {
}
- private MultiStatus fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, ResourceHandler.getString("FormatActionDelegate.errorStatusMessage"), null); //$NON-NLS-1$
+ private MultiStatus fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, SSEUIPlugin.getResourceString("%FormatActionDelegate.errorStatusMessage"), null); //$NON-NLS-1$
protected void format(IProgressMonitor monitor, IFile file) {
try {
@@ -122,19 +119,19 @@ public class FormatActionDelegate extends ResourceActionDelegate {
IContentType contentType = contentDescription.getContentType();
IStructuredFormatProcessor formatProcessor = getFormatProcessor(contentType.getId());
if (formatProcessor != null && (monitor == null || !monitor.isCanceled())) {
- String message = MessageFormat.format(ResourceHandler.getString("FormatActionDelegate.3"), new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%FormatActionDelegate.3", new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
monitor.subTask(message);
formatProcessor.setProgressMonitor(monitor);
formatProcessor.formatFile(file);
}
} catch (MalformedInputExceptionWithDetail e) {
- String message = MessageFormat.format(ResourceHandler.getString("FormatActionDelegate.5"), new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%FormatActionDelegate.5", new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
} catch (IOException e) {
- String message = MessageFormat.format(ResourceHandler.getString("FormatActionDelegate.4"), new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%FormatActionDelegate.4", new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
} catch (CoreException e) {
- String message = MessageFormat.format(ResourceHandler.getString("FormatActionDelegate.4"), new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%FormatActionDelegate.4", new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
}
}
@@ -155,7 +152,7 @@ public class FormatActionDelegate extends ResourceActionDelegate {
format(monitor, members[i]);
}
} catch (CoreException e) {
- String message = MessageFormat.format(ResourceHandler.getString("FormatActionDelegate.4"), new String[]{resource.getFullPath().toString()}); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%FormatActionDelegate.4", new String[]{resource.getFullPath().toString()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
}
}
@@ -166,7 +163,7 @@ public class FormatActionDelegate extends ResourceActionDelegate {
}
protected Job getJob() {
- return new FormatJob(ResourceHandler.getString("FormatActionDelegate.jobName")); //$NON-NLS-1$
+ return new FormatJob(SSEUIPlugin.getResourceString("%FormatActionDelegate.jobName")); //$NON-NLS-1$
}
/*
@@ -181,7 +178,7 @@ public class FormatActionDelegate extends ResourceActionDelegate {
try {
resource.refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
- String message = MessageFormat.format(ResourceHandler.getString("FormatActionDelegate.4"), new String[]{resource.getFullPath().toString()}); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%FormatActionDelegate.4", new String[]{resource.getFullPath().toString()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
}
}

Back to the top