diff options
Diffstat (limited to 'examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java')
-rw-r--r-- | examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java index 2e66c29ae..e977971f7 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java @@ -22,27 +22,27 @@ import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException; /** - * This class is a clone of the Policy classes many Eclipse plugin use to + * This class is a clone of the Policy classes many Eclipse plugin use to * provide NLSing of strings and aid in proper progress monitoring. */ public class Policy { - + private static ResourceBundle bundle = null; private static final String bundleName = "org.eclipse.team.examples.filesystem.messages"; //$NON-NLS-1$ /* - * Returns a resource bundle, creating one if it none is available. + * Returns a resource bundle, creating one if it none is available. */ private static ResourceBundle getResourceBundle() { // thread safety ResourceBundle tmpBundle = bundle; if (tmpBundle != null) return tmpBundle; - // always create a new classloader to be passed in + // always create a new classloader to be passed in // in order to prevent ResourceBundle caching return bundle = ResourceBundle.getBundle(bundleName); } - + /** * Lookup the message with the given ID in this catalog and bind its * substitution locations with the given string. @@ -50,7 +50,7 @@ public class Policy { public static String bind(String id, String binding) { return bind(id, new String[] { binding }); } - + /** * Lookup the message with the given ID in this catalog and bind its * substitution locations with the given strings. @@ -58,7 +58,7 @@ public class Policy { public static String bind(String id, String binding1, String binding2) { return bind(id, new String[] { binding1, binding2 }); } - + /** * Gets a string from the resource bundle. We don't want to crash because of a missing String. * Returns the key if not found. @@ -72,9 +72,9 @@ public class Policy { return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$ } } - + /** - * Gets a string from the resource bundle and binds it with the given arguments. If the key is + * Gets a string from the resource bundle and binds it with the given arguments. If the key is * not found, return the key. */ public static String bind(String key, Object[] args) { @@ -86,7 +86,7 @@ public class Policy { return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$ } } - + /** * Progress monitor helpers */ @@ -94,10 +94,10 @@ public class Policy { if (monitor.isCanceled()) throw new OperationCanceledException(); } - + public static IProgressMonitor monitorFor(IProgressMonitor monitor) { if (monitor == null) return new NullProgressMonitor(); return monitor; - } + } } |