diff options
13 files changed, 50 insertions, 49 deletions
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/AbstractOMBundle.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/AbstractOMBundle.java index 36b3ac8126..9d175efd30 100644 --- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/AbstractOMBundle.java +++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/AbstractOMBundle.java @@ -95,7 +95,7 @@ public abstract class AbstractOMBundle implements OMBundle { if (!debuggingInitialized) { - debugging = getDebugOption("debug", false); + debugging = getDebugOption("debug", false); //$NON-NLS-1$ debuggingInitialized = true; } @@ -175,7 +175,7 @@ public abstract class AbstractOMBundle implements OMBundle public InputStream getInputStream(String path) throws IOException { - URL url = new URL(getBaseURL().toString() + ".options"); + URL url = new URL(getBaseURL().toString() + ".options"); //$NON-NLS-1$ return url.openStream(); } @@ -204,7 +204,7 @@ public abstract class AbstractOMBundle implements OMBundle { try { - bundle = resourceBundle = ResourceBundle.getBundle(packageName + ".plugin"); + bundle = resourceBundle = ResourceBundle.getBundle(packageName + ".plugin"); //$NON-NLS-1$ } catch (MissingResourceException exception) { @@ -214,7 +214,7 @@ public abstract class AbstractOMBundle implements OMBundle InputStream inputStream = null; try { - inputStream = getInputStream("plugin.properties"); + inputStream = getInputStream("plugin.properties"); //$NON-NLS-1$ bundle = new PropertyResourceBundle(inputStream); untranslatedResourceBundle = resourceBundle = bundle; inputStream.close(); @@ -238,13 +238,13 @@ public abstract class AbstractOMBundle implements OMBundle InputStream inputStream = null; try { - inputStream = getInputStream("plugin.properties"); + inputStream = getInputStream("plugin.properties"); //$NON-NLS-1$ bundle = untranslatedResourceBundle = new PropertyResourceBundle(inputStream); inputStream.close(); } catch (IOException ioException) { - throw new MissingResourceException("Missing resource: plugin.properties", accessor + throw new MissingResourceException("Missing resource: plugin.properties", accessor //$NON-NLS-1$ .getName(), key); } finally diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/LegacyBundle.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/LegacyBundle.java index 9ec1dc39e5..4cc32b2332 100644 --- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/LegacyBundle.java +++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/LegacyBundle.java @@ -56,10 +56,10 @@ public class LegacyBundle extends AbstractOMBundle try { - final String prefix = getBundleID() + "/"; + final String prefix = getBundleID() + "/"; //$NON-NLS-1$ final int length = prefix.length(); - inputStream = getInputStream(".options"); + inputStream = getInputStream(".options"); //$NON-NLS-1$ properties.load(inputStream); for (Entry<Object, Object> entry : properties.entrySet()) @@ -111,7 +111,7 @@ public class LegacyBundle extends AbstractOMBundle // file:/D:/sandbox/unpackage1-3.1M7/eclipse/plugins/org.eclipse.emf.common/bin/org/eclipse/emf/common/CommonPlugin.class String className = accessor.getName(); - URL url = accessor.getResource(ReflectUtil.getSimpleName(accessor) + ".class"); + URL url = accessor.getResource(ReflectUtil.getSimpleName(accessor) + ".class"); //$NON-NLS-1$ int segmentsToTrim = 1 + StringUtil.occurrences(className, '.'); url = trimSegments(url, segmentsToTrim); @@ -123,7 +123,7 @@ public class LegacyBundle extends AbstractOMBundle { // If we can open an input stream, then the plugin.properties is there, // and we have a good base URL. - InputStream inputStream = new URL(url.toString() + "plugin.properties").openStream(); + InputStream inputStream = new URL(url.toString() + "plugin.properties").openStream(); //$NON-NLS-1$ inputStream.close(); baseURL = url; } @@ -142,7 +142,7 @@ public class LegacyBundle extends AbstractOMBundle { // Trim off the "bin" or "runtime" segment. String lastSegment = lastSegment(url); - if ("bin".equals(lastSegment) || "runtime".equals(lastSegment)) + if ("bin".equals(lastSegment) || "runtime".equals(lastSegment)) //$NON-NLS-1$ //$NON-NLS-2$ { url = trimSegments(url, 1); } @@ -151,7 +151,7 @@ public class LegacyBundle extends AbstractOMBundle { // If we can open an input stream, then the plugin.properties is in the // folder, and we have a good base URL. - InputStream inputStream = new URL(url.toString() + "plugin.properties").openStream(); + InputStream inputStream = new URL(url.toString() + "plugin.properties").openStream(); //$NON-NLS-1$ inputStream.close(); baseURL = url; } @@ -164,16 +164,16 @@ public class LegacyBundle extends AbstractOMBundle if (baseURL == null) { String resourceName = ReflectUtil.getPackageName(className).replace('.', '/') - + "/plugin.properties"; - throw new MissingResourceException("Missing properties: " + resourceName, accessor.getName(), - "plugin.properties"); + + "/plugin.properties"; //$NON-NLS-1$ + throw new MissingResourceException("Missing properties: " + resourceName, accessor.getName(), //$NON-NLS-1$ + "plugin.properties"); //$NON-NLS-1$ } } private static String lastSegment(URL url) { String path = url.getPath(); - if (path.endsWith("/")) + if (path.endsWith("/")) //$NON-NLS-1$ { path = path.substring(0, path.length() - 1); } @@ -185,7 +185,7 @@ public class LegacyBundle extends AbstractOMBundle private static URL trimSegments(URL url, int count) throws MalformedURLException { String path = url.getPath(); - if (path.endsWith("/")) + if (path.endsWith("/")) //$NON-NLS-1$ { ++count; } @@ -202,7 +202,7 @@ public class LegacyBundle extends AbstractOMBundle path = path.substring(0, pos); } - return new URL(url.getProtocol() + ":" + path + "/"); + return new URL(url.getProtocol() + ":" + path + "/"); //$NON-NLS-1$ //$NON-NLS-2$ } /** @@ -212,6 +212,6 @@ public class LegacyBundle extends AbstractOMBundle */ private static boolean isArchiveProtocol(String scheme) { - return "jar".equalsIgnoreCase(scheme); + return "jar".equalsIgnoreCase(scheme); //$NON-NLS-1$ } } diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/LegacyPlatform.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/LegacyPlatform.java index 396020e828..09776689f5 100644 --- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/LegacyPlatform.java +++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/LegacyPlatform.java @@ -36,12 +36,12 @@ public class LegacyPlatform extends AbstractOMPlatform @Override protected String getDebugOption(String bundleID, String option) { - return debugOptions.get(bundleID + "/" + option); + return debugOptions.get(bundleID + "/" + option); //$NON-NLS-1$ } @Override protected void setDebugOption(String bundleID, String option, String value) { - debugOptions.put(bundleID + "/" + option, value); + debugOptions.put(bundleID + "/" + option, value); //$NON-NLS-1$ } } diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/Net4j.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/Net4j.java index cc37b56fe4..1131a9cd5b 100644 --- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/Net4j.java +++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/Net4j.java @@ -20,26 +20,27 @@ import org.eclipse.net4j.util.om.OMTracer; */ public final class Net4j { - public static final OMBundle BUNDLE = OMPlatform.INSTANCE - .bundle("org.eclipse.net4j", Net4j.class); + public static final String BUNDLE_ID = "org.eclipse.net4j"; //$NON-NLS-1$ - public static final OMTracer DEBUG = BUNDLE.tracer("debug"); + public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, Net4j.class); - public static final OMTracer DEBUG_LIFECYCLE = DEBUG.tracer("lifecycle"); + public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$ - public static final OMTracer DEBUG_LIFECYCLE_DUMP = DEBUG_LIFECYCLE.tracer("dump"); + public static final OMTracer DEBUG_LIFECYCLE = DEBUG.tracer("lifecycle"); //$NON-NLS-1$ - public static final OMTracer DEBUG_BUFFER = DEBUG.tracer("buffer"); + public static final OMTracer DEBUG_LIFECYCLE_DUMP = DEBUG_LIFECYCLE.tracer("dump"); //$NON-NLS-1$ - public static final OMTracer DEBUG_CHANNEL = DEBUG.tracer("channel"); + public static final OMTracer DEBUG_BUFFER = DEBUG.tracer("buffer"); //$NON-NLS-1$ - public static final OMTracer DEBUG_SELECTOR = DEBUG.tracer("selector"); + public static final OMTracer DEBUG_CHANNEL = DEBUG.tracer("channel"); //$NON-NLS-1$ - public static final OMTracer DEBUG_ACCEPTOR = DEBUG.tracer("acceptor"); + public static final OMTracer DEBUG_SELECTOR = DEBUG.tracer("selector"); //$NON-NLS-1$ - public static final OMTracer DEBUG_CONNECTOR = DEBUG.tracer("connector"); + public static final OMTracer DEBUG_ACCEPTOR = DEBUG.tracer("acceptor"); //$NON-NLS-1$ - public static final OMTracer PERF = BUNDLE.tracer("perf"); + public static final OMTracer DEBUG_CONNECTOR = DEBUG.tracer("connector"); //$NON-NLS-1$ + + public static final OMTracer PERF = BUNDLE.tracer("perf"); //$NON-NLS-1$ public static final OMLogger LOG = BUNDLE.logger(); diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OMTracerImpl.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OMTracerImpl.java index 5b454d1f49..6cb3e0a678 100644 --- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OMTracerImpl.java +++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OMTracerImpl.java @@ -40,7 +40,7 @@ public class OMTracerImpl implements OMTracer this.bundle = (OMBundle)parent.getBundle(); this.parent = parent; this.name = name; - fullName = parent.getFullName() + "." + name; + fullName = parent.getFullName() + "." + name; //$NON-NLS-1$ } public OMBundle getBundle() diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OSGiBundle.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OSGiBundle.java index 934a842998..971a972955 100644 --- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OSGiBundle.java +++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OSGiBundle.java @@ -37,7 +37,7 @@ public class OSGiBundle extends AbstractOMBundle { try { - URL entry = getBundleContext().getBundle().getEntry("."); + URL entry = getBundleContext().getBundle().getEntry("."); //$NON-NLS-1$ return FileLocator.resolve(entry); } catch (IOException ex) diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OSGiPlatform.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OSGiPlatform.java index 1762caf922..a877305414 100644 --- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OSGiPlatform.java +++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OSGiPlatform.java @@ -40,7 +40,7 @@ public class OSGiPlatform extends AbstractOMPlatform try { DebugOptions debugOptions = getDebugOptions(); - return debugOptions.getOption(bundleID + "/" + option); + return debugOptions.getOption(bundleID + "/" + option); //$NON-NLS-1$ } catch (Exception ex) { @@ -53,7 +53,7 @@ public class OSGiPlatform extends AbstractOMPlatform try { DebugOptions debugOptions = getDebugOptions(); - debugOptions.setOption(bundleID + "/" + option, value); + debugOptions.setOption(bundleID + "/" + option, value); //$NON-NLS-1$ } catch (Exception ex) { diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java index 726d537ffa..5c88ad407d 100644 --- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java +++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java @@ -551,12 +551,12 @@ public abstract class AbstractConnector extends AbstractLifecycle implements Con if (protocolFactoryRegistry == null) { - Net4j.LOG.info("No protocol factory registry for " + this); + Net4j.LOG.info("No protocol factory registry for " + this); //$NON-NLS-1$ } if (receiveExecutor == null) { - Net4j.LOG.info("No receive executor for " + this); + Net4j.LOG.info("No receive executor for " + this); //$NON-NLS-1$ } } diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPAcceptorImpl.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPAcceptorImpl.java index ed11bff9d7..d7c11c3901 100644 --- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPAcceptorImpl.java +++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPAcceptorImpl.java @@ -249,7 +249,7 @@ public class TCPAcceptorImpl extends AbstractLifecycle implements TCPAcceptor, B if (TRACER.isEnabled()) { - TRACER.trace(toString() + ": Accepted connector " + connector); + TRACER.trace(toString() + ": Accepted connector " + connector); //$NON-NLS-1$ } fireConnectorAccepted(connector); diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/EclipseLoggingBridge.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/EclipseLoggingBridge.java index f9afc43815..fca5e03b93 100644 --- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/EclipseLoggingBridge.java +++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/EclipseLoggingBridge.java @@ -56,7 +56,7 @@ public class EclipseLoggingBridge implements OMLogHandler case DEBUG: return IStatus.OK; default: - throw new IllegalArgumentException("Illegal log level: " + level); + throw new IllegalArgumentException("Illegal log level: " + level); //$NON-NLS-1$ } } } diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OSGiLoggingBridge.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OSGiLoggingBridge.java index bc6a4d533d..1bbe255d03 100644 --- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OSGiLoggingBridge.java +++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OSGiLoggingBridge.java @@ -59,7 +59,7 @@ public class OSGiLoggingBridge implements OMLogHandler } catch (RuntimeException ex) { - throw new IllegalStateException("Log service not found", ex); + throw new IllegalStateException("Log service not found", ex); //$NON-NLS-1$ } } @@ -76,7 +76,7 @@ public class OSGiLoggingBridge implements OMLogHandler case DEBUG: return LogService.LOG_DEBUG; default: - throw new IllegalArgumentException("Illegal log level: " + level); + throw new IllegalArgumentException("Illegal log level: " + level); //$NON-NLS-1$ } } } diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamLogHandler.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamLogHandler.java index ba2eba2860..15e11e9e64 100644 --- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamLogHandler.java +++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamLogHandler.java @@ -39,7 +39,7 @@ public class PrintStreamLogHandler implements OMLogHandler public void logged(OMLogger logger, Level level, String msg, Throwable t) { PrintStream stream = level == Level.ERROR ? err : out; - stream.println((toString(level) + " ") + msg); + stream.println((toString(level) + " ") + msg); //$NON-NLS-1$ if (t != null) { t.printStackTrace(stream); @@ -51,15 +51,15 @@ public class PrintStreamLogHandler implements OMLogHandler switch (level) { case ERROR: - return "[ERROR]"; + return "[ERROR]"; //$NON-NLS-1$ case WARN: - return "[WARN]"; + return "[WARN]"; //$NON-NLS-1$ case INFO: - return "[INFO]"; + return "[INFO]"; //$NON-NLS-1$ case DEBUG: - return "[DEBUG]"; + return "[DEBUG]"; //$NON-NLS-1$ default: - throw new IllegalArgumentException("Illegal log level: " + level); + throw new IllegalArgumentException("Illegal log level: " + level); //$NON-NLS-1$ } } } diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamTraceHandler.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamTraceHandler.java index fe2adee18d..362e23486f 100644 --- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamTraceHandler.java +++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamTraceHandler.java @@ -33,7 +33,7 @@ public class PrintStreamTraceHandler implements OMTraceHandler public void traced(OMTracer tracer, Class context, String msg, Throwable t) { - stream.println("[TRACE] " + msg); + stream.println("[TRACE] " + msg); //$NON-NLS-1$ if (t != null) { t.printStackTrace(stream); |