JBoss Tools SVN: r38679 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-02-14 04:02:44 -0500 (Tue, 14 Feb 2012)
New Revision: 38679
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotWizard.java
Log:
Added logging for finished NonSystem Jobs waiting into SWTBotWizard
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotWizard.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotWizard.java 2012-02-14 08:07:51 UTC (rev 38678)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotWizard.java 2012-02-14 09:02:44 UTC (rev 38679)
@@ -68,8 +68,9 @@
bot().waitWhile(new ShellIsActiveCondition(activeShell), TaskDuration.LONG.getTimeout());
log.info("Waiting until Progress Information Shell is active");
bot().waitWhile(new ProgressInformationShellIsActiveCondition(), TaskDuration.LONG.getTimeout());
- log.info("Waiting until Non System Jobs run");
+ log.info("Waiting until Non System Jobs run started");
bot().waitWhile(new NonSystemJobRunsCondition(), TaskDuration.LONG.getTimeout());
+ log.info("Waiting until Non System Jobs run finished");
}
protected void clickButton(String text) {
14 years, 1 month
JBoss Tools SVN: r38678 - trunk/maven/features/org.jboss.tools.maven.profiles.feature.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-14 03:07:51 -0500 (Tue, 14 Feb 2012)
New Revision: 38678
Modified:
trunk/maven/features/org.jboss.tools.maven.profiles.feature/.project
Log:
JBIDE-10604 : fix .project
Modified: trunk/maven/features/org.jboss.tools.maven.profiles.feature/.project
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.profiles.feature/.project 2012-02-14 07:37:54 UTC (rev 38677)
+++ trunk/maven/features/org.jboss.tools.maven.profiles.feature/.project 2012-02-14 08:07:51 UTC (rev 38678)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.jboss.tools.maven.feature</name>
+ <name>org.jboss.tools.maven.profiles.feature</name>
<comment></comment>
<projects>
</projects>
14 years, 1 month
JBoss Tools SVN: r38677 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-14 02:37:54 -0500 (Tue, 14 Feb 2012)
New Revision: 38677
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWelcomePageActionProvider.java
Log:
JBIDE-10837 - npe
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWelcomePageActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWelcomePageActionProvider.java 2012-02-14 05:04:55 UTC (rev 38676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWelcomePageActionProvider.java 2012-02-14 07:37:54 UTC (rev 38677)
@@ -28,7 +28,9 @@
protected boolean shouldAddForSelection(IStructuredSelection sel) {
IServer server = getSingleServer(sel);
- return ServerUtil.isJBossServerType(server.getServerType()) && accepts(server);
+ if( server != null )
+ return ServerUtil.isJBossServerType(server.getServerType()) && accepts(server);
+ return false;
}
protected boolean accepts(IServer server) {
14 years, 1 month
JBoss Tools SVN: r38676 - trunk/build/aggregate/soa-site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-02-14 00:04:55 -0500 (Tue, 14 Feb 2012)
New Revision: 38676
Modified:
trunk/build/aggregate/soa-site/site.xml
Log:
{gbrown} add the org.savara.tools.incubator.feature to the JBT site.xml (for SOA Tooling)
Modified: trunk/build/aggregate/soa-site/site.xml
===================================================================
--- trunk/build/aggregate/soa-site/site.xml 2012-02-14 02:33:12 UTC (rev 38675)
+++ trunk/build/aggregate/soa-site/site.xml 2012-02-14 05:04:55 UTC (rev 38676)
@@ -98,6 +98,9 @@
<feature url="features/org.savara.tools.feature_0.0.0.jar" id="org.savara.tools.feature" version="0.0.0">
<category name="SOATools" />
</feature>
+ <feature url="features/org.savara.tools.incubator.feature_0.0.0.jar" id="org.savara.tools.incubator.feature" version="0.0.0">
+ <category name="SOATools" />
+ </feature>
<feature url="features/org.jboss.savara.tools.feature_0.0.0.jar" id="org.jboss.savara.tools.feature" version="0.0.0">
<category name="SOATools" />
</feature>
14 years, 1 month
JBoss Tools SVN: r38675 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-02-13 21:33:12 -0500 (Mon, 13 Feb 2012)
New Revision: 38675
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamDSXMLWizard.java
Log:
JBIDE-10787
https://issues.jboss.org/browse/JBIDE-10787
Initial implementation for New DS XML wizard.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamDSXMLWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamDSXMLWizard.java 2012-02-14 02:19:52 UTC (rev 38674)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamDSXMLWizard.java 2012-02-14 02:33:12 UTC (rev 38675)
@@ -1,5 +1,6 @@
package org.jboss.tools.seam.ui.wizard;
+import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -70,27 +71,34 @@
}
class WizardNewDSXMLFileCreationPage extends WizardNewFileCreationPage {
+ private IFieldEditor connProfileSelEditor;
public WizardNewDSXMLFileCreationPage(String pageName, IStructuredSelection selection) {
super(pageName, selection);
}
+ protected InputStream getInitialContents() {
+ Object connection = connProfileSelEditor.getValue();
+ //TODO generate text here
+
+ return null;
+ }
+
public void createControl(Composite parent) {
super.createControl(parent);
Composite topLevel = (Composite)getControl();
- IFieldEditor editor = SeamWizardFactory.createConnectionProfileSelectionFieldEditor(getConnectionProfileDefaultValue(), new IValidator() {
+ connProfileSelEditor = SeamWizardFactory.createConnectionProfileSelectionFieldEditor(getConnectionProfileDefaultValue(), new IValidator() {
public Map<String, IStatus> validate(Object value, Object context) {
validatePage();
return SeamValidatorFactory.NO_ERRORS;
}
});
-// sync.register(editor);
-
Composite q = new Composite(topLevel, 0);
GridLayout l = new GridLayout(4, false);
q.setLayout(l);
- editor.doFillIntoGrid(q);
+ connProfileSelEditor.doFillIntoGrid(q);
+// sync.register(connProfileSelEditor);
validatePage();
}
14 years, 1 month
JBoss Tools SVN: r38674 - in trunk/seam/plugins/org.jboss.tools.seam.ui: src/org/jboss/tools/seam/ui/wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-02-13 21:19:52 -0500 (Mon, 13 Feb 2012)
New Revision: 38674
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamDSXMLWizard.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
Log:
JBIDE-10787
https://issues.jboss.org/browse/JBIDE-10787
Initial implementation for New DS XML wizard.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2012-02-14 00:06:26 UTC (rev 38673)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2012-02-14 02:19:52 UTC (rev 38674)
@@ -97,6 +97,20 @@
</selection>
</wizard>
+ <wizard
+ name="New DS XML"
+ icon="$nl$/icons/seam16.png"
+ category="org.jboss.tools.seam.ui"
+ class="org.jboss.tools.seam.ui.wizard.SeamDSXMLWizard"
+ id="org.jboss.tools.seam.ui.wizard.SeamDSXMLWizard">
+ <description>
+ Creates New DS XML file
+ </description>
+ <selection
+ class="org.eclipse.core.resources.IResource">
+ </selection>
+ </wizard>
+
</extension>
<extension
point="org.eclipse.wst.common.project.facet.ui.wizardPages">
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamDSXMLWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamDSXMLWizard.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamDSXMLWizard.java 2012-02-14 02:19:52 UTC (rev 38674)
@@ -0,0 +1,121 @@
+package org.jboss.tools.seam.ui.wizard;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.ProfileManager;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.internal.dialogs.DialogUtil;
+import org.eclipse.ui.internal.wizards.newresource.ResourceMessages;
+import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
+import org.jboss.tools.common.ui.IValidator;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
+import org.jboss.tools.seam.core.project.facet.SeamProjectPreferences;
+import org.jboss.tools.seam.ui.internal.project.facet.DataModelSynchronizer;
+import org.jboss.tools.seam.ui.internal.project.facet.SeamValidatorFactory;
+
+public class SeamDSXMLWizard extends BasicNewResourceWizard {
+ public static final String WIZARD_ID = "org.jboss.tools.seam.ui.wizard.SeamDSXMLWizard"; //$NON-NLS-1$
+
+ WizardNewDSXMLFileCreationPage mainPage;
+
+ private boolean fOpenEditorOnFinish;
+
+ public SeamDSXMLWizard() {
+
+ }
+
+ public void addPages() {
+ super.addPages();
+ mainPage = new WizardNewDSXMLFileCreationPage("newFilePage1", getSelection());
+ mainPage.setTitle("New DS XML");
+
+ addPage(mainPage);
+ }
+
+ @Override
+ public boolean performFinish() {
+ IFile file = mainPage.createNewFile();
+ if (file == null) {
+ return false;
+ }
+
+ selectAndReveal(file);
+ if (fOpenEditorOnFinish) {
+ // Open editor on new file.
+ IWorkbenchWindow dw = getWorkbench().getActiveWorkbenchWindow();
+ try {
+ if (dw != null) {
+ IWorkbenchPage page = dw.getActivePage();
+ if (page != null) {
+ IDE.openEditor(page, file, true);
+ }
+ }
+ } catch (PartInitException e) {
+ DialogUtil.openError(dw.getShell(), ResourceMessages.FileResource_errorMessage, e.getMessage(), e);
+ }
+ }
+ return true;
+ }
+
+ class WizardNewDSXMLFileCreationPage extends WizardNewFileCreationPage {
+
+ public WizardNewDSXMLFileCreationPage(String pageName, IStructuredSelection selection) {
+ super(pageName, selection);
+ }
+
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+
+ Composite topLevel = (Composite)getControl();
+ IFieldEditor editor = SeamWizardFactory.createConnectionProfileSelectionFieldEditor(getConnectionProfileDefaultValue(), new IValidator() {
+ public Map<String, IStatus> validate(Object value, Object context) {
+ validatePage();
+ return SeamValidatorFactory.NO_ERRORS;
+ }
+ });
+// sync.register(editor);
+
+ Composite q = new Composite(topLevel, 0);
+ GridLayout l = new GridLayout(4, false);
+ q.setLayout(l);
+ editor.doFillIntoGrid(q);
+
+ validatePage();
+ }
+
+ }
+
+ /**
+ * @return
+ */
+ private Object getConnectionProfileDefaultValue() {
+ String defaultDs = SeamProjectPreferences
+ .getStringPreference(SeamProjectPreferences.SEAM_DEFAULT_CONNECTION_PROFILE);
+ return getConnectionProfileNameList().contains(defaultDs) ? defaultDs
+ : ""; //$NON-NLS-1$
+ }
+
+ private static List<String> getConnectionProfileNameList() {
+ IConnectionProfile[] profiles = ProfileManager.getInstance()
+ .getProfilesByCategory(
+ "org.eclipse.datatools.connectivity.db.category"); //$NON-NLS-1$
+ List<String> names = new ArrayList<String>();
+ for (IConnectionProfile connectionProfile : profiles) {
+ names.add(connectionProfile.getName());
+ }
+ return names;
+ }
+
+}
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamDSXMLWizard.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 1 month
JBoss Tools SVN: r38673 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-13 19:06:26 -0500 (Mon, 13 Feb 2012)
New Revision: 38673
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
Log:
[JBIDE-10893] cleanup
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-13 23:58:40 UTC (rev 38672)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-02-14 00:06:26 UTC (rev 38673)
@@ -189,10 +189,12 @@
// reset without notifying
// this.credentialsValidity = null;
IUser user = OpenShiftUIActivator.getDefault().createUser(getRhLogin(), getPassword());
- if (user.isValid() && rememberPassword) {
- storePassword(password);
- } else if(user.isValid() && !rememberPassword) {
- erasePasswordStore();
+ if (user.isValid()) {
+ if (rememberPassword) {
+ storePassword(password);
+ } else {
+ erasePasswordStore();
+ }
}
} catch (NotFoundOpenShiftException e) {
// valid user without domain
14 years, 1 month
JBoss Tools SVN: r38672 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-13 18:58:40 -0500 (Mon, 13 Feb 2012)
New Revision: 38672
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
Log:
[JBIDE-10893] fixing credentials issue
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-13 23:55:39 UTC (rev 38671)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-02-13 23:58:40 UTC (rev 38672)
@@ -197,9 +197,9 @@
} catch (NotFoundOpenShiftException e) {
// valid user without domain
} catch (OpenShiftException e) {
- status = new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID, "Your credentails are not valid.");
+ status = OpenShiftUIActivator.createErrorStatus("Your credentails are not valid.");
} catch (Exception e) {
- status = new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID, NLS.bind(
+ status = OpenShiftUIActivator.createErrorStatus(NLS.bind(
"Could not check user credentials: {0}.", e.getMessage()));
}
14 years, 1 month
JBoss Tools SVN: r38671 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal: ui/action and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-13 18:55:39 -0500 (Mon, 13 Feb 2012)
New Revision: 38671
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.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/ApplicationSelectionDialogModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.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/IOpenShiftWizardModel.java
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/OpenShiftExpressApplicationWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java
Log:
[JBIDE-10893] fixing credentials issue
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java 2012-02-13 23:02:47 UTC (rev 38670)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java 2012-02-13 23:55:39 UTC (rev 38671)
@@ -31,6 +31,8 @@
import com.openshift.express.client.configuration.OpenShiftConfiguration;
public class UserModel {
+ private static final String USER_ID = OpenShiftUIActivator.PLUGIN_ID + " " +
+ OpenShiftUIActivator.getDefault().getBundle().getVersion();
private static UserModel model;
public static UserModel getDefault() {
if( model == null )
@@ -65,8 +67,7 @@
* @throws IOException
*/
public IUser createUser(String username, String password) throws OpenShiftException, IOException {
- IUser u = new User(username, password, OpenShiftUIActivator.PLUGIN_ID + " " +
- OpenShiftUIActivator.getDefault().getBundle().getVersion());
+ IUser u = new User(username, password, USER_ID);
return u;
}
@@ -205,7 +206,7 @@
}
return rhLogin;
}
-
+
/*
* Return true if the value is updated, false otherwise
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java 2012-02-13 23:02:47 UTC (rev 38670)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java 2012-02-13 23:55:39 UTC (rev 38671)
@@ -1,7 +1,6 @@
package org.jboss.tools.openshift.express.internal.ui.action;
import org.eclipse.jface.viewers.ITreeSelection;
-import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
@@ -29,8 +28,8 @@
if (selection != null && selection instanceof ITreeSelection ) {
Object sel = ((ITreeSelection)selection).getFirstElement();
if( sel instanceof IUser) {
- OpenShiftExpressApplicationWizard wizard = new OpenShiftExpressApplicationWizard();
- wizard.setInitialUser((IUser)sel);
+ IUser user = (IUser) sel;
+ OpenShiftExpressApplicationWizard wizard = new OpenShiftExpressApplicationWizard(user);
new WizardDialog(new Shell(), wizard).open();
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java 2012-02-13 23:02:47 UTC (rev 38670)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ImportApplicationAction.java 2012-02-13 23:55:39 UTC (rev 38671)
@@ -39,19 +39,9 @@
if (selection instanceof ITreeSelection
&& treeSelection.getFirstElement() instanceof IApplication) {
final IApplication application = (IApplication) treeSelection.getFirstElement();
- //final IUser user = OpenShiftUIActivator.getDefault().getUser();
- OpenShiftExpressApplicationWizard wizard = new OpenShiftExpressApplicationWizard();
- TreePath[] paths = treeSelection.getPaths();
- if( paths != null && paths.length == 1 ) {
- Object user = paths[0].getParentPath().getLastSegment();
- if( user instanceof IUser )
- wizard.setInitialUser((IUser)user);
- }
- wizard.setSelectedApplication(application);
+ final IUser user = getUser(treeSelection.getPaths());
final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(application.getName());
- if(project.exists()) {
- wizard.setSelectedProject(project);
- }
+ OpenShiftExpressApplicationWizard wizard = new OpenShiftExpressApplicationWizard(user, project, application);
WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
dialog.create();
dialog.open();
@@ -59,5 +49,16 @@
}
}
+ private IUser getUser(TreePath[] paths) {
+ IUser user = null;
+ if( paths != null
+ && paths.length == 1 ) {
+ Object selection = paths[0].getParentPath().getLastSegment();
+ if( selection instanceof IUser )
+ user = (IUser) selection;
+ }
+ return user;
+ }
+
}
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-13 23:02:47 UTC (rev 38670)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-02-13 23:55:39 UTC (rev 38671)
@@ -69,8 +69,8 @@
}
public IUser getUser() {
- // return wizardModel.getUser();
- return OpenShiftUIActivator.getDefault().getUser();
+ return wizardModel.getUser();
+// return OpenShiftUIActivator.getDefault().getUser();
}
public List<IApplication> getApplications() throws OpenShiftException {
@@ -138,8 +138,8 @@
}
public void loadCartridges() throws OpenShiftException {
- // setCartridges(wizardModel.getUser().getCartridges());
- setCartridges(OpenShiftUIActivator.getDefault().getUser().getCartridges());
+ setCartridges(getUser().getCartridges());
+ //setCartridges(OpenShiftUIActivator.getDefault().getUser().getCartridges());
}
public void setCartridges(List<ICartridge> cartridges) {
@@ -160,7 +160,8 @@
}
public List<IEmbeddableCartridge> loadEmbeddableCartridges() throws OpenShiftException {
- List<IEmbeddableCartridge> cartridges = OpenShiftUIActivator.getDefault().getUser().getEmbeddableCartridges();
+// List<IEmbeddableCartridge> cartridges = OpenShiftUIActivator.getDefault().getUser().getEmbeddableCartridges();
+ List<IEmbeddableCartridge> cartridges = getUser().getEmbeddableCartridges();
setEmbeddableCartridges(cartridges);
return cartridges;
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialogModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialogModel.java 2012-02-13 23:02:47 UTC (rev 38670)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialogModel.java 2012-02-13 23:55:39 UTC (rev 38671)
@@ -13,6 +13,7 @@
import java.util.Collections;
import java.util.List;
+import org.eclipse.debug.internal.ui.importexport.launchconfigurations.WizardMessages;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
@@ -32,7 +33,10 @@
private IApplication selectedApplication;
+ private IOpenShiftWizardModel wizardModel;
+
public ApplicationSelectionDialogModel(IOpenShiftWizardModel wizardModel) {
+ this.wizardModel = wizardModel;
this.selectedApplication = wizardModel.getApplication();
}
@@ -59,7 +63,8 @@
}
public IUser getUser() {
- return OpenShiftUIActivator.getDefault().getUser();
+// return OpenShiftUIActivator.getDefault().getUser();
+ return wizardModel.getUser();
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java 2012-02-13 23:02:47 UTC (rev 38670)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java 2012-02-13 23:55:39 UTC (rev 38671)
@@ -61,7 +61,8 @@
}
public IUser getUser() {
- return OpenShiftUIActivator.getDefault().getUser();
+// return OpenShiftUIActivator.getDefault().getUser();
+ return wizardModel.getUser();
}
public boolean getUseExistingApplication() {
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-13 23:02:47 UTC (rev 38670)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2012-02-13 23:55:39 UTC (rev 38671)
@@ -11,8 +11,6 @@
package org.jboss.tools.openshift.express.internal.ui.wizard;
import java.lang.reflect.InvocationTargetException;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.TimeUnit;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.beans.BeanProperties;
@@ -169,17 +167,14 @@
public boolean performAuthentication() {
try {
- final ArrayBlockingQueue<IStatus> queue = new ArrayBlockingQueue<IStatus>(1);
WizardUtils.runInWizard(new Job("Verifying user credentials...") {
@Override
protected IStatus run(IProgressMonitor monitor) {
- IStatus status = pageModel.validateCredentials();
- queue.offer(status);
+ pageModel.validateCredentials();
monitor.done();
return Status.OK_STATUS;
}
}, new DelegatingProgressMonitor(), getContainer(), getDatabindingContext());
- queue.poll(10, TimeUnit.SECONDS);
} catch (InterruptedException e) {
Logger.error("Failed to authenticate on OpenShift", e);
return false;
@@ -187,7 +182,8 @@
Logger.error("Failed to authenticate on OpenShift", e);
return false;
}
- return pageModel.areCredentialsValid();
+ boolean valid = pageModel.areCredentialsValid();
+ return valid;
}
class CredentialsInputValidator extends MultiValidator {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java 2012-02-13 23:02:47 UTC (rev 38670)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java 2012-02-13 23:55:39 UTC (rev 38671)
@@ -15,6 +15,7 @@
import java.lang.reflect.InvocationTargetException;
import java.net.URISyntaxException;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.wst.server.core.IRuntime;
@@ -24,6 +25,7 @@
import com.openshift.express.client.IApplication;
import com.openshift.express.client.ICartridge;
+import com.openshift.express.client.IUser;
import com.openshift.express.client.OpenShiftException;
/**
@@ -160,6 +162,8 @@
public String setProjectName(String projectName);
+ public IProject setProject(IProject project);
+
public boolean isGitSharedProject();
public Boolean setCreateServerAdapter(Boolean createServerAdapter);
@@ -183,5 +187,9 @@
public boolean isExistingApplication();
public void setUseExistingApplication(boolean useExistingApplication);
+
+ public IUser getUser();
+ public IUser setUser(IUser user);
+
}
\ No newline at end of file
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-13 23:02:47 UTC (rev 38670)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-13 23:55:39 UTC (rev 38671)
@@ -53,22 +53,28 @@
private IUser initialUser;
+ /**
+ * @see #getUser which calls UserModel#getRecentUser if no user present at
+ * construction time
+ */
public OpenShiftExpressApplicationWizard() {
- setWizardModel(new OpenShiftExpressApplicationWizardModel());
+ this(null, null, null);
}
+ public OpenShiftExpressApplicationWizard(IUser user) {
+ this(user, null, null);
+ }
+
+ public OpenShiftExpressApplicationWizard(IUser user, IProject project, IApplication application) {
+ setWizardModel(new OpenShiftExpressApplicationWizardModel(user, project, application));
+ }
+
public void setSelectedApplication(IApplication application) {
getWizardModel().setApplication(application);
}
public void setSelectedProject(IProject project) {
- if (project != null && project.exists()) {
- getWizardModel().setExistingProject(false);
- getWizardModel().setProjectName(project.getName());
- } else {
- getWizardModel().setExistingProject(true);
- getWizardModel().setProjectName(null);
- }
+ getWizardModel().setProject(project);
}
@Override
@@ -77,12 +83,12 @@
setNeedsProgressMonitor(true);
Object o = selection.getFirstElement();
if (o instanceof IUser) {
- setInitialUser((IUser) o);
+ setUser((IUser) o);
}
}
- public void setInitialUser(IUser user) {
- this.initialUser = user;
+ protected void setUser(IUser user) {
+ getWizardModel().setUser(user);
}
@Override
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java 2012-02-13 23:02:47 UTC (rev 38670)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizardModel.java 2012-02-13 23:55:39 UTC (rev 38671)
@@ -21,6 +21,7 @@
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.openshift.egit.core.EGitUtils;
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.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ConfigureGitSharedProject;
@@ -43,9 +44,15 @@
private static final String KEY_SELECTED_EMBEDDABLE_CARTRIDGES = "selectedEmbeddableCartridges";
public OpenShiftExpressApplicationWizardModel() {
- super();
+ this(OpenShiftUIActivator.getDefault().getUser(), null, null);
+ }
+
+ public OpenShiftExpressApplicationWizardModel(IUser user, IProject project, IApplication application) {
// default value(s)
+ setUser(user);
+ setProject(project);
setNewProject(true);
+ setApplication(application);
setCreateServerAdapter(true);
setRepositoryPath(DEFAULT_REPOSITORY_PATH);
setRemoteName(NEW_PROJECT_REMOTE_NAME_DEFAULT);
@@ -150,8 +157,7 @@
getProjectName()
, getApplication()
, getRemoteName()
- // , getUser())
- , OpenShiftUIActivator.getDefault().getUser())
+ , getUser())
.execute(monitor);
createServerAdapter(monitor, importedProjects);
}
@@ -255,6 +261,18 @@
public String setProjectName(String projectName) {
return (String) setProperty(PROJECT_NAME, projectName);
}
+
+ @Override
+ public IProject setProject(IProject project) {
+ if (project != null && project.exists()) {
+ setExistingProject(false);
+ setProjectName(project.getName());
+ } else {
+ setExistingProject(true);
+ setProjectName(null);
+ }
+ return project;
+ }
@Override
public boolean isGitSharedProject() {
@@ -336,7 +354,7 @@
IApplication createApplication(String name, ICartridge cartridge, IProgressMonitor monitor)
throws OpenShiftApplicationNotAvailableException, OpenShiftException {
- IUser user = OpenShiftUIActivator.getDefault().getUser();
+ IUser user = getUser();
if (user == null) {
throw new OpenShiftException("Could not create application, have no valid user credentials");
}
@@ -399,4 +417,24 @@
public String getApplicationName() {
return (String) dataModel.get(APPLICATION_NAME);
}
+
+ /**
+ * Returns the user that was stored in this model or the recent user from UserModel
+ *
+ * @see OpenShiftExpressApplicationWizardModel(IUser)
+ * @see OpenShiftExpressApplicationWizardModel()
+ */
+ public IUser getUser() {
+ IUser user = (IUser) dataModel.get(USER);
+ if (user == null) {
+ user = UserModel.getDefault().getRecentUser();
+ }
+ return user;
+ }
+
+ public IUser setUser(IUser user) {
+ dataModel.put(USER, user);
+ return user;
+ }
+
}
\ No newline at end of file
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java 2012-02-13 23:02:47 UTC (rev 38670)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java 2012-02-13 23:55:39 UTC (rev 38671)
@@ -51,7 +51,7 @@
public void create(IProject project, IOpenShiftWizardModel wizardModel, IProgressMonitor monitor) throws OpenShiftException {
createServerAdapter(project, wizardModel.getServerType(), wizardModel.getRuntime(), wizardModel.getMode(),
- wizardModel.getApplication(), OpenShiftUIActivator.getDefault().getUser(), wizardModel.getRemoteName(), monitor);
+ wizardModel.getApplication(), wizardModel.getUser(), wizardModel.getRemoteName(), monitor);
}
public void create(IProject project, IServerType serverType, IRuntime runtime, String mode,
14 years, 1 month
JBoss Tools SVN: r38670 - trunk/download.jboss.org/jbosstools/examples.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-13 18:02:47 -0500 (Mon, 13 Feb 2012)
New Revision: 38670
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3....
Log:
JBIDE-10798 : add GWT/Errai archetype
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-13 21:09:30 UTC (rev 38669)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.... 2012-02-13 23:02:47 UTC (rev 38670)
@@ -268,7 +268,7 @@
<tags>wizard</tags>
<icon path="icons/spring_wiz.gif" />
</project>
- <!--
+
<project>
<category>Java EE 6 Quickstarts</category>
<name>gwt-webapp</name>
@@ -302,8 +302,8 @@
<property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature</property>
</fix>
<fix type="plugin">
- <property name="id">com.google.gwt.eclipse</property>
- <property name="versions">[2.5,)</property>
+ <property name="id">com.google.gwt.eclipse.core</property>
+ <property name="versions">[2.4,)</property>
<property name="description">This project example requires Google Plugin for Eclipse</property>
<property name="connectorIds">com.google.gwt.eclipse.sdkbundle.e37.feature,com.google.gdt.eclipse.suite.e37.feature</property>
</fix>
@@ -312,16 +312,16 @@
<importTypeDescription>The project example requires the m2e, m2eclipse-wtp, JBoss Maven Integration and Google Plugin for Eclipse features.</importTypeDescription>
<mavenArchetype>
<archetypeGroupId>org.jboss.errai.archetypes</archetypeGroupId>
- <archetypeArtifactId>****</archetypeArtifactId>
- <archetypeVersion>1.0.0-SNAPSHOT</archetypeVersion>
- <archetypeRepository>http://repository.jboss.org/nexus/content/repositories/snapshots/</archetypeRepository>
+ <archetypeArtifactId>kitchensink-quickstart</archetypeArtifactId>
+ <archetypeVersion>2.0-SNAPSHOT</archetypeVersion>
+ <archetypeRepository>https://repository.jboss.org/nexus/content/groups/public/</archetypeRepository>
<groupId>org.jboss.tools.example</groupId>
- <artifactId>gwt-helloworld</artifactId>
+ <artifactId>gwt-kitchensink</artifactId>
<version>0.0.1-SNAPSHOT</version>
- <javaPackage>org.jboss.tools.example.gwt.helloworld</javaPackage>
+ <javaPackage>org.jboss.tools.gwt.kitchensink</javaPackage>
</mavenArchetype>
<tags>wizard</tags>
<icon path="icons/new-gdt-project.png" />
</project>
- -->
+
</projects>
14 years, 1 month