Author: Grid.Qian
Date: 2008-06-12 23:24:13 -0400 (Thu, 12 Jun 2008)
New Revision: 8749
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUI.properties
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUIMessages.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbwsLibraryListFieldEditor.java
Log:
JBIDE-2261: add runtime version
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUI.properties
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUI.properties 2008-06-13
03:24:05 UTC (rev 8748)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUI.properties 2008-06-13
03:24:13 UTC (rev 8749)
@@ -10,6 +10,7 @@
Error_JBossWS_Basic_Editor_Support=Editor supports only grid layout
Error_JBossWS_Basic_Editor_Different=Parent for label is different
JBossWS_Runtime_List_Field_Editor_Name=Name
+JBossWS_Runtime_List_Field_Editor_Version=Version
JBossWS_Runtime_List_Field_Editor_Path=Path
JBossWS_Runtime_List_Field_Editor_Inputelement_Must_Be=inputElement must be
JBossWS_Runtime_List_Field_Editor_An_Instance_Of_List=an instance of
List<JBossWSRuntime>.
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUIMessages.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUIMessages.java 2008-06-13
03:24:05 UTC (rev 8748)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUIMessages.java 2008-06-13
03:24:13 UTC (rev 8749)
@@ -37,6 +37,7 @@
public static String Error_JBossWS_Basic_Editor_Support;
public static String Error_JBossWS_Basic_Editor_Different;
public static String JBossWS_Runtime_List_Field_Editor_Name;
+ public static String JBossWS_Runtime_List_Field_Editor_Version;
public static String JBossWS_Runtime_List_Field_Editor_Path;
public static String JBossWS_Runtime_List_Field_Editor_Inputelement_Must_Be;
public static String JBossWS_Runtime_List_Field_Editor_An_Instance_Of_List;
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java 2008-06-13
03:24:05 UTC (rev 8748)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java 2008-06-13
03:24:13 UTC (rev 8749)
@@ -200,11 +200,15 @@
TableColumn tc2 = new TableColumn(tableView.getTable(), SWT.LEFT);
tc2.setWidth(TC_NAME_WIDTH);
tc2.setText(JbossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Name);
-
+
TableColumn tc3 = new TableColumn(tableView.getTable(), SWT.LEFT);
- tc3.setWidth(TC_PATH_WIDTH);
- tc3.setText(JbossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Path);
+ tc3.setWidth(TC_VERSION_WIDTH);
+ tc3.setText(JbossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Version);
+ TableColumn tc4 = new TableColumn(tableView.getTable(), SWT.LEFT);
+ tc4.setWidth(TC_PATH_WIDTH);
+ tc4.setText(JbossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Path);
+
tableView.setContentProvider(new IStructuredContentProvider() {
@SuppressWarnings("unchecked")
@@ -231,7 +235,8 @@
private static final int TC_DEFAULT_NUMBER = 0;
private static final int TC_NAME_NUMBER = 1;
- private static final int TC_PATH_NUMBER = 2;
+ private static final int TC_VERSION_NUMBER = 2;
+ private static final int TC_PATH_NUMBER = 3;
public void addListener(ILabelProviderListener listener) {
}
@@ -258,6 +263,9 @@
if (columnIndex == TC_NAME_NUMBER) {
return rt.getName();
}
+ if (columnIndex == TC_VERSION_NUMBER) {
+ return rt.getVersion().toString();
+ }
if (columnIndex == TC_PATH_NUMBER) {
return rt.getHomeDir();
}
@@ -399,9 +407,9 @@
PropertyChangeListener {
private static final String SRT_NAME = "name";
+ private static final String SRT_VERSION = "version";
private static final String SRT_HOMEDIR = "homeDir";
- private static final String SRT_DEFAULT = "defaultClasspath";
-
+
private static final int GL_PARENT_COLUMNS = 1;
private static final int GL_CONTENT_COLUMNS = 3;
@@ -410,6 +418,10 @@
IFieldEditor name = createTextEditor(SRT_NAME,
JbossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Name2, "");
//$NON-NLS-1$
+ IFieldEditor version = createTextEditor(SRT_VERSION,
+ JbossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Version, "");
//$NON-NLS-1$
+
+
IFieldEditor homeDir = createBrowseFolderEditor(
SRT_HOMEDIR,
JbossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Home_Folder,
@@ -445,6 +457,7 @@
root.setLayout(gl);
name.doFillIntoGrid(root);
name.addPropertyChangeListener(this);
+ version.doFillIntoGrid(root);
homeDir.doFillIntoGrid(root);
homeDir.addPropertyChangeListener(this);
@@ -557,6 +570,7 @@
public JbossWSRuntime getRuntime() {
JbossWSRuntime newRt = new JbossWSRuntime();
newRt.setName(name.getValueAsString());
+ newRt.setVersion(version.getValueAsString());
newRt.setHomeDir(homeDir.getValueAsString());
JbossWSRuntime rt = (JbossWSRuntime)jars.getValue();
newRt.setLibraries(rt.getLibraries());
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbwsLibraryListFieldEditor.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbwsLibraryListFieldEditor.java 2008-06-13
03:24:05 UTC (rev 8748)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbwsLibraryListFieldEditor.java 2008-06-13
03:24:13 UTC (rev 8749)
@@ -13,9 +13,7 @@
import java.io.File;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IPath;
Show replies by date