Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2010-09-08 23:49:38 -0400
committerslewis2010-09-08 23:49:38 -0400
commitf4578881ed036ea6afeafac1e9097b56365164f3 (patch)
tree189693c70e3113523c791e2c61e8a87bad2fbec4
parent8bbfe2fa8f17966a7bcdba3b1faa135246ccd584 (diff)
downloadorg.eclipse.ecf-f4578881ed036ea6afeafac1e9097b56365164f3.tar.gz
org.eclipse.ecf-f4578881ed036ea6afeafac1e9097b56365164f3.tar.xz
org.eclipse.ecf-f4578881ed036ea6afeafac1e9097b56365164f3.zip
Removed references to NLS classes. Removed unnecessary Messages class and messages.properties. Changed version
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/META-INF/MANIFEST.MF9
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java17
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java7
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java5
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java8
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java96
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Messages.java34
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/messages.properties5
8 files changed, 80 insertions, 101 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/META-INF/MANIFEST.MF b/framework/bundles/org.eclipse.ecf.identity/META-INF/MANIFEST.MF
index 57357e85f..f840729f2 100644
--- a/framework/bundles/org.eclipse.ecf.identity/META-INF/MANIFEST.MF
+++ b/framework/bundles/org.eclipse.ecf.identity/META-INF/MANIFEST.MF
@@ -2,18 +2,17 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.identity;singleton:=true
-Bundle-Version: 3.1.0.qualifier
+Bundle-Version: 3.2.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.core.identity.Activator
Bundle-Localization: plugin
Bundle-Vendor: %plugin.provider
Eclipse-LazyStart: true
-Export-Package: org.eclipse.ecf.core.identity;version="3.0.0",
- org.eclipse.ecf.core.util;version="3.0.0",
- org.eclipse.ecf.internal.core.identity;version="3.0.0";x-internal:=true
+Export-Package: org.eclipse.ecf.core.identity;version="3.2.0",
+ org.eclipse.ecf.core.util;version="3.2.0",
+ org.eclipse.ecf.internal.core.identity;version="3.2.0";x-internal:=true
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
J2SE-1.4
Import-Package: org.eclipse.osgi.service.debug;version="1.0.0",
- org.eclipse.osgi.util;version="1.0.0",
org.osgi.framework;version="1.3.0",
org.osgi.service.log;version="1.3.0",
org.osgi.util.tracker;version="1.3.2"
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java
index 53528ea5b..1155ff46c 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java
@@ -10,8 +10,6 @@ package org.eclipse.ecf.core.identity;
import java.security.SecureRandom;
import org.eclipse.ecf.core.util.Base64;
-import org.eclipse.ecf.internal.core.identity.Messages;
-import org.eclipse.osgi.util.NLS;
/**
* Globally unique ID implementation class. Uses
@@ -26,8 +24,7 @@ public class GUID extends StringID {
private static final long serialVersionUID = -8546568877571886386L;
public GUIDNamespace() {
- super(GUID.class.getName(),
- Messages.GUID_GUID_Namespace_Description_Default);
+ super(GUID.class.getName(), "GUID Namespace"); //$NON-NLS-1$
}
public ID createInstance(Object[] args) throws IDCreateException {
@@ -44,8 +41,7 @@ public class GUID extends StringID {
else
return new GUID(this);
} catch (Exception e) {
- throw new IDCreateException(NLS.bind(
- "{0} createInstance()", getName()), e); //$NON-NLS-1$
+ throw new IDCreateException(getName() + " createInstance()", e); //$NON-NLS-1$
}
}
@@ -91,8 +87,8 @@ public class GUID extends StringID {
try {
getRandom(algo, provider);
} catch (Exception e) {
- throw new IDCreateException(Messages.GUID_GUID_Creation_Failure
- + e.getMessage());
+ throw new IDCreateException(
+ "GUID creation failure: " + e.getMessage()); //$NON-NLS-1$
}
// make sure we have reasonable byteLength
if (byteLength <= 0)
@@ -143,10 +139,9 @@ public class GUID extends StringID {
if (provider == null) {
if (algo == null) {
try {
- random = SecureRandom
- .getInstance(Messages.GUID_IBM_SECURE_RANDOM);
+ random = SecureRandom.getInstance("IBMSECURERANDOM"); //$NON-NLS-1$
} catch (Exception e) {
- random = SecureRandom.getInstance(Messages.GUID_SHA1);
+ random = SecureRandom.getInstance("SHA1PRNG"); //$NON-NLS-1$
}
} else
random = SecureRandom.getInstance(algo);
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java
index 68e67ec78..8dafbbe36 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java
@@ -15,7 +15,6 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.ecf.core.util.Trace;
import org.eclipse.ecf.internal.core.identity.Activator;
import org.eclipse.ecf.internal.core.identity.IdentityDebugOptions;
-import org.eclipse.osgi.util.NLS;
/**
* A factory class for creating ID instances. This is the factory for plugins to
@@ -260,7 +259,7 @@ public class IDFactory implements IIDFactory {
// throw...we don't create any instances that we don't know about!
Namespace ns = getNamespace0(n);
if (ns == null)
- logAndThrow(NLS.bind("Namespace {0} not found", n.getName()), null); //$NON-NLS-1$
+ logAndThrow("Namespace " + n.getName() + " not found", null); //$NON-NLS-1$
// We're OK, go ahead and setup array of classes for call to
// instantiator
// Ask instantiator to actually create instance
@@ -281,8 +280,8 @@ public class IDFactory implements IIDFactory {
throws IDCreateException {
Namespace n = getNamespaceByName(namespaceName);
if (n == null)
- throw new IDCreateException(NLS.bind(
- "Namespace {0} not found", namespaceName)); //$NON-NLS-1$
+ throw new IDCreateException(
+ "Namespace " + namespaceName + " not found"); //$NON-NLS-1$
return createID(n, args);
}
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java
index fdd13ce2e..fabb7b487 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java
@@ -8,8 +8,6 @@
******************************************************************************/
package org.eclipse.ecf.core.identity;
-import org.eclipse.osgi.util.NLS;
-
/**
* A unique ID class based upon Long/long
*
@@ -40,8 +38,7 @@ public class LongID extends BaseID {
return new LongID(this, Long.decode(init));
return new LongID(this, (Long) args[0]);
} catch (Exception e) {
- throw new IDCreateException(NLS.bind(
- "{0} createInstance()", getName()), e); //$NON-NLS-1$
+ throw new IDCreateException(getName() + " createInstance()", e); //$NON-NLS-1$
}
}
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java
index 2b00e877e..eb508dde3 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java
@@ -8,8 +8,6 @@
******************************************************************************/
package org.eclipse.ecf.core.identity;
-import org.eclipse.osgi.util.NLS;
-
/**
* A string-based identity
*
@@ -35,10 +33,8 @@ public class StringID extends BaseID {
return new StringID(this, init);
return new StringID(this, (String) parameters[0]);
} catch (Exception e) {
- throw new IDCreateException(
- NLS
- .bind(
- "{0} createInstance()", StringIDNamespace.this.getName()), e); //$NON-NLS-1$
+ throw new IDCreateException(StringIDNamespace.this.getName()
+ + " createInstance()", e); //$NON-NLS-1$
}
}
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java
index d71635e41..2692b7257 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java
@@ -11,7 +11,6 @@ package org.eclipse.ecf.core.util;
import java.text.SimpleDateFormat;
import java.util.*;
import org.eclipse.ecf.internal.core.identity.Activator;
-import org.eclipse.ecf.internal.core.identity.Messages;
import org.eclipse.osgi.service.debug.DebugOptions;
/**
@@ -129,7 +128,8 @@ public class Trace {
*
* @return Whether tracing is enabled for the plug-in.
* @param pluginId
- * The symbolic plugin id for which to determine trace enablement.
+ * The symbolic plugin id for which to determine trace
+ * enablement.
*
*/
protected static boolean shouldTrace(String pluginId) {
@@ -242,7 +242,8 @@ public class Trace {
*/
protected static void trace(String message) {
StringBuffer buf = new StringBuffer(PARENTHESIS_OPEN);
- buf.append(TRACE_STR).append(PARENTHESIS_CLOSE).append(getTimeString()).append(message).append(SEPARATOR_SPACE);
+ buf.append(TRACE_STR).append(PARENTHESIS_CLOSE).append(getTimeString())
+ .append(message).append(SEPARATOR_SPACE);
System.out.println(buf.toString());
}
@@ -253,7 +254,7 @@ public class Trace {
*/
protected static String getTimeString() {
Date d = new Date();
- SimpleDateFormat df = new SimpleDateFormat(Messages.Trace_Date_Time_Format);
+ SimpleDateFormat df = new SimpleDateFormat("[MM/dd/yy;HH:mm:ss:SSS]"); //$NON-NLS-1$
return df.format(d);
}
@@ -304,11 +305,14 @@ public class Trace {
* The message to be traced.
*
*/
- public static void trace(String pluginId, String option, Class clazz, String methodName, String message) {
+ public static void trace(String pluginId, String option, Class clazz,
+ String methodName, String message) {
if (shouldTrace(pluginId, option)) {
- StringBuffer buf = new StringBuffer(PREFIX_TRACING).append(clazz.getName());
+ StringBuffer buf = new StringBuffer(PREFIX_TRACING).append(clazz
+ .getName());
buf.append(SEPARATOR_METHOD).append(methodName);
- buf.append(PARENTHESIS_OPEN).append(message).append(PARENTHESIS_CLOSE);
+ buf.append(PARENTHESIS_OPEN).append(message)
+ .append(PARENTHESIS_CLOSE);
trace(buf.toString());
}
}
@@ -327,12 +331,16 @@ public class Trace {
* @param newValue
* The new value.
*/
- public static void changing(String pluginId, String option, String valueDescription, Object oldValue, Object newValue) {
+ public static void changing(String pluginId, String option,
+ String valueDescription, Object oldValue, Object newValue) {
if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_CHANGING);
- buf.append(valueDescription).append(SEPARATOR_SPACE).append(LABEL_OLD_VALUE).append(getArgumentString(oldValue));
- buf.append(SEPARATOR_PARAMETER).append(LABEL_NEW_VALUE).append(getArgumentString(newValue));
+ buf.append(valueDescription).append(SEPARATOR_SPACE)
+ .append(LABEL_OLD_VALUE)
+ .append(getArgumentString(oldValue));
+ buf.append(SEPARATOR_PARAMETER).append(LABEL_NEW_VALUE)
+ .append(getArgumentString(newValue));
trace(buf.toString());
}
}
@@ -354,12 +362,18 @@ public class Trace {
* @param newValue
* The new value.
*/
- public static void changing(String pluginId, String option, Class clazz, String methodName, String valueDescription, Object oldValue, Object newValue) {
+ public static void changing(String pluginId, String option, Class clazz,
+ String methodName, String valueDescription, Object oldValue,
+ Object newValue) {
if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_CHANGING);
- buf.append(valueDescription).append(SEPARATOR_SPACE).append(LABEL_OLD_VALUE).append(getArgumentString(oldValue));
- buf.append(SEPARATOR_PARAMETER).append(LABEL_NEW_VALUE).append(getArgumentString(newValue));
- buf.append(SEPARATOR_SPACE).append(PARENTHESIS_OPEN).append(clazz.getName()).append(SEPARATOR_METHOD);
+ buf.append(valueDescription).append(SEPARATOR_SPACE)
+ .append(LABEL_OLD_VALUE)
+ .append(getArgumentString(oldValue));
+ buf.append(SEPARATOR_PARAMETER).append(LABEL_NEW_VALUE)
+ .append(getArgumentString(newValue));
+ buf.append(SEPARATOR_SPACE).append(PARENTHESIS_OPEN)
+ .append(clazz.getName()).append(SEPARATOR_METHOD);
buf.append(methodName).append(PARENTHESIS_CLOSE);
trace(buf.toString());
}
@@ -381,12 +395,14 @@ public class Trace {
* The throwable that is being caught.
*
*/
- public static void catching(String pluginId, String option, Class clazz, String methodName, Throwable throwable) {
+ public static void catching(String pluginId, String option, Class clazz,
+ String methodName, Throwable throwable) {
if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_CATCHING);
buf.append(throwable.getMessage()).append(SEPARATOR_SPACE);
- buf.append(PARENTHESIS_OPEN).append(clazz.getName()).append(SEPARATOR_METHOD);
+ buf.append(PARENTHESIS_OPEN).append(clazz.getName())
+ .append(SEPARATOR_METHOD);
buf.append(methodName).append(PARENTHESIS_CLOSE);
trace(buf.toString());
throwable.printStackTrace(System.err);
@@ -410,12 +426,14 @@ public class Trace {
* The throwable that is being thrown.
*
*/
- public static void throwing(String pluginId, String option, Class clazz, String methodName, Throwable throwable) {
+ public static void throwing(String pluginId, String option, Class clazz,
+ String methodName, Throwable throwable) {
if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_THROWING);
buf.append(throwable.getMessage()).append(SEPARATOR_SPACE);
- buf.append(PARENTHESIS_OPEN).append(clazz.getName()).append(SEPARATOR_METHOD);
+ buf.append(PARENTHESIS_OPEN).append(clazz.getName())
+ .append(SEPARATOR_METHOD);
buf.append(methodName).append(PARENTHESIS_CLOSE);
trace(buf.toString());
throwable.printStackTrace(System.err);
@@ -435,11 +453,14 @@ public class Trace {
* The name of method that is being entered.
*
*/
- public static void entering(String pluginId, String option, Class clazz, String methodName) {
+ public static void entering(String pluginId, String option, Class clazz,
+ String methodName) {
if (shouldTrace(pluginId, option)) {
- StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz.getName());
- buf.append(SEPARATOR_METHOD).append(methodName).append(PARENTHESIS_OPEN).append(PARENTHESIS_CLOSE);
+ StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz
+ .getName());
+ buf.append(SEPARATOR_METHOD).append(methodName)
+ .append(PARENTHESIS_OPEN).append(PARENTHESIS_CLOSE);
trace(buf.toString());
}
}
@@ -460,12 +481,15 @@ public class Trace {
* The parameter to the method being entered.
*
*/
- public static void entering(String pluginId, String option, Class clazz, String methodName, Object parameter) {
+ public static void entering(String pluginId, String option, Class clazz,
+ String methodName, Object parameter) {
if (shouldTrace(pluginId, option)) {
- StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz.getName());
+ StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz
+ .getName());
buf.append(SEPARATOR_METHOD).append(methodName);
- buf.append(PARENTHESIS_OPEN).append(getArgumentString(parameter)).append(PARENTHESIS_CLOSE);
+ buf.append(PARENTHESIS_OPEN).append(getArgumentString(parameter))
+ .append(PARENTHESIS_CLOSE);
trace(buf.toString());
}
@@ -487,12 +511,15 @@ public class Trace {
* The parameters to the method being entered.
*
*/
- public static void entering(String pluginId, String option, Class clazz, String methodName, Object[] parameters) {
+ public static void entering(String pluginId, String option, Class clazz,
+ String methodName, Object[] parameters) {
if (shouldTrace(pluginId, option)) {
- StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz.getName());
+ StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz
+ .getName());
buf.append(SEPARATOR_METHOD).append(methodName);
- buf.append(PARENTHESIS_OPEN).append(getArgumentString(parameters)).append(PARENTHESIS_CLOSE);
+ buf.append(PARENTHESIS_OPEN).append(getArgumentString(parameters))
+ .append(PARENTHESIS_CLOSE);
trace(buf.toString());
}
@@ -511,10 +538,12 @@ public class Trace {
* The name of method that is being exited.
*
*/
- public static void exiting(String pluginId, String option, Class clazz, String methodName) {
+ public static void exiting(String pluginId, String option, Class clazz,
+ String methodName) {
if (shouldTrace(pluginId, option)) {
- StringBuffer buf = new StringBuffer(PREFIX_EXITING).append(clazz.getName());
+ StringBuffer buf = new StringBuffer(PREFIX_EXITING).append(clazz
+ .getName());
buf.append(SEPARATOR_METHOD).append(methodName);
trace(buf.toString());
}
@@ -536,12 +565,15 @@ public class Trace {
* The return value of the method being exited.
*
*/
- public static void exiting(String pluginId, String option, Class clazz, String methodName, Object returnValue) {
+ public static void exiting(String pluginId, String option, Class clazz,
+ String methodName, Object returnValue) {
if (shouldTrace(pluginId, option)) {
- StringBuffer buf = new StringBuffer(PREFIX_EXITING).append(clazz.getName());
+ StringBuffer buf = new StringBuffer(PREFIX_EXITING).append(clazz
+ .getName());
buf.append(SEPARATOR_METHOD).append(methodName);
- buf.append(PARENTHESIS_OPEN).append(getArgumentString(returnValue)).append(PARENTHESIS_CLOSE);
+ buf.append(PARENTHESIS_OPEN).append(getArgumentString(returnValue))
+ .append(PARENTHESIS_CLOSE);
trace(buf.toString());
}
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Messages.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Messages.java
deleted file mode 100644
index bf3a8b2e5..000000000
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Messages.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.internal.core.identity;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.core.identity.messages"; //$NON-NLS-1$
- public static String GUID_GUID_Creation_Failure;
- public static String GUID_GUID_Namespace_Description_Default;
- public static String GUID_IBM_SECURE_RANDOM;
- public static String GUID_SHA1;
- public static String Trace_Date_Time_Format;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // private null constructor
- }
-}
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/messages.properties b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/messages.properties
deleted file mode 100644
index aed6ada9f..000000000
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/messages.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-GUID_GUID_Namespace_Description_Default=GUID Namespace
-GUID_IBM_SECURE_RANDOM=IBMSECURERANDOM
-GUID_SHA1=SHA1PRNG
-Trace_Date_Time_Format=[MM/dd/yy;HH:mm:ss:SSS]
-GUID_GUID_Creation_Failure=GUID creation failure:

Back to the top