JBoss Tools SVN: r41577 - in trunk/modeshape: plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2012-05-31 09:38:00 -0400 (Thu, 31 May 2012)
New Revision: 41577
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/PropertyDialog.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Messages.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndValidator.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/messages.properties
trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/CndValidatorTest.java
Log:
JBIDE-12056 Exception Adding/Editing Property Definition's Value Constraint In CND Editor. Exception caused by trying to add an element to an unmodifiable list. Also fixed an exception thrown by validator when removing all text.
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Messages.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Messages.java 2012-05-31 13:29:00 UTC (rev 41576)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Messages.java 2012-05-31 13:38:00 UTC (rev 41577)
@@ -163,6 +163,11 @@
public static String emptyValue;
/**
+ * A message indicating a property definition's value constraint is empty.
+ */
+ public static String emptyValueConstraint;
+
+ /**
* A message indicating a property definition is missing value constraints. One parameter, the property definition name, is
* required.
*/
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndValidator.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndValidator.java 2012-05-31 13:29:00 UTC (rev 41576)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndValidator.java 2012-05-31 13:38:00 UTC (rev 41577)
@@ -1629,7 +1629,11 @@
* @return the status (never <code>null</code>)
*/
public static ValidationStatus validateValueConstraint( final String constraint ) {
- Utils.verifyIsNotEmpty(constraint, "constraint"); //$NON-NLS-1$
+ try {
+ Utils.verifyIsNotEmpty(constraint, "constraint"); //$NON-NLS-1$
+ } catch (IllegalArgumentException e) {
+ return ValidationStatus.createErrorMessage(StatusCodes.EMPTY_VALUE_CONSTRAINT, Messages.emptyValueConstraint);
+ }
// TODO implement validateValueConstraint to make sure constraint is property syntax
return ValidationStatus.OK_STATUS;
@@ -1789,6 +1793,7 @@
int EMPTY_VALUE_CONSTRAINTS = 285;
int DUPLICATE_VALUE_CONSTRAINT = 290;
int VALUE_CONSTRAINTS_EXIST_BUT_MARKED_AS_VARIANT = 295;
+ int EMPTY_VALUE_CONSTRAINT = 300;
}
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/messages.properties
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/messages.properties 2012-05-31 13:29:00 UTC (rev 41576)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/messages.properties 2012-05-31 13:38:00 UTC (rev 41577)
@@ -57,6 +57,7 @@
emptyUnqualifiedName = The {0} has an empty unqualified name.
# 0 = property or attribute name of a node type definition, property definition, or child node definition
emptyValue = A "{0}" value cannot be empty
+emptyValueConstraint = The value constraint cannot be empty.
# 0 = property definition name
emptyValueConstraints = The property definition "{0}" must have at least one value constraint.
# 0 = property value, 1 = property type, 2 = property name
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/PropertyDialog.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/PropertyDialog.java 2012-05-31 13:29:00 UTC (rev 41576)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/PropertyDialog.java 2012-05-31 13:38:00 UTC (rev 41577)
@@ -57,6 +57,7 @@
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.jboss.tools.modeshape.jcr.ItemOwnerProvider;
import org.jboss.tools.modeshape.jcr.Messages;
+import org.jboss.tools.modeshape.jcr.MultiValidationStatus;
import org.jboss.tools.modeshape.jcr.PropertyDefinition;
import org.jboss.tools.modeshape.jcr.PropertyDefinition.PropertyName;
import org.jboss.tools.modeshape.jcr.QualifiedName;
@@ -1158,7 +1159,7 @@
void handleAddValueConstraint() {
final PropertyDefinition propDefn = getPropertyDefinition();
- final Collection<String> currentConstraints = Arrays.asList(propDefn.getValueConstraints());
+ final Collection<String> currentConstraints = new ArrayList<String>(Arrays.asList(propDefn.getValueConstraints()));
final StringValueEditorDialog dialog = new StringValueEditorDialog(getShell()) {
/**
@@ -1191,7 +1192,9 @@
// check for duplicate
currentConstraints.add(newValue);
- return CndValidator.validateValueConstraints(propDefn.getName(), currentConstraints);
+ MultiValidationStatus validationStatus = CndValidator.validateValueConstraints(propDefn.getName(), currentConstraints);
+ currentConstraints.remove(newValue);
+ return validationStatus;
}
};
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/CndValidatorTest.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/CndValidatorTest.java 2012-05-31 13:29:00 UTC (rev 41576)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/CndValidatorTest.java 2012-05-31 13:38:00 UTC (rev 41577)
@@ -205,6 +205,16 @@
}
@Test
+ public void emptyValueConstraintShouldBeAnError() {
+ // setup
+ final ValidationStatus status = CndValidator.validateValueConstraint(Utils.EMPTY_STRING);
+
+ // tests
+ assertTrue(status.isError());
+ assertTrue("Code is " + status.getCode(), status.containsCode(StatusCodes.EMPTY_VALUE_CONSTRAINT)); //$NON-NLS-1$
+ }
+
+ @Test
public void invalidQualifiedNameQualifierShouldBeAnError() {
// setup
final QualifiedName qname = new QualifiedName(Constants.QUALIFIER1 + "Changed", Constants.UNQUALIFIED_NAME1); //$NON-NLS-1$
@@ -410,6 +420,16 @@
}
@Test
+ public void nullValueConstraintShouldBeAnError() {
+ // setup
+ final ValidationStatus status = CndValidator.validateValueConstraint(null);
+
+ // tests
+ assertTrue(status.isError());
+ assertTrue("Code is " + status.getCode(), status.containsCode(StatusCodes.EMPTY_VALUE_CONSTRAINT)); //$NON-NLS-1$
+ }
+
+ @Test
public void primaryItemNameWithNonMatchingQualifierShouldBeAnError() {
// setup
nodeTypeDefinition.setName(Constants.QUALIFIED_NAME1.get());
13 years, 4 months
JBoss Tools SVN: r41575 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-05-31 09:00:05 -0400 (Thu, 31 May 2012)
New Revision: 41575
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java
Log:
added class header and author
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java 2012-05-31 09:43:06 UTC (rev 41574)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java 2012-05-31 13:00:05 UTC (rev 41575)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.openshift.express.internal.core.portforward;
import java.util.List;
@@ -38,6 +48,9 @@
import com.openshift.client.IApplicationPortForwarding;
import com.openshift.client.OpenShiftSSHOperationException;
+/**
+ * @author Xavier Coulon
+ */
public class ApplicationPortForwardingWizardPage extends AbstractOpenShiftWizardPage {
private final ApplicationPortForwardingWizardModel wizardModel;
13 years, 4 months
JBoss Tools SVN: r41574 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal: ui/action and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-05-31 05:43:06 -0400 (Thu, 31 May 2012)
New Revision: 41574
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/ConnectToOpenShiftWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java
Log:
Fixed - JBIDE-12014
Credentials page appears twice when creating new application and user is not connected
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-05-31 09:37:07 UTC (rev 41573)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-05-31 09:43:06 UTC (rev 41574)
@@ -135,7 +135,7 @@
Logger.error("Could not open Credentials Wizard: no shell available");
return;
}
- final ConnectToOpenShiftWizard connectToOpenShiftWizard = new ConnectToOpenShiftWizard();
+ final ConnectToOpenShiftWizard connectToOpenShiftWizard = new ConnectToOpenShiftWizard(UserDelegate.this);
int returnCode = WizardUtils.openWizardDialog(connectToOpenShiftWizard, shell);
if (returnCode == Window.OK) {
Logger.debug("OpenShift Auth succeeded.");
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java 2012-05-31 09:37:07 UTC (rev 41573)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java 2012-05-31 09:43:06 UTC (rev 41574)
@@ -43,10 +43,11 @@
Object sel = ((ITreeSelection) selection).getFirstElement();
if (sel instanceof UserDelegate) {
final UserDelegate user = (UserDelegate) sel;
- user.checkForPassword();
- final OpenShiftExpressApplicationWizard wizard = new NewOpenShiftExpressApplicationWizard(user);
- final WizardDialog wizardDialog = new WizardDialog(new Shell(), wizard);
- wizardDialog.open();
+ if(user.checkForPassword()) {
+ final OpenShiftExpressApplicationWizard wizard = new NewOpenShiftExpressApplicationWizard(user);
+ final WizardDialog wizardDialog = new WizardDialog(new Shell(), wizard);
+ wizardDialog.open();
+ }
}
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-05-31 09:37:07 UTC (rev 41573)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-05-31 09:43:06 UTC (rev 41574)
@@ -479,7 +479,7 @@
private void postVerifyUpdateWidgets() {
importLink.setEnabled(false);
verifyButton.setEnabled(true);
- if (appNameCombo != null) {
+ if (appNameCombo != null && fuser != null) {
appNameCombo.setItems(appListNames);
int index = Arrays.asList(appListNames).indexOf(app);
if (index != -1)
@@ -533,7 +533,7 @@
private Runnable getVerifyingCredentialsJob() {
final ConnectToOpenShiftWizardModel inner = new ConnectToOpenShiftWizardModel() {
public UserDelegate setUser(UserDelegate user) {
- created = user;
+ this.user = user;
return user;
}
};
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/ConnectToOpenShiftWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/ConnectToOpenShiftWizard.java 2012-05-31 09:37:07 UTC (rev 41573)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/ConnectToOpenShiftWizard.java 2012-05-31 09:43:06 UTC (rev 41574)
@@ -12,6 +12,7 @@
import org.eclipse.jface.wizard.Wizard;
import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.jboss.tools.openshift.express.internal.ui.wizard.ConnectToOpenShiftWizardModel;
import org.jboss.tools.openshift.express.internal.ui.wizard.CredentialsWizardPage;
@@ -20,9 +21,20 @@
*/
public class ConnectToOpenShiftWizard extends Wizard {
- private final CredentialsWizardPage page = new CredentialsWizardPage(this, new ConnectToOpenShiftWizardModel());
+ private final CredentialsWizardPage page;
+ /**
+ * Constructor to use when connecting with the default user.
+ */
public ConnectToOpenShiftWizard() {
+ this(UserModel.getDefault().getRecentUser());
+ }
+
+ /**
+ * Constructor to use when user to connect is known.
+ */
+ public ConnectToOpenShiftWizard(final UserDelegate user) {
+ this.page = new CredentialsWizardPage(this, new ConnectToOpenShiftWizardModel(user));
setNeedsProgressMonitor(true);
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-05-31 09:37:07 UTC (rev 41573)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-05-31 09:43:06 UTC (rev 41574)
@@ -82,7 +82,7 @@
public List<IApplication> getApplications() throws OpenShiftException, SocketTimeoutException {
UserDelegate user = getUser();
- if (user == null || !user.hasDomain()) {
+ if (user == null || !user.isConnected() || !user.hasDomain()) {
return Collections.emptyList();
}
return user.getApplications();
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java 2012-05-31 09:37:07 UTC (rev 41573)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java 2012-05-31 09:43:06 UTC (rev 41574)
@@ -14,19 +14,36 @@
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
/**
- * @author André Dietisheim
+ * @author Andre Dietisheim
*/
public class ConnectToOpenShiftWizardModel implements IUserAwareModel {
- protected UserDelegate created = null;
+
+ protected UserDelegate user = null;
+
+ /**
+ * Default constructor.
+ */
+ public ConnectToOpenShiftWizardModel() {
+ super();
+ }
+
+ /**
+ * Constructor
+ * @param user the user to use to connect to OpenShift.
+ */
+ public ConnectToOpenShiftWizardModel(final UserDelegate user) {
+ this.user = user;
+ }
+
@Override
public UserDelegate getUser() {
- return created == null ? UserModel.getDefault().getRecentUser() : created;
+ return user == null ? UserModel.getDefault().getRecentUser() : user;
}
@Override
public UserDelegate setUser(UserDelegate user) {
UserModel.getDefault().addUser(user);
- created = user;
+ this.user = user;
return user;
}
13 years, 4 months
JBoss Tools SVN: r41573 - in branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal: ui/action and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-05-31 05:37:07 -0400 (Thu, 31 May 2012)
New Revision: 41573
Modified:
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/ConnectToOpenShiftWizard.java
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java
Log:
Fixed - JBIDE-12014
Credentials page appears twice when creating new application and user is not connected
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-05-31 07:59:04 UTC (rev 41572)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-05-31 09:37:07 UTC (rev 41573)
@@ -135,7 +135,7 @@
Logger.error("Could not open Credentials Wizard: no shell available");
return;
}
- final ConnectToOpenShiftWizard connectToOpenShiftWizard = new ConnectToOpenShiftWizard();
+ final ConnectToOpenShiftWizard connectToOpenShiftWizard = new ConnectToOpenShiftWizard(UserDelegate.this);
int returnCode = WizardUtils.openWizardDialog(connectToOpenShiftWizard, shell);
if (returnCode == Window.OK) {
Logger.debug("OpenShift Auth succeeded.");
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java 2012-05-31 07:59:04 UTC (rev 41572)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java 2012-05-31 09:37:07 UTC (rev 41573)
@@ -43,10 +43,11 @@
Object sel = ((ITreeSelection) selection).getFirstElement();
if (sel instanceof UserDelegate) {
final UserDelegate user = (UserDelegate) sel;
- user.checkForPassword();
- final OpenShiftExpressApplicationWizard wizard = new NewOpenShiftExpressApplicationWizard(user);
- final WizardDialog wizardDialog = new WizardDialog(new Shell(), wizard);
- wizardDialog.open();
+ if(user.checkForPassword()) {
+ final OpenShiftExpressApplicationWizard wizard = new NewOpenShiftExpressApplicationWizard(user);
+ final WizardDialog wizardDialog = new WizardDialog(new Shell(), wizard);
+ wizardDialog.open();
+ }
}
}
}
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-05-31 07:59:04 UTC (rev 41572)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-05-31 09:37:07 UTC (rev 41573)
@@ -479,7 +479,7 @@
private void postVerifyUpdateWidgets() {
importLink.setEnabled(false);
verifyButton.setEnabled(true);
- if (appNameCombo != null) {
+ if (appNameCombo != null && fuser != null) {
appNameCombo.setItems(appListNames);
int index = Arrays.asList(appListNames).indexOf(app);
if (index != -1)
@@ -533,7 +533,7 @@
private Runnable getVerifyingCredentialsJob() {
final ConnectToOpenShiftWizardModel inner = new ConnectToOpenShiftWizardModel() {
public UserDelegate setUser(UserDelegate user) {
- created = user;
+ this.user = user;
return user;
}
};
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/ConnectToOpenShiftWizard.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/ConnectToOpenShiftWizard.java 2012-05-31 07:59:04 UTC (rev 41572)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/ConnectToOpenShiftWizard.java 2012-05-31 09:37:07 UTC (rev 41573)
@@ -12,6 +12,7 @@
import org.eclipse.jface.wizard.Wizard;
import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.jboss.tools.openshift.express.internal.ui.wizard.ConnectToOpenShiftWizardModel;
import org.jboss.tools.openshift.express.internal.ui.wizard.CredentialsWizardPage;
@@ -20,9 +21,20 @@
*/
public class ConnectToOpenShiftWizard extends Wizard {
- private final CredentialsWizardPage page = new CredentialsWizardPage(this, new ConnectToOpenShiftWizardModel());
+ private final CredentialsWizardPage page;
+ /**
+ * Constructor to use when connecting with the default user.
+ */
public ConnectToOpenShiftWizard() {
+ this(UserModel.getDefault().getRecentUser());
+ }
+
+ /**
+ * Constructor to use when user to connect is known.
+ */
+ public ConnectToOpenShiftWizard(final UserDelegate user) {
+ this.page = new CredentialsWizardPage(this, new ConnectToOpenShiftWizardModel(user));
setNeedsProgressMonitor(true);
}
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-05-31 07:59:04 UTC (rev 41572)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-05-31 09:37:07 UTC (rev 41573)
@@ -82,7 +82,7 @@
public List<IApplication> getApplications() throws OpenShiftException, SocketTimeoutException {
UserDelegate user = getUser();
- if (user == null || !user.hasDomain()) {
+ if (user == null || !user.isConnected() || !user.hasDomain()) {
return Collections.emptyList();
}
return user.getApplications();
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java 2012-05-31 07:59:04 UTC (rev 41572)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ConnectToOpenShiftWizardModel.java 2012-05-31 09:37:07 UTC (rev 41573)
@@ -14,19 +14,36 @@
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
/**
- * @author André Dietisheim
+ * @author Andre Dietisheim
*/
public class ConnectToOpenShiftWizardModel implements IUserAwareModel {
- protected UserDelegate created = null;
+
+ protected UserDelegate user = null;
+
+ /**
+ * Default constructor.
+ */
+ public ConnectToOpenShiftWizardModel() {
+ super();
+ }
+
+ /**
+ * Constructor
+ * @param user the user to use to connect to OpenShift.
+ */
+ public ConnectToOpenShiftWizardModel(final UserDelegate user) {
+ this.user = user;
+ }
+
@Override
public UserDelegate getUser() {
- return created == null ? UserModel.getDefault().getRecentUser() : created;
+ return user == null ? UserModel.getDefault().getRecentUser() : user;
}
@Override
public UserDelegate setUser(UserDelegate user) {
UserModel.getDefault().addUser(user);
- created = user;
+ this.user = user;
return user;
}
13 years, 4 months
JBoss Tools SVN: r41572 - trunk/download.jboss.org/jbosstools/examples.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-05-31 03:59:04 -0400 (Thu, 31 May 2012)
New Revision: 41572
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3....
trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3....
Log:
JBIDE-12045 : Project Examples descriptions and name should not use the acronyms for servers
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3....
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.... 2012-05-31 07:57:35 UTC (rev 41571)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.... 2012-05-31 07:59:04 UTC (rev 41572)
@@ -11,7 +11,7 @@
<shortDescription>Java EE Web Project</shortDescription>
<priority>1</priority>
<description>
-This is your project! It's a sample, deployable Maven 3 project to help you get your foot in the door developing with Java EE 6 on JBoss Application Server 7.1.
+This is your project! It's a sample, deployable Maven 3 project to help you get your foot in the door developing with Java EE 6 on JBoss Enterprise Application Platform 6 or JBoss Application Server 7.1.
This project is setup to allow you to create a compliant Java EE 6 application using JSF 2.0, CDI 1.0, EJB 3.1, JPA 2.0 and Bean Validation 1.0.
It includes a persistence unit and some sample persistence and transaction code to help you get your feet wet with database access in enterprise Java.
</description>
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3....
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.... 2012-05-31 07:57:35 UTC (rev 41571)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.... 2012-05-31 07:59:04 UTC (rev 41572)
@@ -11,7 +11,7 @@
<shortDescription>Java EE Web Project</shortDescription>
<priority>1</priority>
<description>
-This is your project! It's a sample, deployable Maven 3 project to help you get your foot in the door developing with Java EE 6 on JBoss Application Server 7.1.
+This is your project! It's a sample, deployable Maven 3 project to help you get your foot in the door developing with Java EE 6 on JBoss Enterprise Application Platform 6 or JBoss Application Server 7.1.
This project is setup to allow you to create a compliant Java EE 6 application using JSF 2.0, CDI 1.0, EJB 3.1, JPA 2.0 and Bean Validation 1.0.
It includes a persistence unit and some sample persistence and transaction code to help you get your feet wet with database access in enterprise Java.
</description>
13 years, 4 months
JBoss Tools SVN: r41571 - trunk/build/aggregate/soa-site/site.
by jbosstools-commits@lists.jboss.org
Author: dpalmer
Date: 2012-05-31 03:57:35 -0400 (Thu, 31 May 2012)
New Revision: 41571
Modified:
trunk/build/aggregate/soa-site/site/site.xml
Log:
[JBIDE-12057] Added SwitchYard tools editor to the JBT soa site
Modified: trunk/build/aggregate/soa-site/site/site.xml
===================================================================
--- trunk/build/aggregate/soa-site/site/site.xml 2012-05-31 07:56:06 UTC (rev 41570)
+++ trunk/build/aggregate/soa-site/site/site.xml 2012-05-31 07:57:35 UTC (rev 41571)
@@ -20,6 +20,10 @@
<category name="AbridgedTools" />
<category name="SOATools" />
</feature>
+ <feature url="features/org.switchyard.tools.editor.feature_0.0.0.jar" id="org.switchyard.tools.editor.feature" version="0.0.0">
+ <category name="AbridgedTools" />
+ <category name="SOATools" />
+ </feature>
<!-- only in JBT -->
<feature url="features/org.pi4soa.core.feature_0.0.0.jar" id="org.pi4soa.core.feature" version="0.0.0">
13 years, 4 months
JBoss Tools SVN: r41570 - branches/jbosstools-3.3.x/build/aggregate/soa-site/site.
by jbosstools-commits@lists.jboss.org
Author: dpalmer
Date: 2012-05-31 03:56:06 -0400 (Thu, 31 May 2012)
New Revision: 41570
Modified:
branches/jbosstools-3.3.x/build/aggregate/soa-site/site/site.xml
Log:
[JBIDE-12057] Added SwitchYard tools editor to the JBT soa site
Modified: branches/jbosstools-3.3.x/build/aggregate/soa-site/site/site.xml
===================================================================
--- branches/jbosstools-3.3.x/build/aggregate/soa-site/site/site.xml 2012-05-31 07:48:57 UTC (rev 41569)
+++ branches/jbosstools-3.3.x/build/aggregate/soa-site/site/site.xml 2012-05-31 07:56:06 UTC (rev 41570)
@@ -20,6 +20,10 @@
<category name="AbridgedTools" />
<category name="SOATools" />
</feature>
+ <feature url="features/org.switchyard.tools.editor.feature_0.0.0.jar" id="org.switchyard.tools.editor.feature" version="0.0.0">
+ <category name="AbridgedTools" />
+ <category name="SOATools" />
+ </feature>
<!-- only in JBT -->
<feature url="features/org.pi4soa.core.feature_0.0.0.jar" id="org.pi4soa.core.feature" version="0.0.0">
13 years, 4 months
JBoss Tools SVN: r41569 - branches/jbosstools-3.3.x/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-05-31 03:48:57 -0400 (Thu, 31 May 2012)
New Revision: 41569
Modified:
branches/jbosstools-3.3.x/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-10652 scrollbcar for quickstarts
Modified: branches/jbosstools-3.3.x/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- branches/jbosstools-3.3.x/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2012-05-31 07:18:10 UTC (rev 41568)
+++ branches/jbosstools-3.3.x/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2012-05-31 07:48:57 UTC (rev 41569)
@@ -21,7 +21,6 @@
import java.util.Set;
import org.apache.commons.lang.StringEscapeUtils;
-import org.eclipse.core.resources.WorkspaceJob;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IContributor;
@@ -1078,18 +1077,14 @@
return;
}
Point size;
- //if (Platform.OS_MACOSX.equals(Platform.getOS())) {
- size = form.getSize();
- size.y = form.getBody().getSize().y;
- //} else {
- // size = form.getBody().getSize();
- //}
+ size = form.getSize();
+ size.y = form.getBody().getSize().y;
if (!force && size.equals(oldSize)) {
return;
}
oldSize = size;
GridData gd;
- int widthHint = size.x/2 - 40;
+ int widthHint = size.x/2 - 20;
gd = (GridData) newsSection.getLayoutData();
if (newsSection.isExpanded()) {
if (blogsSection.isExpanded()) {
@@ -1116,46 +1111,36 @@
gd.widthHint = widthHint;
gd.grabExcessVerticalSpace = false;
-
- gd = (GridData) tutorialsSection.getLayoutData();
- //gridData.heightHint = size.y - 40;
- gd.widthHint = widthHint;
- gd.grabExcessVerticalSpace = false;
- tutorialPageBook.pack();
- //computedSize = tutorialPageBook.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //tutorialsSection.setSize(widthHint, computedSize.y);
-
+
gd = (GridData) documentationSection.getLayoutData();
//gridData.heightHint = size.y - 40;
gd.widthHint = widthHint;
gd.grabExcessVerticalSpace = false;
- //computedSize = documentationSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //documentationSection.setSize(widthHint, computedSize.y);
gd = (GridData) settingsSection.getLayoutData();
gd.widthHint = widthHint;
gd.grabExcessVerticalSpace = false;
- //computedSize = settingsSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //settingsSection.setSize(widthHint, computedSize.y);
gd = (GridData) projectsSection.getLayoutData();
//gridData.heightHint = size.y - 40;
gd.widthHint = widthHint;
gd.grabExcessVerticalSpace = false;
- //computedSize = projectsSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //projectsSection.setSize(widthHint, computedSize.y);
- blogsScrollComposite.setMinSize(widthHint, size.y - 55);
- newsScrollComposite.setMinSize(widthHint, size.y - 55);
+ gd = (GridData) tutorialsSection.getLayoutData();
+ Point computedSize = tutorialPageBook.computeSize(widthHint, SWT.DEFAULT);
- Point computedSize = tutorialPageBook.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- int y = computedSize.y;
- if (y > 100) {
- y = 100;
+ if (computedSize.y > (size.y/3)) {
+ gd.heightHint = size.y/3;
+ } else {
+ gd.heightHint = SWT.DEFAULT;
}
+ gd.widthHint = widthHint;
+ gd.grabExcessVerticalSpace = false;
- tutorialScrollComposite.setMinSize(widthHint, y);
+ computedSize = tutorialPageBook.computeSize(widthHint, SWT.DEFAULT);
+ tutorialScrollComposite.setMinSize(widthHint - 20, computedSize.y);
+
recomputeScrollComposite(blogsScrollComposite, blogsPageBook);
recomputeScrollComposite(newsScrollComposite, newsPageBook);
13 years, 4 months
JBoss Tools SVN: r41568 - trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-31 03:18:10 -0400 (Thu, 31 May 2012)
New Revision: 41568
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java
Log:
JBIDE-12041 to trunk
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java 2012-05-31 07:17:01 UTC (rev 41567)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java 2012-05-31 07:18:10 UTC (rev 41568)
@@ -89,12 +89,14 @@
protected String getArgsOverrideHost(IServer server, String preArgs) {
// Overrides
+ String host = server.getHost();
if( LaunchCommandPreferences.listensOnAllHosts(jbossServer.getServer())) {
- return ArgsUtil.setArg(preArgs,
+ host = "0.0.0.0";
+ }
+
+ return ArgsUtil.setArg(preArgs,
IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT,
- null, "0.0.0.0");
- }
- return preArgs;
+ null, host);
}
protected String getArgsOverrideConfigFile(IServer server, String preArgs) {
13 years, 4 months
JBoss Tools SVN: r41567 - branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-31 03:17:01 -0400 (Thu, 31 May 2012)
New Revision: 41567
Modified:
branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java
Log:
JBIDE-12041 to cr1
Modified: branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java
===================================================================
--- branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java 2012-05-31 07:13:47 UTC (rev 41566)
+++ branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java 2012-05-31 07:17:01 UTC (rev 41567)
@@ -89,12 +89,14 @@
protected String getArgsOverrideHost(IServer server, String preArgs) {
// Overrides
+ String host = server.getHost();
if( LaunchCommandPreferences.listensOnAllHosts(jbossServer.getServer())) {
- return ArgsUtil.setArg(preArgs,
+ host = "0.0.0.0";
+ }
+
+ return ArgsUtil.setArg(preArgs,
IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT,
- null, "0.0.0.0");
- }
- return preArgs;
+ null, host);
}
protected String getArgsOverrideConfigFile(IServer server, String preArgs) {
13 years, 4 months