Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Roldan Betancort2009-05-20 18:12:47 +0000
committerVictor Roldan Betancort2009-05-20 18:12:47 +0000
commite87578beb3393762ec4175a6ec8eb1a1aab9ee17 (patch)
tree4f55f0df32833b47483bd835b8e82958418a884b
parent0a979565f2cce67cf15709444f0a93e189a5194b (diff)
downloadcdo-e87578beb3393762ec4175a6ec8eb1a1aab9ee17.tar.gz
cdo-e87578beb3393762ec4175a6ec8eb1a1aab9ee17.tar.xz
cdo-e87578beb3393762ec4175a6ec8eb1a1aab9ee17.zip
[272193] [UI] Externalize Strings (Net4j)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=272193
-rw-r--r--plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/DerbyAdapter.java52
-rw-r--r--plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/EmbeddedDerbyAdapter.java2
-rw-r--r--plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBAdapter.java16
-rw-r--r--plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBDataSource.java2
-rw-r--r--plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java66
-rw-r--r--plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java30
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java34
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AllTests.java2
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java6
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java4
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/TestSchema.java104
-rw-r--r--plugins/org.eclipse.net4j.db/plugin.properties2
-rw-r--r--plugins/org.eclipse.net4j.db/plugin.xml2
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java16
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java40
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/bundle/OM.java8
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBField.java12
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java2
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBTable.java12
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/dml/DBStatement.java2
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java112
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBSchema.java8
-rw-r--r--plugins/org.eclipse.net4j.debug/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.net4j.debug/plugin.properties3
-rw-r--r--plugins/org.eclipse.net4j.debug/plugin.xml4
-rw-r--r--plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/messages/Messages.java40
-rw-r--r--plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/messages/messages.properties12
-rw-r--r--plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/views/RemoteTraceView.java19
-rw-r--r--plugins/org.eclipse.net4j.http.common/src/org/eclipse/net4j/http/internal/common/HTTPConnector.java11
-rw-r--r--plugins/org.eclipse.net4j.http.common/src/org/eclipse/net4j/http/internal/common/messages/Messages.java41
-rw-r--r--plugins/org.eclipse.net4j.http.common/src/org/eclipse/net4j/http/internal/common/messages/messages.properties11
-rw-r--r--plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPAcceptor.java19
-rw-r--r--plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPAcceptorFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPServerConnector.java2
-rw-r--r--plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/Net4jTransportServlet.java35
-rw-r--r--plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/RandomizerInjector.java2
-rw-r--r--plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/messages/Messages.java40
-rw-r--r--plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/messages/messages.properties3
-rw-r--r--plugins/org.eclipse.net4j.http.tests/src/org/eclipse/net4j/http/tests/HTTPTest.java12
-rw-r--r--plugins/org.eclipse.net4j.http.tests/src/org/eclipse/net4j/http/tests/Net4jEchoTestServlet.java2
-rw-r--r--plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPClientConnector.java2
-rw-r--r--plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPConnectorFactory.java4
-rw-r--r--plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptorFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMClientConnector.java2
-rw-r--r--plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnector.java9
-rw-r--r--plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnectorFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/messages/Messages.java40
-rw-r--r--plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/messages/messages.properties1
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ControlChannel.java13
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/SelectorUtil.java2
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java6
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptorFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPClientConnector.java4
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java13
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnectorFactory.java8
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java14
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelectorFactory.java4
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/messages/Messages.java40
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/messages/messages.properties3
59 files changed, 604 insertions, 360 deletions
diff --git a/plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/DerbyAdapter.java b/plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/DerbyAdapter.java
index 3f7a530a30..698a02343f 100644
--- a/plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/DerbyAdapter.java
+++ b/plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/DerbyAdapter.java
@@ -22,28 +22,28 @@ import java.util.StringTokenizer;
*/
public abstract class DerbyAdapter extends DBAdapter
{
- public static final String VERSION = "10.3.2.1";
-
- private static final String[] RESERVED_WORDS = { "ADD", "ALL", "ALLOCATE", "ALTER", "AND", "ANY", "ARE", "AS", "ASC",
- "ASSERTION", "AT", "AUTHORIZATION", "AVG", "BEGIN", "BETWEEN", "BIGINT", "BIT", "BOOLEAN", "BOTH", "BY", "CALL",
- "CASCADE", "CASCADED", "CASE", "CAST", "CHAR", "CHARACTER", "CHECK", "CLOSE", "COALESCE", "COLLATE", "COLLATION",
- "COLUMN", "COMMIT", "CONNECT", "CONNECTION", "CONSTRAINT", "CONSTRAINTS", "CONTINUE", "CONVERT", "CORRESPONDING",
- "CREATE", "CURRENT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "CURSOR", "DEALLOCATE",
- "DEC", "DECIMAL", "DECLARE", "DEFAULT", "DEFERRABLE", "DEFERRED", "DELETE", "DESC", "DESCRIBE", "DIAGNOSTICS",
- "DISCONNECT", "DISTINCT", "DOUBLE", "DROP", "ELSE", "END", "END-EXEC", "ESCAPE", "EXCEPT", "EXCEPTION", "EXEC",
- "EXECUTE", "EXISTS", "EXPLAIN", "EXTERNAL", "FALSE", "FETCH", "FIRST", "FLOAT", "FOR", "FOREIGN", "FOUND",
- "FROM", "FULL", "FUNCTION", "GET", "GETCURRENTCONNECTION", "GLOBAL", "GO", "GOTO", "GRANT", "GROUP", "HAVING",
- "HOUR", "IDENTITY", "IMMEDIATE", "IN", "INDICATOR", "INITIALLY", "INNER", "INOUT", "INPUT", "INSENSITIVE",
- "INSERT", "INT", "INTEGER", "INTERSECT", "INTO", "IS", "ISOLATION", "JOIN", "KEY", "LAST", "LEFT", "LIKE",
- "LOWER", "LTRIM", "MATCH", "MAX", "MIN", "MINUTE", "NATIONAL", "NATURAL", "NCHAR", "NVARCHAR", "NEXT", "NO",
- "NOT", "NULL", "NULLIF", "NUMERIC", "OF", "ON", "ONLY", "OPEN", "OPTION", "OR", "ORDER", "OUTER", "OUTPUT",
- "OVERLAPS", "PAD", "PARTIAL", "PREPARE", "PRESERVE", "PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURE", "PUBLIC",
- "READ", "REAL", "REFERENCES", "RELATIVE", "RESTRICT", "REVOKE", "RIGHT", "ROLLBACK", "ROWS", "RTRIM", "SCHEMA",
- "SCROLL", "SECOND", "SELECT", "SESSION_USER", "SET", "SMALLINT", "SOME", "SPACE", "SQL", "SQLCODE", "SQLERROR",
- "SQLSTATE", "SUBSTR", "SUBSTRING", "SUM", "SYSTEM_USER", "TABLE", "TEMPORARY", "TIMEZONE_HOUR",
- "TIMEZONE_MINUTE", "TO", "TRANSACTION", "TRANSLATE", "TRANSLATION", "TRIM", "TRUE", "UNION", "UNIQUE", "UNKNOWN",
- "UPDATE", "UPPER", "USER", "USING", "VALUES", "VARCHAR", "VARYING", "VIEW", "WHENEVER", "WHERE", "WITH", "WORK",
- "WRITE", "XML", "XMLEXISTS", "XMLPARSE", "XMLQUERY", "XMLSERIALIZE", "YEAR" };
+ public static final String VERSION = "10.3.2.1"; //$NON-NLS-1$
+
+ private static final String[] RESERVED_WORDS = { "ADD", "ALL", "ALLOCATE", "ALTER", "AND", "ANY", "ARE", "AS", "ASC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "ASSERTION", "AT", "AUTHORIZATION", "AVG", "BEGIN", "BETWEEN", "BIGINT", "BIT", "BOOLEAN", "BOTH", "BY", "CALL", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "CASCADE", "CASCADED", "CASE", "CAST", "CHAR", "CHARACTER", "CHECK", "CLOSE", "COALESCE", "COLLATE", "COLLATION", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "COLUMN", "COMMIT", "CONNECT", "CONNECTION", "CONSTRAINT", "CONSTRAINTS", "CONTINUE", "CONVERT", "CORRESPONDING", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "CREATE", "CURRENT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "CURSOR", "DEALLOCATE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "DEC", "DECIMAL", "DECLARE", "DEFAULT", "DEFERRABLE", "DEFERRED", "DELETE", "DESC", "DESCRIBE", "DIAGNOSTICS", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "DISCONNECT", "DISTINCT", "DOUBLE", "DROP", "ELSE", "END", "END-EXEC", "ESCAPE", "EXCEPT", "EXCEPTION", "EXEC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "EXECUTE", "EXISTS", "EXPLAIN", "EXTERNAL", "FALSE", "FETCH", "FIRST", "FLOAT", "FOR", "FOREIGN", "FOUND", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "FROM", "FULL", "FUNCTION", "GET", "GETCURRENTCONNECTION", "GLOBAL", "GO", "GOTO", "GRANT", "GROUP", "HAVING", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "HOUR", "IDENTITY", "IMMEDIATE", "IN", "INDICATOR", "INITIALLY", "INNER", "INOUT", "INPUT", "INSENSITIVE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "INSERT", "INT", "INTEGER", "INTERSECT", "INTO", "IS", "ISOLATION", "JOIN", "KEY", "LAST", "LEFT", "LIKE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "LOWER", "LTRIM", "MATCH", "MAX", "MIN", "MINUTE", "NATIONAL", "NATURAL", "NCHAR", "NVARCHAR", "NEXT", "NO", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "NOT", "NULL", "NULLIF", "NUMERIC", "OF", "ON", "ONLY", "OPEN", "OPTION", "OR", "ORDER", "OUTER", "OUTPUT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$
+ "OVERLAPS", "PAD", "PARTIAL", "PREPARE", "PRESERVE", "PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURE", "PUBLIC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "READ", "REAL", "REFERENCES", "RELATIVE", "RESTRICT", "REVOKE", "RIGHT", "ROLLBACK", "ROWS", "RTRIM", "SCHEMA", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "SCROLL", "SECOND", "SELECT", "SESSION_USER", "SET", "SMALLINT", "SOME", "SPACE", "SQL", "SQLCODE", "SQLERROR", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "SQLSTATE", "SUBSTR", "SUBSTRING", "SUM", "SYSTEM_USER", "TABLE", "TEMPORARY", "TIMEZONE_HOUR", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "TIMEZONE_MINUTE", "TO", "TRANSACTION", "TRANSLATE", "TRANSLATION", "TRIM", "TRUE", "UNION", "UNIQUE", "UNKNOWN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "UPDATE", "UPPER", "USER", "USING", "VALUES", "VARCHAR", "VARYING", "VIEW", "WHENEVER", "WHERE", "WITH", "WORK", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "WRITE", "XML", "XMLEXISTS", "XMLPARSE", "XMLQUERY", "XMLSERIALIZE", "YEAR" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
public DerbyAdapter(String name)
{
@@ -59,12 +59,12 @@ public abstract class DerbyAdapter extends DBAdapter
case TINYINT:
case BOOLEAN:
case BIT:
- return "SMALLINT";
+ return "SMALLINT"; //$NON-NLS-1$
case LONGVARBINARY:
case VARBINARY:
case BINARY:
- return "BLOB";
+ return "BLOB"; //$NON-NLS-1$
}
return super.getTypeName(field);
@@ -82,7 +82,7 @@ public abstract class DerbyAdapter extends DBAdapter
{
// Derby just adds one additional single quote for a single quote
String str = (String)value;
- StringTokenizer tokenizer = new StringTokenizer(str, "\'", true); // split on single quote
+ StringTokenizer tokenizer = new StringTokenizer(str, "\'", true); // split on single quote //$NON-NLS-1$
StringBuilder newValueBuilder = new StringBuilder();
while (tokenizer.hasMoreTokens())
@@ -122,7 +122,7 @@ public abstract class DerbyAdapter extends DBAdapter
{
if (c == '\'') // one single quote -->
{
- return "\'\'"; // results two single quotes
+ return "\'\'"; // results two single quotes //$NON-NLS-1$
}
return c; // no escape character --> return as is
diff --git a/plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/EmbeddedDerbyAdapter.java b/plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/EmbeddedDerbyAdapter.java
index 12b859f880..02f0890662 100644
--- a/plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/EmbeddedDerbyAdapter.java
+++ b/plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/EmbeddedDerbyAdapter.java
@@ -23,7 +23,7 @@ import java.sql.Driver;
*/
public class EmbeddedDerbyAdapter extends DerbyAdapter
{
- public static final String NAME = "derby-embedded";
+ public static final String NAME = "derby-embedded"; //$NON-NLS-1$
public EmbeddedDerbyAdapter()
{
diff --git a/plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBAdapter.java b/plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBAdapter.java
index 3e3ef2ca1a..db35a80083 100644
--- a/plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBAdapter.java
+++ b/plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBAdapter.java
@@ -27,9 +27,9 @@ import java.util.StringTokenizer;
*/
public class HSQLDBAdapter extends DBAdapter
{
- private static final String NAME = "hsqldb";
+ private static final String NAME = "hsqldb"; //$NON-NLS-1$
- public static final String VERSION = "1.8.0.8";
+ public static final String VERSION = "1.8.0.8"; //$NON-NLS-1$
public HSQLDBAdapter()
{
@@ -67,16 +67,16 @@ public class HSQLDBAdapter extends DBAdapter
return type.toString();
case LONGVARCHAR:
- return "LONGVARCHAR";
+ return "LONGVARCHAR"; //$NON-NLS-1$
case LONGVARBINARY:
- return "LONGVARBINARY";
+ return "LONGVARBINARY"; //$NON-NLS-1$
case BLOB:
- return "LONGVARBINARY";
+ return "LONGVARBINARY"; //$NON-NLS-1$
case CLOB:
- return "LONGVARCHAR";
+ return "LONGVARCHAR"; //$NON-NLS-1$
case CHAR:
case VARCHAR:
@@ -106,7 +106,7 @@ public class HSQLDBAdapter extends DBAdapter
{
// HSQLDB just adds one additional single quote for a single quote
String str = (String)value;
- StringTokenizer tokenizer = new StringTokenizer(str, "\'", true); // split on single quote
+ StringTokenizer tokenizer = new StringTokenizer(str, "\'", true); // split on single quote //$NON-NLS-1$
StringBuilder newValueBuilder = new StringBuilder();
while (tokenizer.hasMoreTokens())
@@ -141,7 +141,7 @@ public class HSQLDBAdapter extends DBAdapter
{
if (c == '\'') // one single quote -->
{
- return "\'\'"; // results two single quotes
+ return "\'\'"; // results two single quotes //$NON-NLS-1$
}
return c; // no escape character --> return as is
diff --git a/plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBDataSource.java b/plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBDataSource.java
index e073bd2e1b..79319738a4 100644
--- a/plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBDataSource.java
+++ b/plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBDataSource.java
@@ -28,6 +28,6 @@ public class HSQLDBDataSource extends jdbcDataSource
@Override
public String toString()
{
- return MessageFormat.format("HSQLDBDataSource[database={0}, user={1}]", getDatabase(), getUser());
+ return MessageFormat.format("HSQLDBDataSource[database={0}, user={1}]", getDatabase(), getUser()); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java b/plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java
index f362af9b32..fe24b9e863 100644
--- a/plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java
+++ b/plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java
@@ -29,33 +29,33 @@ import java.util.StringTokenizer;
*/
public class MYSQLAdapter extends DBAdapter
{
- public static final String NAME = "mysql";
-
- public static final String VERSION = "5.1.5";
-
- private static final String[] RESERVED_WORDS = { "ACTION", "ADD", "ALL", "ALTER", "ANALYZE", "AND", "AS", "ASC",
- "ASENSITIVE", "BEFORE", "BETWEEN", "BIGINT", "BINARY", "BIT", "BLOB", "BOTH", "BY", "CALL", "CASCADE", "CASE",
- "CHANGE", "CHAR", "CHARACTER", "CHECK", "COLLATE", "COLUMN", "CONDITION", "CONSTRAINT", "CONTINUE", "CONVERT",
- "CREATE", "CROSS", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "CURSOR", "DATABASE",
- "DATABASES", "DATE", "DAY_HOUR", "DAY_MICROSECOND", "DAY_MINUTE", "DAY_SECOND", "DEC", "DECIMAL", "DECLARE",
- "DEFAULT", "DELAYED", "DELETE", "DESC", "DESCRIBE", "DETERMINISTIC", "DISTINCT", "DISTINCTROW", "DIV", "DOUBLE",
- "DROP", "DUAL", "EACH", "ELSE", "ELSEIF", "ENCLOSED", "ENUM", "ESCAPED", "EXISTS", "EXIT", "EXPLAIN", "FALSE",
- "FETCH", "FLOAT", "FLOAT4", "FLOAT8", "FOR", "FORCE", "FOREIGN", "FROM", "FULLTEXT", "GRANT", "GROUP", "HAVING",
- "HIGH_PRIORITY", "HOUR_MICROSECOND", "HOUR_MINUTE", "HOUR_SECOND", "IF", "IGNORE", "IN", "INDEX", "INFILE",
- "INNER", "INOUT", "INSENSITIVE", "INSERT", "INT", "INT1", "INT2", "INT3", "INT4", "INT8", "INTEGER", "INTERVAL",
- "INTO", "IS", "ITERATE", "JOIN", "KEY", "KEYS", "KILL", "LEADING", "LEAVE", "LEFT", "LIKE", "LIMIT", "LINES",
- "LOAD", "LOCALTIME", "LOCALTIMESTAMP", "LOCK", "LONG", "LONGBLOB", "LONGTEXT", "LOOP", "LOW_PRIORITY", "MATCH",
- "MEDIUMBLOB", "MEDIUMINT", "MEDIUMTEXT", "MIDDLEINT", "MINUTE_MICROSECOND", "MINUTE_SECOND", "MOD", "MODIFIES",
- "NATURAL", "NO", "NOT", "NO_WRITE_TO_BINLOG", "NULL", "NUMERIC", "ON", "OPTIMIZE", "OPTION", "OPTIONALLY", "OR",
- "ORDER", "OUT", "OUTER", "OUTFILE", "PRECISION", "PRIMARY", "PROCEDURE", "PURGE", "RAID0", "READ", "READS",
- "REAL", "REFERENCES", "REGEXP", "RELEASE", "RENAME", "REPEAT", "REPLACE", "REQUIRE", "RESTRICT", "RETURN",
- "REVOKE", "RIGHT", "RLIKE", "SCHEMA", "SCHEMAS", "SECOND_MICROSECOND", "SELECT", "SENSITIVE", "SEPARATOR", "SET",
- "SHOW", "SMALLINT", "SONAME", "SPATIAL", "SPECIFIC", "SQL", "SQLEXCEPTION", "SQLSTATE", "SQLWARNING",
- "SQL_BIG_RESULT", "SQL_CALC_FOUND_ROWS", "SQL_SMALL_RESULT", "SSL", "STARTING", "STRAIGHT_JOIN", "TABLE",
- "TERMINATED", "TEXT", "THEN", "TIME", "TIMESTAMP", "TINYBLOB", "TINYINT", "TINYTEXT", "TO", "TRAILING",
- "TRIGGER", "TRUE", "UNDO", "UNION", "UNIQUE", "UNLOCK", "UNSIGNED", "UPDATE", "USAGE", "USE", "USING",
- "UTC_DATE", "UTC_TIME", "UTC_TIMESTAMP", "VALUES", "VARBINARY", "VARCHAR", "VARCHARACTER", "VARYING", "WHEN",
- "WHERE", "WHILE", "WITH", "WRITE", "X509", "XOR", "YEAR_MONTH", "ZEROFILL" };
+ public static final String NAME = "mysql"; //$NON-NLS-1$
+
+ public static final String VERSION = "5.1.5"; //$NON-NLS-1$
+
+ private static final String[] RESERVED_WORDS = { "ACTION", "ADD", "ALL", "ALTER", "ANALYZE", "AND", "AS", "ASC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "ASENSITIVE", "BEFORE", "BETWEEN", "BIGINT", "BINARY", "BIT", "BLOB", "BOTH", "BY", "CALL", "CASCADE", "CASE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "CHANGE", "CHAR", "CHARACTER", "CHECK", "COLLATE", "COLUMN", "CONDITION", "CONSTRAINT", "CONTINUE", "CONVERT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "CREATE", "CROSS", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "CURSOR", "DATABASE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "DATABASES", "DATE", "DAY_HOUR", "DAY_MICROSECOND", "DAY_MINUTE", "DAY_SECOND", "DEC", "DECIMAL", "DECLARE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "DEFAULT", "DELAYED", "DELETE", "DESC", "DESCRIBE", "DETERMINISTIC", "DISTINCT", "DISTINCTROW", "DIV", "DOUBLE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "DROP", "DUAL", "EACH", "ELSE", "ELSEIF", "ENCLOSED", "ENUM", "ESCAPED", "EXISTS", "EXIT", "EXPLAIN", "FALSE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "FETCH", "FLOAT", "FLOAT4", "FLOAT8", "FOR", "FORCE", "FOREIGN", "FROM", "FULLTEXT", "GRANT", "GROUP", "HAVING", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "HIGH_PRIORITY", "HOUR_MICROSECOND", "HOUR_MINUTE", "HOUR_SECOND", "IF", "IGNORE", "IN", "INDEX", "INFILE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "INNER", "INOUT", "INSENSITIVE", "INSERT", "INT", "INT1", "INT2", "INT3", "INT4", "INT8", "INTEGER", "INTERVAL", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "INTO", "IS", "ITERATE", "JOIN", "KEY", "KEYS", "KILL", "LEADING", "LEAVE", "LEFT", "LIKE", "LIMIT", "LINES", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$
+ "LOAD", "LOCALTIME", "LOCALTIMESTAMP", "LOCK", "LONG", "LONGBLOB", "LONGTEXT", "LOOP", "LOW_PRIORITY", "MATCH", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "MEDIUMBLOB", "MEDIUMINT", "MEDIUMTEXT", "MIDDLEINT", "MINUTE_MICROSECOND", "MINUTE_SECOND", "MOD", "MODIFIES", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "NATURAL", "NO", "NOT", "NO_WRITE_TO_BINLOG", "NULL", "NUMERIC", "ON", "OPTIMIZE", "OPTION", "OPTIONALLY", "OR", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "ORDER", "OUT", "OUTER", "OUTFILE", "PRECISION", "PRIMARY", "PROCEDURE", "PURGE", "RAID0", "READ", "READS", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "REAL", "REFERENCES", "REGEXP", "RELEASE", "RENAME", "REPEAT", "REPLACE", "REQUIRE", "RESTRICT", "RETURN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "REVOKE", "RIGHT", "RLIKE", "SCHEMA", "SCHEMAS", "SECOND_MICROSECOND", "SELECT", "SENSITIVE", "SEPARATOR", "SET", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "SHOW", "SMALLINT", "SONAME", "SPATIAL", "SPECIFIC", "SQL", "SQLEXCEPTION", "SQLSTATE", "SQLWARNING", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "SQL_BIG_RESULT", "SQL_CALC_FOUND_ROWS", "SQL_SMALL_RESULT", "SSL", "STARTING", "STRAIGHT_JOIN", "TABLE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+ "TERMINATED", "TEXT", "THEN", "TIME", "TIMESTAMP", "TINYBLOB", "TINYINT", "TINYTEXT", "TO", "TRAILING", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "TRIGGER", "TRUE", "UNDO", "UNION", "UNIQUE", "UNLOCK", "UNSIGNED", "UPDATE", "USAGE", "USE", "USING", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "UTC_DATE", "UTC_TIME", "UTC_TIMESTAMP", "VALUES", "VARBINARY", "VARCHAR", "VARCHARACTER", "VARYING", "WHEN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "WHERE", "WHILE", "WITH", "WRITE", "X509", "XOR", "YEAR_MONTH", "ZEROFILL" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
public MYSQLAdapter()
{
@@ -103,7 +103,7 @@ public class MYSQLAdapter extends DBAdapter
{
case VARCHAR:
case CLOB:
- return "LONGTEXT";
+ return "LONGTEXT"; //$NON-NLS-1$
}
return super.getTypeName(field);
@@ -115,9 +115,9 @@ public class MYSQLAdapter extends DBAdapter
super.addIndexField(builder, field);
if (field.getType() == DBType.VARCHAR)
{
- builder.append("(");
+ builder.append("("); //$NON-NLS-1$
builder.append(field.getPrecision());
- builder.append(")");
+ builder.append(")"); //$NON-NLS-1$
}
}
@@ -148,7 +148,7 @@ public class MYSQLAdapter extends DBAdapter
{
// MySQL does Java-Style backslash-escaping
String str = (String)value;
- StringTokenizer st = new StringTokenizer(str, "\\\'", true); // split on backslash or single quote
+ StringTokenizer st = new StringTokenizer(str, "\\\'", true); // split on backslash or single quote //$NON-NLS-1$
StringBuilder newValueBuilder = new StringBuilder();
while (st.hasMoreTokens())
@@ -183,12 +183,12 @@ public class MYSQLAdapter extends DBAdapter
{
if (c == '\\') // one backslash -->
{
- return "\\\\"; // results in two backslashes
+ return "\\\\"; // results in two backslashes //$NON-NLS-1$
}
if (c == '\'') // one single quote -->
{
- return "\\'"; // results in backslash+single quote
+ return "\\'"; // results in backslash+single quote //$NON-NLS-1$
}
return c; // no escape character --> return as is
diff --git a/plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java b/plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java
index 855027fbc6..61ae6b2a0b 100644
--- a/plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java
+++ b/plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java
@@ -25,22 +25,22 @@ import javax.sql.DataSource;
*/
public class PostgreSQLAdapter extends DBAdapter
{
- public static final String NAME = "postgresql";
+ public static final String NAME = "postgresql"; //$NON-NLS-1$
- public static final String VERSION = "8.3";
+ public static final String VERSION = "8.3"; //$NON-NLS-1$
- private static final String[] RESERVED_WORDS = { "ALL", "ANALYSE", "ANALYZE", "AND", "ANY", "AS", "ASC", "ATOMIC",
- "AUTHORIZATION", "BETWEEN", "BIGINT", "BINARY", "BIT", "BOOLEAN", "BOTH", "C", "CASE", "CAST", "CHAR",
- "CHARACTER", "CHECK", "COALESCE", "COLLATE", "COLUMN", "CONSTRAINT", "CONVERT", "CREATE", "CROSS",
- "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "DEC", "DECIMAL", "DEFAULT", "DEFERRABLE",
- "DESC", "DISTINCT", "DO", "ELSE", "END", "EXCEPT", "EXECUTE", "EXISTS", "EXTRACT", "FALSE", "FLOAT", "FOR",
- "FOREIGN", "FREEZE", "FROM", "FULL", "GRANT", "GROUP", "HAVING", "ILIKE", "IN", "INITIALLY", "INNER", "INT",
- "INTEGER", "INTERSECT", "INTERVAL", "INTO", "IS", "ISNULL", "JOIN", "LEADING", "LEFT", "LIKE", "LIMIT",
- "LOCALTIME", "LOCALTIMESTAMP", "NATURAL", "NCHAR", "NCLOB", "NEW", "NONE", "NOT", "NOTNULL", "NULL", "NULLIF",
- "NUMERIC", "OFF", "OFFSET", "OLD", "ON", "ONLY", "OR", "ORDER", "OUTER", "OVERLAPS", "OVERLAY", "PLACING",
- "POSITION", "PRIMARY", "REAL", "RECHECK", "REFERENCES", "RIGHT", "ROW", "SELECT", "SESSION_USER", "SETOF",
- "SIMILAR", "SMALLINT", "SOME", "SUBSTRING", "TABLE", "THEN", "TIME", "TIMESTAMP", "TO", "TRAILING", "TREAT",
- "TRIM", "TRUE", "UNION", "UNIQUE", "USER", "USING", "VARCHAR", "VERBOSE", "WHEN", "WHERE" };
+ private static final String[] RESERVED_WORDS = { "ALL", "ANALYSE", "ANALYZE", "AND", "ANY", "AS", "ASC", "ATOMIC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "AUTHORIZATION", "BETWEEN", "BIGINT", "BINARY", "BIT", "BOOLEAN", "BOTH", "C", "CASE", "CAST", "CHAR", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "CHARACTER", "CHECK", "COALESCE", "COLLATE", "COLUMN", "CONSTRAINT", "CONVERT", "CREATE", "CROSS", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "DEC", "DECIMAL", "DEFAULT", "DEFERRABLE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "DESC", "DISTINCT", "DO", "ELSE", "END", "EXCEPT", "EXECUTE", "EXISTS", "EXTRACT", "FALSE", "FLOAT", "FOR", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "FOREIGN", "FREEZE", "FROM", "FULL", "GRANT", "GROUP", "HAVING", "ILIKE", "IN", "INITIALLY", "INNER", "INT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "INTEGER", "INTERSECT", "INTERVAL", "INTO", "IS", "ISNULL", "JOIN", "LEADING", "LEFT", "LIKE", "LIMIT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "LOCALTIME", "LOCALTIMESTAMP", "NATURAL", "NCHAR", "NCLOB", "NEW", "NONE", "NOT", "NOTNULL", "NULL", "NULLIF", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "NUMERIC", "OFF", "OFFSET", "OLD", "ON", "ONLY", "OR", "ORDER", "OUTER", "OVERLAPS", "OVERLAY", "PLACING", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "POSITION", "PRIMARY", "REAL", "RECHECK", "REFERENCES", "RIGHT", "ROW", "SELECT", "SESSION_USER", "SETOF", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "SIMILAR", "SMALLINT", "SOME", "SUBSTRING", "TABLE", "THEN", "TIME", "TIMESTAMP", "TO", "TRAILING", "TREAT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "TRIM", "TRUE", "UNION", "UNIQUE", "USER", "USING", "VARCHAR", "VERBOSE", "WHEN", "WHERE" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
public PostgreSQLAdapter()
{
@@ -84,7 +84,7 @@ public class PostgreSQLAdapter extends DBAdapter
case VARCHAR:
case CLOB:
case BLOB:
- return "text";
+ return "text"; //$NON-NLS-1$
}
return super.getTypeName(field);
diff --git a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java
index b3924c500b..938da12bd5 100644
--- a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java
+++ b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java
@@ -60,31 +60,31 @@ public abstract class AbstractDBTest<DATA_SOURCE extends DataSource> extends Abs
public void testDBTypes() throws Exception
{
- IDBSchema schema = DBUtil.createSchema("testDBTypes");
+ IDBSchema schema = DBUtil.createSchema("testDBTypes"); //$NON-NLS-1$
DBType[] dbTypes = DBType.values();
int count = 0;
int i = 0;
for (DBType dbType : dbTypes)
{
- IDBTable table = schema.addTable("table_" + i);
- table.addField("field", dbType);
+ IDBTable table = schema.addTable("table_" + i); //$NON-NLS-1$
+ table.addField("field", dbType); //$NON-NLS-1$
++count;
if (dbAdapter.isTypeIndexable(dbType))
{
- IDBTable idx_table = schema.addTable("idx_table" + i);
- IDBField idx_field = idx_table.addField("field", dbType);
+ IDBTable idx_table = schema.addTable("idx_table" + i); //$NON-NLS-1$
+ IDBField idx_field = idx_table.addField("field", dbType); //$NON-NLS-1$
idx_table.addIndex(IDBIndex.Type.NON_UNIQUE, idx_field);
++count;
- IDBTable uni_table = schema.addTable("uni_table" + i);
- IDBField uni_field = uni_table.addField("field", dbType);
+ IDBTable uni_table = schema.addTable("uni_table" + i); //$NON-NLS-1$
+ IDBField uni_field = uni_table.addField("field", dbType); //$NON-NLS-1$
uni_table.addIndex(IDBIndex.Type.UNIQUE, uni_field);
++count;
- IDBTable pk_table = schema.addTable("pk_table" + i);
- IDBField pk_field = pk_table.addField("field", dbType);
+ IDBTable pk_table = schema.addTable("pk_table" + i); //$NON-NLS-1$
+ IDBField pk_field = pk_table.addField("field", dbType); //$NON-NLS-1$
pk_table.addIndex(IDBIndex.Type.PRIMARY_KEY, pk_field);
++count;
}
@@ -98,15 +98,15 @@ public abstract class AbstractDBTest<DATA_SOURCE extends DataSource> extends Abs
public void testEscapeStrings() throws Exception
{
- IDBSchema schema = DBUtil.createSchema("testEscapeStrings");
- IDBTable table = schema.addTable("testtable");
- IDBField field = table.addField("strval", DBType.VARCHAR, 255);
+ IDBSchema schema = DBUtil.createSchema("testEscapeStrings"); //$NON-NLS-1$
+ IDBTable table = schema.addTable("testtable"); //$NON-NLS-1$
+ IDBField field = table.addField("strval", DBType.VARCHAR, 255); //$NON-NLS-1$
schema.create(dbAdapter, dbConnectionProvider);
- insertString(field, "My name is 'nobody', not body");
- insertString(field, "a = 'hello'");
- insertString(field, "'hello' == a");
- insertString(field, "'hello'");
+ insertString(field, "My name is 'nobody', not body"); //$NON-NLS-1$
+ insertString(field, "a = 'hello'"); //$NON-NLS-1$
+ insertString(field, "'hello' == a"); //$NON-NLS-1$
+ insertString(field, "'hello'"); //$NON-NLS-1$
}
private void insertString(IDBField field, String val)
@@ -122,7 +122,7 @@ public abstract class AbstractDBTest<DATA_SOURCE extends DataSource> extends Abs
}
finally
{
- DBUtil.update(connection, "DELETE FROM " + table);
+ DBUtil.update(connection, "DELETE FROM " + table); //$NON-NLS-1$
}
}
}
diff --git a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AllTests.java b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AllTests.java
index 5f1fd5a1ae..0f15a041a3 100644
--- a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AllTests.java
+++ b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AllTests.java
@@ -20,7 +20,7 @@ public class AllTests
{
public static Test suite()
{
- TestSuite suite = new TestSuite("Tests for Net4j");
+ TestSuite suite = new TestSuite("Tests for Net4j"); //$NON-NLS-1$
// $JUnit-BEGIN$
suite.addTestSuite(DerbyTest.class);
diff --git a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java
index f72da72387..ca3b17af16 100644
--- a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java
+++ b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java
@@ -34,12 +34,12 @@ public class DerbyTest extends AbstractDBTest<EmbeddedDataSource>
@Override
protected void configureDataSource(EmbeddedDataSource dataSource)
{
- dbFolder = TMPUtil.createTempFolder("derby_", null, new File("/temp"));
+ dbFolder = TMPUtil.createTempFolder("derby_", null, new File("/temp")); //$NON-NLS-1$ //$NON-NLS-2$
deleteDBFolder();
- msg("Using DB folder: " + dbFolder.getAbsolutePath());
+ msg("Using DB folder: " + dbFolder.getAbsolutePath()); //$NON-NLS-1$
dataSource.setDatabaseName(dbFolder.getAbsolutePath());
- dataSource.setCreateDatabase("create");
+ dataSource.setCreateDatabase("create"); //$NON-NLS-1$
}
@Override
diff --git a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java
index a221f98d5f..ece71ce8d2 100644
--- a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java
+++ b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java
@@ -27,7 +27,7 @@ public class HsqldbTest extends AbstractDBTest<HSQLDBDataSource>
@Override
protected void configureDataSource(HSQLDBDataSource dataSource)
{
- dataSource.setDatabase("jdbc:hsqldb:mem:dbtest");
- dataSource.setUser("sa");
+ dataSource.setDatabase("jdbc:hsqldb:mem:dbtest"); //$NON-NLS-1$
+ dataSource.setUser("sa"); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/TestSchema.java b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/TestSchema.java
index 3065215ce1..9ef0f06666 100644
--- a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/TestSchema.java
+++ b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/TestSchema.java
@@ -26,54 +26,54 @@ public class TestSchema extends DBSchema
/**
* DBTable cdo_repository
*/
- public static final IDBTable REPOSITORY = INSTANCE.addTable("cdo_repository");
+ public static final IDBTable REPOSITORY = INSTANCE.addTable("cdo_repository"); //$NON-NLS-1$
public static final IDBField REPOSITORY_NAME = //
- REPOSITORY.addField("name", DBType.VARCHAR, 255);
+ REPOSITORY.addField("name", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField REPOSITORY_UUID = //
- REPOSITORY.addField("uuid", DBType.VARCHAR, 64);
+ REPOSITORY.addField("uuid", DBType.VARCHAR, 64); //$NON-NLS-1$
public static final IDBField REPOSITORY_STARTS = //
- REPOSITORY.addField("starts", DBType.BIGINT);
+ REPOSITORY.addField("starts", DBType.BIGINT); //$NON-NLS-1$
public static final IDBField REPOSITORY_STARTED = //
- REPOSITORY.addField("started", DBType.BIGINT);
+ REPOSITORY.addField("started", DBType.BIGINT); //$NON-NLS-1$
public static final IDBField REPOSITORY_STOPPED = //
- REPOSITORY.addField("stopped", DBType.BIGINT);
+ REPOSITORY.addField("stopped", DBType.BIGINT); //$NON-NLS-1$
public static final IDBField REPOSITORY_NEXT_CDOID = //
- REPOSITORY.addField("next_cdoid", DBType.BIGINT);
+ REPOSITORY.addField("next_cdoid", DBType.BIGINT); //$NON-NLS-1$
public static final IDBField REPOSITORY_NEXT_METAID = //
- REPOSITORY.addField("next_metaid", DBType.BIGINT);
+ REPOSITORY.addField("next_metaid", DBType.BIGINT); //$NON-NLS-1$
/**
* DBTable cdo_packages
*/
- public static final IDBTable PACKAGES = INSTANCE.addTable("cdo_packages");
+ public static final IDBTable PACKAGES = INSTANCE.addTable("cdo_packages"); //$NON-NLS-1$
public static final IDBField PACKAGES_ID = //
- PACKAGES.addField("id", DBType.INTEGER);
+ PACKAGES.addField("id", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField PACKAGES_URI = //
- PACKAGES.addField("uri", DBType.VARCHAR, 255);
+ PACKAGES.addField("uri", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField PACKAGES_NAME = //
- PACKAGES.addField("name", DBType.VARCHAR, 255);
+ PACKAGES.addField("name", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField PACKAGES_ECORE = //
- PACKAGES.addField("ecore", DBType.CLOB);
+ PACKAGES.addField("ecore", DBType.CLOB); //$NON-NLS-1$
public static final IDBField PACKAGES_DYNAMIC = //
- PACKAGES.addField("dynamic", DBType.BOOLEAN);
+ PACKAGES.addField("dynamic", DBType.BOOLEAN); //$NON-NLS-1$
public static final IDBField PACKAGES_RANGE_LB = //
- PACKAGES.addField("range_lb", DBType.BIGINT);
+ PACKAGES.addField("range_lb", DBType.BIGINT); //$NON-NLS-1$
public static final IDBField PACKAGES_RANGE_UB = //
- PACKAGES.addField("range_ub", DBType.BIGINT);
+ PACKAGES.addField("range_ub", DBType.BIGINT); //$NON-NLS-1$
public static final IDBIndex INDEX_PACKAGES_PK = //
PACKAGES.addIndex(IDBIndex.Type.PRIMARY_KEY, PACKAGES_ID);
@@ -84,22 +84,22 @@ public class TestSchema extends DBSchema
/**
* DBTable cdo_classes
*/
- public static final IDBTable CLASSES = INSTANCE.addTable("cdo_classes");
+ public static final IDBTable CLASSES = INSTANCE.addTable("cdo_classes"); //$NON-NLS-1$
public static final IDBField CLASSES_ID = //
- CLASSES.addField("id", DBType.INTEGER);
+ CLASSES.addField("id", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField CLASSES_PACKAGE = //
- CLASSES.addField("package", DBType.INTEGER);
+ CLASSES.addField("package", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField CLASSES_CLASSIFIER = //
- CLASSES.addField("classifier", DBType.INTEGER);
+ CLASSES.addField("classifier", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField CLASSES_NAME = //
- CLASSES.addField("name", DBType.VARCHAR, 255);
+ CLASSES.addField("name", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField CLASSES_ABSTRACT = //
- CLASSES.addField("abstract", DBType.BOOLEAN);
+ CLASSES.addField("abstract", DBType.BOOLEAN); //$NON-NLS-1$
public static final IDBIndex INDEX_CLASSES_PK = //
CLASSES.addIndex(IDBIndex.Type.PRIMARY_KEY, CLASSES_ID);
@@ -107,16 +107,16 @@ public class TestSchema extends DBSchema
/**
* DBTable cdo_supertypes
*/
- public static final IDBTable SUPERTYPES = INSTANCE.addTable("cdo_supertypes");
+ public static final IDBTable SUPERTYPES = INSTANCE.addTable("cdo_supertypes"); //$NON-NLS-1$
public static final IDBField SUPERTYPES_TYPE = //
- SUPERTYPES.addField("type_id", DBType.INTEGER);
+ SUPERTYPES.addField("type_id", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField SUPERTYPES_SUPERTYPE_PACKAGE = //
- SUPERTYPES.addField("supertype_package", DBType.VARCHAR, 255);
+ SUPERTYPES.addField("supertype_package", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField SUPERTYPES_SUPERTYPE_CLASSIFIER = //
- SUPERTYPES.addField("supertype_classifier", DBType.INTEGER);
+ SUPERTYPES.addField("supertype_classifier", DBType.INTEGER); //$NON-NLS-1$
public static final IDBIndex INDEX_SUPERTYPES_PK = //
SUPERTYPES.addIndex(IDBIndex.Type.PRIMARY_KEY, SUPERTYPES_TYPE);
@@ -124,37 +124,37 @@ public class TestSchema extends DBSchema
/**
* DBTable cdo_features
*/
- public static final IDBTable FEATURES = INSTANCE.addTable("cdo_features");
+ public static final IDBTable FEATURES = INSTANCE.addTable("cdo_features"); //$NON-NLS-1$
public static final IDBField FEATURES_ID = //
- FEATURES.addField("id", DBType.INTEGER);
+ FEATURES.addField("id", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField FEATURES_CLASS = //
- FEATURES.addField("class", DBType.INTEGER);
+ FEATURES.addField("class", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField FEATURES_FEATURE = //
- FEATURES.addField("feature", DBType.INTEGER);
+ FEATURES.addField("feature", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField FEATURES_NAME = //
- FEATURES.addField("name", DBType.VARCHAR, 255);
+ FEATURES.addField("name", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField FEATURES_TYPE = //
- FEATURES.addField("type", DBType.INTEGER);
+ FEATURES.addField("type", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField FEATURES_REFERENCE_PACKAGE = //
- FEATURES.addField("reference_package", DBType.VARCHAR, 255);
+ FEATURES.addField("reference_package", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField FEATURES_REFERENCE_CLASSIFIER = //
- FEATURES.addField("reference_classifier", DBType.INTEGER);
+ FEATURES.addField("reference_classifier", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField FEATURES_MANY = //
- FEATURES.addField("many", DBType.BOOLEAN);
+ FEATURES.addField("many", DBType.BOOLEAN); //$NON-NLS-1$
public static final IDBField FEATURES_CONTAINMENT = //
- FEATURES.addField("containment", DBType.BOOLEAN);
+ FEATURES.addField("containment", DBType.BOOLEAN); //$NON-NLS-1$
public static final IDBField FEATURES_INDEX = //
- FEATURES.addField("idx", DBType.INTEGER);
+ FEATURES.addField("idx", DBType.INTEGER); //$NON-NLS-1$
public static final IDBIndex INDEX_FEATURES_PK = //
FEATURES.addIndex(IDBIndex.Type.PRIMARY_KEY, FEATURES_ID);
@@ -162,43 +162,43 @@ public class TestSchema extends DBSchema
/**
* Name of object table
*/
- public static final String CDO_OBJECTS = "cdo_objects";
+ public static final String CDO_OBJECTS = "cdo_objects"; //$NON-NLS-1$
/**
* Field names of attribute tables
*/
- public static final String ATTRIBUTES_ID = "cdo_id";
+ public static final String ATTRIBUTES_ID = "cdo_id"; //$NON-NLS-1$
- public static final String ATTRIBUTES_VERSION = "cdo_version";
+ public static final String ATTRIBUTES_VERSION = "cdo_version"; //$NON-NLS-1$
- public static final String ATTRIBUTES_CLASS = "cdo_class";
+ public static final String ATTRIBUTES_CLASS = "cdo_class"; //$NON-NLS-1$
- public static final String ATTRIBUTES_CREATED = "cdo_created";
+ public static final String ATTRIBUTES_CREATED = "cdo_created"; //$NON-NLS-1$
- public static final String ATTRIBUTES_REVISED = "cdo_revised";
+ public static final String ATTRIBUTES_REVISED = "cdo_revised"; //$NON-NLS-1$
- public static final String ATTRIBUTES_RESOURCE = "cdo_resource";
+ public static final String ATTRIBUTES_RESOURCE = "cdo_resource"; //$NON-NLS-1$
- public static final String ATTRIBUTES_CONTAINER = "cdo_container";
+ public static final String ATTRIBUTES_CONTAINER = "cdo_container"; //$NON-NLS-1$
- public static final String ATTRIBUTES_FEATURE = "cdo_feature";
+ public static final String ATTRIBUTES_FEATURE = "cdo_feature"; //$NON-NLS-1$
/**
* Field names of reference tables
*/
- public static final String REFERENCES_FEATURE = "cdo_feature";
+ public static final String REFERENCES_FEATURE = "cdo_feature"; //$NON-NLS-1$
- public static final String REFERENCES_SOURCE = "cdo_source";
+ public static final String REFERENCES_SOURCE = "cdo_source"; //$NON-NLS-1$
- public static final String REFERENCES_VERSION = "cdo_version";
+ public static final String REFERENCES_VERSION = "cdo_version"; //$NON-NLS-1$
- public static final String REFERENCES_IDX = "cdo_idx";
+ public static final String REFERENCES_IDX = "cdo_idx"; //$NON-NLS-1$
- public static final String REFERENCES_TARGET = "cdo_target";
+ public static final String REFERENCES_TARGET = "cdo_target"; //$NON-NLS-1$
private TestSchema()
{
- super("CDO");
+ super("CDO"); //$NON-NLS-1$
}
static
diff --git a/plugins/org.eclipse.net4j.db/plugin.properties b/plugins/org.eclipse.net4j.db/plugin.properties
index 664fb2f6f9..05bb739ee9 100644
--- a/plugins/org.eclipse.net4j.db/plugin.properties
+++ b/plugins/org.eclipse.net4j.db/plugin.properties
@@ -23,3 +23,5 @@ providerName = Eclipse Modeling Project
# %%% END OF TRANSLATED PROPERTIES %%%
# The above properties have been shipped for translation.
# ==============================================================================
+
+extension-point.name = Net4j DB Adapters \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.db/plugin.xml b/plugins/org.eclipse.net4j.db/plugin.xml
index d115eb3fd6..389fca03fc 100644
--- a/plugins/org.eclipse.net4j.db/plugin.xml
+++ b/plugins/org.eclipse.net4j.db/plugin.xml
@@ -13,6 +13,6 @@
<plugin>
- <extension-point id="dbAdapters" name="Net4j DB Adapters" schema="schema/dbAdapters.exsd"/>
+ <extension-point id="dbAdapters" name="%extension-point.name" schema="schema/dbAdapters.exsd"/>
</plugin>
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java
index d82f4a3007..9d37e16a4c 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java
@@ -30,7 +30,7 @@ public enum DBType
DECIMAL(3), //
CHAR(1), //
VARCHAR(12), //
- LONGVARCHAR(-1, "LONG VARCHAR"), //
+ LONGVARCHAR(-1, "LONG VARCHAR"), // //$NON-NLS-1$
DATE(91)
{
@Override
@@ -57,13 +57,13 @@ public enum DBType
if (value instanceof Date)
{
Date date = (Date)value;
- builder.append("'");
+ builder.append("'"); //$NON-NLS-1$
builder.append(new java.sql.Timestamp(date.getTime()));
- builder.append("'");
+ builder.append("'"); //$NON-NLS-1$
}
else
{
- throw new IllegalArgumentException("Not a java.util.Date: " + value);
+ throw new IllegalArgumentException("Not a java.util.Date: " + value); //$NON-NLS-1$
}
}
}, //
@@ -86,7 +86,7 @@ public enum DBType
}
}, //
- LONGVARBINARY(-4, "LONG VARBINARY")
+ LONGVARBINARY(-4, "LONG VARBINARY") //$NON-NLS-1$
{
@Override
public void appendValue(StringBuilder builder, Object value)
@@ -148,15 +148,15 @@ public enum DBType
{
if (value == null)
{
- builder.append("NULL");
+ builder.append("NULL"); //$NON-NLS-1$
}
else
{
if (value instanceof String || value instanceof Character)
{
- builder.append("'");
+ builder.append("'"); //$NON-NLS-1$
builder.append(value);
- builder.append("'");
+ builder.append("'"); //$NON-NLS-1$
}
else
{
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
index 7fe635e44d..f533da1587 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
@@ -56,7 +56,7 @@ public final class DBUtil
public static DataSource createDataSource(Map<Object, Object> properties, String namespace)
{
- return createDataSource(properties, namespace, "class");
+ return createDataSource(properties, namespace, "class"); //$NON-NLS-1$
}
public static DataSource createDataSource(Map<Object, Object> properties, String namespace, String driverClassKey)
@@ -159,7 +159,7 @@ public final class DBUtil
{
List<String> names = new ArrayList<String>();
DatabaseMetaData metaData = connection.getMetaData();
- tables = metaData.getTables(dbName, null, null, new String[] { "TABLE" });
+ tables = metaData.getTables(dbName, null, null, new String[] { "TABLE" }); //$NON-NLS-1$
while (tables.next())
{
String name = tables.getString(3);
@@ -187,7 +187,7 @@ public final class DBUtil
statement = connection.createStatement();
for (String tableName : DBUtil.getAllTableNames(connection, dbName))
{
- String sql = "DROP TABLE " + tableName;
+ String sql = "DROP TABLE " + tableName; //$NON-NLS-1$
DBUtil.trace(sql);
statement.execute(sql);
}
@@ -214,7 +214,7 @@ public final class DBUtil
return 0;
}
- throw new DBException("Not an integer number: " + number);
+ throw new DBException("Not an integer number: " + number); //$NON-NLS-1$
}
public static long selectMaximumLong(Connection connection, IDBField field) throws DBException
@@ -229,15 +229,15 @@ public final class DBUtil
return 0L;
}
- throw new DBException("Not a long number: " + number);
+ throw new DBException("Not a long number: " + number); //$NON-NLS-1$
}
private static Number getMaximumNumber(Connection connection, IDBField field) throws DBException
{
StringBuilder builder = new StringBuilder();
- builder.append("SELECT MAX(");
+ builder.append("SELECT MAX("); //$NON-NLS-1$
builder.append(field);
- builder.append(") FROM ");
+ builder.append(") FROM "); //$NON-NLS-1$
builder.append(field.getTable());
String sql = builder.toString();
@@ -304,32 +304,32 @@ public final class DBUtil
IDBField[] fields = table.getFields();
if (fields.length != args.length)
{
- throw new IllegalArgumentException("Wrong number of args for " + table + ": " + Arrays.asList(args) + " --> "
+ throw new IllegalArgumentException("Wrong number of args for " + table + ": " + Arrays.asList(args) + " --> " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ Arrays.asList(table.getFields()));
}
StringBuilder builder = new StringBuilder();
- builder.append("INSERT INTO ");
+ builder.append("INSERT INTO "); //$NON-NLS-1$
builder.append(table);
- builder.append(" VALUES (");
+ builder.append(" VALUES ("); //$NON-NLS-1$
for (int i = 0; i < fields.length; i++)
{
if (i > 0)
{
- builder.append(", ");
+ builder.append(", "); //$NON-NLS-1$
}
dbAdapter.appendValue(builder, fields[i], args[i]);
}
- builder.append(")");
+ builder.append(")"); //$NON-NLS-1$
String sql = builder.toString();
int count = update(connection, sql);
if (count == 0)
{
- throw new DBException("No row inserted into table " + table);
+ throw new DBException("No row inserted into table " + table); //$NON-NLS-1$
}
}
@@ -341,27 +341,27 @@ public final class DBUtil
{
if (fields[i].getTable() != table)
{
- throw new IllegalArgumentException("Multiple tables not allowed: " + Arrays.asList(fields));
+ throw new IllegalArgumentException("Multiple tables not allowed: " + Arrays.asList(fields)); //$NON-NLS-1$
}
}
StringBuilder builder = new StringBuilder();
- builder.append("SELECT ");
+ builder.append("SELECT "); //$NON-NLS-1$
for (int i = 0; i < fields.length; i++)
{
if (i > 0)
{
- builder.append(", ");
+ builder.append(", "); //$NON-NLS-1$
}
builder.append(fields[i]);
}
- builder.append(" FROM ");
+ builder.append(" FROM "); //$NON-NLS-1$
builder.append(table);
if (where != null)
{
- builder.append(" WHERE ");
+ builder.append(" WHERE "); //$NON-NLS-1$
builder.append(where);
}
@@ -391,7 +391,7 @@ public final class DBUtil
long length = blob.length();
if (length > Integer.MAX_VALUE)
{
- throw new IllegalStateException("byte[] too long: " + length);
+ throw new IllegalStateException("byte[] too long: " + length); //$NON-NLS-1$
}
values[i] = blob.getBytes(1, (int)length);
@@ -402,7 +402,7 @@ public final class DBUtil
long length = clob.length();
if (length > Integer.MAX_VALUE)
{
- throw new IllegalStateException("String too long: " + length);
+ throw new IllegalStateException("String too long: " + length); //$NON-NLS-1$
}
values[i] = clob.getSubString(1, (int)length);
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/bundle/OM.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/bundle/OM.java
index de4b60dbd7..8fe64610fe 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/bundle/OM.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/bundle/OM.java
@@ -41,7 +41,7 @@ public abstract class OM
public static final OMLogger LOG = BUNDLE.logger();
- public static final String EXT_POINT = "dbAdapters";
+ public static final String EXT_POINT = "dbAdapters"; //$NON-NLS-1$
/**
* @author Eike Stepper
@@ -65,16 +65,16 @@ public abstract class OM
IConfigurationElement[] elements = registry.getConfigurationElementsFor(BUNDLE_ID, EXT_POINT);
for (final IConfigurationElement element : elements)
{
- if ("dbAdapter".equals(element.getName()))
+ if ("dbAdapter".equals(element.getName())) //$NON-NLS-1$
{
- DBAdapterDescriptor descriptor = new DBAdapterDescriptor(element.getAttribute("name"))
+ DBAdapterDescriptor descriptor = new DBAdapterDescriptor(element.getAttribute("name")) //$NON-NLS-1$
{
@Override
public IDBAdapter createDBAdapter()
{
try
{
- return (IDBAdapter)element.createExecutableExtension("class");
+ return (IDBAdapter)element.createExecutableExtension("class"); //$NON-NLS-1$
}
catch (CoreException ex)
{
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBField.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBField.java
index d58105bc2f..51b7debdc3 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBField.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBField.java
@@ -142,7 +142,7 @@ public class DBField extends DBSchemaElement implements IDBField
public String getFullName()
{
- return table.getName() + "." + name;
+ return table.getName() + "." + name; //$NON-NLS-1$
}
public String formatPrecision()
@@ -150,27 +150,27 @@ public class DBField extends DBSchemaElement implements IDBField
int precision = getPrecision();
if (precision > 0)
{
- return "(" + precision + ")";
+ return "(" + precision + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
- return "";
+ return ""; //$NON-NLS-1$
}
public String formatPrecisionAndScale()
{
if (scale == DEFAULT)
{
- return "(" + getPrecision() + ")";
+ return "(" + getPrecision() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
- return "(" + getPrecision() + ", " + scale + ")";
+ return "(" + getPrecision() + ", " + scale + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
public void appendValue(StringBuilder builder, Object value)
{
if (value == null)
{
- builder.append("NULL");
+ builder.append("NULL"); //$NON-NLS-1$
}
else
{
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java
index baa5f32cfb..7d85b005b8 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java
@@ -73,7 +73,7 @@ public class DBIndex extends DBSchemaElement implements IDBIndex
public String getName()
{
- return "idx_" + table.getName() + "_" + position;
+ return "idx_" + table.getName() + "_" + position; //$NON-NLS-1$ //$NON-NLS-2$
}
public String getFullName()
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBTable.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBTable.java
index d35471d622..66d06d67dd 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBTable.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBTable.java
@@ -81,7 +81,7 @@ public class DBTable extends DBSchemaElement implements IDBTable
schema.assertUnlocked();
if (getField(name) != null)
{
- throw new DBException("DBField exists: " + name);
+ throw new DBException("DBField exists: " + name); //$NON-NLS-1$
}
DBField field = new DBField(this, name, type, precision, scale, notNull, fields.size());
@@ -156,21 +156,21 @@ public class DBTable extends DBSchemaElement implements IDBTable
public String sqlInsert()
{
StringBuilder builder = new StringBuilder();
- builder.append("INSERT INTO ");
+ builder.append("INSERT INTO "); //$NON-NLS-1$
builder.append(getName());
- builder.append(" VALUES (");
+ builder.append(" VALUES ("); //$NON-NLS-1$
for (int i = 0; i < fields.size(); i++)
{
if (i > 0)
{
- builder.append(", ");
+ builder.append(", "); //$NON-NLS-1$
}
- builder.append("?");
+ builder.append("?"); //$NON-NLS-1$
}
- builder.append(")");
+ builder.append(")"); //$NON-NLS-1$
return builder.toString();
}
}
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/dml/DBStatement.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/dml/DBStatement.java
index 2ab0f130b0..057fc59a6f 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/dml/DBStatement.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/dml/DBStatement.java
@@ -93,7 +93,7 @@ public class DBStatement implements IDBStatement
{
if (element instanceof IDBParameter)
{
- builder.append("?");
+ builder.append("?"); //$NON-NLS-1$
}
else
{
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
index 5a46b34f03..a18d0f5819 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
@@ -40,39 +40,39 @@ public abstract class DBAdapter implements IDBAdapter
{
private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_SQL, DBAdapter.class);
- private static final String[] SQL92_RESERVED_WORDS = { "ABSOLUTE", "ACTION", "ADD", "AFTER", "ALL", "ALLOCATE",
- "ALTER", "AND", "ANY", "ARE", "ARRAY", "AS", "ASC", "ASENSITIVE", "ASSERTION", "ASYMMETRIC", "AT", "ATOMIC",
- "AUTHORIZATION", "AVG", "BEFORE", "BEGIN", "BETWEEN", "BIGINT", "BINARY", "BIT", "BIT_LENGTH", "BLOB", "BOOLEAN",
- "BOTH", "BREADTH", "BY", "CALL", "CALLED", "CASCADE", "CASCADED", "CASE", "CAST", "CATALOG", "CHAR", "CHARACTER",
- "CHARACTER_LENGTH", "CHAR_LENGTH", "CHECK", "CLOB", "CLOSE", "COALESCE", "COLLATE", "COLLATION", "COLUMN",
- "COMMIT", "CONDITION", "CONNECT", "CONNECTION", "CONSTRAINT", "CONSTRAINTS", "CONSTRUCTOR", "CONTAINS",
- "CONTINUE", "CONVERT", "CORRESPONDING", "COUNT", "CREATE", "CROSS", "CUBE", "CURRENT", "CURRENT_DATE",
- "CURRENT_DEFAULT_TRANSFORM_GROUP", "CURRENT_PATH", "CURRENT_ROLE", "CURRENT_TIME", "CURRENT_TIMESTAMP",
- "CURRENT_TRANSFORM_GROUP_FOR_TYPE", "CURRENT_USER", "CURSOR", "CYCLE", "DATA", "DATE", "DAY", "DEALLOCATE",
- "DEC", "DECIMAL", "DECLARE", "DEFAULT", "DEFERRABLE", "DEFERRED", "DELETE", "DEPTH", "DEREF", "DESC", "DESCRIBE",
- "DESCRIPTOR", "DETERMINISTIC", "DIAGNOSTICS", "DISCONNECT", "DISTINCT", "DO", "DOMAIN", "DOUBLE", "DROP",
- "DYNAMIC", "EACH", "ELEMENT", "ELSE", "ELSEIF", "END", "EQUALS", "ESCAPE", "EXCEPT", "EXCEPTION", "EXEC",
- "EXECUTE", "EXISTS", "EXIT", "EXTERNAL", "EXTRACT", "FALSE", "FETCH", "FILTER", "FIRST", "FLOAT", "FOR",
- "FOREIGN", "FOUND", "FREE", "FROM", "FULL", "FUNCTION", "GENERAL", "GET", "GLOBAL", "GO", "GOTO", "GRANT",
- "GROUP", "GROUPING", "HANDLER", "HAVING", "HOLD", "HOUR", "IDENTITY", "IF", "IMMEDIATE", "IN", "INDICATOR",
- "INITIALLY", "INNER", "INOUT", "INPUT", "INSENSITIVE", "INSERT", "INT", "INTEGER", "INTERSECT", "INTERVAL",
- "INTO", "IS", "ISOLATION", "ITERATE", "JOIN", "KEY", "LANGUAGE", "LARGE", "LAST", "LATERAL", "LEADING", "LEAVE",
- "LEFT", "LEVEL", "LIKE", "LOCAL", "LOCALTIME", "LOCALTIMESTAMP", "LOCATOR", "LOOP", "LOWER", "MAP", "MATCH",
- "MAX", "MEMBER", "MERGE", "METHOD", "MIN", "MINUTE", "MODIFIES", "MODULE", "MONTH", "MULTISET", "NAMES",
- "NATIONAL", "NATURAL", "NCHAR", "NCLOB", "NEW", "NEXT", "NO", "NONE", "NOT", "NULL", "NULLIF", "NUMERIC",
- "OBJECT", "OCTET_LENGTH", "OF", "OLD", "ON", "ONLY", "OPEN", "OPTION", "OR", "ORDER", "ORDINALITY", "OUT",
- "OUTER", "OUTPUT", "OVER", "OVERLAPS", "PAD", "PARAMETER", "PARTIAL", "PARTITION", "PATH", "POSITION",
- "PRECISION", "PREPARE", "PRESERVE", "PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURE", "PUBLIC", "RANGE", "READ",
- "READS", "REAL", "RECURSIVE", "REF", "REFERENCES", "REFERENCING", "RELATIVE", "RELEASE", "REPEAT", "RESIGNAL",
- "RESTRICT", "RESULT", "RETURN", "RETURNS", "REVOKE", "RIGHT", "ROLE", "ROLLBACK", "ROLLUP", "ROUTINE", "ROW",
- "ROWS", "SAVEPOINT", "SCHEMA", "SCOPE", "SCROLL", "SEARCH", "SECOND", "SECTION", "SELECT", "SENSITIVE",
- "SESSION", "SESSION_USER", "SET", "SETS", "SIGNAL", "SIMILAR", "SIZE", "SMALLINT", "SOME", "SPACE", "SPECIFIC",
- "SPECIFICTYPE", "SQL", "SQLCODE", "SQLERROR", "SQLEXCEPTION", "SQLSTATE", "SQLWARNING", "START", "STATE",
- "STATIC", "SUBMULTISET", "SUBSTRING", "SUM", "SYMMETRIC", "SYSTEM", "SYSTEM_USER", "TABLE", "TABLESAMPLE",
- "TEMPORARY", "THEN", "TIME", "TIMESTAMP", "TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TO", "TRAILING", "TRANSACTION",
- "TRANSLATE", "TRANSLATION", "TREAT", "TRIGGER", "TRIM", "TRUE", "UNDER", "UNDO", "UNION", "UNIQUE", "UNKNOWN",
- "UNNEST", "UNTIL", "UPDATE", "UPPER", "USAGE", "USER", "USING", "VALUE", "VALUES", "VARCHAR", "VARYING", "VIEW",
- "WHEN", "WHENEVER", "WHERE", "WHILE", "WINDOW", "WITH", "WITHIN", "WITHOUT", "WORK", "WRITE", "YEAR", "ZONE" };
+ private static final String[] SQL92_RESERVED_WORDS = { "ABSOLUTE", "ACTION", "ADD", "AFTER", "ALL", "ALLOCATE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ "ALTER", "AND", "ANY", "ARE", "ARRAY", "AS", "ASC", "ASENSITIVE", "ASSERTION", "ASYMMETRIC", "AT", "ATOMIC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "AUTHORIZATION", "AVG", "BEFORE", "BEGIN", "BETWEEN", "BIGINT", "BINARY", "BIT", "BIT_LENGTH", "BLOB", "BOOLEAN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "BOTH", "BREADTH", "BY", "CALL", "CALLED", "CASCADE", "CASCADED", "CASE", "CAST", "CATALOG", "CHAR", "CHARACTER", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "CHARACTER_LENGTH", "CHAR_LENGTH", "CHECK", "CLOB", "CLOSE", "COALESCE", "COLLATE", "COLLATION", "COLUMN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "COMMIT", "CONDITION", "CONNECT", "CONNECTION", "CONSTRAINT", "CONSTRAINTS", "CONSTRUCTOR", "CONTAINS", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "CONTINUE", "CONVERT", "CORRESPONDING", "COUNT", "CREATE", "CROSS", "CUBE", "CURRENT", "CURRENT_DATE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "CURRENT_DEFAULT_TRANSFORM_GROUP", "CURRENT_PATH", "CURRENT_ROLE", "CURRENT_TIME", "CURRENT_TIMESTAMP", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "CURRENT_TRANSFORM_GROUP_FOR_TYPE", "CURRENT_USER", "CURSOR", "CYCLE", "DATA", "DATE", "DAY", "DEALLOCATE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "DEC", "DECIMAL", "DECLARE", "DEFAULT", "DEFERRABLE", "DEFERRED", "DELETE", "DEPTH", "DEREF", "DESC", "DESCRIBE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "DESCRIPTOR", "DETERMINISTIC", "DIAGNOSTICS", "DISCONNECT", "DISTINCT", "DO", "DOMAIN", "DOUBLE", "DROP", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "DYNAMIC", "EACH", "ELEMENT", "ELSE", "ELSEIF", "END", "EQUALS", "ESCAPE", "EXCEPT", "EXCEPTION", "EXEC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "EXECUTE", "EXISTS", "EXIT", "EXTERNAL", "EXTRACT", "FALSE", "FETCH", "FILTER", "FIRST", "FLOAT", "FOR", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "FOREIGN", "FOUND", "FREE", "FROM", "FULL", "FUNCTION", "GENERAL", "GET", "GLOBAL", "GO", "GOTO", "GRANT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "GROUP", "GROUPING", "HANDLER", "HAVING", "HOLD", "HOUR", "IDENTITY", "IF", "IMMEDIATE", "IN", "INDICATOR", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "INITIALLY", "INNER", "INOUT", "INPUT", "INSENSITIVE", "INSERT", "INT", "INTEGER", "INTERSECT", "INTERVAL", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "INTO", "IS", "ISOLATION", "ITERATE", "JOIN", "KEY", "LANGUAGE", "LARGE", "LAST", "LATERAL", "LEADING", "LEAVE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "LEFT", "LEVEL", "LIKE", "LOCAL", "LOCALTIME", "LOCALTIMESTAMP", "LOCATOR", "LOOP", "LOWER", "MAP", "MATCH", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "MAX", "MEMBER", "MERGE", "METHOD", "MIN", "MINUTE", "MODIFIES", "MODULE", "MONTH", "MULTISET", "NAMES", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "NATIONAL", "NATURAL", "NCHAR", "NCLOB", "NEW", "NEXT", "NO", "NONE", "NOT", "NULL", "NULLIF", "NUMERIC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "OBJECT", "OCTET_LENGTH", "OF", "OLD", "ON", "ONLY", "OPEN", "OPTION", "OR", "ORDER", "ORDINALITY", "OUT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "OUTER", "OUTPUT", "OVER", "OVERLAPS", "PAD", "PARAMETER", "PARTIAL", "PARTITION", "PATH", "POSITION", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "PRECISION", "PREPARE", "PRESERVE", "PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURE", "PUBLIC", "RANGE", "READ", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "READS", "REAL", "RECURSIVE", "REF", "REFERENCES", "REFERENCING", "RELATIVE", "RELEASE", "REPEAT", "RESIGNAL", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "RESTRICT", "RESULT", "RETURN", "RETURNS", "REVOKE", "RIGHT", "ROLE", "ROLLBACK", "ROLLUP", "ROUTINE", "ROW", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "ROWS", "SAVEPOINT", "SCHEMA", "SCOPE", "SCROLL", "SEARCH", "SECOND", "SECTION", "SELECT", "SENSITIVE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "SESSION", "SESSION_USER", "SET", "SETS", "SIGNAL", "SIMILAR", "SIZE", "SMALLINT", "SOME", "SPACE", "SPECIFIC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "SPECIFICTYPE", "SQL", "SQLCODE", "SQLERROR", "SQLEXCEPTION", "SQLSTATE", "SQLWARNING", "START", "STATE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "STATIC", "SUBMULTISET", "SUBSTRING", "SUM", "SYMMETRIC", "SYSTEM", "SYSTEM_USER", "TABLE", "TABLESAMPLE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "TEMPORARY", "THEN", "TIME", "TIMESTAMP", "TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TO", "TRAILING", "TRANSACTION", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "TRANSLATE", "TRANSLATION", "TREAT", "TRIGGER", "TRIM", "TRUE", "UNDER", "UNDO", "UNION", "UNIQUE", "UNKNOWN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "UNNEST", "UNTIL", "UPDATE", "UPPER", "USAGE", "USER", "USING", "VALUE", "VALUES", "VARCHAR", "VARYING", "VIEW", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "WHEN", "WHENEVER", "WHERE", "WHILE", "WINDOW", "WITH", "WITHIN", "WITHOUT", "WORK", "WRITE", "YEAR", "ZONE" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
private String name;
@@ -137,7 +137,7 @@ public abstract class DBAdapter implements IDBAdapter
created = false;
if (TRACER.isEnabled())
{
- TRACER.trace("-- " + ex.getMessage());
+ TRACER.trace("-- " + ex.getMessage()); //$NON-NLS-1$
}
}
@@ -199,7 +199,7 @@ public abstract class DBAdapter implements IDBAdapter
protected String getDropTableSQL(IDBTable table)
{
- return "DROP TABLE " + table;
+ return "DROP TABLE " + table; //$NON-NLS-1$
}
/**
@@ -245,7 +245,7 @@ public abstract class DBAdapter implements IDBAdapter
@Override
public String toString()
{
- return getName() + "-" + getVersion();
+ return getName() + "-" + getVersion(); //$NON-NLS-1$
}
/**
@@ -254,18 +254,18 @@ public abstract class DBAdapter implements IDBAdapter
protected void doCreateTable(IDBTable table, Statement statement) throws SQLException
{
StringBuilder builder = new StringBuilder();
- builder.append("CREATE TABLE ");
+ builder.append("CREATE TABLE "); //$NON-NLS-1$
builder.append(table);
- builder.append(" (");
+ builder.append(" ("); //$NON-NLS-1$
appendFieldDefs(builder, table, createFieldDefinitions(table));
String constraints = createConstraints(table);
if (constraints != null)
{
- builder.append(", ");
+ builder.append(", "); //$NON-NLS-1$
builder.append(constraints);
}
- builder.append(")");
+ builder.append(")"); //$NON-NLS-1$
String sql = builder.toString();
if (TRACER.isEnabled())
{
@@ -288,31 +288,31 @@ public abstract class DBAdapter implements IDBAdapter
{
IDBTable table = index.getTable();
StringBuilder builder = new StringBuilder();
- builder.append("CREATE ");
+ builder.append("CREATE "); //$NON-NLS-1$
if (index.getType() == IDBIndex.Type.UNIQUE)
{
- builder.append("UNIQUE ");
+ builder.append("UNIQUE "); //$NON-NLS-1$
}
- builder.append("INDEX ");
+ builder.append("INDEX "); //$NON-NLS-1$
builder.append(table);
- builder.append("_idx");
+ builder.append("_idx"); //$NON-NLS-1$
builder.append(num);
- builder.append(" ON ");
+ builder.append(" ON "); //$NON-NLS-1$
builder.append(table);
- builder.append(" (");
+ builder.append(" ("); //$NON-NLS-1$
IDBField[] fields = index.getFields();
for (int i = 0; i < fields.length; i++)
{
if (i != 0)
{
- builder.append(", ");
+ builder.append(", "); //$NON-NLS-1$
}
addIndexField(builder, fields[i]);
}
- builder.append(")");
+ builder.append(")"); //$NON-NLS-1$
String sql = builder.toString();
if (TRACER.isEnabled())
{
@@ -340,7 +340,7 @@ public abstract class DBAdapter implements IDBAdapter
*/
protected String createFieldDefinition(IDBField field)
{
- return getTypeName(field) + (field.isNotNull() ? " NOT NULL" : "");
+ return getTypeName(field) + (field.isNotNull() ? " NOT NULL" : ""); //$NON-NLS-1$ //$NON-NLS-2$
}
protected String getTypeName(IDBField field)
@@ -377,7 +377,7 @@ public abstract class DBAdapter implements IDBAdapter
return type.toString() + field.formatPrecisionAndScale();
}
- throw new IllegalArgumentException("Unknown type: " + type);
+ throw new IllegalArgumentException("Unknown type: " + type); //$NON-NLS-1$
}
public String[] getSQL92ReservedWords()
@@ -408,9 +408,9 @@ public abstract class DBAdapter implements IDBAdapter
try
{
StringBuilder builder = new StringBuilder();
- builder.append("SELECT ");
+ builder.append("SELECT "); //$NON-NLS-1$
appendFieldNames(builder, table);
- builder.append(" FROM ");
+ builder.append(" FROM "); //$NON-NLS-1$
builder.append(table);
String sql = builder.toString();
@@ -419,7 +419,7 @@ public abstract class DBAdapter implements IDBAdapter
int columnCount = metaData.getColumnCount();
if (columnCount != table.getFieldCount())
{
- throw new DBException("DBTable " + table + " has " + columnCount + " columns instead of "
+ throw new DBException("DBTable " + table + " has " + columnCount + " columns instead of " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ table.getFieldCount());
}
}
@@ -454,7 +454,7 @@ public abstract class DBAdapter implements IDBAdapter
IDBField field = fields[i];
if (i != 0)
{
- appendable.append(", ");
+ appendable.append(", "); //$NON-NLS-1$
}
String fieldName = field.getName();
@@ -476,13 +476,13 @@ public abstract class DBAdapter implements IDBAdapter
IDBField field = fields[i];
if (i != 0)
{
- appendable.append(", ");
+ appendable.append(", "); //$NON-NLS-1$
}
// String fieldName = mangleFieldName(field.getName(), 0);
String fieldName = field.getName();
appendable.append(fieldName);
- appendable.append(" ");
+ appendable.append(" "); //$NON-NLS-1$
appendable.append(defs[i]);
}
}
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBSchema.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBSchema.java
index 6cf520585f..e36b06207a 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBSchema.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBSchema.java
@@ -67,7 +67,7 @@ public class DBSchema extends DBSchemaElement implements IDBSchema
assertUnlocked();
if (tables.containsKey(name))
{
- throw new DBException("DBTable exists: " + name);
+ throw new DBException("DBTable exists: " + name); //$NON-NLS-1$
}
DBTable table = new DBTable(this, name);
@@ -120,7 +120,7 @@ public class DBSchema extends DBSchemaElement implements IDBSchema
connection = connectionProvider.getConnection();
if (connection == null)
{
- throw new DBException("No connection available from " + connectionProvider);
+ throw new DBException("No connection available from " + connectionProvider); //$NON-NLS-1$
}
return create(dbAdapter, connection);
@@ -176,7 +176,7 @@ public class DBSchema extends DBSchemaElement implements IDBSchema
out.println(tableName);
for (int i = 0; i < tableName.length(); i++)
{
- out.print("=");
+ out.print("="); //$NON-NLS-1$
}
out.println();
@@ -216,7 +216,7 @@ public class DBSchema extends DBSchemaElement implements IDBSchema
{
if (locked)
{
- throw new DBException("DBSchema locked: " + name);
+ throw new DBException("DBSchema locked: " + name); //$NON-NLS-1$
}
}
}
diff --git a/plugins/org.eclipse.net4j.debug/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.debug/META-INF/MANIFEST.MF
index 39987f3af5..a7133dce8b 100644
--- a/plugins/org.eclipse.net4j.debug/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.debug/META-INF/MANIFEST.MF
@@ -13,4 +13,5 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.net4j.internal.debug;version="2.0.0";x-internal:=true,
org.eclipse.net4j.internal.debug.bundle;version="2.0.0";x-internal:=true,
+ org.eclipse.net4j.internal.debug.messages;x-internal:=true,
org.eclipse.net4j.internal.debug.views;version="2.0.0";x-internal:=true
diff --git a/plugins/org.eclipse.net4j.debug/plugin.properties b/plugins/org.eclipse.net4j.debug/plugin.properties
index 7026794318..87ecd7dc56 100644
--- a/plugins/org.eclipse.net4j.debug/plugin.properties
+++ b/plugins/org.eclipse.net4j.debug/plugin.properties
@@ -23,3 +23,6 @@ providerName = Eclipse Modeling Project
# %%% END OF TRANSLATED PROPERTIES %%%
# The above properties have been shipped for translation.
# ==============================================================================
+
+category.name = Debug
+view.name = Remote Traces \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.debug/plugin.xml b/plugins/org.eclipse.net4j.debug/plugin.xml
index e5a5489976..540dea0e53 100644
--- a/plugins/org.eclipse.net4j.debug/plugin.xml
+++ b/plugins/org.eclipse.net4j.debug/plugin.xml
@@ -17,10 +17,10 @@
point="org.eclipse.ui.views">
<category
id="org.eclipse.debug.ui"
- name="Debug">
+ name="%category.name">
</category>
<view
- name="Remote Traces"
+ name="%view.name"
icon="icons/text.gif"
category="org.eclipse.debug.ui"
class="org.eclipse.net4j.internal.debug.views.RemoteTraceView"
diff --git a/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/messages/Messages.java b/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/messages/Messages.java
new file mode 100644
index 0000000000..010441e154
--- /dev/null
+++ b/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/messages/Messages.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.internal.debug.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Eike Stepper
+ */
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.eclipse.net4j.internal.debug.messages.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private Messages()
+ {
+ }
+
+ public static String getString(String key)
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString(key);
+ }
+ catch (MissingResourceException e)
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/messages/messages.properties b/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/messages/messages.properties
new file mode 100644
index 0000000000..1e56ba7e21
--- /dev/null
+++ b/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/messages/messages.properties
@@ -0,0 +1,12 @@
+RemoteTraceView.0=ID
+RemoteTraceView.1=Time Stamp
+RemoteTraceView.10=Clear
+RemoteTraceView.11=Double-click detected on
+RemoteTraceView.12=Remote Traces
+RemoteTraceView.2=Agent ID
+RemoteTraceView.3=Bundle ID
+RemoteTraceView.4=Tracer Name
+RemoteTraceView.5=Context
+RemoteTraceView.6=Message
+RemoteTraceView.7=Throwable
+RemoteTraceView.9=Clear
diff --git a/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/views/RemoteTraceView.java b/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/views/RemoteTraceView.java
index 3359f86ac6..fcb0839bcc 100644
--- a/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/views/RemoteTraceView.java
+++ b/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/views/RemoteTraceView.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.internal.debug.views;
import org.eclipse.net4j.internal.debug.RemoteTraceManager;
+import org.eclipse.net4j.internal.debug.messages.Messages;
import org.eclipse.net4j.util.ObjectUtil;
import org.eclipse.net4j.util.ReflectUtil;
import org.eclipse.net4j.util.om.trace.RemoteTraceServer.Event;
@@ -91,8 +92,8 @@ public class RemoteTraceView extends ViewPart
protected void createColmuns(TableViewer viewer)
{
- final String[] columnNames = { "ID", "Time Stamp", "Agent ID", "Bundle ID", "Tracer Name", "Context", "Message",
- "Throwable" };
+ final String[] columnNames = { Messages.getString("RemoteTraceView.0"), Messages.getString("RemoteTraceView.1"), Messages.getString("RemoteTraceView.2"), Messages.getString("RemoteTraceView.3"), Messages.getString("RemoteTraceView.4"), Messages.getString("RemoteTraceView.5"), Messages.getString("RemoteTraceView.6"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+ Messages.getString("RemoteTraceView.7") }; //$NON-NLS-1$
final int[] columnWidths = { 60, 170, 80, 160, 120, 120, 400, 200 };
TableColumn[] columns = new TableColumn[columnNames.length];
for (int i = 0; i < columns.length; i++)
@@ -120,7 +121,7 @@ public class RemoteTraceView extends ViewPart
private void hookContextMenu()
{
- MenuManager menuMgr = new MenuManager("#PopupMenu");
+ MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener()
{
@@ -171,8 +172,8 @@ public class RemoteTraceView extends ViewPart
}
};
- clearAction.setText("Clear");
- clearAction.setToolTipText("Clear");
+ clearAction.setText(Messages.getString("RemoteTraceView.9")); //$NON-NLS-1$
+ clearAction.setToolTipText(Messages.getString("RemoteTraceView.10")); //$NON-NLS-1$
clearAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(
ISharedImages.IMG_TOOL_DELETE));
@@ -183,7 +184,7 @@ public class RemoteTraceView extends ViewPart
{
ISelection selection = viewer.getSelection();
Object obj = ((IStructuredSelection)selection).getFirstElement();
- showMessage("Double-click detected on " + obj.toString());
+ showMessage(Messages.getString("RemoteTraceView.11") + obj.toString()); //$NON-NLS-1$
}
};
}
@@ -201,7 +202,7 @@ public class RemoteTraceView extends ViewPart
private void showMessage(String message)
{
- MessageDialog.openInformation(viewer.getControl().getShell(), "Remote Traces", message);
+ MessageDialog.openInformation(viewer.getControl().getShell(), Messages.getString("RemoteTraceView.12"), message); //$NON-NLS-1$
}
/**
@@ -276,7 +277,7 @@ public class RemoteTraceView extends ViewPart
return id;
}
- return id + " (" + className + ")";
+ return id + " (" + className + ")"; //$NON-NLS-1$ //$NON-NLS-2$
case 7:
return getFirstLine(text);
@@ -326,7 +327,7 @@ public class RemoteTraceView extends ViewPart
str = str.substring(0, nl);
}
- return str.replaceAll("\r", "");
+ return str.replaceAll("\r", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/plugins/org.eclipse.net4j.http.common/src/org/eclipse/net4j/http/internal/common/HTTPConnector.java b/plugins/org.eclipse.net4j.http.common/src/org/eclipse/net4j/http/internal/common/HTTPConnector.java
index 25bc85dbac..8e9bd76aae 100644
--- a/plugins/org.eclipse.net4j.http.common/src/org/eclipse/net4j/http/internal/common/HTTPConnector.java
+++ b/plugins/org.eclipse.net4j.http.common/src/org/eclipse/net4j/http/internal/common/HTTPConnector.java
@@ -15,6 +15,7 @@ import org.eclipse.net4j.channel.ChannelException;
import org.eclipse.net4j.connector.ConnectorException;
import org.eclipse.net4j.http.common.IHTTPConnector;
import org.eclipse.net4j.http.internal.common.bundle.OM;
+import org.eclipse.net4j.http.internal.common.messages.Messages;
import org.eclipse.net4j.protocol.IProtocol;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
@@ -105,7 +106,7 @@ public abstract class HTTPConnector extends Connector implements IHTTPConnector
if (TRACER.isEnabled())
{
- TRACER.format("Multiplexing {0} (count={1})", buffer.formatContent(true), outputOperationCount);
+ TRACER.format("Multiplexing {0} (count={1})", buffer.formatContent(true), outputOperationCount); //$NON-NLS-1$
}
outputOperations.add(new BufferChannelOperation(httpChannel.getID(), outputOperationCount, buffer));
@@ -168,7 +169,7 @@ public abstract class HTTPConnector extends Connector implements IHTTPConnector
return;
default:
- throw new IOException("Invalid operation code: " + code);
+ throw new IOException("Invalid operation code: " + code); //$NON-NLS-1$
}
markLastTraffic();
@@ -353,7 +354,7 @@ public abstract class HTTPConnector extends Connector implements IHTTPConnector
HTTPChannel channel = (HTTPChannel)inverseOpenChannel(getChannelID(), protocolID);
if (channel == null)
{
- throw new ConnectorException("Could not open channel");
+ throw new ConnectorException(Messages.getString("HTTPConnector.0")); //$NON-NLS-1$
}
channel.increaseInputOperationCount();
@@ -456,7 +457,7 @@ public abstract class HTTPConnector extends Connector implements IHTTPConnector
int length = in.readShort();
if (TRACER.isEnabled())
{
- TRACER.format("Receiving Buffer operation: operationID={0}, length={1}", getOperationCount(), length);
+ TRACER.format("Receiving Buffer operation: operationID={0}, length={1}", getOperationCount(), length); //$NON-NLS-1$
}
buffer = getConfig().getBufferProvider().provideBuffer();
@@ -483,7 +484,7 @@ public abstract class HTTPConnector extends Connector implements IHTTPConnector
out.writeShort(length);
if (TRACER.isEnabled())
{
- TRACER.format("Transmitting Buffer operation: operationID={0}, length={1}", getOperationCount(), length);
+ TRACER.format("Transmitting Buffer operation: operationID={0}, length={1}", getOperationCount(), length); //$NON-NLS-1$
}
for (int i = 0; i < length; i++)
diff --git a/plugins/org.eclipse.net4j.http.common/src/org/eclipse/net4j/http/internal/common/messages/Messages.java b/plugins/org.eclipse.net4j.http.common/src/org/eclipse/net4j/http/internal/common/messages/Messages.java
new file mode 100644
index 0000000000..9d6becd868
--- /dev/null
+++ b/plugins/org.eclipse.net4j.http.common/src/org/eclipse/net4j/http/internal/common/messages/Messages.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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:
+ * Victor Roldan Betancort - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.net4j.http.internal.common.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Victor Roldan Betancort
+ */
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.eclipse.net4j.http.internal.common.messages.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private Messages()
+ {
+ }
+
+ public static String getString(String key)
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString(key);
+ }
+ catch (MissingResourceException e)
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.http.common/src/org/eclipse/net4j/http/internal/common/messages/messages.properties b/plugins/org.eclipse.net4j.http.common/src/org/eclipse/net4j/http/internal/common/messages/messages.properties
new file mode 100644
index 0000000000..dca19eaf4f
--- /dev/null
+++ b/plugins/org.eclipse.net4j.http.common/src/org/eclipse/net4j/http/internal/common/messages/messages.properties
@@ -0,0 +1,11 @@
+# Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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:
+# Victor Roldan Betancort - initial API and implementation
+# Eike Stepper - maintenance
+
+HTTPConnector.0=Could not open channel
diff --git a/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPAcceptor.java b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPAcceptor.java
index fa39f2d5fd..1d2e6a9a56 100644
--- a/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPAcceptor.java
+++ b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPAcceptor.java
@@ -14,6 +14,7 @@ import org.eclipse.net4j.connector.IConnector;
import org.eclipse.net4j.http.common.IHTTPConnector;
import org.eclipse.net4j.http.internal.common.HTTPConnector;
import org.eclipse.net4j.http.internal.server.bundle.OM;
+import org.eclipse.net4j.http.internal.server.messages.Messages;
import org.eclipse.net4j.http.server.IHTTPAcceptor;
import org.eclipse.net4j.http.server.INet4jTransportServlet;
import org.eclipse.net4j.util.StringUtil;
@@ -157,7 +158,7 @@ public class HTTPAcceptor extends Acceptor implements IHTTPAcceptor, INet4jTrans
HTTPConnector connector = httpConnectors.get(connectorID);
if (connector == null)
{
- throw new IllegalArgumentException("Invalid connectorID: " + connectorID);
+ throw new IllegalArgumentException("Invalid connectorID: " + connectorID); //$NON-NLS-1$
}
connector.deactivate();
@@ -169,7 +170,7 @@ public class HTTPAcceptor extends Acceptor implements IHTTPAcceptor, INet4jTrans
HTTPServerConnector connector = httpConnectors.get(connectorID);
if (connector == null)
{
- throw new IllegalArgumentException("Invalid connectorID: " + connectorID);
+ throw new IllegalArgumentException("Invalid connectorID: " + connectorID); //$NON-NLS-1$
}
connector.readInputOperations(in);
@@ -179,7 +180,7 @@ public class HTTPAcceptor extends Acceptor implements IHTTPAcceptor, INet4jTrans
@Override
public String toString()
{
- return "HTTPAcceptor";
+ return "HTTPAcceptor"; //$NON-NLS-1$
}
@Override
@@ -202,9 +203,9 @@ public class HTTPAcceptor extends Acceptor implements IHTTPAcceptor, INet4jTrans
protected void doBeforeActivate() throws Exception
{
super.doBeforeActivate();
- checkState(randomizer, "randomizer");
- checkState(connectorIDLength > 0, "Constraint violated: connectorIDLength > 0");
- checkState(maxIdleTime >= 100, "Constraint violated: maxIdleTime >= 100");
+ checkState(randomizer, "randomizer"); //$NON-NLS-1$
+ checkState(connectorIDLength > 0, "Constraint violated: connectorIDLength > 0"); //$NON-NLS-1$
+ checkState(maxIdleTime >= 100, "Constraint violated: maxIdleTime >= 100"); //$NON-NLS-1$
}
@Override
@@ -224,7 +225,7 @@ public class HTTPAcceptor extends Acceptor implements IHTTPAcceptor, INet4jTrans
protected String createConnectorID(String userID)
{
- return randomizer.nextString(connectorIDLength, "0123456789ABCDEF");
+ return randomizer.nextString(connectorIDLength, "0123456789ABCDEF"); //$NON-NLS-1$
}
protected HTTPServerConnector createServerConnector()
@@ -238,7 +239,7 @@ public class HTTPAcceptor extends Acceptor implements IHTTPAcceptor, INet4jTrans
IConnector[] connectors = getAcceptedConnectors();
if (TRACER.isEnabled())
{
- TRACER.format("Checking {0} HTTP server connectors for idle time: {1,time}", connectors.length, new Date());
+ TRACER.format("Checking {0} HTTP server connectors for idle time: {1,time}", connectors.length, new Date()); //$NON-NLS-1$
}
for (IConnector connector : connectors)
@@ -249,7 +250,7 @@ public class HTTPAcceptor extends Acceptor implements IHTTPAcceptor, INet4jTrans
if (idleTime > maxIdleTime)
{
serverConnector.deactivate();
- OM.LOG.info("Deactivated idle HTTP server connector: " + serverConnector);
+ OM.LOG.info(Messages.getString("HTTPAcceptor.8") + serverConnector); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPAcceptorFactory.java b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPAcceptorFactory.java
index 7016365a0c..81e8f81992 100644
--- a/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPAcceptorFactory.java
+++ b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPAcceptorFactory.java
@@ -17,7 +17,7 @@ import org.eclipse.spi.net4j.AcceptorFactory;
*/
public class HTTPAcceptorFactory extends AcceptorFactory
{
- public static final String TYPE = "http";
+ public static final String TYPE = "http"; //$NON-NLS-1$
public HTTPAcceptorFactory()
{
diff --git a/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPServerConnector.java b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPServerConnector.java
index 69898384fe..3601aa6f40 100644
--- a/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPServerConnector.java
+++ b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/HTTPServerConnector.java
@@ -40,7 +40,7 @@ public class HTTPServerConnector extends HTTPConnector
public String getURL()
{
- return "agent://connector:" + getConnectorID();
+ return "agent://connector:" + getConnectorID(); //$NON-NLS-1$
}
public int getMaxIdleTime()
diff --git a/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/Net4jTransportServlet.java b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/Net4jTransportServlet.java
index 6fd1dc022d..2203331256 100644
--- a/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/Net4jTransportServlet.java
+++ b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/Net4jTransportServlet.java
@@ -15,6 +15,7 @@ import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.http.common.IHTTPConnector;
import org.eclipse.net4j.http.internal.common.HTTPConnector;
import org.eclipse.net4j.http.internal.server.bundle.OM;
+import org.eclipse.net4j.http.internal.server.messages.Messages;
import org.eclipse.net4j.http.server.INet4jTransportServlet;
import org.eclipse.net4j.protocol.IProtocol;
import org.eclipse.net4j.util.container.IPluginContainer;
@@ -49,7 +50,7 @@ public class Net4jTransportServlet extends HttpServlet implements INet4jTranspor
{
if (TRACER.isEnabled())
{
- TRACER.trace("Creating " + getClass().getName());
+ TRACER.trace("Creating " + getClass().getName()); //$NON-NLS-1$
}
}
@@ -79,10 +80,10 @@ public class Net4jTransportServlet extends HttpServlet implements INet4jTranspor
{
if (requestHandler == null)
{
- throw new ServletException("No request handler installed");
+ throw new ServletException(Messages.getString("Net4jTransportServlet_0")); //$NON-NLS-1$
}
- String connectorID = req.getParameter("list");
+ String connectorID = req.getParameter("list"); //$NON-NLS-1$
if (connectorID != null)
{
doList(connectorID, resp);
@@ -111,7 +112,7 @@ public class Net4jTransportServlet extends HttpServlet implements INet4jTranspor
break;
default:
- throw new IOException("Invalid opcaode: " + opcode);
+ throw new IOException("Invalid opcaode: " + opcode); //$NON-NLS-1$
}
out.flush();
@@ -121,7 +122,7 @@ public class Net4jTransportServlet extends HttpServlet implements INet4jTranspor
{
if (TRACER.isEnabled())
{
- TRACER.format("Received List request: {0}", connectorID);
+ TRACER.format("Received List request: {0}", connectorID); //$NON-NLS-1$
}
IHTTPConnector[] connectors = requestHandler.handleList(connectorID);
@@ -130,27 +131,27 @@ public class Net4jTransportServlet extends HttpServlet implements INet4jTranspor
{
// TODO Security: Hide connectorID!
writer.write(connector.getConnectorID());
- writer.write(":");
+ writer.write(":"); //$NON-NLS-1$
String userID = connector.getUserID();
if (userID != null)
{
- writer.write(" userID=" + userID);
+ writer.write(" userID=" + userID); //$NON-NLS-1$
}
if (connector instanceof HTTPServerConnector)
{
long idleTime = System.currentTimeMillis() - ((HTTPServerConnector)connector).getLastTraffic();
- writer.write(" idleTime=" + idleTime);
+ writer.write(" idleTime=" + idleTime); //$NON-NLS-1$
}
- writer.write("\n");
+ writer.write("\n"); //$NON-NLS-1$
for (IChannel channel : connector.getChannels())
{
- writer.write(" ");
+ writer.write(" "); //$NON-NLS-1$
writer.write(String.valueOf(channel.getID()));
- writer.write(": ");
+ writer.write(": "); //$NON-NLS-1$
IBufferHandler receiveHandler = channel.getReceiveHandler();
if (receiveHandler instanceof IProtocol<?>)
{
@@ -167,9 +168,9 @@ public class Net4jTransportServlet extends HttpServlet implements INet4jTranspor
writer.write(string);
}
- writer.write(" (");
+ writer.write(" ("); //$NON-NLS-1$
writer.write(String.valueOf(channel.getID()));
- writer.write(")\n");
+ writer.write(")\n"); //$NON-NLS-1$
}
}
}
@@ -182,7 +183,7 @@ public class Net4jTransportServlet extends HttpServlet implements INet4jTranspor
String userID = in.readString();
if (TRACER.isEnabled())
{
- TRACER.format("Received Connect request: {0}", userID);
+ TRACER.format("Received Connect request: {0}", userID); //$NON-NLS-1$
}
IHTTPConnector connector = requestHandler.handleConnect(userID);
@@ -204,7 +205,7 @@ public class Net4jTransportServlet extends HttpServlet implements INet4jTranspor
String connectorID = in.readString();
if (TRACER.isEnabled())
{
- TRACER.format("Received Disconnect request: {0}", connectorID);
+ TRACER.format("Received Disconnect request: {0}", connectorID); //$NON-NLS-1$
}
requestHandler.handleDisonnect(connectorID);
@@ -221,7 +222,7 @@ public class Net4jTransportServlet extends HttpServlet implements INet4jTranspor
String connectorID = in.readString();
if (TRACER.isEnabled())
{
- TRACER.format("Received Operations request: {0}", connectorID);
+ TRACER.format("Received Operations request: {0}", connectorID); //$NON-NLS-1$
}
requestHandler.handleOperations(connectorID, in, out);
@@ -252,7 +253,7 @@ public class Net4jTransportServlet extends HttpServlet implements INet4jTranspor
acceptor = (HTTPAcceptor)IPluginContainer.INSTANCE.getElement(ACCEPTORS_GROUP, HTTP_TYPE, null);
if (acceptor == null)
{
- throw new ServletException("Acceptor not found");
+ throw new ServletException(Messages.getString("Net4jTransportServlet_1")); //$NON-NLS-1$
}
acceptor.setServlet(this);
diff --git a/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/RandomizerInjector.java b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/RandomizerInjector.java
index 66640c32c3..170e156d43 100644
--- a/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/RandomizerInjector.java
+++ b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/RandomizerInjector.java
@@ -42,6 +42,6 @@ public class RandomizerInjector implements IElementProcessor
protected IRandomizer getRandomizer(IManagedContainer container)
{
- return (IRandomizer)container.getElement("org.eclipse.net4j.randomizers", "default", TYPE);
+ return (IRandomizer)container.getElement("org.eclipse.net4j.randomizers", "default", TYPE); //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/messages/Messages.java b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/messages/Messages.java
new file mode 100644
index 0000000000..e26c8da01b
--- /dev/null
+++ b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/messages/Messages.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.http.internal.server.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Eike Stepper
+ */
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.eclipse.net4j.http.internal.server.messages.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private Messages()
+ {
+ }
+
+ public static String getString(String key)
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString(key);
+ }
+ catch (MissingResourceException e)
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/messages/messages.properties b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/messages/messages.properties
new file mode 100644
index 0000000000..9ae501bf64
--- /dev/null
+++ b/plugins/org.eclipse.net4j.http.server/src/org/eclipse/net4j/http/internal/server/messages/messages.properties
@@ -0,0 +1,3 @@
+HTTPAcceptor.8=Deactivated idle HTTP server connector:
+Net4jTransportServlet_0=No request handler installed
+Net4jTransportServlet_1=Acceptor not found
diff --git a/plugins/org.eclipse.net4j.http.tests/src/org/eclipse/net4j/http/tests/HTTPTest.java b/plugins/org.eclipse.net4j.http.tests/src/org/eclipse/net4j/http/tests/HTTPTest.java
index 8d0a91a715..21754e3cbe 100644
--- a/plugins/org.eclipse.net4j.http.tests/src/org/eclipse/net4j/http/tests/HTTPTest.java
+++ b/plugins/org.eclipse.net4j.http.tests/src/org/eclipse/net4j/http/tests/HTTPTest.java
@@ -49,7 +49,7 @@ public class HTTPTest extends AbstractTransportTest
public void _testRequestFlush() throws Exception
{
HttpClient client = new HttpClient();
- PostMethod method = new PostMethod("http://eike@localhost:8080/net4j/echotest");
+ PostMethod method = new PostMethod("http://eike@localhost:8080/net4j/echotest"); //$NON-NLS-1$
method.setRequestEntity(new RequestEntity()
{
public long getContentLength()
@@ -59,7 +59,7 @@ public class HTTPTest extends AbstractTransportTest
public String getContentType()
{
- return "application/octet-stream";
+ return "application/octet-stream"; //$NON-NLS-1$
}
public boolean isRepeatable()
@@ -81,7 +81,7 @@ public class HTTPTest extends AbstractTransportTest
{
try
{
- msg("Writing " + b);
+ msg("Writing " + b); //$NON-NLS-1$
out.write(b);
out.flush();
Thread.sleep(1000);
@@ -103,7 +103,7 @@ public class HTTPTest extends AbstractTransportTest
assertEquals(i, b);
long gap = in.readLong();
- msg("Gap: " + gap);
+ msg("Gap: " + gap); //$NON-NLS-1$
}
method.releaseConnection();
@@ -126,7 +126,7 @@ public class HTTPTest extends AbstractTransportTest
private HTTPClientConnector getHTTPConnector()
{
- return (HTTPClientConnector)container.getElement("org.eclipse.net4j.connectors", "http",
- "http://eike@localhost:8080/net4j");
+ return (HTTPClientConnector)container.getElement("org.eclipse.net4j.connectors", "http", //$NON-NLS-1$ //$NON-NLS-2$
+ "http://eike@localhost:8080/net4j"); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.http.tests/src/org/eclipse/net4j/http/tests/Net4jEchoTestServlet.java b/plugins/org.eclipse.net4j.http.tests/src/org/eclipse/net4j/http/tests/Net4jEchoTestServlet.java
index 9ab59a9527..17129148b7 100644
--- a/plugins/org.eclipse.net4j.http.tests/src/org/eclipse/net4j/http/tests/Net4jEchoTestServlet.java
+++ b/plugins/org.eclipse.net4j.http.tests/src/org/eclipse/net4j/http/tests/Net4jEchoTestServlet.java
@@ -63,7 +63,7 @@ public class Net4jEchoTestServlet extends HttpServlet
long now = System.currentTimeMillis();
long gap = now - lastTime;
lastTime = now;
- IOUtil.OUT().println("Gap: " + gap);
+ IOUtil.OUT().println("Gap: " + gap); //$NON-NLS-1$
out.writeByte(b);
out.writeLong(gap);
diff --git a/plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPClientConnector.java b/plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPClientConnector.java
index db8fb1505d..688d2b0f07 100644
--- a/plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPClientConnector.java
+++ b/plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPClientConnector.java
@@ -113,7 +113,7 @@ public class HTTPClientConnector extends HTTPConnector
protected void doBeforeActivate() throws Exception
{
super.doBeforeActivate();
- checkArg(url, "url == null");
+ checkArg(url, "url == null"); //$NON-NLS-1$
}
@Override
diff --git a/plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPConnectorFactory.java b/plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPConnectorFactory.java
index 86cc8de92c..453ec8fb43 100644
--- a/plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPConnectorFactory.java
+++ b/plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPConnectorFactory.java
@@ -22,9 +22,9 @@ import java.net.URL;
*/
public class HTTPConnectorFactory extends ConnectorFactory
{
- private static final String HTTP_SCHEME_PREFIX = "http://";
+ private static final String HTTP_SCHEME_PREFIX = "http://"; //$NON-NLS-1$
- public static final String TYPE = "http";
+ public static final String TYPE = "http"; //$NON-NLS-1$
public HTTPConnectorFactory()
{
diff --git a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptorFactory.java b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptorFactory.java
index 4928540f11..5bdaaddb9e 100644
--- a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptorFactory.java
+++ b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptorFactory.java
@@ -20,7 +20,7 @@ import org.eclipse.spi.net4j.AcceptorFactory;
*/
public class JVMAcceptorFactory extends AcceptorFactory
{
- public static final String TYPE = "jvm";
+ public static final String TYPE = "jvm"; //$NON-NLS-1$
public JVMAcceptorFactory()
{
diff --git a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMClientConnector.java b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMClientConnector.java
index eab2e2597b..0754838ee3 100644
--- a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMClientConnector.java
+++ b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMClientConnector.java
@@ -40,7 +40,7 @@ public class JVMClientConnector extends JVMConnector
acceptor = JVMAcceptorManager.INSTANCE.getAcceptor(getName());
if (acceptor == null)
{
- throw new IllegalStateException("acceptor == null");
+ throw new IllegalStateException("acceptor == null"); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnector.java b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnector.java
index a92174711b..3659906f29 100644
--- a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnector.java
+++ b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnector.java
@@ -15,6 +15,7 @@ import org.eclipse.net4j.channel.ChannelException;
import org.eclipse.net4j.connector.ConnectorException;
import org.eclipse.net4j.connector.ConnectorState;
import org.eclipse.net4j.internal.jvm.bundle.OM;
+import org.eclipse.net4j.internal.jvm.messages.Messages;
import org.eclipse.net4j.jvm.IJVMConnector;
import org.eclipse.net4j.protocol.IProtocol;
import org.eclipse.net4j.util.om.trace.ContextTracer;
@@ -64,7 +65,7 @@ public abstract class JVMConnector extends Connector implements IJVMConnector
public String getURL()
{
- return "jvm://" + name;
+ return "jvm://" + name; //$NON-NLS-1$
}
@Override
@@ -92,7 +93,7 @@ public abstract class JVMConnector extends Connector implements IJVMConnector
IBuffer buffer = localQueue.poll();
if (TRACER.isEnabled())
{
- TRACER.trace("Multiplexing " + buffer.formatContent(true));
+ TRACER.trace("Multiplexing " + buffer.formatContent(true)); //$NON-NLS-1$
}
buffer.flip();
@@ -115,7 +116,7 @@ public abstract class JVMConnector extends Connector implements IJVMConnector
InternalChannel channel = getPeer().inverseOpenChannel(channelID, protocolID);
if (channel == null)
{
- throw new ChannelException("Failed to register channel with peer");
+ throw new ChannelException(Messages.getString("JVMConnector.2")); //$NON-NLS-1$
}
}
catch (ChannelException ex)
@@ -149,7 +150,7 @@ public abstract class JVMConnector extends Connector implements IJVMConnector
protected void doBeforeActivate() throws Exception
{
super.doBeforeActivate();
- checkState(name, "name");
+ checkState(name, "name"); //$NON-NLS-1$
}
@Override
diff --git a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnectorFactory.java b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnectorFactory.java
index 1e97105f00..519e1188e8 100644
--- a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnectorFactory.java
+++ b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnectorFactory.java
@@ -20,7 +20,7 @@ import org.eclipse.spi.net4j.ConnectorFactory;
*/
public class JVMConnectorFactory extends ConnectorFactory
{
- public static final String TYPE = "jvm";
+ public static final String TYPE = "jvm"; //$NON-NLS-1$
public JVMConnectorFactory()
{
diff --git a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/messages/Messages.java b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/messages/Messages.java
new file mode 100644
index 0000000000..a76ea00723
--- /dev/null
+++ b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/messages/Messages.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.internal.jvm.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Eike Stepper
+ */
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.eclipse.net4j.internal.jvm.messages.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private Messages()
+ {
+ }
+
+ public static String getString(String key)
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString(key);
+ }
+ catch (MissingResourceException e)
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/messages/messages.properties b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/messages/messages.properties
new file mode 100644
index 0000000000..c788784c1e
--- /dev/null
+++ b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/messages/messages.properties
@@ -0,0 +1 @@
+JVMConnector.2=Failed to register channel with peer
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ControlChannel.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ControlChannel.java
index 88cc52d770..1e5f6b3634 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ControlChannel.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ControlChannel.java
@@ -13,6 +13,7 @@ package org.eclipse.net4j.internal.tcp;
import org.eclipse.net4j.buffer.IBuffer;
import org.eclipse.net4j.connector.ConnectorException;
import org.eclipse.net4j.internal.tcp.bundle.OM;
+import org.eclipse.net4j.internal.tcp.messages.Messages;
import org.eclipse.net4j.protocol.IProtocol;
import org.eclipse.net4j.util.ImplementationError;
import org.eclipse.net4j.util.concurrent.ConcurrencyUtil;
@@ -71,7 +72,7 @@ public class ControlChannel extends Channel
{
if (TRACER.isEnabled())
{
- TRACER.format("Registering channel {0} with protocol {1}", channelID, protocol);
+ TRACER.format("Registering channel {0} with protocol {1}", channelID, protocol); //$NON-NLS-1$
}
assertValidChannelID(channelID);
@@ -87,7 +88,7 @@ public class ControlChannel extends Channel
Boolean acknowledged = acknowledgement.get(timeout);
if (acknowledged == null)
{
- throw new TimeoutRuntimeException("Registration timeout after " + timeout + " milliseconds");
+ throw new TimeoutRuntimeException(MessageFormat.format(Messages.getString("ControlChannel_0"), timeout)); //$NON-NLS-1$
}
return acknowledged;
@@ -97,7 +98,7 @@ public class ControlChannel extends Channel
{
if (TRACER.isEnabled())
{
- TRACER.format("Deregistering channel {0}", channelID);
+ TRACER.format("Deregistering channel {0}", channelID); //$NON-NLS-1$
}
assertValidChannelID(channelID);
@@ -146,7 +147,7 @@ public class ControlChannel extends Channel
InternalChannel channel = getConnector().inverseOpenChannel(channelID, protocolID);
if (channel == null)
{
- throw new ConnectorException("Could not open channel");
+ throw new ConnectorException(Messages.getString("ControlChannel_4")); //$NON-NLS-1$
}
}
catch (Exception ex)
@@ -227,7 +228,7 @@ public class ControlChannel extends Channel
if (!getConnector().isNegotiating())
{
getConnector().deactivate();
- throw new IllegalStateException("Connector is not negotiating");
+ throw new IllegalStateException("Connector is not negotiating"); //$NON-NLS-1$
}
}
@@ -235,7 +236,7 @@ public class ControlChannel extends Channel
{
if (!getConnector().isConnected())
{
- throw new IllegalStateException("Connector is not connected");
+ throw new IllegalStateException("Connector is not connected"); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/SelectorUtil.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/SelectorUtil.java
index f2e040232d..5fc85a2c58 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/SelectorUtil.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/SelectorUtil.java
@@ -79,7 +79,7 @@ public final class SelectorUtil
{
TRACER.trace("Setting interest " //$NON-NLS-1$
+ formatInterestOps(newOps)
- + (oldOps == 0 ? "" : " (was " + formatInterestOps(oldOps).toLowerCase() + ")")); //$NON-NLS-1$ //$NON-NLS-2$
+ + (oldOps == 0 ? "" : " (was " + formatInterestOps(oldOps).toLowerCase() + ")")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
selectionKey.interestOps(newOps);
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java
index fe958b74d2..cb9e62b2b6 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java
@@ -137,7 +137,7 @@ public class TCPAcceptor extends Acceptor implements ITCPAcceptor, ITCPPassiveSe
if (addr == null)
{
address = socket.getInetAddress().toString();
- if (address.startsWith("/"))
+ if (address.startsWith("/")) //$NON-NLS-1$
{
address = address.substring(1);
}
@@ -217,7 +217,7 @@ public class TCPAcceptor extends Acceptor implements ITCPAcceptor, ITCPPassiveSe
super.doBeforeActivate();
if (selector == null)
{
- throw new IllegalStateException("selector == null");
+ throw new IllegalStateException("selector == null"); //$NON-NLS-1$
}
if (startSynchronously)
@@ -240,7 +240,7 @@ public class TCPAcceptor extends Acceptor implements ITCPAcceptor, ITCPPassiveSe
{
startLatch = null;
IOUtil.closeSilent(serverSocketChannel);
- throw new IOException("Registration with selector timed out after " + synchronousStartTimeout + " millis");
+ throw new IOException("Registration with selector timed out after " + synchronousStartTimeout + " millis"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptorFactory.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptorFactory.java
index b7b345e6a5..b356c4e153 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptorFactory.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptorFactory.java
@@ -20,7 +20,7 @@ import org.eclipse.spi.net4j.AcceptorFactory;
*/
public class TCPAcceptorFactory extends AcceptorFactory
{
- public static final String TYPE = "tcp";
+ public static final String TYPE = "tcp"; //$NON-NLS-1$
private static final String SEPARATOR = ":"; //$NON-NLS-1$
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPClientConnector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPClientConnector.java
index b0cc84d9a9..480705336d 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPClientConnector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPClientConnector.java
@@ -75,12 +75,12 @@ public class TCPClientConnector extends TCPConnector
super.doBeforeActivate();
if (getHost() == null)
{
- throw new IllegalStateException("host == null");
+ throw new IllegalStateException("host == null"); //$NON-NLS-1$
}
if (getPort() == 0)
{
- throw new IllegalStateException("port == 0");
+ throw new IllegalStateException("port == 0"); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
index 0b1cdd8e73..912371d4e8 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
@@ -16,6 +16,7 @@ import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.connector.ConnectorException;
import org.eclipse.net4j.connector.ConnectorState;
import org.eclipse.net4j.internal.tcp.bundle.OM;
+import org.eclipse.net4j.internal.tcp.messages.Messages;
import org.eclipse.net4j.protocol.IProtocol;
import org.eclipse.net4j.tcp.ITCPActiveSelectorListener;
import org.eclipse.net4j.tcp.ITCPConnector;
@@ -116,7 +117,7 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
@Override
public String getURL()
{
- return "tcp://" + host + ":" + port;
+ return "tcp://" + host + ":" + port; //$NON-NLS-1$ //$NON-NLS-2$
}
public void handleRegistration(ITCPSelector selector, SocketChannel socketChannel)
@@ -327,12 +328,12 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
super.doBeforeActivate();
if (socketChannel == null)
{
- throw new IllegalStateException("socketChannel == null");
+ throw new IllegalStateException("socketChannel == null"); //$NON-NLS-1$
}
if (selector == null)
{
- throw new IllegalStateException("selector == null");
+ throw new IllegalStateException("selector == null"); //$NON-NLS-1$
}
}
@@ -366,7 +367,7 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
{
if (selectionKey == null)
{
- throw new IllegalStateException("No selection key for connector " + this);
+ throw new IllegalStateException("No selection key for connector " + this); //$NON-NLS-1$
}
}
@@ -405,7 +406,7 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
{
if (buffer.getByteBuffer() != byteBuffer)
{
- throw new IllegalArgumentException("The passed buffer is not the last that was produced");
+ throw new IllegalArgumentException("The passed buffer is not the last that was produced"); //$NON-NLS-1$
}
controlChannel.sendBuffer(buffer);
@@ -424,7 +425,7 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
}
else
{
- OM.LOG.error("Connector negotiation failed: " + TCPConnector.this);
+ OM.LOG.error(Messages.getString("TCPConnector.6") + TCPConnector.this); //$NON-NLS-1$
failed = true;
}
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnectorFactory.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnectorFactory.java
index 3f071f9be1..0aad58334c 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnectorFactory.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnectorFactory.java
@@ -24,9 +24,9 @@ import java.net.URL;
*/
public class TCPConnectorFactory extends ConnectorFactory
{
- public static final String TYPE = "tcp";
+ public static final String TYPE = "tcp"; //$NON-NLS-1$
- private static final String URL_SCHEME = "http://";
+ private static final String URL_SCHEME = "http://"; //$NON-NLS-1$
public TCPConnectorFactory()
{
@@ -70,13 +70,13 @@ public class TCPConnectorFactory extends ConnectorFactory
String userID = connector.getUserID();
if (!StringUtil.isEmpty(userID))
{
- description = userID + "@" + description;
+ description = userID + "@" + description; //$NON-NLS-1$
}
int port = connector.getPort();
if (port != ITCPConnector.DEFAULT_PORT)
{
- description = description + ":" + port;
+ description = description + ":" + port; //$NON-NLS-1$
}
return description;
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java
index 68db3c6c62..07f58e0cc9 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java
@@ -74,7 +74,7 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
@Override
public String toString()
{
- return "REGISTER " + channel;
+ return "REGISTER " + channel; //$NON-NLS-1$
}
});
}
@@ -93,7 +93,7 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
@Override
public String toString()
{
- return "REGISTER " + channel;
+ return "REGISTER " + channel; //$NON-NLS-1$
}
});
}
@@ -110,7 +110,7 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
@Override
public String toString()
{
- return "INTEREST CONNECT " + selectionKey.channel() + " = " + on;
+ return "INTEREST CONNECT " + selectionKey.channel() + " = " + on; //$NON-NLS-1$ //$NON-NLS-2$
}
});
}
@@ -127,7 +127,7 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
@Override
public String toString()
{
- return "INTEREST READ " + selectionKey.channel() + " = " + on;
+ return "INTEREST READ " + selectionKey.channel() + " = " + on; //$NON-NLS-1$ //$NON-NLS-2$
}
});
}
@@ -144,7 +144,7 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
@Override
public String toString()
{
- return "INTEREST WRITE " + selectionKey.channel() + " = " + on;
+ return "INTEREST WRITE " + selectionKey.channel() + " = " + on; //$NON-NLS-1$ //$NON-NLS-2$
}
});
}
@@ -347,7 +347,7 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
{
if (TRACER.isEnabled())
{
- TRACER.format("Ordering {0} operation {1}", client ? "client" : "server", operation);
+ TRACER.format("Ordering {0} operation {1}", client ? "client" : "server", operation); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
if (client)
@@ -373,7 +373,7 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
{
if (TRACER.isEnabled())
{
- TRACER.format("Executing {0} operation {1}", client ? "client" : "server", operation);
+ TRACER.format("Executing {0} operation {1}", client ? "client" : "server", operation); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
operation.run();
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelectorFactory.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelectorFactory.java
index 5e6b7e8f0c..0c090369bd 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelectorFactory.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelectorFactory.java
@@ -18,9 +18,9 @@ import org.eclipse.net4j.util.factory.Factory;
*/
public class TCPSelectorFactory extends Factory
{
- public static final String PRODUCT_GROUP = "org.eclipse.net4j.selectors";
+ public static final String PRODUCT_GROUP = "org.eclipse.net4j.selectors"; //$NON-NLS-1$
- public static final String TYPE = "tcp";
+ public static final String TYPE = "tcp"; //$NON-NLS-1$
public TCPSelectorFactory()
{
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/messages/Messages.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/messages/Messages.java
new file mode 100644
index 0000000000..a878d89d20
--- /dev/null
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/messages/Messages.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.internal.tcp.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Eike Stepper
+ */
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.eclipse.net4j.internal.tcp.messages.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private Messages()
+ {
+ }
+
+ public static String getString(String key)
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString(key);
+ }
+ catch (MissingResourceException e)
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/messages/messages.properties b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/messages/messages.properties
new file mode 100644
index 0000000000..8814d3ae7f
--- /dev/null
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/messages/messages.properties
@@ -0,0 +1,3 @@
+ControlChannel_0=Registration timeout after {0} milliseconds
+ControlChannel_4=Could not open channel
+TCPConnector.6=Connector negotiation failed:

Back to the top