Author: rob.stryker(a)jboss.com
Date: 2009-12-16 22:25:37 -0500 (Wed, 16 Dec 2009)
New Revision: 19379
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java
Log:
JBIDE-5497
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties 2009-12-17
03:02:13 UTC (rev 19378)
+++
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties 2009-12-17
03:25:37 UTC (rev 19379)
@@ -12,7 +12,7 @@
JBoss_Runtime_Delete_Used_Confirm=Runtime ''{0}'' is used by JBoss ESB
projects. Are you sure you want to delete it?
JBoss_Runtime_Delete_Not_Used_Confirm=Are you sure you want to delete runtime
''{0}''?
JBoss_Runtime_List_Field_Editor_Edit_Runtime=Edit JBoss ESB Runtime
-JBoss_Runtime_List_Field_Editor_Modify_Runtime=Input new values
+JBoss_Runtime_List_Field_Editor_Modify_Runtime=Modify your ESB runtime
JBoss_Runtime_List_Field_Editor_New_Runtime=New JBoss ESB Runtime
JBoss_Runtime_List_Field_Editor_Configuration_Description=Only for JBoss AS contained ESB
runtime
Error_JBoss_Runtime_List_Field_Editor_Path_To_Home_Diretory_Cannot_Be_Empty=Path to JBoss
ESB runtime home directory cannot be empty
@@ -28,6 +28,7 @@
# START NON-TRANSLATABLE
JBoss_ESBRuntime_Classpath_Container_5=esb_runtime
# END NON-TRANSLATABLE
+JBoss_ESBRuntime_Classpath_Container_Manage_Runtimes_Button=Manage ESB Runtimes
JBoss_ESBRuntime_Classpath_Container_Description=Select a ESB runtime to add to the
project classpath
JBoss_ESBRuntime_Classpath_Container_Name=Name
JBoss_ESBRuntime_Classpath_Container_RuntimeType=Runtime Type
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java 2009-12-17
03:02:13 UTC (rev 19378)
+++
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java 2009-12-17
03:25:37 UTC (rev 19379)
@@ -57,7 +57,7 @@
public static String JBoss_ESBRuntime_Classpath_Container_Description;
public static String JBoss_ESBRuntime_Classpath_Container_Name;
-
+ public static String JBoss_ESBRuntime_Classpath_Container_Manage_Runtimes_Button;
public static String JBoss_ESBRuntime_Classpath_Container_RuntimeType;
public static String JBoss_ESBRuntime_Classpath_Container_RuntimeType_ESBLibrariesOnly;
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java 2009-12-17
03:02:13 UTC (rev 19378)
+++
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java 2009-12-17
03:25:37 UTC (rev 19379)
@@ -36,12 +36,19 @@
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog;
+import org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.ui.ServerUICore;
@@ -58,6 +65,7 @@
private IClasspathEntry entry;
private TableViewer runtimeViewer;
private Object selectedRuntime;
+ private Button manageRuntimes;
public JBossESBRuntimeContainerPage(){
super(JBossESBUIMessages.JBoss_ESBRuntime_Classpath_Container_Title);
@@ -77,19 +85,16 @@
public void createControl(Composite parent) {
Composite com = new Composite(parent, SWT.NONE);
- com.setLayout(new GridLayout());
+ com.setLayout(new FormLayout());
com.setLayoutData(new GridData(GridData.FILL_BOTH));
Table table = new Table(com, SWT.BORDER);
runtimeViewer = new TableViewer(table);
- runtimeViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
runtimeViewer.addSelectionChangedListener(new ISelectionChangedListener(){
-
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection = (StructuredSelection)event.getSelection();
selectedRuntime = selection.getFirstElement();
setPageComplete(isPageComplete());
-
}});
runtimeViewer.addFilter(new ESBRuntimeFilter());
@@ -111,11 +116,41 @@
runtimeViewer.setContentProvider(new ArrayContentProvider());
runtimeViewer.setLabelProvider(new RuntimeLabelProvider());
+
+ // button
+ manageRuntimes = new Button(com, SWT.DEFAULT);
+ manageRuntimes.setText(JBossESBUIMessages.JBoss_ESBRuntime_Classpath_Container_Manage_Runtimes_Button);
+ manageRuntimes.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ public void widgetSelected(SelectionEvent e) {
+ manageRuntimesPressed();
+ }
+ });
+ // layout
+ FormData fd = new FormData();
+ fd.left = new FormAttachment(0, 5);
+ fd.bottom = new FormAttachment(100,-5);
+ manageRuntimes.setLayoutData(fd);
+
+ fd = new FormData();
+ fd.top = new FormAttachment(0,5);
+ fd.left = new FormAttachment(0,5);
+ fd.right = new FormAttachment(100,-5);
+ fd.bottom = new FormAttachment(manageRuntimes,-5);
+ runtimeViewer.getTable().setLayoutData(fd);
+
runtimeViewer.setInput(getAllAvailableESBRuntimes());
setControl(com);
}
+ protected void manageRuntimesPressed() {
+ FilteredPreferenceDialog dialog = WorkbenchPreferenceDialog
+ .createDialogOn(manageRuntimes.getShell(),
"org.jboss.tools.esb.project.runtime.preference");
+ dialog.open();
+ }
+
public boolean finish() {
IStructuredSelection selection = (StructuredSelection)runtimeViewer.getSelection();
Object obj = selection.getFirstElement();
Show replies by date