Author: Grid.Qian
Date: 2008-06-06 04:15:24 -0400 (Fri, 06 Jun 2008)
New Revision: 8590
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeClassPathInitializer.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeManager.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSClassPathCommand.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCore.properties
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCoreMessages.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java
Log:
JBIDE-2047: modify for I18n messages
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeClassPathInitializer.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeClassPathInitializer.java 2008-06-06
05:01:35 UTC (rev 8589)
+++
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeClassPathInitializer.java 2008-06-06
08:15:24 UTC (rev 8590)
@@ -28,7 +28,7 @@
throws CoreException {
if (containerPath.segment(0).equals(
- JbossWSCoreMessages.JBOSSWS_RUNTIME_LIB)) {
+ JbossWSCoreMessages.JBossWS_Runtime_Lib)) {
JbossWSRuntimeClasspathContainer container = new JbossWSRuntimeClasspathContainer(
containerPath);
JavaCore.setClasspathContainer(containerPath,
@@ -51,7 +51,7 @@
}
public String getDescription() {
- return JbossWSCoreMessages.JBOSSWS_RUNTIME;
+ return JbossWSCoreMessages.JBossWS_Runtime;
}
public int getKind() {
@@ -67,9 +67,9 @@
ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
IPath wsPath = JbossWSCoreUtils.getJbossWSRuntimePath(null);
if (wsPath != null) {
- IPath libPath = wsPath.append(JbossWSCoreMessages.DIR_LIB);
+ IPath libPath = wsPath.append(JbossWSCoreMessages.Dir_Lib);
list.addAll(Arrays.asList(getEntries(libPath)));
- libPath = wsPath.append(JbossWSCoreMessages.DIR_CLIENT);
+ libPath = wsPath.append(JbossWSCoreMessages.Dir_Client);
list.addAll(Arrays.asList(getEntries(libPath)));
entries = list.toArray(new IClasspathEntry[list.size()]);
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeManager.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeManager.java 2008-06-06
05:01:35 UTC (rev 8589)
+++
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeManager.java 2008-06-06
08:15:24 UTC (rev 8590)
@@ -21,12 +21,8 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.preference.IPersistentPreferenceStore;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.tools.ws.core.JbossWSCorePlugin;
import org.jboss.tools.ws.core.messages.JbossWSCoreMessages;
@@ -45,7 +41,7 @@
private JbossWSRuntimeManager() {
IPreferenceStore ps = JbossWSCorePlugin.getDefault().getPreferenceStore();
- String runtimeListString = ps.getString(JbossWSCoreMessages.WS_LOCATION);
+ String runtimeListString = ps.getString(JbossWSCoreMessages.WS_Location);
runtimes = converter.getMap(runtimeListString);
}
@@ -191,29 +187,6 @@
return null;
}
- /**
- * If project has JbossWS facet then this method returns default JbossWS runtime for
proper version of facet.
- * Otherwise return first default runtime.
- * @param project
- * @return
- */
- public static JbossWSRuntime getDefaultRuntimeForProject(IProject project) {
- if(project==null) {
- throw new IllegalArgumentException("Project must not be null.");
- }
- try {
- IProjectFacet facet =
ProjectFacetsManager.getProjectFacet("jbossws.core");
- IFacetedProject facetedProject = ProjectFacetsManager.create(project);
- if(facetedProject!=null) {
- return getInstance().getDefaultRuntime();
- }
- } catch (CoreException e) {
- e.printStackTrace();
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- }
- return getInstance().getDefaultRuntime();
- }
/**
* Return list of available JbossWSRuntime names
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSClassPathCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSClassPathCommand.java 2008-06-06
05:01:35 UTC (rev 8589)
+++
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSClassPathCommand.java 2008-06-06
08:15:24 UTC (rev 8590)
@@ -58,7 +58,7 @@
IJavaProject javaProject = JavaCore.create(project);
IClasspathEntry newClasspath = JavaCore.newContainerEntry(new Path(
- JbossWSCoreMessages.JBOSSWS_RUNTIME_LIB));
+ JbossWSCoreMessages.JBossWS_Runtime_Lib));
IClasspathEntry[] oldClasspathEntries = javaProject
.readRawClasspath();
@@ -70,7 +70,7 @@
project.getFullPath())
|| oldClasspathEntries[i].getPath().lastSegment()
.toUpperCase().contains(
- JbossWSCoreMessages.JBOSSAS)) {
+ JbossWSCoreMessages.JBossAS)) {
isFolderInClassPathAlready = true;
break;
}
@@ -89,7 +89,7 @@
}
} catch (JavaModelException e) {
status = StatusUtils.errorStatus(NLS.bind(
- JbossWSCoreMessages.ERROR_COPY, new String[] { e
+ JbossWSCoreMessages.Error_Copy, new String[] { e
.getLocalizedMessage() }), e);
return status;
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java 2008-06-06
05:01:35 UTC (rev 8589)
+++
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java 2008-06-06
08:15:24 UTC (rev 8590)
@@ -48,22 +48,22 @@
IPath wsPath = JbossWSCoreUtils.getJbossWSRuntimePath(null);
IPath libPath = null;
try {
- libPath = wsPath.append(JbossWSCoreMessages.DIR_LIB);
+ libPath = wsPath.append(JbossWSCoreMessages.Dir_Lib);
} catch (Exception e) {
status = StatusUtils.errorStatus(NLS.bind(
- JbossWSCoreMessages.ERROR_WS_LOCATION, new String[] { e
+ JbossWSCoreMessages.Error_WS_Location, new String[] { e
.getLocalizedMessage() }), e);
return status;
}
IPath targetPath = JbossWSCoreUtils.pathToWebProjectContainer(project
.toString());
- targetPath = targetPath.append(JbossWSCoreMessages.DIR_WEB_INF).append(
- JbossWSCoreMessages.DIR_LIB);
+ targetPath = targetPath.append(JbossWSCoreMessages.Dir_Web_Inf).append(
+ JbossWSCoreMessages.Dir_Lib);
status = JbossWSCoreUtils.copy(libPath, targetPath);
if (status == Status.OK_STATUS) {
// copy client jars to project's folder
- libPath = wsPath.append(JbossWSCoreMessages.DIR_CLIENT);
+ libPath = wsPath.append(JbossWSCoreMessages.Dir_Client);
status = JbossWSCoreUtils.copy(libPath, targetPath);
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java 2008-06-06
05:01:35 UTC (rev 8589)
+++
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java 2008-06-06
08:15:24 UTC (rev 8590)
@@ -26,7 +26,7 @@
public void execute(IProject project, IProjectFacetVersion arg1, Object arg2,
IProgressMonitor monitor) throws CoreException {
- monitor.beginTask(JbossWSCoreMessages.PROGRESS_INSTALL_JBOSSWS_RUNTIME, 2 );
+ monitor.beginTask(JbossWSCoreMessages.Progress_Install_JBossWS_Runtime, 2 );
JbossWSClassPathCommand command = new JbossWSClassPathCommand(project);
command.executeOverride(monitor);
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCore.properties
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCore.properties 2008-06-06
05:01:35 UTC (rev 8589)
+++
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCore.properties 2008-06-06
08:15:24 UTC (rev 8590)
@@ -1,12 +1,12 @@
-PROGRESS_INSTALL_JBOSSWS_RUNTIME=JBoss Web Service Runtime
-DIR_LIB=lib
-DIR_CLIENT=client
-DIR_WEB_INF=WEB-INF
-DIR_WEB_CONTENT=WebContent
-ERROR_COPY=Exception while copy JBossWS jars
-WS_LOCATION=jbosswsruntimelocation
-JBOSSWS_RUNTIME_LIB=JbossWSRuntimeLib
-JBOSSWS_RUNTIME=JBoss WS Runtime
-JBOSSAS=JBOSS
-ERROR_WS_LOCATION=The JBoss WS Runtime Location is NULL
-ERROR_WS_CLASSPATH=A error comes up when create JBoss WS Classpath
\ No newline at end of file
+Progress_Install_JBossWS_Runtime=JBoss Web Service Runtime
+Dir_Lib=lib
+Dir_Client=client
+Dir_Web_Inf=WEB-INF
+Dir_Web_Content=WebContent
+Error_Copy=Exception while copy JBossWS jars
+WS_Location=jbosswsruntimelocation
+JBossWS_Runtime_Lib=JbossWSRuntimeLib
+JBossWS_Runtime=JBoss WS Runtime
+JBossAS=JBOSS
+Error_WS_Location=The JBoss WS Runtime Location is NULL
+Error_WS_Classpath=A error comes up when create JBoss WS Classpath
\ No newline at end of file
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCoreMessages.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCoreMessages.java 2008-06-06
05:01:35 UTC (rev 8589)
+++
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCoreMessages.java 2008-06-06
08:15:24 UTC (rev 8590)
@@ -24,18 +24,18 @@
// Do not instantiate
}
- public static String PROGRESS_INSTALL_JBOSSWS_RUNTIME;
- public static String DIR_LIB;
- public static String DIR_CLIENT;
- public static String DIR_WEB_INF;
- public static String DIR_WEB_CONTENT;
- public static String ERROR_COPY;
- public static String WS_LOCATION;
- public static String JBOSSWS_RUNTIME_LIB;
- public static String JBOSSWS_RUNTIME;
- public static String JBOSSAS;
- public static String ERROR_WS_LOCATION;
- public static String ERROR_WS_CLASSPATH;
+ public static String Progress_Install_JBossWS_Runtime;
+ public static String Dir_Lib;
+ public static String Dir_Client;
+ public static String Dir_Web_Inf;
+ public static String Dir_Web_Content;
+ public static String Error_Copy;
+ public static String WS_Location;
+ public static String JBossWS_Runtime_Lib;
+ public static String JBossWS_Runtime;
+ public static String JBossAS;
+ public static String Error_WS_Location;
+ public static String Error_WS_Classpath;
static {
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java 2008-06-06
05:01:35 UTC (rev 8589)
+++
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java 2008-06-06
08:15:24 UTC (rev 8590)
@@ -131,7 +131,7 @@
finStream = new FileInputStream(children[i]);
} catch (FileNotFoundException e) {
status = StatusUtils.errorStatus(NLS.bind(
- JbossWSCoreMessages.ERROR_COPY, new String[] { e
+ JbossWSCoreMessages.Error_Copy, new String[] { e
.getLocalizedMessage() }), e);
}
try {
@@ -139,7 +139,7 @@
targetPath), children[i].getName(), finStream);
} catch (CoreException e) {
status = StatusUtils.errorStatus(NLS.bind(
- JbossWSCoreMessages.ERROR_COPY, new String[] { e
+ JbossWSCoreMessages.Error_Copy, new String[] { e
.getLocalizedMessage() }), e);
}
} else {
@@ -151,7 +151,7 @@
.getLocation());
} catch (CoreException e) {
status = StatusUtils.errorStatus(NLS.bind(
- JbossWSCoreMessages.ERROR_COPY, new String[] { e
+ JbossWSCoreMessages.Error_Copy, new String[] { e
.getLocalizedMessage() }), e);
}
}
@@ -238,7 +238,7 @@
public static Map<String, JbossWSRuntime> getJbossWSRutntimeMap(){
IPreferenceStore ps = JbossWSCorePlugin.getDefault()
.getPreferenceStore();
- String runtimeLocation = ps.getString(JbossWSCoreMessages.WS_LOCATION);
+ String runtimeLocation = ps.getString(JbossWSCoreMessages.WS_Location);
if (runtimeLocation == null || runtimeLocation.equals("")) {
return new HashMap<String, JbossWSRuntime>();
}