JBoss Tools SVN: r38839 - trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-16 13:17:15 -0500 (Thu, 16 Feb 2012)
New Revision: 38839
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesJob.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesLocationPage.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesReadyPage.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesRequirementsPage.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard2.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/ProjectReadyWizard.java
Log:
organize imports
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesJob.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesJob.java 2012-02-16 17:40:48 UTC (rev 38838)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesJob.java 2012-02-16 18:17:15 UTC (rev 38839)
@@ -11,8 +11,6 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesLocationPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesLocationPage.java 2012-02-16 17:40:48 UTC (rev 38838)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesLocationPage.java 2012-02-16 18:17:15 UTC (rev 38839)
@@ -7,10 +7,8 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart;
-import org.eclipse.jdt.internal.ui.workingsets.IWorkingSetIDs;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeSelection;
import org.eclipse.jface.viewers.TreePath;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java 2012-02-16 17:40:48 UTC (rev 38838)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java 2012-02-16 18:17:15 UTC (rev 38839)
@@ -31,7 +31,6 @@
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesReadyPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesReadyPage.java 2012-02-16 17:40:48 UTC (rev 38838)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesReadyPage.java 2012-02-16 18:17:15 UTC (rev 38839)
@@ -3,7 +3,6 @@
import java.util.List;
import org.eclipse.core.resources.IMarker;
-import org.eclipse.jdt.internal.ui.typehierarchy.ShowQualifiedTypeNamesAction;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardPage;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesRequirementsPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesRequirementsPage.java 2012-02-16 17:40:48 UTC (rev 38838)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesRequirementsPage.java 2012-02-16 18:17:15 UTC (rev 38839)
@@ -14,9 +14,6 @@
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard2.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard2.java 2012-02-16 17:40:48 UTC (rev 38838)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard2.java 2012-02-16 18:17:15 UTC (rev 38839)
@@ -17,7 +17,6 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
-import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -38,7 +37,6 @@
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.project.examples.Messages;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
-import org.jboss.tools.project.examples.dialog.xpl.QuickFixPage;
import org.jboss.tools.project.examples.model.ProjectExample;
public class NewProjectExamplesWizard2 extends Wizard implements INewWizard {
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/ProjectReadyWizard.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/ProjectReadyWizard.java 2012-02-16 17:40:48 UTC (rev 38838)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/ProjectReadyWizard.java 2012-02-16 18:17:15 UTC (rev 38839)
@@ -10,10 +10,8 @@
************************************************************************************/
package org.jboss.tools.project.examples.wizard;
-import java.util.ArrayList;
import java.util.List;
-import org.eclipse.jdt.internal.ui.typehierarchy.ShowQualifiedTypeNamesAction;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
12 years, 7 months
JBoss Tools SVN: r38838 - trunk/download.jboss.org/jbosstools/examples.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-16 12:40:48 -0500 (Thu, 16 Feb 2012)
New Revision: 38838
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-jbds50.xml
Log:
change icons for quickstarts
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-jbds50.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-jbds50.xml 2012-02-16 17:39:50 UTC (rev 38837)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-jbds50.xml 2012-02-16 17:40:48 UTC (rev 38838)
@@ -39,7 +39,7 @@
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<welcome type="cheatsheets" url="/jboss-as-helloworld/cheatsheets/helloworld.xml"/>
<tags>central</tags>
- <icon path="icons/jbossas7.png" />
+ <icon path="icons/jboss.png" />
</project>
<project>
@@ -84,7 +84,7 @@
</fixes>
<importType>maven</importType>
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
- <icon path="icons/jbossas7.png" />
+ <icon path="icons/jboss.png" />
</project>
@@ -128,7 +128,7 @@
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<welcome type="cheatsheets" url="/jboss-as-login/cheatsheets/login.xml"/>
<tags>central</tags>
- <icon path="icons/jbossas7.png" />
+ <icon path="icons/jboss.png" />
</project>
<project>
@@ -171,7 +171,7 @@
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<welcome type="cheatsheets" url="/jboss-as-numberguess/cheatsheets/numberguess.xml"/>
<tags>central</tags>
- <icon path="icons/jbossas7.png" />
+ <icon path="icons/jboss.png" />
</project>
<project>
@@ -215,7 +215,7 @@
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<welcome type="cheatsheets" url="/jboss-as-kitchensink/cheatsheets/kitchensink.xml"/>
<tags>central</tags>
- <icon path="icons/jbossas7.png" />
+ <icon path="icons/jboss.png" />
</project>
<project>
<category>JBoss AS 7 Quickstarts</category>
@@ -257,7 +257,7 @@
<welcome type="cheatsheets" url="/poh5-helloworld/cheatsheets/poh5-helloworld.xml"/>
-->
<tags>central</tags>
- <icon path="icons/jbossas7.png" />
+ <icon path="icons/jboss.png" />
</project>
</projects>
12 years, 7 months
JBoss Tools SVN: r38837 - trunk/download.jboss.org/jbosstools/examples.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-16 12:39:50 -0500 (Thu, 16 Feb 2012)
New Revision: 38837
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml
Log:
change icons for quickstarts
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml 2012-02-16 17:11:50 UTC (rev 38836)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml 2012-02-16 17:39:50 UTC (rev 38837)
@@ -35,7 +35,7 @@
</properties>
-->
</mavenArchetype>
- <icon path="icons/jbossas7.png" />
+ <icon path="icons/jboss.png" />
</project>
<project>
@@ -79,7 +79,7 @@
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<welcome type="cheatsheets" url="/jboss-as-helloworld/cheatsheets/helloworld.xml"/>
<tags>central</tags>
- <icon path="icons/jbossas7.png" />
+ <icon path="icons/jboss.png" />
</project>
<project>
@@ -124,7 +124,7 @@
</fixes>
<importType>maven</importType>
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
- <icon path="icons/jbossas7.png" />
+ <icon path="icons/jboss.png" />
</project>
@@ -169,7 +169,7 @@
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<welcome type="cheatsheets" url="/jboss-as-login/cheatsheets/login.xml"/>
<tags>central</tags>
- <icon path="icons/jbossas7.png" />
+ <icon path="icons/jboss.png" />
</project>
<project>
@@ -213,7 +213,7 @@
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<welcome type="cheatsheets" url="/jboss-as-numberguess/cheatsheets/numberguess.xml"/>
<tags>central</tags>
- <icon path="icons/jbossas7.png" />
+ <icon path="icons/jboss.png" />
</project>
<project>
@@ -257,7 +257,7 @@
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<welcome type="cheatsheets" url="/jboss-as-kitchensink/cheatsheets/kitchensink.xml"/>
<tags>central</tags>
- <icon path="icons/jbossas7.png" />
+ <icon path="icons/jboss.png" />
</project>
<project>
<category>JBoss Quickstarts</category>
@@ -300,7 +300,7 @@
<welcome type="cheatsheets" url="/poh5-helloworld/cheatsheets/poh5-helloworld.xml"/>
-->
<tags>central</tags>
- <icon path="icons/jbossas7.png" />
+ <icon path="icons/jboss.png" />
</project>
</projects>
12 years, 7 months
JBoss Tools SVN: r38836 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-16 12:11:50 -0500 (Thu, 16 Feb 2012)
New Revision: 38836
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/OpenShiftPasswordStorageKey.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/SecurePasswordStore.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
Log:
[JBIDE-10936]
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/OpenShiftPasswordStorageKey.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/OpenShiftPasswordStorageKey.java 2012-02-16 16:58:10 UTC (rev 38835)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/OpenShiftPasswordStorageKey.java 2012-02-16 17:11:50 UTC (rev 38836)
@@ -29,7 +29,7 @@
private String userName;
public OpenShiftPasswordStorageKey(String platform, String userName) {
- this.userName = userName;
+ this.userName = platform;
this.platform = userName;
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/SecurePasswordStore.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/SecurePasswordStore.java 2012-02-16 16:58:10 UTC (rev 38835)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/SecurePasswordStore.java 2012-02-16 17:11:50 UTC (rev 38836)
@@ -52,7 +52,7 @@
update(storageKey, password);
}
- private void update(IStorageKey key, String password) throws SecurePasswordStoreException {
+ public void update(IStorageKey key, String password) throws SecurePasswordStoreException {
if (!storageKey.equals(key) || isPasswordChanged(password)) {
storeInPreferences(this.password = password, this.storageKey = key);
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2012-02-16 16:58:10 UTC (rev 38835)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2012-02-16 17:11:50 UTC (rev 38836)
@@ -30,13 +30,11 @@
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Text;
@@ -49,9 +47,6 @@
import org.jboss.tools.openshift.express.internal.ui.utils.StringUtils;
import org.jboss.tools.openshift.express.internal.ui.utils.UIUtils;
-import com.openshift.express.client.IUser;
-import com.openshift.express.client.OpenShiftException;
-
/**
* @author Andre Dietisheim
* @author Xavier Coulon
@@ -61,16 +56,14 @@
protected static final String OPENSHIFT_EXPRESS_SIGNUP_URL = "https://openshift.redhat.com/app/user/new/express"; //$NON-NLS-1$
private final CredentialsWizardPageModel pageModel;
-
- private final IUserAwareModel wizardModel;
private Text rhLoginText = null;
private Text passwordText = null;
public CredentialsWizardPage(IWizard wizard, IUserAwareModel wizardModel) {
- super("OpenShift Connection", "Please provide your OpenShift Express credentials.", "Server Connection", wizard);
+ super("Server connection", "Please provide your OpenShift Express credentials.", "Server Connection",
+ wizard);
this.pageModel = new CredentialsWizardPageModel(wizardModel);
- this.wizardModel = wizardModel;
}
protected void doCreateControls(Composite container, DataBindingContext dbc) {
@@ -78,38 +71,45 @@
Link signupLink = new Link(container, SWT.WRAP);
signupLink.setText("If you do not have an account on OpenShift Express, please sign up <a>here</a>.");
- GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).span(2, 1).applyTo(signupLink);
+ GridDataFactory.fillDefaults()
+ .align(SWT.LEFT, SWT.CENTER).span(2, 1).applyTo(signupLink);
signupLink.addSelectionListener(onSignupLinkClicked());
Label fillerLabel = new Label(container, SWT.NONE);
- GridDataFactory.fillDefaults().span(2, 1).hint(SWT.DEFAULT, 6).applyTo(fillerLabel);
+ GridDataFactory.fillDefaults()
+ .span(2, 1).hint(SWT.DEFAULT, 6).applyTo(fillerLabel);
Label rhLoginLabel = new Label(container, SWT.NONE);
rhLoginLabel.setText("&Username");
- GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(rhLoginLabel);
+ GridDataFactory.fillDefaults()
+ .align(SWT.LEFT, SWT.CENTER).applyTo(rhLoginLabel);
rhLoginText = new Text(container, SWT.BORDER);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(1, 1).applyTo(rhLoginText);
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.CENTER).grab(true, false).span(1, 1).applyTo(rhLoginText);
UIUtils.selectAllOnFocus(rhLoginText);
- final IObservableValue rhLoginObservable = BeanProperties.value(CredentialsWizardPageModel.PROPERTY_RHLOGIN)
- .observe(pageModel);
+ final IObservableValue rhLoginObservable =
+ BeanProperties.value(CredentialsWizardPageModel.PROPERTY_RHLOGIN).observe(pageModel);
dbc.bindValue(WidgetProperties.text(SWT.Modify).observe(rhLoginText), rhLoginObservable);
Label passwordLabel = new Label(container, SWT.NONE);
passwordLabel.setText("&Password");
- GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(passwordLabel);
+ GridDataFactory.fillDefaults()
+ .align(SWT.LEFT, SWT.CENTER).applyTo(passwordLabel);
passwordText = new Text(container, SWT.BORDER | SWT.PASSWORD);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(1, 1).applyTo(passwordText);
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.CENTER).grab(true, false).span(1, 1).applyTo(passwordText);
UIUtils.selectAllOnFocus(passwordText);
- final IObservableValue passwordModelObservable = BeanProperties.value(
- CredentialsWizardPageModel.PROPERTY_PASSWORD).observe(pageModel);
+ final IObservableValue passwordModelObservable =
+ BeanProperties.value(CredentialsWizardPageModel.PROPERTY_PASSWORD).observe(pageModel);
final ISWTObservableValue passwordTextObservable = WidgetProperties.text(SWT.Modify).observe(passwordText);
dbc.bindValue(passwordTextObservable, passwordModelObservable);
- IObservableValue credentialsStatusObservable = BeanProperties.value(
- CredentialsWizardPageModel.PROPERTY_CREDENTIALS_STATUS).observe(pageModel);
- dbc.addValidationStatusProvider(new CredentialsInputValidator(rhLoginObservable, passwordModelObservable));
- final CredentialsStatusValidator credentialsStatusValidator = new CredentialsStatusValidator(
- credentialsStatusObservable, passwordTextObservable);
+ IObservableValue credentialsStatusObservable =
+ BeanProperties.value(CredentialsWizardPageModel.PROPERTY_CREDENTIALS_STATUS).observe(pageModel);
+ dbc.addValidationStatusProvider(
+ new CredentialsInputValidator(rhLoginObservable, passwordModelObservable));
+ final CredentialsStatusValidator credentialsStatusValidator =
+ new CredentialsStatusValidator(credentialsStatusObservable, passwordTextObservable);
dbc.addValidationStatusProvider(credentialsStatusValidator);
ControlDecorationSupport.create(credentialsStatusValidator, SWT.LEFT | SWT.TOP);
@@ -117,11 +117,12 @@
// the text fields
Button rememberPasswordCheckBox = new Button(container, SWT.CHECK);
rememberPasswordCheckBox.setText("Save password (could trigger secure storage login)");
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(rememberPasswordCheckBox);
- final IObservableValue rememberPasswordModelObservable = BeanProperties.value(
- CredentialsWizardPageModel.PROPERTY_REMEMBER_PASSWORD).observe(pageModel);
- final ISWTObservableValue rememberPasswordCheckBoxObservable = WidgetProperties.selection().observe(
- rememberPasswordCheckBox);
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(rememberPasswordCheckBox);
+ final IObservableValue rememberPasswordModelObservable =
+ BeanProperties.value(CredentialsWizardPageModel.PROPERTY_REMEMBER_PASSWORD).observe(pageModel);
+ final ISWTObservableValue rememberPasswordCheckBoxObservable =
+ WidgetProperties.selection().observe(rememberPasswordCheckBox);
dbc.bindValue(rememberPasswordCheckBoxObservable, rememberPasswordModelObservable);
}
@@ -145,7 +146,8 @@
@Override
protected void onPageActivated(DataBindingContext dbc) {
super.onPageActivated(dbc);
- if (pageModel.getRhLogin() == null || pageModel.getRhLogin().isEmpty() && rhLoginText != null) {
+ if (StringUtils.isEmpty(pageModel.getRhLogin())
+ && rhLoginText != null) {
rhLoginText.setFocus();
} else if (passwordText != null) {
passwordText.setFocus();
@@ -191,7 +193,8 @@
private final IObservableValue passwordObservable;
- public CredentialsInputValidator(IObservableValue rhLoginObservable, IObservableValue passwordObservable) {
+ public CredentialsInputValidator(IObservableValue rhLoginObservable,
+ IObservableValue passwordObservable) {
this.rhLoginObservable = rhLoginObservable;
this.passwordObservable = passwordObservable;
}
@@ -202,7 +205,8 @@
// something..
final String rhLoginValue = (String) rhLoginObservable.getValue();
final String passwordValue = (String) passwordObservable.getValue();
- if (!StringUtils.isEmpty(rhLoginValue) && !StringUtils.isEmpty(passwordValue)) {
+ if (!StringUtils.isEmpty(rhLoginValue)
+ && !StringUtils.isEmpty(passwordValue)) {
return ValidationStatus.ok();
}
return ValidationStatus.cancel("Please provide your OpenShift Express user credentials");
@@ -226,8 +230,7 @@
final IStatus credentialsValidityStatus = (IStatus) credentialsStatusObservable.getValue();
if (credentialsValidityStatus != null) {
- final IStatus credentialsValidity = pageModel.getCredentialsStatus();
- return credentialsValidity;
+ return pageModel.getCredentialsStatus();
}
return ValidationStatus.ok();
}
@@ -238,7 +241,5 @@
targets.add(passwordTextObservable);
return targets;
}
-
}
-
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-02-16 16:58:10 UTC (rev 38835)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-02-16 17:11:50 UTC (rev 38836)
@@ -50,13 +50,15 @@
private SecurePasswordStore store;
private IUserAwareModel wizardModel;
+
+ private OpenShiftPasswordStorageKey key;
public CredentialsWizardPageModel(IUserAwareModel wizardModel) {
this.wizardModel = wizardModel;
this.rhLoginPreferenceValue = new StringPreferenceValue(RHLOGIN_PREFS_KEY, OpenShiftUIActivator.PLUGIN_ID);
this.libraServer = initLibraServer();
this.rhLogin = initRhLogin();
- this.store = initSecureStore(libraServer, rhLogin);
+ initSecureStore(libraServer, rhLogin);
this.password = initPassword();
resetCredentialsStatus();
}
@@ -70,33 +72,36 @@
return null;
}
- private SecurePasswordStore initSecureStore(final String platform, final String rhLogin) {
- SecurePasswordStore store = null;
- final OpenShiftPasswordStorageKey key = new OpenShiftPasswordStorageKey(platform, rhLogin);
- if (key != null) {
- store = new SecurePasswordStore(key);
- }
- return store;
+ private void initSecureStore(final String platform, final String rhLogin) {
+ this.key = new OpenShiftPasswordStorageKey(platform, rhLogin);
+ this.store = new SecurePasswordStore(key);
}
protected String initRhLogin() {
String rhLogin = null;
+
IUser user = wizardModel.getUser();
+ if (user == null) {
+ user = UserModel.getDefault().getRecentUser();
+ }
if (user != null) {
rhLogin = user.getRhlogin();
} else {
rhLogin = rhLoginPreferenceValue.get();
- if (rhLogin == null || rhLogin.length() == 0) {
+ if (rhLogin == null
+ || rhLogin.length() == 0) {
rhLogin = getConfiguredUserName();
}
}
+
return rhLogin;
}
-
+
protected String initPassword() {
String password = null;
if (!StringUtils.isEmpty(libraServer)
- && !StringUtils.isEmpty(rhLogin) && store != null) {
+ && !StringUtils.isEmpty(rhLogin)
+ && store != null) {
try {
password = store.getPassword();
setRememberPassword(!StringUtils.isEmpty(password));
@@ -107,10 +112,11 @@
return password;
}
- private void storePassword(String password) {
+ private void storePassword(IUser user) {
try {
if (store != null) {
- store.setPassword(password);
+ OpenShiftPasswordStorageKey key = new OpenShiftPasswordStorageKey(libraServer, user.getRhlogin());
+ store.update(key, password);
}
} catch (SecurePasswordStoreException e) {
Logger.error(e.getMessage(), e);
@@ -226,7 +232,7 @@
private void storeUser(IUser user) {
wizardModel.setUser(user);
if (rememberPassword) {
- storePassword(password);
+ storePassword(user);
} else {
erasePasswordStore();
}
12 years, 7 months
JBoss Tools SVN: r38835 - in trunk/maven/plugins: org.jboss.tools.maven.profiles.ui and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-16 11:58:10 -0500 (Thu, 16 Feb 2012)
New Revision: 38835
Modified:
trunk/maven/plugins/org.jboss.tools.maven.profiles.core/
trunk/maven/plugins/org.jboss.tools.maven.profiles.ui/
Log:
Add target to .svnignore
Property changes on: trunk/maven/plugins/org.jboss.tools.maven.profiles.core
___________________________________________________________________
Added: svn:ignore
+ target
Property changes on: trunk/maven/plugins/org.jboss.tools.maven.profiles.ui
___________________________________________________________________
Added: svn:ignore
+ target
12 years, 7 months
JBoss Tools SVN: r38834 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui: src/org/jboss/tools/openshift/express/internal/ui/action and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-02-16 11:52:55 -0500 (Thu, 16 Feb 2012)
New Revision: 38834
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/OpenConnectionDialogActionDelegate.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/RefreshViewerActionDelegate.java
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshUserAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshUserActionDelegate.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteApplicationAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ExpressConsoleView.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/Logger.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/TailServerLogActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/UserPropertySource.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.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/CredentialsWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
Log:
Fixed - JBIDE-10832 - OpenShift UseCase: Creation of app fails when user has no domain
https://issues.jboss.org/browse/JBIDE-10832
Open - JBIDE-10812 - OpenShift console: can select multiple apps but then only 1 gets deleted. List is not refreshed.
https://issues.jboss.org/browse/JBIDE-10812
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-02-16 16:52:55 UTC (rev 38834)
@@ -485,7 +485,7 @@
id="org.jboss.tools.openshift.express.ui.viewer.expressConsoleViewContribution"
targetID="org.jboss.tools.openshift.express.ui.viewer.expressConsoleView">
<action
- class="org.jboss.tools.openshift.express.internal.ui.action.RefreshUserActionDelegate"
+ class="org.jboss.tools.openshift.express.internal.ui.viewer.actionDelegate.RefreshViewerActionDelegate"
icon="icons/refresh.gif"
id="org.jboss.tools.openshift.express.ui.viewActions.refreshAction"
label="Refresh"
@@ -493,7 +493,7 @@
toolbarPath="openshift">
</action>
<action
- class="org.jboss.tools.openshift.express.internal.ui.action.OpenConnectionDialogActionDelegate"
+ class="org.jboss.tools.openshift.express.internal.ui.viewer.actionDelegate.OpenConnectionDialogActionDelegate"
icon="icons/resource_obj.gif"
id="org.jboss.tools.openshift.express.ui.viewActions.openConnectionWizard"
label="Connect"
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractAction.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractAction.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -11,6 +11,8 @@
/** The current selection in the view. */
protected ISelection selection = null;
+
+ protected CommonViewer viewer;
public AbstractAction(String text) {
super(text);
@@ -24,6 +26,7 @@
public void selectionChanged(SelectionChangedEvent event) {
Object source = event.getSource();
if (source instanceof CommonViewer) {
+ this.viewer = (CommonViewer) source;
this.selection = ((CommonViewer) source).getSelection();
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteApplicationAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteApplicationAction.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteApplicationAction.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -1,11 +1,14 @@
package org.jboss.tools.openshift.express.internal.ui.action;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ITreeSelection;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.ISharedImages;
@@ -33,16 +36,30 @@
*/
@Override
public void run() {
- if (isApplication(selection)) {
- final IApplication application = (IApplication) ((ITreeSelection)selection).getFirstElement();
- final String appName = application.getName();
- final boolean confirm = MessageDialog
- .openConfirm(
- Display.getCurrent().getActiveShell(),
- "Application deletion",
- "You are about to destroy the '" + appName + "' application.\n" +
- "This is NOT reversible, all remote data for this application will be removed.");
- if (confirm) {
+ final List<IApplication> appsToDelete = new ArrayList<IApplication>();
+ for (@SuppressWarnings("unchecked")
+ Iterator<Object> iterator = ((ITreeSelection) selection).iterator(); iterator.hasNext();) {
+ final Object element = iterator.next();
+ if (isApplication(element)) {
+ appsToDelete.add((IApplication) element);
+ }
+ }
+ if (appsToDelete.size() == 0) {
+ return;
+ }
+ boolean confirm = false;
+ if (appsToDelete.size() == 1) {
+ confirm = MessageDialog.openConfirm(Display.getCurrent().getActiveShell(), "Application deletion",
+ "You are about to destroy the '" + appsToDelete.get(0) + "' application.\n"
+ + "This is NOT reversible, all remote data for this application will be removed.");
+ } else if (appsToDelete.size() > 1) {
+ confirm = MessageDialog.openConfirm(Display.getCurrent().getActiveShell(), "Application deletion",
+ "You are about to destroy " + appsToDelete.size() + " applications.\n"
+ + "This is NOT reversible, all remote data for those applications will be removed.");
+ }
+ if (confirm) {
+ for (final IApplication application : appsToDelete) {
+ final String appName = application.getName();
Job job = new Job("Deleting application '" + appName + "'...") {
protected IStatus run(IProgressMonitor monitor) {
try {
@@ -51,6 +68,9 @@
Logger.error("Failed to delete application '" + appName + "'", e);
} finally {
monitor.done();
+ if (viewer != null) {
+ viewer.refresh();
+ }
}
return Status.OK_STATUS;
}
@@ -59,12 +79,13 @@
job.schedule(); // start as soon as possible
}
}
+ if (viewer != null) {
+ viewer.refresh();
+ }
}
- private boolean isApplication(ISelection selection) {
- return selection != null
- && selection instanceof ITreeSelection
- && ((ITreeSelection)selection).getFirstElement() instanceof IApplication;
+ private boolean isApplication(Object selection) {
+ return selection instanceof IApplication;
}
}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -1,48 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.action;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.navigator.CommonNavigator;
-import org.jboss.tools.common.ui.WizardUtils;
-import org.jboss.tools.openshift.express.internal.core.console.UserModel;
-import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
-import org.jboss.tools.openshift.express.internal.ui.viewer.ConnectToOpenShiftWizard;
-
-public class OpenConnectionDialogActionDelegate implements IViewActionDelegate {
-
- private CommonNavigator view;
-
- @Override
- public void run(IAction action) {
- final Display display = Display.getCurrent();
- final Shell shell = new Shell(display);
- final IWizard connectToOpenShiftWizard = new ConnectToOpenShiftWizard();
- int returnCode = WizardUtils.openWizardDialog(connectToOpenShiftWizard, shell);
- if (returnCode == Window.OK) {
- Logger.debug("OpenShift Auth succeeded.");
- if (view != null) {
- view.getCommonViewer().setInput(UserModel.getDefault());
- }
- }
-
- }
-
- @Override
- public void selectionChanged(IAction action, ISelection selection) {
-
- }
-
- @Override
- public void init(IViewPart view) {
- if (view instanceof CommonNavigator) {
- this.view = (CommonNavigator) view;
- }
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshUserAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshUserAction.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshUserAction.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -1,28 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.action;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-public class RefreshUserAction implements IViewActionDelegate {
-
- @Override
- public void run(IAction action) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void selectionChanged(IAction action, ISelection selection) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void init(IViewPart view) {
- // TODO Auto-generated method stub
-
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshUserActionDelegate.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshUserActionDelegate.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshUserActionDelegate.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -1,50 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.action;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.navigator.CommonNavigator;
-import org.jboss.tools.common.ui.WizardUtils;
-import org.jboss.tools.openshift.express.internal.core.console.UserModel;
-import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
-import org.jboss.tools.openshift.express.internal.ui.viewer.ConnectToOpenShiftWizard;
-
-public class RefreshUserActionDelegate implements IViewActionDelegate {
-
- private CommonNavigator view;
-
- private ISelection selection;
-
- @Override
- public void run(IAction action) {
- final Display display = Display.getCurrent();
- final Shell shell = new Shell(display);
- final IWizard connectToOpenShiftWizard = new ConnectToOpenShiftWizard();
- int returnCode = WizardUtils.openWizardDialog(connectToOpenShiftWizard, shell);
- if (returnCode == Window.OK) {
- Logger.debug("OpenShift Auth succeeded.");
- if (view != null) {
- view.getCommonViewer().setInput(UserModel.getDefault());
- }
- }
-
- }
-
- @Override
- public void selectionChanged(IAction action, ISelection selection) {
- this.selection = selection;
- }
-
- @Override
- public void init(IViewPart view) {
- if (view instanceof CommonNavigator) {
- this.view = (CommonNavigator) view;
- }
- }
-
-}
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -1,236 +0,0 @@
-package org.jboss.tools.openshift.express.internal.ui.action;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jgit.transport.CredentialsProvider;
-import org.eclipse.jgit.transport.RemoteSession;
-import org.eclipse.jgit.transport.SshSessionFactory;
-import org.eclipse.jgit.transport.URIish;
-import org.eclipse.jgit.util.FS;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.console.IConsole;
-import org.eclipse.ui.console.IConsoleConstants;
-import org.eclipse.ui.console.IConsoleListener;
-import org.eclipse.ui.console.MessageConsole;
-import org.eclipse.ui.views.IViewDescriptor;
-import org.eclipse.ui.views.IViewRegistry;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.ui.IServerModule;
-import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
-import org.jboss.tools.openshift.express.internal.ui.console.ConsoleUtils;
-import org.jboss.tools.openshift.express.internal.ui.console.JschToEclipseLogger;
-import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
-import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
-
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.openshift.express.client.IApplication;
-import com.openshift.express.client.OpenShiftException;
-import com.openshift.express.client.utils.Base64Encoder;
-
-/**
- * The action associated with the "Show In>Remote Console" menu item.
- *
- * @author Xavier Coulon
- *
- */
-public class TailServerLogAction extends AbstractAction implements IConsoleListener {
-
- /**
- * The message consoles associated with the 'tail' workers that write the output.
- */
- private Map<String, TailServerLogWorker> consoleWorkers = new HashMap<String, TailServerLogWorker>();
-
- /**
- * Constructor
- */
- public TailServerLogAction() {
- super(OpenShiftExpressUIMessages.TAIL_SERVER_LOG_ACTION);
- IViewRegistry reg = PlatformUI.getWorkbench().getViewRegistry();
- IViewDescriptor desc = reg.find(IConsoleConstants.ID_CONSOLE_VIEW);
- setImageDescriptor(desc.getImageDescriptor());
- ConsoleUtils.registerConsoleListener(this);
- }
-
- /**
- * Operation called when the user clicks on 'Show In>Remote Console'. If no Console/Worker existed, a new one is
- * created, otherwise, it is displayed. {@inheritDoc}
- */
- @Override
- public void run() {
- try {
- if (selection instanceof IStructuredSelection) {
- final Object selectedItem = ((IStructuredSelection) selection).getFirstElement();
- if (selectedItem instanceof IServer) {
- final IServer server = ((IServer) selectedItem);
- run(server);
- } else if (selectedItem instanceof IServerModule) {
- final IServer server = ((IServerModule) selectedItem).getServer();
- run(server);
- } else if (selectedItem instanceof IApplication) {
- final IApplication application = (IApplication) selectedItem;
- run(application);
- }
- }
- } catch (Exception e) {
- Logger.error("Failed to open Remote Console", e);
- }
- }
-
- private void run(final IApplication application) throws OpenShiftException, MalformedURLException {
- final String host = new URL(application.getApplicationUrl()).getHost();
- final String appId = application.getUUID();
- final String appName = application.getName();
- final MessageConsole console = ConsoleUtils.findMessageConsole(createConsoleId(appName, host));
- ConsoleUtils.displayConsoleView(console);
- console.newMessageStream().println("Loading....");
- if (!this.consoleWorkers.containsKey(console.getName())) {
- launchTailServerJob(host, appId, appName, console);
- }
- }
-
- private static String createConsoleId(String appName, String host) {
- return host;
- }
-
- private void run(final IServer server) {
- if (ExpressServerUtils.isOpenShiftRuntime(server) || ExpressServerUtils.isInOpenshiftBehaviourMode(server)) {
- final String host = server.getHost();
- final String appId = ExpressServerUtils.getExpressApplicationId(server);
- final String appName = ExpressServerUtils.getExpressApplicationName(server);
- final MessageConsole console = ConsoleUtils.findMessageConsole(createConsoleId(appName, host));
- ConsoleUtils.displayConsoleView(console);
- console.newMessageStream().println("Loading....");
- if (!this.consoleWorkers.containsKey(console.getName())) {
- launchTailServerJob(host, appId, appName, console);
- }
- }
- }
-
- private void launchTailServerJob(final String host, final String appId, final String appName,
- final MessageConsole console) {
- new Job("Launching Tail Server Operation") {
- protected IStatus run(IProgressMonitor monitor) {
- try {
- final TailServerLogWorker tailServerLogWorker = startTailProcess(host, appId, appName, console);
- consoleWorkers.put(console.getName(), tailServerLogWorker);
- Thread thread = new Thread(tailServerLogWorker);
- thread.start();
- } catch (Exception e) {
- Logger.error("Failed to retrieve remote server logs", e);
- console.newMessageStream().println("Failed to retrieve remote server logs: " + e.getMessage());
- console.newMessageStream().println("Please make sure your ssh key is added to your ssh preferences");
- }
- return Status.OK_STATUS;
- }
-
- }.schedule();
- }
-
- /**
- * Starting the tail process on the remote OpenShift Platform. This method relies on the JGit SSH support (including
- * JSch) to open a connection AND execute a command in a single invocation. The connection establishement requires
- * an SSH key, and the passphrase is prompted to the user if necessary.
- *
- * @param server
- * the server adapter on which the action is performed
- * @param console
- * the console into which the tail should be writtent
- * @return the Worker that encapsulate the established RemoteSession, the tail Process and the output console
- * @throws JSchException
- * in case of underlying exception
- * @throws IOException
- * in case of underlying exception
- */
- private TailServerLogWorker startTailProcess(final String host, final String appId, final String appName,
- final MessageConsole console) throws JSchException, IOException {
- final String logFilePath = appName + "/logs/*.log";
- final String options = "-f -n 100";
-
- JSch.setLogger(new JschToEclipseLogger());
- final SshSessionFactory sshSessionFactory = SshSessionFactory.getInstance();
- final URIish uri = new URIish().setHost(host).setUser(appId);
- RemoteSession remoteSession = sshSessionFactory.getSession(uri, CredentialsProvider.getDefault(), FS.DETECTED,
- 0);
-
- // the rhc-tail-files command template
- // ssh_cmd =
- // "ssh -t #{app_uuid}(a)#{app}-#{namespace}.#{rhc_domain} 'tail#{opt['opts'] ? ' --opts ' + Base64::encode64(opt['opts']).chomp : ''} #{file_glob}'"
- final String command = buildCommand(logFilePath, options);
- Process process = remoteSession.exec(command, 0);
- return new TailServerLogWorker(console, process, remoteSession);
-
- }
-
- /**
- * Builds the 'ssh tail' command that should be executed on the remote OpenShift platform.
- *
- * @param filePath
- * @param options
- * @return
- * @throws UnsupportedEncodingException
- */
- private String buildCommand(final String filePath, final String options) throws UnsupportedEncodingException {
- StringBuilder commandBuilder = new StringBuilder("tail ");
- if (options != null && !options.isEmpty()) {
- final String opts = new String(Base64Encoder.encode(options.getBytes("UTF-8")), "UTF-8");
- commandBuilder.append("--opts ").append(opts).append(" ");
- }
- commandBuilder.append(filePath);
- final String command = commandBuilder.toString();
- Logger.debug("ssh command to execute: " + command);
- return command;
- }
-
- public Object getSelection() {
- if (selection instanceof IStructuredSelection) {
- final Object selectedItem = ((IStructuredSelection) selection).getFirstElement();
- if (selectedItem instanceof IServer) {
- return ((IServer) selectedItem);
- }
- if (selectedItem instanceof IServerModule) {
- return ((IServerModule) selectedItem).getServer();
- }
- if (selectedItem instanceof IApplication) {
-
- }
- }
- return null;
- }
-
- @Override
- public void consolesAdded(IConsole[] consoles) {
- // don't do anything special
- }
-
- /**
- * Operation to perform when the console is removed (through the CloseConsoleAction that was brung by the
- * <code>TailConsolePageParticipant</code>). In the current case, the associated worker is stopped and the
- * console/worker are removed from the map, so that further 'Show In>Remote Console' invocation will trigger a new
- * worker process.
- */
- @Override
- public void consolesRemoved(IConsole[] consoles) {
- // if the console is associated with a 'tail' process, stop that process
- for (IConsole console : consoles) {
- final String consoleName = console.getName();
- if (consoleWorkers.containsKey(consoleName)) {
- final TailServerLogWorker worker = consoleWorkers.get(consoleName);
- worker.stop();
- consoleWorkers.remove(consoleName);
- }
- }
-
- }
-
-}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ExpressConsoleView.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ExpressConsoleView.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ExpressConsoleView.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -23,7 +23,7 @@
super.dispose();
}
- private void refreshViewer() {
+ public void refreshViewer() {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
getCommonViewer().refresh();
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java (from rev 38805, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -0,0 +1,237 @@
+package org.jboss.tools.openshift.express.internal.ui.console;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jgit.transport.CredentialsProvider;
+import org.eclipse.jgit.transport.RemoteSession;
+import org.eclipse.jgit.transport.SshSessionFactory;
+import org.eclipse.jgit.transport.URIish;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.console.IConsoleListener;
+import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.ui.views.IViewDescriptor;
+import org.eclipse.ui.views.IViewRegistry;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.ui.IServerModule;
+import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
+import org.jboss.tools.openshift.express.internal.ui.action.AbstractAction;
+import org.jboss.tools.openshift.express.internal.ui.action.TailServerLogWorker;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.OpenShiftException;
+import com.openshift.express.client.utils.Base64Encoder;
+
+/**
+ * The action associated with the "Show In>Remote Console" menu item.
+ *
+ * @author Xavier Coulon
+ *
+ */
+public class TailServerLogAction extends AbstractAction implements IConsoleListener {
+
+ /**
+ * The message consoles associated with the 'tail' workers that write the output.
+ */
+ private Map<String, TailServerLogWorker> consoleWorkers = new HashMap<String, TailServerLogWorker>();
+
+ /**
+ * Constructor
+ */
+ public TailServerLogAction() {
+ super(OpenShiftExpressUIMessages.TAIL_SERVER_LOG_ACTION);
+ IViewRegistry reg = PlatformUI.getWorkbench().getViewRegistry();
+ IViewDescriptor desc = reg.find(IConsoleConstants.ID_CONSOLE_VIEW);
+ setImageDescriptor(desc.getImageDescriptor());
+ ConsoleUtils.registerConsoleListener(this);
+ }
+
+ /**
+ * Operation called when the user clicks on 'Show In>Remote Console'. If no Console/Worker existed, a new one is
+ * created, otherwise, it is displayed. {@inheritDoc}
+ */
+ @Override
+ public void run() {
+ try {
+
+ if (selection instanceof IStructuredSelection) {
+ final Object selectedItem = ((IStructuredSelection) selection).getFirstElement();
+ if (selectedItem instanceof IServer) {
+ final IServer server = ((IServer) selectedItem);
+ run(server);
+ } else if (selectedItem instanceof IServerModule) {
+ final IServer server = ((IServerModule) selectedItem).getServer();
+ run(server);
+ } else if (selectedItem instanceof IApplication) {
+ final IApplication application = (IApplication) selectedItem;
+ run(application);
+ }
+ }
+ } catch (Exception e) {
+ Logger.error("Failed to open Remote Console", e);
+ }
+ }
+
+ private void run(final IApplication application) throws OpenShiftException, MalformedURLException {
+ final String host = new URL(application.getApplicationUrl()).getHost();
+ final String appId = application.getUUID();
+ final String appName = application.getName();
+ final MessageConsole console = ConsoleUtils.findMessageConsole(createConsoleId(appName, host));
+ ConsoleUtils.displayConsoleView(console);
+ console.newMessageStream().println("Loading....");
+ if (!this.consoleWorkers.containsKey(console.getName())) {
+ launchTailServerJob(host, appId, appName, console);
+ }
+ }
+
+ private static String createConsoleId(String appName, String host) {
+ return host;
+ }
+
+ private void run(final IServer server) {
+ if (ExpressServerUtils.isOpenShiftRuntime(server) || ExpressServerUtils.isInOpenshiftBehaviourMode(server)) {
+ final String host = server.getHost();
+ final String appId = ExpressServerUtils.getExpressApplicationId(server);
+ final String appName = ExpressServerUtils.getExpressApplicationName(server);
+ final MessageConsole console = ConsoleUtils.findMessageConsole(createConsoleId(appName, host));
+ ConsoleUtils.displayConsoleView(console);
+ console.newMessageStream().println("Loading....");
+ if (!this.consoleWorkers.containsKey(console.getName())) {
+ launchTailServerJob(host, appId, appName, console);
+ }
+ }
+ }
+
+ private void launchTailServerJob(final String host, final String appId, final String appName,
+ final MessageConsole console) {
+ new Job("Launching Tail Server Operation") {
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ final TailServerLogWorker tailServerLogWorker = startTailProcess(host, appId, appName, console);
+ consoleWorkers.put(console.getName(), tailServerLogWorker);
+ Thread thread = new Thread(tailServerLogWorker);
+ thread.start();
+ } catch (Exception e) {
+ Logger.error("Failed to retrieve remote server logs", e);
+ console.newMessageStream().println("Failed to retrieve remote server logs: " + e.getMessage());
+ console.newMessageStream().println("Please make sure your ssh key is added to your ssh preferences");
+ }
+ return Status.OK_STATUS;
+ }
+
+ }.schedule();
+ }
+
+ /**
+ * Starting the tail process on the remote OpenShift Platform. This method relies on the JGit SSH support (including
+ * JSch) to open a connection AND execute a command in a single invocation. The connection establishement requires
+ * an SSH key, and the passphrase is prompted to the user if necessary.
+ *
+ * @param server
+ * the server adapter on which the action is performed
+ * @param console
+ * the console into which the tail should be writtent
+ * @return the Worker that encapsulate the established RemoteSession, the tail Process and the output console
+ * @throws JSchException
+ * in case of underlying exception
+ * @throws IOException
+ * in case of underlying exception
+ */
+ private TailServerLogWorker startTailProcess(final String host, final String appId, final String appName,
+ final MessageConsole console) throws JSchException, IOException {
+ final String logFilePath = appName + "/logs/*.log";
+ final String options = "-f -n 100";
+
+ JSch.setLogger(new JschToEclipseLogger());
+ final SshSessionFactory sshSessionFactory = SshSessionFactory.getInstance();
+ final URIish uri = new URIish().setHost(host).setUser(appId);
+ RemoteSession remoteSession = sshSessionFactory.getSession(uri, CredentialsProvider.getDefault(), FS.DETECTED,
+ 0);
+
+ // the rhc-tail-files command template
+ // ssh_cmd =
+ // "ssh -t #{app_uuid}(a)#{app}-#{namespace}.#{rhc_domain} 'tail#{opt['opts'] ? ' --opts ' + Base64::encode64(opt['opts']).chomp : ''} #{file_glob}'"
+ final String command = buildCommand(logFilePath, options);
+ Process process = remoteSession.exec(command, 0);
+ return new TailServerLogWorker(console, process, remoteSession);
+
+ }
+
+ /**
+ * Builds the 'ssh tail' command that should be executed on the remote OpenShift platform.
+ *
+ * @param filePath
+ * @param options
+ * @return
+ * @throws UnsupportedEncodingException
+ */
+ private String buildCommand(final String filePath, final String options) throws UnsupportedEncodingException {
+ StringBuilder commandBuilder = new StringBuilder("tail ");
+ if (options != null && !options.isEmpty()) {
+ final String opts = new String(Base64Encoder.encode(options.getBytes("UTF-8")), "UTF-8");
+ commandBuilder.append("--opts ").append(opts).append(" ");
+ }
+ commandBuilder.append(filePath);
+ final String command = commandBuilder.toString();
+ Logger.debug("ssh command to execute: " + command);
+ return command;
+ }
+
+ public Object getSelection() {
+ if (selection instanceof IStructuredSelection) {
+ final Object selectedItem = ((IStructuredSelection) selection).getFirstElement();
+ if (selectedItem instanceof IServer) {
+ return ((IServer) selectedItem);
+ }
+ if (selectedItem instanceof IServerModule) {
+ return ((IServerModule) selectedItem).getServer();
+ }
+ if (selectedItem instanceof IApplication) {
+
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public void consolesAdded(IConsole[] consoles) {
+ // don't do anything special
+ }
+
+ /**
+ * Operation to perform when the console is removed (through the CloseConsoleAction that was brung by the
+ * <code>TailConsolePageParticipant</code>). In the current case, the associated worker is stopped and the
+ * console/worker are removed from the map, so that further 'Show In>Remote Console' invocation will trigger a new
+ * worker process.
+ */
+ @Override
+ public void consolesRemoved(IConsole[] consoles) {
+ // if the console is associated with a 'tail' process, stop that process
+ for (IConsole console : consoles) {
+ final String consoleName = console.getName();
+ if (consoleWorkers.containsKey(consoleName)) {
+ final TailServerLogWorker worker = consoleWorkers.get(consoleName);
+ worker.stop();
+ consoleWorkers.remove(consoleName);
+ }
+ }
+
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -1,6 +1,5 @@
package org.jboss.tools.openshift.express.internal.ui.console;
-import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.navigator.CommonActionProvider;
@@ -10,11 +9,7 @@
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.CommonActionProviderUtils;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
-import org.jboss.tools.openshift.express.internal.core.console.UserModel;
-import org.jboss.tools.openshift.express.internal.ui.action.TailServerLogAction;
-import com.openshift.express.client.IUser;
-
public class TailServerLogActionProvider extends CommonActionProvider {
private TailServerLogAction action;
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -38,5 +38,6 @@
public static String SHOW_PROPERTIES_VIEW_ACTION;
+ public static String REFRESH_VIEWER_ACTION;
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties 2012-02-16 16:52:55 UTC (rev 38834)
@@ -14,3 +14,5 @@
MAKE_SNAPSHOT_ACTION=Pull down Application Snapshot
SHOW_PROPERTIES_VIEW_ACTION=Properties
+REFRESH_VIEWER_ACTION=Refresh
+
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/Logger.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/Logger.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/Logger.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -120,6 +120,9 @@
*/
public static void debug(final String message) {
String debugOption = Platform.getDebugOption(DEBUG);
+ if( OpenShiftUIActivator.getDefault() == null )
+ return;
+
if (OpenShiftUIActivator.getDefault().isDebugging() && "true".equalsIgnoreCase(debugOption)) {
System.out.println("[" + Thread.currentThread().getName() + "] " + message);
}
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/OpenConnectionDialogActionDelegate.java (from rev 38738, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/OpenConnectionDialogActionDelegate.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/OpenConnectionDialogActionDelegate.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/OpenConnectionDialogActionDelegate.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -0,0 +1,48 @@
+package org.jboss.tools.openshift.express.internal.ui.viewer.actionDelegate;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.navigator.CommonNavigator;
+import org.jboss.tools.common.ui.WizardUtils;
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+import org.jboss.tools.openshift.express.internal.ui.viewer.ConnectToOpenShiftWizard;
+
+public class OpenConnectionDialogActionDelegate implements IViewActionDelegate {
+
+ private CommonNavigator view;
+
+ @Override
+ public void run(IAction action) {
+ final Display display = Display.getCurrent();
+ final Shell shell = new Shell(display);
+ final IWizard connectToOpenShiftWizard = new ConnectToOpenShiftWizard();
+ int returnCode = WizardUtils.openWizardDialog(connectToOpenShiftWizard, shell);
+ if (returnCode == Window.OK) {
+ Logger.debug("OpenShift Auth succeeded.");
+ if (view != null) {
+ view.getCommonViewer().setInput(UserModel.getDefault());
+ }
+ }
+
+ }
+
+ @Override
+ public void selectionChanged(IAction action, ISelection selection) {
+
+ }
+
+ @Override
+ public void init(IViewPart view) {
+ if (view instanceof CommonNavigator) {
+ this.view = (CommonNavigator) view;
+ }
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/OpenConnectionDialogActionDelegate.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/RefreshViewerActionDelegate.java (from rev 38738, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/RefreshUserActionDelegate.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/RefreshViewerActionDelegate.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/RefreshViewerActionDelegate.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -0,0 +1,32 @@
+package org.jboss.tools.openshift.express.internal.ui.viewer.actionDelegate;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.jboss.tools.openshift.express.internal.ui.console.ExpressConsoleView;
+
+public class RefreshViewerActionDelegate implements IViewActionDelegate {
+
+ private ExpressConsoleView view;
+
+ protected ISelection selection;
+
+ @Override
+ public void run(IAction action) {
+ view.refreshViewer();
+ }
+
+ @Override
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = selection;
+ }
+
+ @Override
+ public void init(IViewPart view) {
+ if (view instanceof ExpressConsoleView) {
+ this.view = (ExpressConsoleView) view;
+ }
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/RefreshViewerActionDelegate.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/TailServerLogActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/TailServerLogActionProvider.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/TailServerLogActionProvider.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -10,7 +10,7 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
-import org.jboss.tools.openshift.express.internal.ui.action.TailServerLogAction;
+import org.jboss.tools.openshift.express.internal.ui.console.TailServerLogAction;
/**
* @author Xavier Coulon
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/UserPropertySource.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/UserPropertySource.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/UserPropertySource.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -46,7 +46,7 @@
if (id.equals("Username")) {
return user.getRhlogin();
}
- if (id.equals("Domain")) {
+ if (id.equals("Domain") && user.hasDomain()) {
return user.getDomain().getNamespace() + "." + user.getDomain().getRhcDomain();
}
} catch (OpenShiftException e) {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -40,6 +40,7 @@
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.PageChangingEvent;
import org.eclipse.jface.fieldassist.AutoCompleteField;
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.jface.fieldassist.FieldDecoration;
@@ -59,6 +60,8 @@
import org.eclipse.jface.viewers.TableViewerColumn;
import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -77,6 +80,7 @@
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.common.ui.databinding.ValueBindingBuilder;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import org.jboss.tools.openshift.express.internal.ui.utils.StringUtils;
import org.jboss.tools.openshift.express.internal.ui.utils.UIUtils;
import org.jboss.tools.openshift.express.internal.ui.utils.UIUtils.IWidgetVisitor;
@@ -86,6 +90,7 @@
import com.openshift.express.client.IApplication;
import com.openshift.express.client.ICartridge;
import com.openshift.express.client.IEmbeddableCartridge;
+import com.openshift.express.client.IUser;
import com.openshift.express.client.NotFoundOpenShiftException;
import com.openshift.express.client.OpenShiftException;
@@ -141,36 +146,28 @@
useExistingAppBtn.setText("Use existing application:");
useExistingAppBtn.setToolTipText("Select an existing application or uncheck to create a new one.");
useExistingAppBtn.setFocus();
- GridDataFactory.fillDefaults()
- .span(1, 1).align(SWT.FILL, SWT.CENTER).grab(false, false).applyTo(useExistingAppBtn);
- IObservableValue useExistingAppObservable =
- BeanProperties.value(ApplicationConfigurationWizardPageModel.PROPERTY_USE_EXISTING_APPLICATION)
- .observe(pageModel);
- final IObservableValue useExistingAppBtnSelection =
- WidgetProperties.selection().observe(useExistingAppBtn);
+ GridDataFactory.fillDefaults().span(1, 1).align(SWT.FILL, SWT.CENTER).grab(false, false)
+ .applyTo(useExistingAppBtn);
+ IObservableValue useExistingAppObservable = BeanProperties.value(
+ ApplicationConfigurationWizardPageModel.PROPERTY_USE_EXISTING_APPLICATION).observe(pageModel);
+ final IObservableValue useExistingAppBtnSelection = WidgetProperties.selection().observe(useExistingAppBtn);
dbc.bindValue(useExistingAppBtnSelection, useExistingAppObservable);
// existing app name
this.existingAppNameText = new Text(existingAppSelectionGroup, SWT.BORDER);
- GridDataFactory.fillDefaults()
- .align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false).applyTo(existingAppNameText);
- IObservableValue existingAppNameTextObservable =
- WidgetProperties.text(SWT.Modify).observe(existingAppNameText);
- IObservableValue existingAppNameModelObservable =
- BeanProperties.value(
- ApplicationConfigurationWizardPageModel.PROPERTY_EXISTING_APPLICATION_NAME).observe(pageModel);
- ValueBindingBuilder
- .bind(existingAppNameTextObservable)
- .to(existingAppNameModelObservable)
- .in(dbc);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false)
+ .applyTo(existingAppNameText);
+ IObservableValue existingAppNameTextObservable = WidgetProperties.text(SWT.Modify).observe(existingAppNameText);
+ IObservableValue existingAppNameModelObservable = BeanProperties.value(
+ ApplicationConfigurationWizardPageModel.PROPERTY_EXISTING_APPLICATION_NAME).observe(pageModel);
+ ValueBindingBuilder.bind(existingAppNameTextObservable).to(existingAppNameModelObservable).in(dbc);
UIUtils.focusOnSelection(useExistingAppBtn, existingAppNameText);
createContentAssist(existingAppNameText);
this.browseAppsButton = new Button(existingAppSelectionGroup, SWT.NONE);
browseAppsButton.setText("Browse...");
browseAppsButton.addSelectionListener(onBrowseApps());
- GridDataFactory.fillDefaults()
- .align(SWT.LEFT, SWT.CENTER).hint(100, SWT.DEFAULT).span(1, 1).grab(false, false)
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).hint(100, SWT.DEFAULT).span(1, 1).grab(false, false)
.applyTo(browseAppsButton);
// observe the list of application, get notified once they have been
IObservableValue existingApplicationsLoaded =
@@ -180,21 +177,21 @@
new ApplicationToSelectNameValidator(
useExistingAppBtnSelection, existingAppNameTextObservable, existingApplicationsLoaded);
dbc.addValidationStatusProvider(existingAppValidator);
- ControlDecorationSupport.create(
- existingAppValidator, SWT.LEFT | SWT.TOP, null, new CustomControlDecorationUpdater(false));
+ ControlDecorationSupport.create(existingAppValidator, SWT.LEFT | SWT.TOP, null,
+ new CustomControlDecorationUpdater(false));
return existingAppSelectionGroup;
}
private void createContentAssist(final Text existingAppNameText) {
ControlDecoration dec = new ControlDecoration(existingAppNameText, SWT.TOP | SWT.LEFT);
- FieldDecoration contentProposalFieldIndicator =
- FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
+ FieldDecoration contentProposalFieldIndicator = FieldDecorationRegistry.getDefault().getFieldDecoration(
+ FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
dec.setImage(contentProposalFieldIndicator.getImage());
dec.setDescriptionText("Auto-completion is enabled when you start typing an application name.");
dec.setShowOnlyOnFocus(true);
- AutoCompleteField adapter =
- new AutoCompleteField(existingAppNameText, new TextContentAdapter(), new String[] {});
+ AutoCompleteField adapter = new AutoCompleteField(existingAppNameText, new TextContentAdapter(),
+ new String[] {});
adapter.setProposals(pageModel.getApplicationNames());
}
@@ -226,11 +223,9 @@
this.newAppConfigurationGroup = new Group(parent, SWT.NONE);
newAppConfigurationGroup.setText("New application");
GridLayoutFactory.fillDefaults().numColumns(2).margins(6, 6).applyTo(newAppConfigurationGroup);
- GridDataFactory.fillDefaults()
- .grab(true, true).align(SWT.FILL, SWT.FILL).applyTo(newAppConfigurationGroup);
+ GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).applyTo(newAppConfigurationGroup);
- IObservableValue useExistingApplication =
- WidgetProperties.selection().observe(useExistingAppBtn);
+ IObservableValue useExistingApplication = WidgetProperties.selection().observe(useExistingAppBtn);
useExistingApplication.addValueChangeListener(
onUseExistingApplication(
@@ -240,46 +235,36 @@
newAppNameLabel.setText("Name:");
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).applyTo(newAppNameLabel);
this.newAppNameText = new Text(newAppConfigurationGroup, SWT.BORDER);
- GridDataFactory.fillDefaults()
- .grab(true, false).align(SWT.FILL, SWT.FILL).applyTo(newAppNameText);
+ GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.FILL).applyTo(newAppNameText);
UIUtils.selectAllOnFocus(newAppNameText);
- final IObservableValue applicationNameTextObservable =
- WidgetProperties.text(SWT.Modify).observe(newAppNameText);
- final IObservableValue applicationNameModelObservable =
- BeanProperties
- .value(ApplicationConfigurationWizardPageModel.PROPERTY_APPLICATION_NAME)
- .observe(pageModel);
- ValueBindingBuilder
- .bind(applicationNameTextObservable)
- .to(applicationNameModelObservable)
- .in(dbc);
+ final IObservableValue applicationNameTextObservable = WidgetProperties.text(SWT.Modify)
+ .observe(newAppNameText);
+ final IObservableValue applicationNameModelObservable = BeanProperties.value(
+ ApplicationConfigurationWizardPageModel.PROPERTY_APPLICATION_NAME).observe(pageModel);
+ ValueBindingBuilder.bind(applicationNameTextObservable).to(applicationNameModelObservable).in(dbc);
this.newAppTypeLabel = new Label(newAppConfigurationGroup, SWT.NONE);
newAppTypeLabel.setText("Type:");
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).applyTo(newAppTypeLabel);
this.newAppCartridgeCombo = new Combo(newAppConfigurationGroup, SWT.BORDER | SWT.READ_ONLY);
- GridDataFactory.fillDefaults()
- .align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false).applyTo(newAppCartridgeCombo);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false)
+ .applyTo(newAppCartridgeCombo);
fillCartridgesCombo(dbc, newAppCartridgeCombo);
- final ISWTObservableValue selectedCartridgeComboObservable =
- WidgetProperties.selection().observe(newAppCartridgeCombo);
- final IObservableValue selectedCartridgeModelObservable =
- BeanProperties.value(NewApplicationWizardPageModel.PROPERTY_SELECTED_CARTRIDGE).observe(pageModel);
- ValueBindingBuilder
- .bind(selectedCartridgeComboObservable).converting(new StringToCartridgeConverter())
- .to(selectedCartridgeModelObservable).converting(new CartridgeToStringConverter())
- .in(dbc);
+ final ISWTObservableValue selectedCartridgeComboObservable = WidgetProperties.selection().observe(
+ newAppCartridgeCombo);
+ final IObservableValue selectedCartridgeModelObservable = BeanProperties.value(
+ NewApplicationWizardPageModel.PROPERTY_SELECTED_CARTRIDGE).observe(pageModel);
+ ValueBindingBuilder.bind(selectedCartridgeComboObservable).converting(new StringToCartridgeConverter())
+ .to(selectedCartridgeModelObservable).converting(new CartridgeToStringConverter()).in(dbc);
final ISWTObservableValue useExistingAppBtnSelection = WidgetProperties.selection().observe(useExistingAppBtn);
- final NewApplicationNameValidator newApplicationNameValidator =
- new NewApplicationNameValidator(
- useExistingAppBtnSelection, applicationNameTextObservable);
+ final NewApplicationNameValidator newApplicationNameValidator = new NewApplicationNameValidator(
+ useExistingAppBtnSelection, applicationNameTextObservable);
dbc.addValidationStatusProvider(newApplicationNameValidator);
ControlDecorationSupport.create(newApplicationNameValidator, SWT.LEFT | SWT.TOP, null,
new CustomControlDecorationUpdater());
- final NewApplicationTypeValidator newApplicationTypeValidator =
- new NewApplicationTypeValidator(
- useExistingAppBtnSelection, selectedCartridgeComboObservable);
+ final NewApplicationTypeValidator newApplicationTypeValidator = new NewApplicationTypeValidator(
+ useExistingAppBtnSelection, selectedCartridgeComboObservable);
dbc.addValidationStatusProvider(newApplicationTypeValidator);
ControlDecorationSupport.create(newApplicationTypeValidator, SWT.LEFT | SWT.TOP, null,
new CustomControlDecorationUpdater());
@@ -292,30 +277,28 @@
GridLayoutFactory.fillDefaults().numColumns(2).margins(6, 6).applyTo(newAppEmbeddableCartridgesGroup);
Composite tableContainer = new Composite(newAppEmbeddableCartridgesGroup, SWT.NONE);
- GridDataFactory.fillDefaults()
- .align(SWT.FILL, SWT.FILL).grab(true, true).span(1, 2).hint(400, 250).applyTo(tableContainer);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).span(1, 2).hint(400, 250)
+ .applyTo(tableContainer);
this.viewer = createTable(tableContainer);
- dbc.bindSet(
- ViewerProperties.checkedElements(IEmbeddableCartridge.class).observe(viewer),
+ dbc.bindSet(ViewerProperties.checkedElements(IEmbeddableCartridge.class).observe(viewer),
BeanProperties.set(ApplicationConfigurationWizardPageModel.PROPERTY_SELECTED_EMBEDDABLE_CARTRIDGES)
.observe(pageModel));
this.checkAllButton = new Button(newAppEmbeddableCartridgesGroup, SWT.PUSH);
checkAllButton.setText("&Select All");
- GridDataFactory.fillDefaults().
- hint(110, SWT.DEFAULT).grab(false, false).align(SWT.FILL, SWT.TOP).applyTo(checkAllButton);
+ GridDataFactory.fillDefaults().hint(110, SWT.DEFAULT).grab(false, false).align(SWT.FILL, SWT.TOP)
+ .applyTo(checkAllButton);
checkAllButton.addSelectionListener(onCheckAll());
this.uncheckAllButton = new Button(newAppEmbeddableCartridgesGroup, SWT.PUSH);
uncheckAllButton.setText("&Deselect All");
- GridDataFactory.fillDefaults()
- .hint(110, SWT.DEFAULT).grab(false, true).align(SWT.FILL, SWT.TOP).applyTo(uncheckAllButton);
+ GridDataFactory.fillDefaults().hint(110, SWT.DEFAULT).grab(false, true).align(SWT.FILL, SWT.TOP)
+ .applyTo(uncheckAllButton);
uncheckAllButton.addSelectionListener(onUncheckAll());
// bottom filler
Composite spacer = new Composite(newAppConfigurationGroup, SWT.NONE);
- GridDataFactory.fillDefaults()
- .span(2, 1).align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(spacer);
+ GridDataFactory.fillDefaults().span(2, 1).align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(spacer);
}
/**
@@ -327,8 +310,7 @@
* @param applicationBrowseButton
* @return
*/
- private IValueChangeListener onUseExistingApplication(final Group
- applicationConfigurationGroup,
+ private IValueChangeListener onUseExistingApplication(final Group applicationConfigurationGroup,
final Text applicationNameText, final Button applicationBrowseButton) {
return new IValueChangeListener() {
@@ -347,8 +329,7 @@
}
/**
- * Enables/disables the given widgets based on the flag to use an existing
- * app or create a new application.
+ * Enables/disables the given widgets based on the flag to use an existing app or create a new application.
*
* @param useExisting
* @param applicationConfigurationGroup
@@ -621,12 +602,11 @@
}
/**
- * Viewer element comparer based on #equals(). The default implementation in
- * CheckboxTableViewer compares elements based on instance identity.
+ * Viewer element comparer based on #equals(). The default implementation in CheckboxTableViewer compares elements
+ * based on instance identity.
* <p>
- * We need this since the available cartridges (item listed in the viewer)
- * are not the same instance as the ones in the embedded application (items
- * to check in the viewer).
+ * We need this since the available cartridges (item listed in the viewer) are not the same instance as the ones in
+ * the embedded application (items to check in the viewer).
*/
private static class EqualityComparer implements IElementComparer {
@@ -670,6 +650,32 @@
}.start();
}
+ @Override
+ protected void onPageWillGetActivated(Direction direction, PageChangingEvent event, DataBindingContext dbc) {
+ if (direction == Direction.BACKWARDS) {
+ return;
+ }
+ try {
+ final IUser user = this.pageModel.getUser();
+ if (user != null && !user.hasDomain()) {
+ IWizard domainDialog = new NewDomainDialog(user);
+ WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), domainDialog);
+ dialog.create();
+ dialog.setBlockOnOpen(true);
+ int result = dialog.open();
+ if(result != Dialog.OK) {
+ final IWizardContainer container = getWizard().getContainer();
+ if(container instanceof WizardDialog) {
+ dbc.dispose();
+ ((WizardDialog)container).close();
+ }
+ }
+ }
+ } catch (OpenShiftException e) {
+ Logger.error("Failed to refresh OpenShift account info", e);
+ }
+ }
+
protected void loadOpenshiftResources(final DataBindingContext dbc) {
try {
WizardUtils.runInWizard(new Job("Loading existing applications...") {
@@ -836,8 +842,8 @@
return ValidationStatus.ok();
}
if (StringUtils.isEmpty(cartridge)) {
- return OpenShiftUIActivator.createCancelStatus(
- "Select an alphanumerical name and a type for the application to create.");
+ return OpenShiftUIActivator
+ .createCancelStatus("Select an alphanumerical name and a type for the application to create.");
}
return ValidationStatus.ok();
}
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-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -73,7 +73,7 @@
public List<IApplication> getApplications() throws OpenShiftException {
IUser user = getUser();
- if (user == null) {
+ if (user == null || !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/CredentialsWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -30,11 +30,13 @@
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Text;
@@ -47,6 +49,9 @@
import org.jboss.tools.openshift.express.internal.ui.utils.StringUtils;
import org.jboss.tools.openshift.express.internal.ui.utils.UIUtils;
+import com.openshift.express.client.IUser;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author Andre Dietisheim
* @author Xavier Coulon
@@ -56,14 +61,16 @@
protected static final String OPENSHIFT_EXPRESS_SIGNUP_URL = "https://openshift.redhat.com/app/user/new/express"; //$NON-NLS-1$
private final CredentialsWizardPageModel pageModel;
+
+ private final IUserAwareModel wizardModel;
private Text rhLoginText = null;
private Text passwordText = null;
public CredentialsWizardPage(IWizard wizard, IUserAwareModel wizardModel) {
- super("OpenShift Connection", "Please provide your OpenShift Express credentials.", "Server Connection",
- wizard);
+ super("OpenShift Connection", "Please provide your OpenShift Express credentials.", "Server Connection", wizard);
this.pageModel = new CredentialsWizardPageModel(wizardModel);
+ this.wizardModel = wizardModel;
}
protected void doCreateControls(Composite container, DataBindingContext dbc) {
@@ -71,45 +78,38 @@
Link signupLink = new Link(container, SWT.WRAP);
signupLink.setText("If you do not have an account on OpenShift Express, please sign up <a>here</a>.");
- GridDataFactory.fillDefaults()
- .align(SWT.LEFT, SWT.CENTER).span(2, 1).applyTo(signupLink);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).span(2, 1).applyTo(signupLink);
signupLink.addSelectionListener(onSignupLinkClicked());
Label fillerLabel = new Label(container, SWT.NONE);
- GridDataFactory.fillDefaults()
- .span(2, 1).hint(SWT.DEFAULT, 6).applyTo(fillerLabel);
+ GridDataFactory.fillDefaults().span(2, 1).hint(SWT.DEFAULT, 6).applyTo(fillerLabel);
Label rhLoginLabel = new Label(container, SWT.NONE);
rhLoginLabel.setText("&Username");
- GridDataFactory.fillDefaults()
- .align(SWT.LEFT, SWT.CENTER).applyTo(rhLoginLabel);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(rhLoginLabel);
rhLoginText = new Text(container, SWT.BORDER);
- GridDataFactory.fillDefaults()
- .align(SWT.FILL, SWT.CENTER).grab(true, false).span(1, 1).applyTo(rhLoginText);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(1, 1).applyTo(rhLoginText);
UIUtils.selectAllOnFocus(rhLoginText);
- final IObservableValue rhLoginObservable =
- BeanProperties.value(CredentialsWizardPageModel.PROPERTY_RHLOGIN).observe(pageModel);
+ final IObservableValue rhLoginObservable = BeanProperties.value(CredentialsWizardPageModel.PROPERTY_RHLOGIN)
+ .observe(pageModel);
dbc.bindValue(WidgetProperties.text(SWT.Modify).observe(rhLoginText), rhLoginObservable);
Label passwordLabel = new Label(container, SWT.NONE);
passwordLabel.setText("&Password");
- GridDataFactory.fillDefaults()
- .align(SWT.LEFT, SWT.CENTER).applyTo(passwordLabel);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(passwordLabel);
passwordText = new Text(container, SWT.BORDER | SWT.PASSWORD);
- GridDataFactory.fillDefaults()
- .align(SWT.FILL, SWT.CENTER).grab(true, false).span(1, 1).applyTo(passwordText);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(1, 1).applyTo(passwordText);
UIUtils.selectAllOnFocus(passwordText);
- final IObservableValue passwordModelObservable =
- BeanProperties.value(CredentialsWizardPageModel.PROPERTY_PASSWORD).observe(pageModel);
+ final IObservableValue passwordModelObservable = BeanProperties.value(
+ CredentialsWizardPageModel.PROPERTY_PASSWORD).observe(pageModel);
final ISWTObservableValue passwordTextObservable = WidgetProperties.text(SWT.Modify).observe(passwordText);
dbc.bindValue(passwordTextObservable, passwordModelObservable);
- IObservableValue credentialsStatusObservable =
- BeanProperties.value(CredentialsWizardPageModel.PROPERTY_CREDENTIALS_STATUS).observe(pageModel);
- dbc.addValidationStatusProvider(
- new CredentialsInputValidator(rhLoginObservable, passwordModelObservable));
- final CredentialsStatusValidator credentialsStatusValidator =
- new CredentialsStatusValidator(credentialsStatusObservable, passwordTextObservable);
+ IObservableValue credentialsStatusObservable = BeanProperties.value(
+ CredentialsWizardPageModel.PROPERTY_CREDENTIALS_STATUS).observe(pageModel);
+ dbc.addValidationStatusProvider(new CredentialsInputValidator(rhLoginObservable, passwordModelObservable));
+ final CredentialsStatusValidator credentialsStatusValidator = new CredentialsStatusValidator(
+ credentialsStatusObservable, passwordTextObservable);
dbc.addValidationStatusProvider(credentialsStatusValidator);
ControlDecorationSupport.create(credentialsStatusValidator, SWT.LEFT | SWT.TOP);
@@ -117,12 +117,11 @@
// the text fields
Button rememberPasswordCheckBox = new Button(container, SWT.CHECK);
rememberPasswordCheckBox.setText("Save password (could trigger secure storage login)");
- GridDataFactory.fillDefaults()
- .align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(rememberPasswordCheckBox);
- final IObservableValue rememberPasswordModelObservable =
- BeanProperties.value(CredentialsWizardPageModel.PROPERTY_REMEMBER_PASSWORD).observe(pageModel);
- final ISWTObservableValue rememberPasswordCheckBoxObservable =
- WidgetProperties.selection().observe(rememberPasswordCheckBox);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(rememberPasswordCheckBox);
+ final IObservableValue rememberPasswordModelObservable = BeanProperties.value(
+ CredentialsWizardPageModel.PROPERTY_REMEMBER_PASSWORD).observe(pageModel);
+ final ISWTObservableValue rememberPasswordCheckBoxObservable = WidgetProperties.selection().observe(
+ rememberPasswordCheckBox);
dbc.bindValue(rememberPasswordCheckBoxObservable, rememberPasswordModelObservable);
}
@@ -192,8 +191,7 @@
private final IObservableValue passwordObservable;
- public CredentialsInputValidator(IObservableValue rhLoginObservable,
- IObservableValue passwordObservable) {
+ public CredentialsInputValidator(IObservableValue rhLoginObservable, IObservableValue passwordObservable) {
this.rhLoginObservable = rhLoginObservable;
this.passwordObservable = passwordObservable;
}
@@ -204,8 +202,7 @@
// something..
final String rhLoginValue = (String) rhLoginObservable.getValue();
final String passwordValue = (String) passwordObservable.getValue();
- if (!StringUtils.isEmpty(rhLoginValue)
- && !StringUtils.isEmpty(passwordValue)) {
+ if (!StringUtils.isEmpty(rhLoginValue) && !StringUtils.isEmpty(passwordValue)) {
return ValidationStatus.ok();
}
return ValidationStatus.cancel("Please provide your OpenShift Express user credentials");
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -26,7 +26,6 @@
*/
public class NewDomainDialog extends Wizard {
- private String namespace;
private NewDomainWizardPageModel model;
public NewDomainDialog(IUser user) {
@@ -56,6 +55,6 @@
@Override
public void addPages() {
- addPage(new NewDomainWizardPage(namespace, model, this));
+ addPage(new NewDomainWizardPage(model, this));
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -63,7 +63,7 @@
private NewDomainWizardPageModel model;
- public NewDomainWizardPage(String namespace, NewDomainWizardPageModel model, IWizard wizard) {
+ public NewDomainWizardPage(NewDomainWizardPageModel model, IWizard wizard) {
super("Domain Creation", "Create a new domain", "New Domain", wizard);
this.model = model;
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-16 16:46:55 UTC (rev 38833)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-16 16:52:55 UTC (rev 38834)
@@ -41,6 +41,7 @@
import org.jboss.tools.openshift.express.internal.ui.ImportFailedException;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.WontOverwriteException;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IEmbeddableCartridge;
@@ -73,7 +74,7 @@
void setWizardModel(OpenShiftExpressApplicationWizardModel wizardModel) {
this.wizardModel = wizardModel;
}
-
+
OpenShiftExpressApplicationWizardModel getWizardModel() {
return wizardModel;
}
@@ -92,7 +93,7 @@
protected void openError(final String title, final String message) {
getShell().getDisplay().syncExec(new Runnable() {
-
+
@Override
public void run() {
MessageDialog.openError(getShell(), title, message);
@@ -103,18 +104,16 @@
protected boolean askForConfirmation(final String message, final String applicationName) {
final boolean[] confirmed = new boolean[1];
getShell().getDisplay().syncExec(new Runnable() {
-
+
@Override
public void run() {
- confirmed[0] = MessageDialog.openConfirm(
- getShell(),
- NLS.bind("Import OpenShift Application ", applicationName),
- message);
+ confirmed[0] = MessageDialog.openConfirm(getShell(),
+ NLS.bind("Import OpenShift Application ", applicationName), message);
}
});
return confirmed[0];
}
-
+
public void setSelectedApplication(IApplication application) {
getWizardModel().setApplication(application);
}
@@ -148,7 +147,7 @@
IWizardPage[] pages = getPages();
return initialUser == null ? pages[0] : pages[1];
}
-
+
public void setInitialUser(IUser user) {
this.initialUser = user;
}
@@ -173,13 +172,12 @@
private boolean importProject() {
try {
final DelegatingProgressMonitor delegatingMonitor = new DelegatingProgressMonitor();
- IStatus jobResult = WizardUtils.runInWizard(
- new ImportJob(delegatingMonitor), delegatingMonitor, getContainer());
+ IStatus jobResult = WizardUtils.runInWizard(new ImportJob(delegatingMonitor), delegatingMonitor,
+ getContainer());
return JobUtils.isOk(jobResult);
} catch (Exception e) {
- ErrorDialog.openError(getShell(), "Error", "Could not create local git repository.",
- OpenShiftUIActivator.createErrorStatus(
- "An exception occurred while creating local git repository.", e));
+ ErrorDialog.openError(getShell(), "Error", "Could not create local git repository.", OpenShiftUIActivator
+ .createErrorStatus("An exception occurred while creating local git repository.", e));
return false;
}
}
@@ -196,8 +194,8 @@
return Status.OK_STATUS;
} catch (Exception e) {
// TODO: refresh user
- return OpenShiftUIActivator.createErrorStatus(
- "Could not create application \"{0}\"", e, applicationName);
+ return OpenShiftUIActivator.createErrorStatus("Could not create application \"{0}\"",
+ e, applicationName);
}
}
@@ -218,16 +216,15 @@
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
- if (selectedCartridges != null
- && !selectedCartridges.isEmpty()) {
+ if (selectedCartridges != null && !selectedCartridges.isEmpty()) {
List<IEmbeddableCartridge> embeddableCartridges = new ArrayList<IEmbeddableCartridge>();
embeddableCartridges.addAll(selectedCartridges);
application.addEmbbedCartridges(embeddableCartridges);
}
} catch (OpenShiftException e) {
- return OpenShiftUIActivator.createErrorStatus(
- NLS.bind("Could not embed cartridges to application {0}"
- , getWizardModel().getApplication().getName()), e);
+ return OpenShiftUIActivator.createErrorStatus(NLS.bind(
+ "Could not embed cartridges to application {0}", getWizardModel()
+ .getApplication().getName()), e);
}
return Status.OK_STATUS;
}
@@ -239,8 +236,7 @@
}
/**
- * A workspace job that will create a new project or enable the selected
- * project to be used with OpenShift.
+ * A workspace job that will create a new project or enable the selected project to be used with OpenShift.
*/
class ImportJob extends WorkspaceJob {
12 years, 7 months
JBoss Tools SVN: r38832 - trunk/download.jboss.org/jbosstools/examples.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-16 11:43:42 -0500 (Thu, 16 Feb 2012)
New Revision: 38832
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3....
Log:
JBIDE-10798 : make m2e-wtp 0.16.0 compatible
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3....
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.... 2012-02-16 16:27:23 UTC (rev 38831)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.... 2012-02-16 16:43:42 UTC (rev 38832)
@@ -26,7 +26,7 @@
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.16.0)</property>
+ <property name="versions">[0.13.1,0.17)</property>
<property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
<property name="connectorIds">org.maven.ide.eclipse.wtp</property>
</fix>
@@ -80,7 +80,7 @@
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.16.0)</property>
+ <property name="versions">[0.13.1,0.17)</property>
<property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
<property name="connectorIds">org.maven.ide.eclipse.wtp</property>
</fix>
@@ -184,7 +184,7 @@
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.16.0)</property>
+ <property name="versions">[0.13.1,0.17)</property>
<property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
<property name="connectorIds">org.maven.ide.eclipse.wtp</property>
</fix>
@@ -242,7 +242,7 @@
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.16.0)</property>
+ <property name="versions">[0.13.1,0.17)</property>
<property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
<property name="connectorIds">org.maven.ide.eclipse.wtp</property>
</fix>
@@ -291,7 +291,7 @@
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.15.1,0.16.0)</property>
+ <property name="versions">[0.15.1,0.17)</property>
<property name="description">This project example requires m2eclipse-wtp >= 0.15.</property>
<property name="connectorIds">org.maven.ide.eclipse.wtp</property>
</fix>
12 years, 7 months
JBoss Tools SVN: r38831 - trunk/seam/features/org.jboss.tools.seam.test.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-02-16 11:27:23 -0500 (Thu, 16 Feb 2012)
New Revision: 38831
Modified:
trunk/seam/features/org.jboss.tools.seam.test.feature/feature.xml
Log:
added seam.base.test plugin to let seam test to be installed from nightly/trunk composite repo
Modified: trunk/seam/features/org.jboss.tools.seam.test.feature/feature.xml
===================================================================
--- trunk/seam/features/org.jboss.tools.seam.test.feature/feature.xml 2012-02-16 16:20:21 UTC (rev 38830)
+++ trunk/seam/features/org.jboss.tools.seam.test.feature/feature.xml 2012-02-16 16:27:23 UTC (rev 38831)
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<feature id="org.jboss.tools.seam.test.feature"
- label="%featureName"
- version="3.3.0.qualifier"
- provider-name="%providerName">
+<feature
+ id="org.jboss.tools.seam.test.feature"
+ label="%featureName"
+ version="3.3.0.qualifier"
+ provider-name="%providerName">
<description url="http://www.jboss.org/tools">
%description
@@ -16,37 +17,196 @@
%license
</license>
- <plugin id="org.jboss.tools.seam.core.test" download-size="0" install-size="0" version="0.0.0" />
- <plugin id="org.jboss.tools.seam.pages.xml.test" download-size="0" install-size="0" version="0.0.0" />
- <plugin id="org.jboss.tools.seam.ui.bot.test" download-size="0" install-size="0" version="0.0.0" />
- <plugin id="org.jboss.tools.seam.ui.test" download-size="0" install-size="0" version="0.0.0" />
- <plugin id="org.jboss.tools.seam.xml.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
+ <plugin
+ id="org.jboss.tools.seam.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
- <plugin id="org.jboss.tools.seam121EAP.core.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam121EAP.ui.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
+ <plugin
+ id="org.jboss.tools.seam.pages.xml.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
- <plugin id="org.jboss.tools.seam201GA.core.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam201GA.ui.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam202SP1.core.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam202SP1.ui.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam203CR1.core.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam203CR1.ui.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
+ <plugin
+ id="org.jboss.tools.seam.ui.bot.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
- <plugin id="org.jboss.tools.seam211GA.core.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam211GA.ui.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam212GA.core.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam212GA.ui.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
+ <plugin
+ id="org.jboss.tools.seam.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
- <plugin id="org.jboss.tools.seam220CR1.core.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam220CR1.ui.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam220GA.core.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam220GA.ui.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
+ <plugin
+ id="org.jboss.tools.seam.xml.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
- <plugin id="org.jboss.tools.seam221CR1.core.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam221CR1.ui.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam221CR2.core.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seam221CR2.ui.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
+ <plugin
+ id="org.jboss.tools.seam121EAP.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
- <plugin id="org.jboss.tools.seamfp.core.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.tools.seamfp.ui.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
+ <plugin
+ id="org.jboss.tools.seam121EAP.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam201GA.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam201GA.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam202SP1.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam202SP1.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam203CR1.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam203CR1.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam211GA.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam211GA.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam212GA.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam212GA.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam220CR1.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam220CR1.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam220GA.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam220GA.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam221CR1.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam221CR1.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam221CR2.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam221CR2.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seamfp.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seamfp.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.seam.base.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
12 years, 7 months
JBoss Tools SVN: r38830 - trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke.
by jbosstools-commits@lists.jboss.org
Author: jgargula
Date: 2012-02-16 11:20:21 -0500 (Thu, 16 Feb 2012)
New Revision: 38830
Modified:
trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsProject.java
Log:
Fixed delay for waiting while dialog is not visible after creating new project.
Modified: trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsProject.java
===================================================================
--- trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsProject.java 2012-02-16 16:19:04 UTC (rev 38829)
+++ trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsProject.java 2012-02-16 16:20:21 UTC (rev 38830)
@@ -13,22 +13,21 @@
import java.io.File;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.drools.ui.bot.test.DroolsAllBotTests;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
-import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.helper.FileRenameHelper;
import org.jboss.tools.ui.bot.ext.types.EntityType;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.types.ViewType;
import org.jboss.tools.ui.bot.ext.view.ProblemsView;
import org.jboss.tools.ui.bot.test.WidgetVariables;
-import org.jboss.tools.drools.ui.bot.test.DroolsAllBotTests;
import org.junit.Test;
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
/**
* Test managing of Drools Project
* @author Vladimir Pakan
@@ -39,6 +38,7 @@
* Test manage Drools project
*/
private static final String RENAMED_DROOLS_PROJECT = DroolsAllBotTests.DROOLS_PROJECT_NAME + "-renamed";
+
@Test
public void testManageDroolsProject() {
createDroolsProjectTest (DroolsAllBotTests.DROOLS_PROJECT_NAME);
@@ -87,9 +87,9 @@
* @param droolsProjectName
*/
private void createDroolsProjectTest(String droolsProjectName){
- createDroolsProject(droolsProjectName);
+ createDroolsProject(droolsProjectName);
SWTTestExt.util.waitForAll(30*1000L);
- bot.sleep(Timing.time10S());
+ bot.waitForNumberOfShells(1);
assertTrue("Project "
+ droolsProjectName
+ " was not created properly.",SWTEclipseExt.isProjectInPackageExplorer(bot,droolsProjectName));
12 years, 7 months