JBoss Tools SVN: r25721 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-11 10:26:27 -0400 (Mon, 11 Oct 2010)
New Revision: 25721
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
Log:
[JBIDE-7282] [JBIDE-7283] [JBIDE-7284] <"> removed in messages
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-10-11 14:25:25 UTC (rev 25720)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-10-11 14:26:27 UTC (rev 25721)
@@ -64,7 +64,7 @@
ErrorNameInUse.text=Error: the name chosen is already in use
ErrorMustNameConnection.text=You must name the connection;
-ErrorMustProvideUrl.text="ou must provide a url for the clou";
+ErrorMustProvideUrl.text=You must provide a url for the cloud;
ErrorCouldNotOpenBrowser.text=Could not open url \"{0}\"in Browser;
ErrorInvalidURL.text=URL specified is invalid
ErrorNonCloudURL.text=URL specified is not a valid Delta-cloud address
14 years, 1 month
JBoss Tools SVN: r25720 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-11 10:25:25 -0400 (Mon, 11 Oct 2010)
New Revision: 25720
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
Log:
[JBIDE-7282] [JBIDE-7283] [JBIDE-7284] <"> removed in messages
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-10-11 14:24:06 UTC (rev 25719)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-10-11 14:25:25 UTC (rev 25720)
@@ -63,9 +63,9 @@
EC2PasswordLink.text=For EC2 use the <a href="https://console.aws.amazon.com/ec2/home">Access Secret Key</a>
ErrorNameInUse.text=Error: the name chosen is already in use
-ErrorMustNameConnection.text="You must name the connection";
-ErrorMustProvideUrl.text="You must provide a url for the cloud";
-ErrorCouldNotOpenBrowser.text="Could not open url \"{0}\"in Browser";
+ErrorMustNameConnection.text=You must name the connection;
+ErrorMustProvideUrl.text="ou must provide a url for the clou";
+ErrorCouldNotOpenBrowser.text=Could not open url \"{0}\"in Browser;
ErrorInvalidURL.text=URL specified is invalid
ErrorNonCloudURL.text=URL specified is not a valid Delta-cloud address
ErrorInvalidPem.text=File specified is not a valid existing key
14 years, 1 month
JBoss Tools SVN: r25719 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-11 10:24:06 -0400 (Mon, 11 Oct 2010)
New Revision: 25719
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
Log:
[JBIDE-7282] [JBIDE-7283] [JBIDE-7284] error message key corrected
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-10-11 14:22:13 UTC (rev 25718)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-10-11 14:24:06 UTC (rev 25719)
@@ -64,7 +64,7 @@
ErrorNameInUse.text=Error: the name chosen is already in use
ErrorMustNameConnection.text="You must name the connection";
-ErrorMustProvideUrl="You must provide a url for the cloud";
+ErrorMustProvideUrl.text="You must provide a url for the cloud";
ErrorCouldNotOpenBrowser.text="Could not open url \"{0}\"in Browser";
ErrorInvalidURL.text=URL specified is invalid
ErrorNonCloudURL.text=URL specified is not a valid Delta-cloud address
14 years, 1 month
JBoss Tools SVN: r25718 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-11 10:22:13 -0400 (Mon, 11 Oct 2010)
New Revision: 25718
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
Log:
[JBIDE-7282] [JBIDE-7283] [JBIDE-7284] Error messages externalized, must enter url now (mandatory form field)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-11 14:09:08 UTC (rev 25717)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-11 14:22:13 UTC (rev 25718)
@@ -58,6 +58,7 @@
*/
public class CloudConnectionPage extends WizardPage {
+ private static final int CLOUDTYPE_CHECK_DELAY = 500;
private static final String DESCRIPTION = "NewCloudConnection.desc"; //$NON-NLS-1$
private static final String TITLE = "NewCloudConnection.title"; //$NON-NLS-1$
private static final String URL_LABEL = "Url.label"; //$NON-NLS-1$
@@ -71,6 +72,8 @@
private static final String COULD_NOT_OPEN_BROWSER = "ErrorCouldNotOpenBrowser.text"; //$NON-NLS-1$
private static final String TEST_SUCCESSFUL = "NewCloudConnectionTest.success"; //$NON-NLS-1$
private static final String TEST_FAILURE = "NewCloudConnectionTest.failure"; //$NON-NLS-1$
+ private static final String MUST_ENTER_A_NAME = "ErrorMustNameConnection.text"; //$NON-NLS-1$
+ private static final String MUST_ENTER_A_URL = "ErrorMustProvideUrl.text"; //$NON-NLS-1$;
private String defaultName = ""; //$NON-NLS-1$
private String defaultUrl = ""; //$NON-NLS-1$
@@ -148,9 +151,12 @@
Text urlText = new Text(container, SWT.BORDER | SWT.SINGLE);
urlText.setText(defaultUrl);
dbc.bindValue(
- WidgetProperties.text(SWT.Modify).observeDelayed(500, urlText),
+ WidgetProperties.text(SWT.Modify).observeDelayed(CLOUDTYPE_CHECK_DELAY, urlText),
BeanProperties.value(CloudConnectionModel.class, CloudConnectionModel.PROPERTY_URL)
- .observe(connectionModel));
+ .observe(connectionModel),
+ new UpdateValueStrategy().setAfterGetValidator(new MandatoryStringValidator(
+ WizardMessages.getString(MUST_ENTER_A_URL))),
+ null);
// cloud type
Label typeLabel = new Label(container, SWT.NULL);
@@ -371,14 +377,15 @@
.observe(connectionModel),
new UpdateValueStrategy().setBeforeSetValidator(
new CompositeValidator(
- new MandatoryStringValidator("name must be defined"),
+ new MandatoryStringValidator(WizardMessages.getString(MUST_ENTER_A_NAME)),
new IValidator() {
@Override
public IStatus validate(Object value) {
if (nameText.getText() != null
&& DeltaCloudManager.getDefault().findCloud(nameText.getText()) != null) {
- return ValidationStatus.error(WizardMessages.getString(NAME_ALREADY_IN_USE));
+ return ValidationStatus
+ .error(WizardMessages.getString(NAME_ALREADY_IN_USE));
} else {
return ValidationStatus.ok();
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-10-11 14:09:08 UTC (rev 25717)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-10-11 14:22:13 UTC (rev 25718)
@@ -63,6 +63,8 @@
EC2PasswordLink.text=For EC2 use the <a href="https://console.aws.amazon.com/ec2/home">Access Secret Key</a>
ErrorNameInUse.text=Error: the name chosen is already in use
+ErrorMustNameConnection.text="You must name the connection";
+ErrorMustProvideUrl="You must provide a url for the cloud";
ErrorCouldNotOpenBrowser.text="Could not open url \"{0}\"in Browser";
ErrorInvalidURL.text=URL specified is invalid
ErrorNonCloudURL.text=URL specified is not a valid Delta-cloud address
14 years, 1 month
JBoss Tools SVN: r25717 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-11 10:09:08 -0400 (Mon, 11 Oct 2010)
New Revision: 25717
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
Log:
[JBIDE-7282] [JBIDE-7283] [JBIDE-7284] error message display "name already used" corrected
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-11 13:35:57 UTC (rev 25716)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-11 14:09:08 UTC (rev 25717)
@@ -378,7 +378,7 @@
public IStatus validate(Object value) {
if (nameText.getText() != null
&& DeltaCloudManager.getDefault().findCloud(nameText.getText()) != null) {
- return ValidationStatus.error(NAME_ALREADY_IN_USE);
+ return ValidationStatus.error(WizardMessages.getString(NAME_ALREADY_IN_USE));
} else {
return ValidationStatus.ok();
}
14 years, 1 month
JBoss Tools SVN: r25716 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-11 09:35:57 -0400 (Mon, 11 Oct 2010)
New Revision: 25716
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
Log:
[JBIDE-7282] [JBIDE-7283] [JBIDE-7284] authors added
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-11 13:33:59 UTC (rev 25715)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-11 13:35:57 UTC (rev 25716)
@@ -52,6 +52,10 @@
import org.jboss.tools.deltacloud.ui.common.databinding.validator.MandatoryStringValidator;
import org.jboss.tools.deltacloud.ui.common.swt.JFaceUtils;
+/**
+ * @author Jeff Jonhston
+ * @author André Dietisheim
+ */
public class CloudConnectionPage extends WizardPage {
private static final String DESCRIPTION = "NewCloudConnection.desc"; //$NON-NLS-1$
@@ -333,7 +337,7 @@
* the url text widget
* @param typeLabel
* the cloud type label to display the cloud type in
- * @return
+ * @return
* @return the binding that was created
*/
private Binding bindCloudTypeLabel(DataBindingContext dbc, Text urlText, final Label typeLabel) {
14 years, 1 month
JBoss Tools SVN: r25715 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-11 09:33:59 -0400 (Mon, 11 Oct 2010)
New Revision: 25715
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
Log:
[JBIDE-7282] [JBIDE-7283] [JBIDE-7284] cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-11 13:11:26 UTC (rev 25714)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-11 13:33:59 UTC (rev 25715)
@@ -151,15 +151,11 @@
// cloud type
Label typeLabel = new Label(container, SWT.NULL);
typeLabel.setText(defaultType);
- UpdateValueStrategy url2TypeStrategy = new UpdateValueStrategy();
- url2TypeStrategy.setConverter(new CloudConnectionModel.CloudTypeConverter());
- url2TypeStrategy.setBeforeSetValidator(new CloudConnectionModel.CloudTypeValidator());
- Binding urlBinding = bindCloudTypeLabel(dbc, urlText, typeLabel, url2TypeStrategy);
+ Binding urlBinding = bindCloudTypeLabel(dbc, urlText, typeLabel);
+ // username
Label usernameLabel = new Label(container, SWT.NULL);
usernameLabel.setText(WizardMessages.getString(USERNAME_LABEL));
-
- // username
Text usernameText = new Text(container, SWT.BORDER | SWT.SINGLE);
usernameText.setText(defaultUsername);
ControlDecoration usernameDecoration = JFaceUtils.createDecoration(usernameText, TEST_FAILURE);
@@ -283,7 +279,7 @@
}
/**
- * Enables/Disables credentials test button on url validity changes.
+ * Enables/Disables (credentials) test button on url validity changes.
*
* @param testButton
* the test button
@@ -307,33 +303,63 @@
* the type label
* @return the value change listener
*/
- private IValueChangeListener displayCloudTypeOnUrlValidityChanges(final Label typeLabel) {
- return new IValueChangeListener() {
+ private class CloudTypeAdapter implements IValueChangeListener {
- @Override
- public void handleValueChange(ValueChangeEvent event) {
- IStatus status = (IStatus) event.diff.getNewValue();
- if (status.isOK()) {
- typeLabel.setText(connectionModel.getType());
- } else {
- typeLabel.setText("");
- }
+ private Label typeLabel;
+
+ public CloudTypeAdapter(Label typeLabel) {
+ this.typeLabel = typeLabel;
+ }
+
+ @Override
+ public void handleValueChange(ValueChangeEvent event) {
+ IStatus status = (IStatus) event.diff.getNewValue();
+ if (status.isOK()) {
+ typeLabel.setText(connectionModel.getType());
+ } else {
+ typeLabel.setText("");
}
- };
+ }
}
- private Binding bindCloudTypeLabel(DataBindingContext dbc, Text urlText, final Label typeLabel,
- UpdateValueStrategy url2TypeStrategy) {
- Binding urlBinding = dbc.bindValue(
+ /**
+ * Binds the given cloud type label to the given url text widget. Attaches a
+ * listener to the url text widget Adds a validity decorator to the url text
+ * widget.
+ *
+ * @param dbc
+ * the databinding context to use
+ * @param urlText
+ * the url text widget
+ * @param typeLabel
+ * the cloud type label to display the cloud type in
+ * @return
+ * @return the binding that was created
+ */
+ private Binding bindCloudTypeLabel(DataBindingContext dbc, Text urlText, final Label typeLabel) {
+ UpdateValueStrategy updateStrategy = new UpdateValueStrategy();
+ updateStrategy.setConverter(new CloudConnectionModel.CloudTypeConverter());
+ updateStrategy.setBeforeSetValidator(new CloudConnectionModel.CloudTypeValidator());
+
+ Binding binding = dbc.bindValue(
WidgetProperties.text(SWT.Modify).observeDelayed(100, urlText),
BeanProperties.value(CloudConnectionModel.PROPERTY_TYPE).observe(connectionModel),
- url2TypeStrategy,
+ updateStrategy,
new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER));
- urlBinding.getValidationStatus().addValueChangeListener(displayCloudTypeOnUrlValidityChanges(typeLabel));
- ControlDecorationSupport.create(urlBinding, SWT.LEFT | SWT.TOP);
- return urlBinding;
+ binding.getValidationStatus().addValueChangeListener(new CloudTypeAdapter(typeLabel));
+ ControlDecorationSupport.create(binding, SWT.LEFT | SWT.TOP);
+ return binding;
}
+ /**
+ * Bind the given name text wdiget to the cloud connection model. Attaches
+ * validators to the binding that enforce unique user input.
+ *
+ * @param dbc
+ * the databinding context to use
+ * @param nameText
+ * the name text widget to bind
+ */
private void bindName(DataBindingContext dbc, final Text nameText) {
Binding nameTextBinding = dbc.bindValue(
WidgetProperties.text(SWT.Modify).observe(nameText),
14 years, 1 month
JBoss Tools SVN: r25714 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-11 09:11:26 -0400 (Mon, 11 Oct 2010)
New Revision: 25714
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java
Log:
[JBIDE-7282] [JBIDE-7283] [JBIDE-7284] corrected connection name retrieval
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-11 12:55:47 UTC (rev 25713)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-11 13:11:26 UTC (rev 25714)
@@ -1,7 +1,13 @@
2010-10-11 André Dietisheim <adietish(a)redhat.com>
- * src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java : [JBIDE-7282] [JBIDE-7283] [JBIDE-7284] added decorations, (switched to databinding) corrected page validity, added wizard messages
- * src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties: [JBIDE-7282] [JBIDE-7283] [JBIDE-7284] Added new messages.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java (performTest):
+ [JBIDE-7282] [JBIDE-7283] [JBIDE-7284] removed autogenerated comments, changed setting access to use presentation model
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java:
+ [JBIDE-7282] [JBIDE-7283] [JBIDE-7284] removed autogenerated comments, changed setting access to use presentation model
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java :
+ [JBIDE-7282] [JBIDE-7283] [JBIDE-7284] added decorations, (switched to databinding) corrected page validity, added wizard messages
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties:
+ [JBIDE-7282] [JBIDE-7283] [JBIDE-7284] Added new messages.
2010-10-08 Jeff Johnston <jjohnstn(a)redhat.com>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java 2010-10-11 12:55:47 UTC (rev 25713)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java 2010-10-11 13:11:26 UTC (rev 25714)
@@ -36,6 +36,9 @@
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
+/**
+ * @author Andre Dietisheim
+ */
public class CloudConnectionModel extends ObservablePojo {
public static final String PROPERTY_URL = "url";
@@ -135,7 +138,6 @@
connection.setRequestProperty(HTTPHEADER_KEY_ACCEPT, HTTPHEADER_VALUE_ACCEPTXML);
return connection.getContent();
}
-
}
public static class CloudTypeValidator implements IValidator {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-11 12:55:47 UTC (rev 25713)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-11 13:11:26 UTC (rev 25714)
@@ -35,7 +35,6 @@
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
- // TODO Auto-generated method stub
}
@Override
@@ -91,5 +90,4 @@
}
return true;
}
-
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java 2010-10-11 12:55:47 UTC (rev 25713)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java 2010-10-11 13:11:26 UTC (rev 25714)
@@ -31,12 +31,10 @@
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
- // TODO Auto-generated method stub
}
@Override
public void addPages() {
- // TODO Auto-generated method stub
mainPage = new CloudConnectionPage(WizardMessages.getString(MAINPAGE_NAME), this);
addPage(mainPage);
}
@@ -62,7 +60,7 @@
@Override
public boolean performFinish() {
- String name = mainPage.getName();
+ String name = mainPage.getModel().getName();
String url = mainPage.getModel().getUrl();
String username = mainPage.getModel().getUsername();
String password = mainPage.getModel().getPassword();
14 years, 1 month
JBoss Tools SVN: r25713 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/6600.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-10-11 08:55:47 -0400 (Mon, 11 Oct 2010)
New Revision: 25713
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/6600/jbide6600.xml.xml
Log:
fix for org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests.DocBookTemplatesTest.testCheckDocBookTitle()
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/6600/jbide6600.xml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/6600/jbide6600.xml.xml 2010-10-11 12:23:40 UTC (rev 25712)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/6600/jbide6600.xml.xml 2010-10-11 12:55:47 UTC (rev 25713)
@@ -1,7 +1,7 @@
<tests>
<test id="title">
<H1 STYLE="-moz-user-modify: read-write;">
- A Top Level Section
+ <span>A Top Level Section</span>
</H1>
</test>
</tests>
\ No newline at end of file
14 years, 1 month
JBoss Tools SVN: r25712 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-11 08:23:40 -0400 (Mon, 11 Oct 2010)
New Revision: 25712
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudType.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
Log:
[JBIDE-7282] [JBIDE-7283] [JBIDE-7284] removed (unneeded) CloudType, added JIRA-tags to changelog
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-11 12:21:36 UTC (rev 25711)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-11 12:23:40 UTC (rev 25712)
@@ -1,7 +1,7 @@
2010-10-11 André Dietisheim <adietish(a)redhat.com>
- * src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java : added decorations, (switched to databinding) corrected page validity, added wizard messages
- * src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties: Added new messages.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java : [JBIDE-7282] [JBIDE-7283] [JBIDE-7284] added decorations, (switched to databinding) corrected page validity, added wizard messages
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties: [JBIDE-7282] [JBIDE-7283] [JBIDE-7284] Added new messages.
2010-10-08 Jeff Johnston <jjohnstn(a)redhat.com>
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudType.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudType.java 2010-10-11 12:21:36 UTC (rev 25711)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudType.java 2010-10-11 12:23:40 UTC (rev 25712)
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.StringReader;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-public class CloudType {
-
- private static final String HTTPHEADER_KEY_ACCEPT = "Accept"; //$NON-NLS-1$
- private static final String HTTPHEADER_VALUE_ACCEPTXML = "application/xml;q=1.0"; //$NON-NLS-1$
- private static final String DOCUMENT_ELEMENT_DRIVER = "driver"; //$NON-NLS-1$
- private static final String DOCUMENT_ELEMENT_API = "api"; //$NON-NLS-1$
- private static final String URLCONNECTION_ENCODING = "UTF-8"; //$NON-NLS-1$
-
- public static final String UNKNOWN_TYPE_LABEL = "UnknownType.label"; //$NON-NLS-1$
- private static final String INVALID_URL = "ErrorInvalidURL.text"; //$NON-NLS-1$
- static final String NONCLOUD_URL = "ErrorNonCloudURL.text"; //$NON-NLS-1$
-
- private String label = WizardMessages.getString(UNKNOWN_TYPE_LABEL);
- private boolean isValid;
- private String url;
-
- public CloudType(String url) {
- init(url);
- }
-
- /**
- * Initializes this instance, sets the cloud type label and the validity. It
- * tries to connect to the cloud instance that's supposed at the given url,
- * requests an API response and parses the xml that's returned.
- *
- * @param url
- * the cloud instance url to connect to
- */
- private void init(String url) {
- this.url = url;
- try {
- Object o = getURLContent(url + "/api?format=xml"); //$NON-NLS-1$
- if (o instanceof InputStream) {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- DocumentBuilder db = dbf.newDocumentBuilder();
- Document document = db.parse(
- new InputSource(new StringReader(getXML((InputStream) o))));
-
- NodeList elements = document.getElementsByTagName(DOCUMENT_ELEMENT_API); //$NON-NLS-1$
- if (elements.getLength() > 0) {
- Node n = elements.item(0);
- Node driver = n.getAttributes().getNamedItem(
- DOCUMENT_ELEMENT_DRIVER); //$NON-NLS-1$
- if (driver != null) {
- isValid = true;
- String driverValue = driver.getNodeValue();
- label = driverValue.toUpperCase();
- }
- }
- }
- } catch (MalformedURLException e) {
- label = WizardMessages.getString(INVALID_URL);
- } catch (IOException e) {
- label = WizardMessages.getString(NONCLOUD_URL);
- } catch (ParserConfigurationException e) {
- label = WizardMessages.getString(NONCLOUD_URL);
- } catch (SAXException e) {
- label = WizardMessages.getString(NONCLOUD_URL);
- } catch (Exception e) {
- label = WizardMessages.getString(INVALID_URL);
- }
- }
-
- private String getXML(InputStream is) throws UnsupportedEncodingException, IOException {
- try {
- if (is == null) {
- return "";
- }
- StringBuilder sb = new StringBuilder();
- String line = "";
- BufferedReader reader = new BufferedReader(new InputStreamReader(is, URLCONNECTION_ENCODING));
- while ((line = reader.readLine()) != null) {
- sb.append(line).append("\n"); //$NON-NLS-1$
- }
- return sb.toString();
- } finally {
- is.close();
- }
- }
-
- public boolean isValid() {
- return isValid;
- }
-
- public String getLabel() {
- return label;
- }
-
- public String getUrl() {
- return url;
- }
-
- private Object getURLContent(String url) throws IOException {
- URL u = new URL(url);
- URLConnection connection = u.openConnection();
- connection.setRequestProperty(HTTPHEADER_KEY_ACCEPT, HTTPHEADER_VALUE_ACCEPTXML); //$NON-NLS-1$ $NON-NLS-2$
- return connection.getContent();
- }
-}
14 years, 1 month