diff options
author | Brian Vosburgh | 2013-02-08 23:17:12 +0000 |
---|---|---|
committer | Brian Vosburgh | 2013-02-11 22:17:26 +0000 |
commit | c804b90b6fa85579408d6b7710371079a4bf10dc (patch) | |
tree | 3cc84eef37099ab9635e6665741ca3752ccc66ec /jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen | |
parent | f6c8a4e2a6408cb52148ff9eb69d819b578848ee (diff) | |
download | webtools.dali-c804b90b6fa85579408d6b7710371079a4bf10dc.tar.gz webtools.dali-c804b90b6fa85579408d6b7710371079a4bf10dc.tar.xz webtools.dali-c804b90b6fa85579408d6b7710371079a4bf10dc.zip |
clean up messages in jaxb plug-ins
Diffstat (limited to 'jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen')
-rw-r--r-- | jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/.classpath | 1 | ||||
-rw-r--r-- | jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/build.properties | 18 | ||||
-rw-r--r-- | jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/property_files/jpt_jaxb_core_schemagen.properties (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/internal/jpt_jaxb_core.properties) | 14 | ||||
-rw-r--r-- | jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/JptJaxbCoreSchemagenMessages.java | 42 | ||||
-rw-r--r-- | jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/Main.java | 15 | ||||
-rw-r--r-- | jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/internal/JptJaxbCoreMessages.java | 43 | ||||
-rw-r--r-- | jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/internal/Tools.java | 21 |
7 files changed, 77 insertions, 77 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/.classpath b/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/.classpath index 2fc0e3f0a8..53c9ead412 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/.classpath +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/.classpath @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="property_files"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"> <accessrules> diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/build.properties b/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/build.properties index d535c6112b..196d809321 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/build.properties +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/build.properties @@ -1,14 +1,14 @@ -############################################################################### -# Copyright (c) 2010, 2011 Oracle. -# 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 +################################################################################ +# Copyright (c) 2010, 2013 Oracle. 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: -# Oracle. - initial API and implementation -############################################################################### -source.. = src/ +# Oracle - initial API and implementation +################################################################################ +source.. = src/,\ + property_files/ output.. = bin/ bin.includes = .,\ META-INF/,\ diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/internal/jpt_jaxb_core.properties b/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/property_files/jpt_jaxb_core_schemagen.properties index 349e16f5eb..50ae679211 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/internal/jpt_jaxb_core.properties +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/property_files/jpt_jaxb_core_schemagen.properties @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2010, 2012 Oracle. All rights reserved. +# Copyright (c) 2010, 2013 Oracle. 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. @@ -8,12 +8,12 @@ # Oracle - initial API and implementation ################################################################################ -LOADING_CLASSES = loading... -GENERATING_SCHEMA = \ngenerating schema... -SCHEMA_GENERATED = \nSchema generated: {0} -SCHEMA_NOT_CREATED = \nSchema {0} not created -NOT_FOUND = \n\tNot found: {0} -CONTEXT_FACTORY_NOT_FOUND = \nThe JAXBContextFactory {0} \n\ +LOADING_CLASSES=loading... +GENERATING_SCHEMA=\ngenerating schema... +SCHEMA_GENERATED=\nSchema generated: {0} +SCHEMA_NOT_CREATED=\nSchema {0} not created +NOT_FOUND=\n\tNot found: {0} +CONTEXT_FACTORY_NOT_FOUND=\nThe JAXBContextFactory {0} \n\ specified in the jaxb.properties file could not be located on the project classpath. \n\ The JAXB provider that defines this factory should be added to the project classpath, \n\ or the jaxb.properties file should be removed to use the default provider. diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/JptJaxbCoreSchemagenMessages.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/JptJaxbCoreSchemagenMessages.java new file mode 100644 index 0000000000..557922f513 --- /dev/null +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/JptJaxbCoreSchemagenMessages.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2010, 2013 Oracle. 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: + * Oracle - initial API and implementation + *******************************************************************************/ +package org.eclipse.jpt.jaxb.core.schemagen; + +import java.util.MissingResourceException; +import java.util.ResourceBundle; + +/** + * Localized messages used by Dali JAXB core schema generation. + */ +@SuppressWarnings("nls") +public class JptJaxbCoreSchemagenMessages { + + private static final String BUNDLE_NAME = "jpt_jaxb_core_schemagen"; //$NON-NLS-1$ + private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); + + public static String getString(String key) { + try { + return RESOURCE_BUNDLE.getString(key); + } catch (MissingResourceException ex) { + return '!' + key + '!'; + } + } + + public static final String LOADING_CLASSES = "LOADING_CLASSES"; + public static final String GENERATING_SCHEMA = "GENERATING_SCHEMA"; + public static final String SCHEMA_GENERATED = "SCHEMA_GENERATED"; + public static final String SCHEMA_NOT_CREATED = "SCHEMA_NOT_CREATED"; + public static final String NOT_FOUND = "NOT_FOUND"; + public static final String CONTEXT_FACTORY_NOT_FOUND = "CONTEXT_FACTORY_NOT_FOUND"; + + private JptJaxbCoreSchemagenMessages() { + throw new UnsupportedOperationException(); + } +}
\ No newline at end of file diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/Main.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/Main.java index 8bb4f2d081..58b9ad4edd 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/Main.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/Main.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2012 Oracle. All rights reserved. + * Copyright (c) 2010, 2013 Oracle. 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. @@ -23,7 +23,6 @@ import javax.xml.bind.SchemaOutputResolver; import javax.xml.transform.Result; import javax.xml.transform.stream.StreamResult; -import org.eclipse.jpt.jaxb.core.schemagen.internal.JptJaxbCoreMessages; import org.eclipse.jpt.jaxb.core.schemagen.internal.Tools; /** @@ -83,14 +82,14 @@ public class Main this.generateSchema(jaxbContext); } else { - Tools.logMessage(INFO, Tools.bind(JptJaxbCoreMessages.SCHEMA_NOT_CREATED, this.targetSchemaName)); + Tools.logMessage(INFO, Tools.bind(JptJaxbCoreSchemagenMessages.SCHEMA_NOT_CREATED, this.targetSchemaName)); System.exit(1); } System.out.flush(); } private JAXBContext buildJaxbContext() { - Tools.logMessage(INFO, Tools.getString(JptJaxbCoreMessages.LOADING_CLASSES)); + Tools.logMessage(INFO, Tools.getString(JptJaxbCoreSchemagenMessages.LOADING_CLASSES)); JAXBContext jaxbContext = null; try { ClassLoader loader = Thread.currentThread().getContextClassLoader(); @@ -106,7 +105,7 @@ public class Main } private void generateSchema(JAXBContext jaxbContext) { - Tools.logMessage(INFO, Tools.getString(JptJaxbCoreMessages.GENERATING_SCHEMA)); + Tools.logMessage(INFO, Tools.getString(JptJaxbCoreSchemagenMessages.GENERATING_SCHEMA)); System.out.flush(); SchemaOutputResolver schemaOutputResolver = @@ -129,7 +128,7 @@ public class Main Tools.logMessage(INFO, className); } catch (ClassNotFoundException e) { - Tools.logMessage(SEVERE, Tools.bind(JptJaxbCoreMessages.NOT_FOUND, className)); + Tools.logMessage(SEVERE, Tools.bind(JptJaxbCoreSchemagenMessages.NOT_FOUND, className)); } } System.out.flush(); @@ -143,7 +142,7 @@ public class Main Tools.logMessage(SEVERE, message); } else if(linkedEx != null && linkedEx instanceof ClassNotFoundException) { - String errorMessage = Tools.bind(JptJaxbCoreMessages.CONTEXT_FACTORY_NOT_FOUND, linkedEx.getMessage()); + String errorMessage = Tools.bind(JptJaxbCoreSchemagenMessages.CONTEXT_FACTORY_NOT_FOUND, linkedEx.getMessage()); Tools.logMessage(SEVERE, errorMessage); } else { @@ -236,7 +235,7 @@ class JptSchemaOutputResolver extends SchemaOutputResolver { StreamResult result = new StreamResult(file); result.setSystemId(file.toURL().toExternalForm()); - Tools.logMessage(INFO, Tools.bind(JptJaxbCoreMessages.SCHEMA_GENERATED, file)); + Tools.logMessage(INFO, Tools.bind(JptJaxbCoreSchemagenMessages.SCHEMA_GENERATED, file)); return result; } diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/internal/JptJaxbCoreMessages.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/internal/JptJaxbCoreMessages.java deleted file mode 100644 index 49170533dd..0000000000 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/internal/JptJaxbCoreMessages.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2010 Oracle. 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: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jaxb.core.schemagen.internal; - -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * Localized messages used by Dali JAXB core. - */ -public class JptJaxbCoreMessages -{ - - public static final String LOADING_CLASSES = "LOADING_CLASSES"; - public static final String GENERATING_SCHEMA = "GENERATING_SCHEMA"; - public static final String SCHEMA_GENERATED = "SCHEMA_GENERATED"; - public static final String SCHEMA_NOT_CREATED = "SCHEMA_NOT_CREATED"; - public static final String NOT_FOUND = "NOT_FOUND"; - public static final String CONTEXT_FACTORY_NOT_FOUND = "CONTEXT_FACTORY_NOT_FOUND"; - - - private static final String BUNDLE_NAME = "org.eclipse.jpt.jaxb.core.schemagen.internal.jpt_jaxb_core"; //$NON-NLS-1$ - private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); - - private JptJaxbCoreMessages() { - } - - public static String getString(String key) { - try { - return RESOURCE_BUNDLE.getString(key); - } - catch (MissingResourceException e) { - return '!' + key + '!'; - } - } -}
\ No newline at end of file diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/internal/Tools.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/internal/Tools.java index 8696c5c2ff..ccfff4c35f 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/internal/Tools.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core.schemagen/src/org/eclipse/jpt/jaxb/core/schemagen/internal/Tools.java @@ -1,12 +1,12 @@ /******************************************************************************* -* Copyright (c) 2010, 2012 Oracle. 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: -* Oracle - initial API and implementation -*******************************************************************************/ + * Copyright (c) 2010, 2013 Oracle. 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: + * Oracle - initial API and implementation + *******************************************************************************/ package org.eclipse.jpt.jaxb.core.schemagen.internal; import static java.util.logging.Level.SEVERE; @@ -14,6 +14,7 @@ import static java.util.logging.Level.SEVERE; import java.io.File; import java.text.MessageFormat; import java.util.logging.Level; +import org.eclipse.jpt.jaxb.core.schemagen.JptJaxbCoreSchemagenMessages; /** * Tools @@ -70,7 +71,7 @@ public final class Tools public static String stripProtocol(String uri) { - return uri.replaceFirst("http://", EMPTY_STRING); + return uri.replaceFirst("http://", EMPTY_STRING); //$NON-NLS-1$ } @@ -115,7 +116,7 @@ public final class Tools // ********** NLS utilities ********** public static String getString(String key) { - return JptJaxbCoreMessages.getString(key); + return JptJaxbCoreSchemagenMessages.getString(key); } public static String bind(String key, Object argument) { |