Author: adietish
Date: 2011-10-05 17:16:35 -0400 (Wed, 05 Oct 2011)
New Revision: 35394
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java
Log:
[JBIDE-9793] "delete" application now refreshes the table, "new"
dialog is not functional again
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-10-05
21:14:43 UTC (rev 35393)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-10-05
21:16:35 UTC (rev 35394)
@@ -122,7 +122,6 @@
GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).hint(80,
30).applyTo(detailsButton);
DataBindingUtils.bindEnablementToValidationStatus(detailsButton, IStatus.INFO, dbc ,
selectedApplicationBinding);
detailsButton.addSelectionListener(onDetails(dbc));
-
}
private IDoubleClickListener onApplicationDoubleClick() {
@@ -282,6 +281,13 @@
protected IStatus run(IProgressMonitor monitor) {
try {
model.destroyCurrentApplication();
+ getContainer().getShell().getDisplay().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ viewer.refresh();
+ }
+ });
return Status.OK_STATUS;
} catch (OpenshiftException e) {
return new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID, NLS.bind(
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java 2011-10-05
21:14:43 UTC (rev 35393)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java 2011-10-05
21:16:35 UTC (rev 35394)
@@ -62,16 +62,17 @@
nameText.setTextLimit(13);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true,
false).applyTo(nameText);
Binding nameBinding = dbc.bindValue(
- WidgetProperties.text().observe(nameText)
+ WidgetProperties.text(SWT.Modify).observe(nameText)
, BeanProperties.value(NewApplicationWizardPageModel.PROPERTY_NAME).observe(model)
, new UpdateValueStrategy().setAfterGetValidator(new ApplicationNameValidator())
, null);
ControlDecorationSupport.create(nameBinding, SWT.LEFT | SWT.TOP);
-
+
Label cartridgeLabel = new Label(parent, SWT.WRAP);
cartridgeLabel.setText("&Cartridge");
GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(cartridgeLabel);
Combo cartridgesCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true,
false).applyTo(cartridgesCombo);
dbc.bindList(
WidgetProperties.items().observe(cartridgesCombo)
,
BeanProperties.list(NewApplicationWizardPageModel.PROPERTY_CARTRIDGES).observe(model)
@@ -86,9 +87,9 @@
return ((ICartridge) fromObject).getName();
}
}));
- dbc.bindValue(WidgetProperties.selection().observe(cartridgesCombo)
+ dbc.bindValue(
+ WidgetProperties.selection().observe(cartridgesCombo)
,
BeanProperties.value(NewApplicationWizardPageModel.PROPERTY_SELECTED_CARTRIDGE).observe(model));
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true,
false).applyTo(cartridgesCombo);
}
@Override
@@ -99,6 +100,7 @@
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
+
model.loadCartridges();
} catch (OpenshiftException e) {
return new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID, "Could not
load cartridges", e);
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java 2011-10-05
21:14:43 UTC (rev 35393)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java 2011-10-05
21:16:35 UTC (rev 35394)
@@ -60,6 +60,14 @@
}
public void loadCartridges() throws OpenshiftException {
+// final Collection<ICartridge> cartridges = user.getCartridges();
+// PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+//
+// @Override
+// public void run() {
+// setCartridges(cartridges);
+// }
+// });
setCartridges(user.getCartridges());
}
@@ -92,6 +100,4 @@
return false;
}
}
-
-
}