JBoss Tools SVN: r39348 - trunk/central/plugins/org.jboss.tools.central.discovery.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-03-07 13:37:43 -0500 (Wed, 07 Mar 2012)
New Revision: 39348
Modified:
trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml
Log:
org.eclipse.jst.server_adapters.ext.feature is not needed; exclude from connector for JBT and JBDS
Modified: trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml
===================================================================
--- trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2012-03-07 17:39:57 UTC (rev 39347)
+++ trunk/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2012-03-07 18:37:43 UTC (rev 39348)
@@ -388,14 +388,14 @@
<connectorDescriptor
categoryId="org.jboss.tools.central.discovery.web"
groupId="org.jboss.tools.central.discovery.web.core"
- description="JST Server Core, UI, Adapters, Extensions, User Doc"
+ description="JST Server Core, UI, Adapters, User Doc"
id="org.eclipse.jst.server_core.feature"
kind="task"
license="Free, EPL, Other"
name="JST Server"
provider="Eclipse.org"
siteUrl="http://download.jboss.org/jbosstools/updates/indigo/SR2/">
- <iu id="org.eclipse.jst.server_adapters.ext.feature"/>
+ <!-- <iu id="org.eclipse.jst.server_adapters.ext.feature"/> -->
<iu id="org.eclipse.jst.server_adapters.feature"/>
<iu id="org.eclipse.jst.server_core.feature"/>
<iu id="org.eclipse.jst.server_ui.feature"/>
14 years, 1 month
JBoss Tools SVN: r39347 - in branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui: src/org/jboss/tools/openshift/express/internal/core/console and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-03-07 12:39:57 -0500 (Wed, 07 Mar 2012)
New Revision: 39347
Removed:
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java
Modified:
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/OpenConnectionDialogActionDelegate.java
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/PropertySourceAdapterFactory.java
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/UserPropertySource.java
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialog.java
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialogModel.java
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
Log:
Fixed - JBIDE-11184
NPE when the user is not connected (ignored the password dialog, did not input his password)
Fixed - JBIDE-10856
Application selection UI issues
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-03-07 17:39:57 UTC (rev 39347)
@@ -521,14 +521,14 @@
<viewContribution
id="org.jboss.tools.openshift.express.ui.viewer.expressConsoleViewContribution"
targetID="org.jboss.tools.openshift.express.ui.viewer.expressConsoleView">
- <action
+ <!--action
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"
style="push"
toolbarPath="openshift">
- </action>
+ </action-->
<action
class="org.jboss.tools.openshift.express.internal.ui.viewer.actionDelegate.OpenConnectionDialogActionDelegate"
icon="icons/resource_obj.gif"
Deleted: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java 2012-03-07 17:39:57 UTC (rev 39347)
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.openshift.express.internal.core.console;
-
-import java.util.Map;
-
-import com.openshift.express.client.IUser;
-
-public interface IPasswordPrompter {
-
- public enum PromptResult {
- PASSWORD_VALUE, SAVE_PASSWORD_VALUE;
- }
- /**
- * Returns a map of the values entered by the user. The value indexed with {@link IPasswordPrompter.PromptResult.PASSWORD_VALUE} in the
- * returning array is the input password, the value indexed with indexed with {@link IPasswordPrompter.PromptResult.SAVE_PASSWORD_VALUE} is the Boolean stating
- * whether the password should be saved in the secured storage or not.
- *
- * @param user
- * @return map with password value (as String) and 'save password' (as Boolean)
- */
- public Map<PromptResult, Object> getPasswordFor(IUser user);
-}
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-03-07 17:39:57 UTC (rev 39347)
@@ -11,10 +11,16 @@
package org.jboss.tools.openshift.express.internal.core.console;
import java.util.List;
-import java.util.Map;
-import org.jboss.tools.openshift.express.internal.core.console.IPasswordPrompter.PromptResult;
+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.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+import org.jboss.tools.openshift.express.internal.ui.viewer.ConnectToOpenShiftWizard;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.ICartridge;
@@ -27,12 +33,29 @@
public class UserDelegate implements IUser {
private IUser delegate;
private boolean rememberPassword;
+ private boolean connected;
+ private boolean alreadyPromptedForPassword;
- public UserDelegate(IUser user, boolean rememberPassword) {
+ public UserDelegate(IUser user, boolean rememberPassword, boolean connected) {
this.delegate = user;
this.rememberPassword = rememberPassword;
+ this.setConnected(connected);
}
+ /**
+ * @return the delegate
+ */
+ protected final IUser getDelegate() {
+ return delegate;
+ }
+
+ /**
+ * @param delegate the delegate to set
+ */
+ protected final void setDelegate(IUser delegate) {
+ this.delegate = delegate;
+ }
+
public String getRhlogin() {
return delegate.getRhlogin();
}
@@ -44,98 +67,176 @@
return rememberPassword;
}
- protected void checkForPassword() {
+ /**
+ * @param rememberPassword the rememberPassword to set
+ */
+ protected final void setRememberPassword(boolean rememberPassword) {
+ this.rememberPassword = rememberPassword;
+ }
+
+ public boolean canPromptForPassword() {
+ return this.alreadyPromptedForPassword == false;
+ }
+
+ /**
+ * Prompts user for password if it was not given or retrieved from secure storage before.
+ * @return true if user entered credentials, false otherwise.
+ */
+ public boolean checkForPassword() {
if( delegate.getPassword() == null || "".equals(delegate.getPassword())) {
try {
- Map<PromptResult, Object> passwordAndSaveValues = UserModel.promptForPassword(this);
- if(passwordAndSaveValues != null) {
- final String password = (String) passwordAndSaveValues.get(PromptResult.PASSWORD_VALUE);
- delegate = UserModel.getDefault().createUser(delegate.getRhlogin(), password);
- final Boolean save = (Boolean) passwordAndSaveValues.get(PromptResult.SAVE_PASSWORD_VALUE);
- this.rememberPassword = save;
- }
+ this.alreadyPromptedForPassword = true;
+ Display.getDefault().syncExec(new Runnable() { public void run() {
+ final IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ final Shell shell = activeWorkbenchWindow != null ? activeWorkbenchWindow.getShell() : null;
+ if(shell == null) {
+ Logger.error("Could not open Credentials Wizard: no shell available");
+ return;
+ }
+ final IWizard connectToOpenShiftWizard = new ConnectToOpenShiftWizard();
+ int returnCode = WizardUtils.openWizardDialog(connectToOpenShiftWizard, shell);
+ if (returnCode == Window.OK) {
+ Logger.debug("OpenShift Auth succeeded.");
+ setDelegate(UserModel.getDefault().getRecentUser().getDelegate());
+ setConnected(true);
+ setRememberPassword(UserModel.getDefault().getRecentUser().isRememberPassword());
+ } else {
+ setConnected(false);
+ }
+ }});
} catch( Exception e ) {
Logger.error("Failed to retrieve User's password", e);
}
}
+ return (delegate.getPassword() != null && !"".equals(delegate.getPassword()));
}
public IApplication createApplication(String arg0, ICartridge arg1)
throws OpenShiftException {
- checkForPassword();
- return delegate.createApplication(arg0, arg1);
+ if(checkForPassword()) {
+ return delegate.createApplication(arg0, arg1);
+ }
+ return null;
}
public IDomain createDomain(String arg0, ISSHPublicKey arg1)
throws OpenShiftException {
- checkForPassword();
- return delegate.createDomain(arg0, arg1);
+ if(checkForPassword()) {
+ return delegate.createDomain(arg0, arg1);
+ }
+ return null;
}
public IApplication getApplicationByName(String arg0)
throws OpenShiftException {
- checkForPassword();
- return delegate.getApplicationByName(arg0);
+ if(checkForPassword()) {
+ return delegate.getApplicationByName(arg0);
+ }
+ return null;
}
public List<IApplication> getApplications() throws OpenShiftException {
- checkForPassword();
- return delegate.getApplications();
+ if(checkForPassword()) {
+ return delegate.getApplications();
+ }
+ return null;
}
public List<IApplication> getApplicationsByCartridge(ICartridge arg0)
throws OpenShiftException {
- checkForPassword();
- return delegate.getApplicationsByCartridge(arg0);
+ if(checkForPassword()) {
+ return delegate.getApplicationsByCartridge(arg0);
+ }
+ return null;
}
public String getAuthIV() {
- checkForPassword();
- return delegate.getAuthIV();
+ if(checkForPassword()) {
+ return delegate.getAuthIV();
+ }
+ return null;
}
public String getAuthKey() {
- checkForPassword();
- return delegate.getAuthKey();
+ if(checkForPassword()) {
+ return delegate.getAuthKey();
+ }
+ return null;
}
public ICartridge getCartridgeByName(String arg0) throws OpenShiftException {
- checkForPassword();
- return delegate.getCartridgeByName(arg0);
+ if(checkForPassword()) {
+ return delegate.getCartridgeByName(arg0);
+ }
+ return null;
}
public List<ICartridge> getCartridges() throws OpenShiftException {
- checkForPassword();
- return delegate.getCartridges();
+ if(checkForPassword()) {
+ return delegate.getCartridges();
+ }
+ return null;
}
public IDomain getDomain() throws OpenShiftException {
- checkForPassword();
- return delegate.getDomain();
+ if(checkForPassword()) {
+ return delegate.getDomain();
+ }
+ return null;
}
public List<IEmbeddableCartridge> getEmbeddableCartridges()
throws OpenShiftException {
- checkForPassword();
- return delegate.getEmbeddableCartridges();
+ if(checkForPassword()) {
+ return delegate.getEmbeddableCartridges();
+ }
+ return null;
}
public ISSHPublicKey getSshKey() throws OpenShiftException {
- checkForPassword();
- return delegate.getSshKey();
+ if(checkForPassword()) {
+ return delegate.getSshKey();
+ }
+ return null;
}
public String getUUID() throws OpenShiftException {
- checkForPassword();
- return delegate.getUUID();
+ if(checkForPassword()) {
+ return delegate.getUUID();
+ }
+ return null;
}
public boolean hasApplication(String arg0) throws OpenShiftException {
- checkForPassword();
- return delegate.hasApplication(arg0);
+ if(checkForPassword()) {
+ return delegate.hasApplication(arg0);
+ }
+ return false;
}
public boolean hasApplication(ICartridge arg0) throws OpenShiftException {
- checkForPassword();
- return delegate.hasApplication(arg0);
+ if(checkForPassword()) {
+ return delegate.hasApplication(arg0);
+ }
+ return false;
}
public boolean hasDomain() throws OpenShiftException {
- checkForPassword();
- return delegate.hasDomain();
+ if(checkForPassword()) {
+ return delegate.hasDomain();
+ }
+ return false;
+
}
public boolean isValid() throws OpenShiftException {
- checkForPassword();
- return delegate.isValid();
+ if(checkForPassword()) {
+ return delegate.isValid();
+ }
+ return false;
}
public void refresh() throws OpenShiftException {
- checkForPassword();
- delegate.refresh();
+ if(checkForPassword()) {
+ delegate.refresh();
+ }
}
+
+ /**
+ * @return the connected
+ */
+ public boolean isConnected() {
+ return connected;
+ }
+
+ /**
+ * @param connected the connected to set
+ */
+ public void setConnected(boolean connected) {
+ this.connected = connected;
+ }
}
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java 2012-03-07 17:39:57 UTC (rev 39347)
@@ -15,13 +15,11 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
-import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
import org.jboss.tools.common.ui.preferencevalue.StringsPreferenceValue;
-import org.jboss.tools.openshift.express.internal.core.console.IPasswordPrompter.PromptResult;
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.OpenShiftPasswordStorageKey;
@@ -44,30 +42,6 @@
return model;
}
- private static IPasswordPrompter prompter;
- public static void setPasswordPrompt(IPasswordPrompter prompt) {
- prompter =prompt;
- }
-
- public static IPasswordPrompter getPasswordPrompt() {
- return prompter;
- }
-
- /**
- * Returns a map of the values entered by the user. The value indexed with {@link IPasswordPrompter.PromptResult.PASSWORD_VALUE} in the
- * returning array is the input password, the value indexed with indexed with {@link IPasswordPrompter.PromptResult.SAVE_PASSWORD_VALUE} is the Boolean stating
- * whether the password should be saved in the secured storage or not.
- *
- * @param user
- * @return map with password value (as String) and 'save password' (as
- * Boolean), or null if the password prompter could not be
- * initialized
- */
-
- public static Map<PromptResult, Object> promptForPassword(IUser user) {
- return prompter == null ? null : prompter.getPasswordFor(user);
- }
-
/** The most recent user connected on OpenShift. */
private UserDelegate recentUser = null;
private HashMap<String, UserDelegate> allUsers = new HashMap<String, UserDelegate>();
@@ -164,7 +138,7 @@
for (int i = 0; i < users.length; i++) {
try {
String password = getPasswordFromSecureStorage(users[i]);
- UserDelegate u = new UserDelegate(createUser(users[i], password), password != null);
+ UserDelegate u = new UserDelegate(createUser(users[i], password), password != null, password != null);
addUser(u);
} catch (OpenShiftException ose) {
// TODO
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java 2012-03-07 17:39:57 UTC (rev 39347)
@@ -1,8 +1,6 @@
package org.jboss.tools.openshift.express.internal.ui;
import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
@@ -10,23 +8,16 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.window.Window;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.jboss.ide.eclipse.as.ui.dialogs.RequiredCredentialsDialog;
-import org.jboss.tools.openshift.express.internal.core.console.IPasswordPrompter;
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.osgi.framework.BundleContext;
-import com.openshift.express.client.IUser;
-
/**
* The activator class controls the plug-in life cycle
*/
-public class OpenShiftUIActivator extends AbstractUIPlugin implements IPasswordPrompter {
+public class OpenShiftUIActivator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.tools.openshift.express.ui"; //$NON-NLS-1$
@@ -50,7 +41,6 @@
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
- UserModel.setPasswordPrompt(this);
}
/*
@@ -128,20 +118,4 @@
return ImageDescriptor.createFromURL(imageFileUrl);
}
- public Map<PromptResult, Object> getPasswordFor(final IUser user) {
- final Map<PromptResult, Object> val = new HashMap<PromptResult, Object>();
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- Shell shell = Display.getDefault().getActiveShell();
- RequiredCredentialsDialog d = new RequiredCredentialsDialog(shell, user.getRhlogin(), user.getPassword());
- d.setCanModifyUser(false);
- d.setDescription("Provide enter the password for your express server");
- if( d.open() == Window.OK) {
- val.put(PromptResult.PASSWORD_VALUE, d.getPass());
- val.put(PromptResult.SAVE_PASSWORD_VALUE, d.getSave());
- }
- }
- });
- return val;
- }
}
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java 2012-03-07 17:39:57 UTC (rev 39347)
@@ -42,4 +42,9 @@
public static String REFRESH_VIEWER_ACTION;
public static String DELETE_CONNECTION_ACTION;
+
+ public static String USER_NOT_CONNECTED_LABEL;
+
+ public static String LOADING_USER_APPLICATIONS_LABEL;
+
}
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties 2012-03-07 17:39:57 UTC (rev 39347)
@@ -18,4 +18,8 @@
DELETE_CONNECTION_ACTION=Delete
+USER_NOT_CONNECTED_LABEL=<User is not connected>
+LOADING_USER_APPLICATIONS_LABEL=Loading
+
+
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java 2012-03-07 17:39:57 UTC (rev 39347)
@@ -22,6 +22,7 @@
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
@@ -53,6 +54,11 @@
}
}
+ public static class NotConnectedUserStub {
+ public NotConnectedUserStub () {
+ }
+ }
+
// Keep track of what's loading and what's finished
private ArrayList<IUser> loadedUsers = new ArrayList<IUser>();
private ArrayList<IUser> loadingUsers = new ArrayList<IUser>();
@@ -76,7 +82,11 @@
@Override
public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof IUser) {
+ if (parentElement instanceof UserDelegate) {
+ UserDelegate user = (UserDelegate) parentElement;
+ if(!user.isConnected() && !user.canPromptForPassword()) {
+ return new Object[]{new NotConnectedUserStub()};
+ }
if (!loadedUsers.contains(parentElement)) {
if (!loadingUsers.contains(parentElement)) {
// Load the data
@@ -118,8 +128,8 @@
IUser user = ((OpenShiftExpressConsoleContentCategory) parentElement).getUser();
children = new Object[] { user };
}
- if (parentElement instanceof IUser) {
- final IUser user = (IUser) parentElement;
+ if (parentElement instanceof UserDelegate) {
+ final UserDelegate user = (UserDelegate) parentElement;
if (user.hasDomain()) {
children = user.getApplications().toArray();
}
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java 2012-03-07 17:39:57 UTC (rev 39347)
@@ -18,7 +18,9 @@
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
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.viewer.OpenShiftExpressConsoleContentProvider.LoadingStub;
+import org.jboss.tools.openshift.express.internal.ui.viewer.OpenShiftExpressConsoleContentProvider.NotConnectedUserStub;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IEmbeddableCartridge;
@@ -107,8 +109,11 @@
}
if (element instanceof LoadingStub) {
- return new StyledString("Loading...");
+ return new StyledString(OpenShiftExpressUIMessages.LOADING_USER_APPLICATIONS_LABEL);
}
+ if (element instanceof NotConnectedUserStub) {
+ return new StyledString(OpenShiftExpressUIMessages.USER_NOT_CONNECTED_LABEL);
+ }
if (element instanceof OpenShiftException ) {
return new StyledString( ((OpenShiftException)element).getMessage());
}
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/OpenConnectionDialogActionDelegate.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/OpenConnectionDialogActionDelegate.java 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/OpenConnectionDialogActionDelegate.java 2012-03-07 17:39:57 UTC (rev 39347)
@@ -4,10 +4,10 @@
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.PlatformUI;
import org.eclipse.ui.navigator.CommonNavigator;
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
@@ -20,8 +20,7 @@
@Override
public void run(IAction action) {
- final Display display = Display.getCurrent();
- final Shell shell = new Shell(display);
+ final Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
final IWizard connectToOpenShiftWizard = new ConnectToOpenShiftWizard();
int returnCode = WizardUtils.openWizardDialog(connectToOpenShiftWizard, shell);
if (returnCode == Window.OK) {
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/PropertySourceAdapterFactory.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/PropertySourceAdapterFactory.java 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/PropertySourceAdapterFactory.java 2012-03-07 17:39:57 UTC (rev 39347)
@@ -12,10 +12,10 @@
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.ui.views.properties.IPropertySource;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IEmbeddableCartridge;
-import com.openshift.express.client.IUser;
/**
* @author Xavier Coulon
@@ -26,8 +26,8 @@
@Override
public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
if(adapterType == IPropertySource.class) {
- if(adaptableObject instanceof IUser) {
- return new UserPropertySource((IUser)adaptableObject);
+ if(adaptableObject instanceof UserDelegate) {
+ return new UserPropertySource((UserDelegate)adaptableObject);
}
if(adaptableObject instanceof IApplication) {
return new ApplicationPropertySource((IApplication)adaptableObject);
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/UserPropertySource.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/UserPropertySource.java 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/UserPropertySource.java 2012-03-07 17:39:57 UTC (rev 39347)
@@ -13,9 +13,10 @@
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.PropertyDescriptor;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
-import com.openshift.express.client.IUser;
import com.openshift.express.client.OpenShiftException;
/**
@@ -23,9 +24,9 @@
*/
public class UserPropertySource implements IPropertySource {
- private final IUser user;
+ private final UserDelegate user;
- public UserPropertySource(IUser user) {
+ public UserPropertySource(UserDelegate user) {
this.user = user;
}
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialog.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialog.java 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialog.java 2012-03-07 17:39:57 UTC (rev 39347)
@@ -138,12 +138,12 @@
}
}), null);
- Button refreshButton = new Button(dialogArea, SWT.PUSH);
+ /*Button refreshButton = new Button(dialogArea, SWT.PUSH);
refreshButton.setText("R&efresh");
GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.TOP).grab(false, false).hint(80, SWT.DEFAULT)
.applyTo(refreshButton);
refreshButton.addSelectionListener(onRefresh(dbc));
-
+ */
Button detailsButton = new Button(dialogArea, SWT.PUSH);
detailsButton.setText("De&tails...");
GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.TOP).grab(false, true).hint(80, SWT.DEFAULT)
@@ -239,6 +239,7 @@
WizardUtils.runInWizard(new Job("Loading applications...") {
@Override
protected IStatus run(IProgressMonitor monitor) {
+ dialogModel.refresh();
final Collection<IApplication> applications = dialogModel.getApplications();
setViewerInput(applications);
return Status.OK_STATUS;
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialogModel.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialogModel.java 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialogModel.java 2012-03-07 17:39:57 UTC (rev 39347)
@@ -38,6 +38,14 @@
this.selectedApplication = wizardModel.getApplication();
}
+ public void refresh() {
+ try {
+ getUser().refresh();
+ } catch (OpenShiftException e) {
+ Logger.error("Failed to refresh User's account", e);
+ }
+ }
+
public List<IApplication> getApplications() {
try {
IUser user = getUser();
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-03-07 17:32:13 UTC (rev 39346)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-03-07 17:39:57 UTC (rev 39347)
@@ -214,7 +214,7 @@
IStatus status = Status.OK_STATUS;
UserDelegate user = null;
try {
- user = new UserDelegate(UserModel.getDefault().createUser(getRhLogin(), getPassword()), rememberPassword);
+ user = new UserDelegate(UserModel.getDefault().createUser(rhLogin, password), rememberPassword, password != null);
if (user.isValid()) {
storeUser(user);
} else {
14 years, 1 month
JBoss Tools SVN: r39346 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal: ui and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-03-07 12:32:13 -0500 (Wed, 07 Mar 2012)
New Revision: 39346
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.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/viewer/OpenShiftExpressConsoleContentProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java
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/property/PropertySourceAdapterFactory.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/CredentialsWizardPageModel.java
Log:
Fixed - JBIDE-11184
NPE when the user is not connected (ignored the password dialog, did not input his password)
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java 2012-03-07 17:02:26 UTC (rev 39345)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java 2012-03-07 17:32:13 UTC (rev 39346)
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.openshift.express.internal.core.console;
-
-import java.util.Map;
-
-import com.openshift.express.client.IUser;
-
-public interface IPasswordPrompter {
-
- public enum PromptResult {
- PASSWORD_VALUE, SAVE_PASSWORD_VALUE;
- }
- /**
- * Returns a map of the values entered by the user. The value indexed with {@link IPasswordPrompter.PromptResult.PASSWORD_VALUE} in the
- * returning array is the input password, the value indexed with indexed with {@link IPasswordPrompter.PromptResult.SAVE_PASSWORD_VALUE} is the Boolean stating
- * whether the password should be saved in the secured storage or not.
- *
- * @param user
- * @return map with password value (as String) and 'save password' (as Boolean)
- */
- public Map<PromptResult, Object> getPasswordFor(IUser user);
-}
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java 2012-03-07 17:32:13 UTC (rev 39346)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.core.console;
+
+import java.util.Map;
+
+import com.openshift.express.client.IUser;
+
+@Deprecated
+public interface IPasswordPrompter {
+
+ public enum PromptResult {
+ PASSWORD_VALUE, SAVE_PASSWORD_VALUE;
+ }
+ /**
+ * Returns a map of the values entered by the user. The value indexed with {@link IPasswordPrompter.PromptResult.PASSWORD_VALUE} in the
+ * returning array is the input password, the value indexed with indexed with {@link IPasswordPrompter.PromptResult.SAVE_PASSWORD_VALUE} is the Boolean stating
+ * whether the password should be saved in the secured storage or not.
+ *
+ * @param user
+ * @return map with password value (as String) and 'save password' (as Boolean)
+ */
+ public Map<PromptResult, Object> getPasswordFor(IUser user);
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/IPasswordPrompter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-03-07 17:02:26 UTC (rev 39345)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-03-07 17:32:13 UTC (rev 39346)
@@ -11,10 +11,16 @@
package org.jboss.tools.openshift.express.internal.core.console;
import java.util.List;
-import java.util.Map;
-import org.jboss.tools.openshift.express.internal.core.console.IPasswordPrompter.PromptResult;
+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.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+import org.jboss.tools.openshift.express.internal.ui.viewer.ConnectToOpenShiftWizard;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.ICartridge;
@@ -27,12 +33,29 @@
public class UserDelegate implements IUser {
private IUser delegate;
private boolean rememberPassword;
+ private boolean connected;
+ private boolean alreadyPromptedForPassword;
- public UserDelegate(IUser user, boolean rememberPassword) {
+ public UserDelegate(IUser user, boolean rememberPassword, boolean connected) {
this.delegate = user;
this.rememberPassword = rememberPassword;
+ this.setConnected(connected);
}
+ /**
+ * @return the delegate
+ */
+ protected final IUser getDelegate() {
+ return delegate;
+ }
+
+ /**
+ * @param delegate the delegate to set
+ */
+ protected final void setDelegate(IUser delegate) {
+ this.delegate = delegate;
+ }
+
public String getRhlogin() {
return delegate.getRhlogin();
}
@@ -44,98 +67,176 @@
return rememberPassword;
}
- protected void checkForPassword() {
+ /**
+ * @param rememberPassword the rememberPassword to set
+ */
+ protected final void setRememberPassword(boolean rememberPassword) {
+ this.rememberPassword = rememberPassword;
+ }
+
+ public boolean canPromptForPassword() {
+ return this.alreadyPromptedForPassword == false;
+ }
+
+ /**
+ * Prompts user for password if it was not given or retrieved from secure storage before.
+ * @return true if user entered credentials, false otherwise.
+ */
+ public boolean checkForPassword() {
if( delegate.getPassword() == null || "".equals(delegate.getPassword())) {
try {
- Map<PromptResult, Object> passwordAndSaveValues = UserModel.promptForPassword(this);
- if(passwordAndSaveValues != null) {
- final String password = (String) passwordAndSaveValues.get(PromptResult.PASSWORD_VALUE);
- delegate = UserModel.getDefault().createUser(delegate.getRhlogin(), password);
- final Boolean save = (Boolean) passwordAndSaveValues.get(PromptResult.SAVE_PASSWORD_VALUE);
- this.rememberPassword = save;
- }
+ this.alreadyPromptedForPassword = true;
+ Display.getDefault().syncExec(new Runnable() { public void run() {
+ final IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ final Shell shell = activeWorkbenchWindow != null ? activeWorkbenchWindow.getShell() : null;
+ if(shell == null) {
+ Logger.error("Could not open Credentials Wizard: no shell available");
+ return;
+ }
+ final IWizard connectToOpenShiftWizard = new ConnectToOpenShiftWizard();
+ int returnCode = WizardUtils.openWizardDialog(connectToOpenShiftWizard, shell);
+ if (returnCode == Window.OK) {
+ Logger.debug("OpenShift Auth succeeded.");
+ setDelegate(UserModel.getDefault().getRecentUser().getDelegate());
+ setConnected(true);
+ setRememberPassword(UserModel.getDefault().getRecentUser().isRememberPassword());
+ } else {
+ setConnected(false);
+ }
+ }});
} catch( Exception e ) {
Logger.error("Failed to retrieve User's password", e);
}
}
+ return (delegate.getPassword() != null && !"".equals(delegate.getPassword()));
}
public IApplication createApplication(String arg0, ICartridge arg1)
throws OpenShiftException {
- checkForPassword();
- return delegate.createApplication(arg0, arg1);
+ if(checkForPassword()) {
+ return delegate.createApplication(arg0, arg1);
+ }
+ return null;
}
public IDomain createDomain(String arg0, ISSHPublicKey arg1)
throws OpenShiftException {
- checkForPassword();
- return delegate.createDomain(arg0, arg1);
+ if(checkForPassword()) {
+ return delegate.createDomain(arg0, arg1);
+ }
+ return null;
}
public IApplication getApplicationByName(String arg0)
throws OpenShiftException {
- checkForPassword();
- return delegate.getApplicationByName(arg0);
+ if(checkForPassword()) {
+ return delegate.getApplicationByName(arg0);
+ }
+ return null;
}
public List<IApplication> getApplications() throws OpenShiftException {
- checkForPassword();
- return delegate.getApplications();
+ if(checkForPassword()) {
+ return delegate.getApplications();
+ }
+ return null;
}
public List<IApplication> getApplicationsByCartridge(ICartridge arg0)
throws OpenShiftException {
- checkForPassword();
- return delegate.getApplicationsByCartridge(arg0);
+ if(checkForPassword()) {
+ return delegate.getApplicationsByCartridge(arg0);
+ }
+ return null;
}
public String getAuthIV() {
- checkForPassword();
- return delegate.getAuthIV();
+ if(checkForPassword()) {
+ return delegate.getAuthIV();
+ }
+ return null;
}
public String getAuthKey() {
- checkForPassword();
- return delegate.getAuthKey();
+ if(checkForPassword()) {
+ return delegate.getAuthKey();
+ }
+ return null;
}
public ICartridge getCartridgeByName(String arg0) throws OpenShiftException {
- checkForPassword();
- return delegate.getCartridgeByName(arg0);
+ if(checkForPassword()) {
+ return delegate.getCartridgeByName(arg0);
+ }
+ return null;
}
public List<ICartridge> getCartridges() throws OpenShiftException {
- checkForPassword();
- return delegate.getCartridges();
+ if(checkForPassword()) {
+ return delegate.getCartridges();
+ }
+ return null;
}
public IDomain getDomain() throws OpenShiftException {
- checkForPassword();
- return delegate.getDomain();
+ if(checkForPassword()) {
+ return delegate.getDomain();
+ }
+ return null;
}
public List<IEmbeddableCartridge> getEmbeddableCartridges()
throws OpenShiftException {
- checkForPassword();
- return delegate.getEmbeddableCartridges();
+ if(checkForPassword()) {
+ return delegate.getEmbeddableCartridges();
+ }
+ return null;
}
public ISSHPublicKey getSshKey() throws OpenShiftException {
- checkForPassword();
- return delegate.getSshKey();
+ if(checkForPassword()) {
+ return delegate.getSshKey();
+ }
+ return null;
}
public String getUUID() throws OpenShiftException {
- checkForPassword();
- return delegate.getUUID();
+ if(checkForPassword()) {
+ return delegate.getUUID();
+ }
+ return null;
}
public boolean hasApplication(String arg0) throws OpenShiftException {
- checkForPassword();
- return delegate.hasApplication(arg0);
+ if(checkForPassword()) {
+ return delegate.hasApplication(arg0);
+ }
+ return false;
}
public boolean hasApplication(ICartridge arg0) throws OpenShiftException {
- checkForPassword();
- return delegate.hasApplication(arg0);
+ if(checkForPassword()) {
+ return delegate.hasApplication(arg0);
+ }
+ return false;
}
public boolean hasDomain() throws OpenShiftException {
- checkForPassword();
- return delegate.hasDomain();
+ if(checkForPassword()) {
+ return delegate.hasDomain();
+ }
+ return false;
+
}
public boolean isValid() throws OpenShiftException {
- checkForPassword();
- return delegate.isValid();
+ if(checkForPassword()) {
+ return delegate.isValid();
+ }
+ return false;
}
public void refresh() throws OpenShiftException {
- checkForPassword();
- delegate.refresh();
+ if(checkForPassword()) {
+ delegate.refresh();
+ }
}
+
+ /**
+ * @return the connected
+ */
+ public boolean isConnected() {
+ return connected;
+ }
+
+ /**
+ * @param connected the connected to set
+ */
+ public void setConnected(boolean connected) {
+ this.connected = connected;
+ }
}
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-03-07 17:02:26 UTC (rev 39345)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java 2012-03-07 17:32:13 UTC (rev 39346)
@@ -15,13 +15,11 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
-import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
import org.jboss.tools.common.ui.preferencevalue.StringsPreferenceValue;
-import org.jboss.tools.openshift.express.internal.core.console.IPasswordPrompter.PromptResult;
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.OpenShiftPasswordStorageKey;
@@ -44,30 +42,6 @@
return model;
}
- private static IPasswordPrompter prompter;
- public static void setPasswordPrompt(IPasswordPrompter prompt) {
- prompter =prompt;
- }
-
- public static IPasswordPrompter getPasswordPrompt() {
- return prompter;
- }
-
- /**
- * Returns a map of the values entered by the user. The value indexed with {@link IPasswordPrompter.PromptResult.PASSWORD_VALUE} in the
- * returning array is the input password, the value indexed with indexed with {@link IPasswordPrompter.PromptResult.SAVE_PASSWORD_VALUE} is the Boolean stating
- * whether the password should be saved in the secured storage or not.
- *
- * @param user
- * @return map with password value (as String) and 'save password' (as
- * Boolean), or null if the password prompter could not be
- * initialized
- */
-
- public static Map<PromptResult, Object> promptForPassword(IUser user) {
- return prompter == null ? null : prompter.getPasswordFor(user);
- }
-
/** The most recent user connected on OpenShift. */
private UserDelegate recentUser = null;
private HashMap<String, UserDelegate> allUsers = new HashMap<String, UserDelegate>();
@@ -164,7 +138,7 @@
for (int i = 0; i < users.length; i++) {
try {
String password = getPasswordFromSecureStorage(users[i]);
- UserDelegate u = new UserDelegate(createUser(users[i], password), password != null);
+ UserDelegate u = new UserDelegate(createUser(users[i], password), password != null, password != null);
addUser(u);
} catch (OpenShiftException ose) {
// TODO
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java 2012-03-07 17:02:26 UTC (rev 39345)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIActivator.java 2012-03-07 17:32:13 UTC (rev 39346)
@@ -1,8 +1,6 @@
package org.jboss.tools.openshift.express.internal.ui;
import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
@@ -10,23 +8,16 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.window.Window;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.jboss.ide.eclipse.as.ui.dialogs.RequiredCredentialsDialog;
-import org.jboss.tools.openshift.express.internal.core.console.IPasswordPrompter;
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.osgi.framework.BundleContext;
-import com.openshift.express.client.IUser;
-
/**
* The activator class controls the plug-in life cycle
*/
-public class OpenShiftUIActivator extends AbstractUIPlugin implements IPasswordPrompter {
+public class OpenShiftUIActivator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.tools.openshift.express.ui"; //$NON-NLS-1$
@@ -50,7 +41,6 @@
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
- UserModel.setPasswordPrompt(this);
}
/*
@@ -128,20 +118,4 @@
return ImageDescriptor.createFromURL(imageFileUrl);
}
- public Map<PromptResult, Object> getPasswordFor(final IUser user) {
- final Map<PromptResult, Object> val = new HashMap<PromptResult, Object>();
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- Shell shell = Display.getDefault().getActiveShell();
- RequiredCredentialsDialog d = new RequiredCredentialsDialog(shell, user.getRhlogin(), user.getPassword());
- d.setCanModifyUser(false);
- d.setDescription("Provide enter the password for your express server");
- if( d.open() == Window.OK) {
- val.put(PromptResult.PASSWORD_VALUE, d.getPass());
- val.put(PromptResult.SAVE_PASSWORD_VALUE, d.getSave());
- }
- }
- });
- return val;
- }
}
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-03-07 17:02:26 UTC (rev 39345)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java 2012-03-07 17:32:13 UTC (rev 39346)
@@ -42,4 +42,9 @@
public static String REFRESH_VIEWER_ACTION;
public static String DELETE_CONNECTION_ACTION;
+
+ public static String USER_NOT_CONNECTED_LABEL;
+
+ public static String LOADING_USER_APPLICATIONS_LABEL;
+
}
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-03-07 17:02:26 UTC (rev 39345)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties 2012-03-07 17:32:13 UTC (rev 39346)
@@ -18,4 +18,8 @@
DELETE_CONNECTION_ACTION=Delete
+USER_NOT_CONNECTED_LABEL=<User is not connected>
+LOADING_USER_APPLICATIONS_LABEL=Loading
+
+
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java 2012-03-07 17:02:26 UTC (rev 39345)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleContentProvider.java 2012-03-07 17:32:13 UTC (rev 39346)
@@ -22,6 +22,7 @@
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
@@ -53,6 +54,11 @@
}
}
+ public static class NotConnectedUserStub {
+ public NotConnectedUserStub () {
+ }
+ }
+
// Keep track of what's loading and what's finished
private ArrayList<IUser> loadedUsers = new ArrayList<IUser>();
private ArrayList<IUser> loadingUsers = new ArrayList<IUser>();
@@ -76,7 +82,11 @@
@Override
public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof IUser) {
+ if (parentElement instanceof UserDelegate) {
+ UserDelegate user = (UserDelegate) parentElement;
+ if(!user.isConnected() && !user.canPromptForPassword()) {
+ return new Object[]{new NotConnectedUserStub()};
+ }
if (!loadedUsers.contains(parentElement)) {
if (!loadingUsers.contains(parentElement)) {
// Load the data
@@ -118,8 +128,8 @@
IUser user = ((OpenShiftExpressConsoleContentCategory) parentElement).getUser();
children = new Object[] { user };
}
- if (parentElement instanceof IUser) {
- final IUser user = (IUser) parentElement;
+ if (parentElement instanceof UserDelegate) {
+ final UserDelegate user = (UserDelegate) parentElement;
if (user.hasDomain()) {
children = user.getApplications().toArray();
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java 2012-03-07 17:02:26 UTC (rev 39345)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java 2012-03-07 17:32:13 UTC (rev 39346)
@@ -18,7 +18,9 @@
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
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.viewer.OpenShiftExpressConsoleContentProvider.LoadingStub;
+import org.jboss.tools.openshift.express.internal.ui.viewer.OpenShiftExpressConsoleContentProvider.NotConnectedUserStub;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IEmbeddableCartridge;
@@ -107,8 +109,11 @@
}
if (element instanceof LoadingStub) {
- return new StyledString("Loading...");
+ return new StyledString(OpenShiftExpressUIMessages.LOADING_USER_APPLICATIONS_LABEL);
}
+ if (element instanceof NotConnectedUserStub) {
+ return new StyledString(OpenShiftExpressUIMessages.USER_NOT_CONNECTED_LABEL);
+ }
if (element instanceof OpenShiftException ) {
return new StyledString( ((OpenShiftException)element).getMessage());
}
Modified: 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/OpenConnectionDialogActionDelegate.java 2012-03-07 17:02:26 UTC (rev 39345)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionDelegate/OpenConnectionDialogActionDelegate.java 2012-03-07 17:32:13 UTC (rev 39346)
@@ -4,10 +4,10 @@
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.PlatformUI;
import org.eclipse.ui.navigator.CommonNavigator;
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
@@ -20,8 +20,7 @@
@Override
public void run(IAction action) {
- final Display display = Display.getCurrent();
- final Shell shell = new Shell(display);
+ final Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
final IWizard connectToOpenShiftWizard = new ConnectToOpenShiftWizard();
int returnCode = WizardUtils.openWizardDialog(connectToOpenShiftWizard, shell);
if (returnCode == Window.OK) {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/PropertySourceAdapterFactory.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/PropertySourceAdapterFactory.java 2012-03-07 17:02:26 UTC (rev 39345)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/PropertySourceAdapterFactory.java 2012-03-07 17:32:13 UTC (rev 39346)
@@ -12,10 +12,10 @@
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.ui.views.properties.IPropertySource;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IEmbeddableCartridge;
-import com.openshift.express.client.IUser;
/**
* @author Xavier Coulon
@@ -26,8 +26,8 @@
@Override
public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
if(adapterType == IPropertySource.class) {
- if(adaptableObject instanceof IUser) {
- return new UserPropertySource((IUser)adaptableObject);
+ if(adaptableObject instanceof UserDelegate) {
+ return new UserPropertySource((UserDelegate)adaptableObject);
}
if(adaptableObject instanceof IApplication) {
return new ApplicationPropertySource((IApplication)adaptableObject);
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-03-07 17:02:26 UTC (rev 39345)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/UserPropertySource.java 2012-03-07 17:32:13 UTC (rev 39346)
@@ -13,9 +13,10 @@
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.PropertyDescriptor;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
-import com.openshift.express.client.IUser;
import com.openshift.express.client.OpenShiftException;
/**
@@ -25,9 +26,9 @@
private static final String PROPERTY_DOMAIN = "Domain";
private static final String PROPERTY_USERNAME = "Username";
- private final IUser user;
+ private final UserDelegate user;
- public UserPropertySource(IUser user) {
+ public UserPropertySource(UserDelegate user) {
this.user = user;
}
@@ -46,6 +47,13 @@
@Override
public Object getPropertyValue(Object id) {
try {
+ if(!user.isConnected() && !user.canPromptForPassword()) {
+ return OpenShiftExpressUIMessages.USER_NOT_CONNECTED_LABEL;
+ }
+ if(!user.isConnected() && user.canPromptForPassword()) {
+ user.checkForPassword();
+ }
+
if (id.equals(PROPERTY_USERNAME)) {
return user.getRhlogin();
}
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-03-07 17:02:26 UTC (rev 39345)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-03-07 17:32:13 UTC (rev 39346)
@@ -214,7 +214,7 @@
IStatus status = Status.OK_STATUS;
UserDelegate user = null;
try {
- user = new UserDelegate(UserModel.getDefault().createUser(getRhLogin(), getPassword()), rememberPassword);
+ user = new UserDelegate(UserModel.getDefault().createUser(rhLogin, password), rememberPassword, password != null);
if (user.isValid()) {
storeUser(user);
} else {
14 years, 1 month
JBoss Tools SVN: r39345 - branches/jbosstools-3.3.0.Beta1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-03-07 12:02:26 -0500 (Wed, 07 Mar 2012)
New Revision: 39345
Modified:
branches/jbosstools-3.3.0.Beta1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java
Log:
JBIDE-10244 Cleaning up Runtime plugin
Modified: branches/jbosstools-3.3.0.Beta1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java 2012-03-07 16:47:36 UTC (rev 39344)
+++ branches/jbosstools-3.3.0.Beta1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java 2012-03-07 17:02:26 UTC (rev 39345)
@@ -10,6 +10,7 @@
************************************************************************************/
package org.jboss.tools.runtime.ui;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -54,7 +55,15 @@
Display.getDefault().asyncExec(new Runnable() {
public void run() {
Shell shell = Display.getCurrent().getActiveShell();
- RuntimeUIActivator.refreshRuntimes(shell, RuntimeUIActivator.getDefault().getRuntimePaths(), null, false, 7);
+ Set<RuntimePath> runtimePaths = new HashSet<RuntimePath>();
+ for (RuntimePath runtimePath:RuntimeUIActivator.getDefault().getRuntimePaths()) {
+ if (runtimePath.isScanOnEveryStartup() || firstStart) {
+ runtimePaths.add(runtimePath);
+ }
+ }
+ if (runtimePaths.size() > 0) {
+ RuntimeUIActivator.refreshRuntimes(shell, runtimePaths, null, false, 7);
+ }
}
});
}
14 years, 1 month
JBoss Tools SVN: r39344 - trunk/documentation/whatsnew/openshift.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-03-07 11:47:36 -0500 (Wed, 07 Mar 2012)
New Revision: 39344
Modified:
trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
Log:
[JBIDE-11031] wrinting N&N for OpenShift
Modified: trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html 2012-03-07 16:41:48 UTC (rev 39343)
+++ trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html 2012-03-07 16:47:36 UTC (rev 39344)
@@ -46,37 +46,48 @@
<b>OpenShift Express Console</b>
</td>
<td valign="top">
- We reworked the whole UI for OpenShift in JBoss Tools 3.3.0 Beta1. Was was a single wizard in M5 is now split up
+ We reworked the whole UI for OpenShift in JBoss Tools 3.3.0 Beta1. What was a single wizard in M5 is now split up
into different parts with concise aims. The central entry point is now what we call the <b>OpenShift Express console</b>.
<p>
<img src="images/openshift-console.png" alt="OpenShift Express Console" />
</p>
The OpenShift Express console will list your accounts and
- applications and allow you to manage your resources on the Red Hat
+ applications. It allows you to manage your resources on the Red Hat
PaaS. Actions in the context menu allow you to create new users,
- manage domains, applications, etc. The OpenShift console also allows
- you to import OpenShift applications to projects in your local
- workspace, to create Eclipse WTP server adapters etc. <br />
+ manage domains, applications, etc. <br />
</td>
</tr>
<tr>
<td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
<b>Properties</b>
</td>
- <td valign="top">Details to what's selected in the in the
- OpenShift Express console are shown in the <b>Properties view</b>
+ <td valign="top">Details to the item selected in the OpenShift console are shown in the <b>Properties view</b>
<p>
<img src="images/openshift-properties.png" alt="OpenShift Express Properties" />
</p>
<p>
<small> <a
- href="https://issues.jboss.org/browse/JBIDE-10528">Related
- Jira</a>
+ href="https://issues.jboss.org/browse/JBIDE-10528">Related Jira</a>
</small>
</p>
</td>
</tr>
<tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>Embedded cartridges</b>
+ </td>
+ <td valign="top">
+ You may now add embed or remove cartridges from an existing application by choosing the appropriate
+ entry in the context menu. We now offer a separate wizard for that sake.
+ <p>
+ <img src="images/menu-edit-embedded-cartridges.png"/>
+ </p>
+ <p>
+ <img src="images/edit-embedded-cartridges.png"/>
+ </p>
+ </td>
+ </tr>
+ <tr>
<td colspan="2">
<hr />
<h3>OpenShift Server</h3>
@@ -93,13 +104,38 @@
<p>
<img src="images/console-create-a-server-adapter.png" alt="create server adapter" />
</p>
+ You may now also create the server adapter like any other Eclipse WTP server adapter by invoking the <b>new server wizard</b>
<p>
+ <img src="images/server-adapter-wizard.png" />
+ </p>
+ <p>
+ <img src="images/server-adapter-wizard-2.png" />
+ </p>
+ The new OpenShift Server Adapter is not bound to JBoss AS7 any longer, it has it's own runtime.
+ The adapter may therefore now also publish to non-java applications.
+ <p>
<small>
<a href="https://issues.jboss.org/browse/JBIDE-10716">Related Jira</a>
</small>
</p>
</td>
</tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>Source & binary deployment</b></td>
+ <td valign="top">
+ The new <b>OpenShift Server adapter</b> is now able to publish source and binary artifacts.
+ When you create the adapter, you bind it to a project in your workspace.
+ He'll (git) push any changes in the <b>source</b> of this project and publish them to the OpenShift application.
+ That's what we call the source publishing mode. <br/>
+ Given a <b>jbossas-7</b> application, you may also drag and drop projects to the adapter as
+ you always could with Eclipse WTP server adapters.
+ The adapter will build wars for these projects,
+ copy them to the <b>deployments</b> folder of your project (the project the adapter is bound to)
+ and push them to the OpenShift application. This is what we call the <b>binary</b> mode where binary artifacts
+ are pushed to the OpenShift git repository.
+ </td>
+ </td>tr>
</table>
</body>
14 years, 1 month
JBoss Tools SVN: r39343 - 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: xcoulon
Date: 2012-03-07 11:41:48 -0500 (Wed, 07 Mar 2012)
New Revision: 39343
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/wizard/ApplicationSelectionDialog.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialogModel.java
Log:
Fixed - JBIDE-10856
Application selection UI issues
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-03-07 16:40:58 UTC (rev 39342)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-03-07 16:41:48 UTC (rev 39343)
@@ -516,14 +516,14 @@
<viewContribution
id="org.jboss.tools.openshift.express.ui.viewer.expressConsoleViewContribution"
targetID="org.jboss.tools.openshift.express.ui.viewer.expressConsoleView">
- <action
+ <!--action
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"
style="push"
toolbarPath="openshift">
- </action>
+ </action-->
<action
class="org.jboss.tools.openshift.express.internal.ui.viewer.actionDelegate.OpenConnectionDialogActionDelegate"
icon="icons/resource_obj.gif"
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialog.java 2012-03-07 16:40:58 UTC (rev 39342)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialog.java 2012-03-07 16:41:48 UTC (rev 39343)
@@ -138,12 +138,12 @@
}
}), null);
- Button refreshButton = new Button(dialogArea, SWT.PUSH);
+ /*Button refreshButton = new Button(dialogArea, SWT.PUSH);
refreshButton.setText("R&efresh");
GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.TOP).grab(false, false).hint(80, SWT.DEFAULT)
.applyTo(refreshButton);
refreshButton.addSelectionListener(onRefresh(dbc));
-
+ */
Button detailsButton = new Button(dialogArea, SWT.PUSH);
detailsButton.setText("De&tails...");
GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.TOP).grab(false, true).hint(80, SWT.DEFAULT)
@@ -239,6 +239,7 @@
WizardUtils.runInWizard(new Job("Loading applications...") {
@Override
protected IStatus run(IProgressMonitor monitor) {
+ dialogModel.refresh();
final Collection<IApplication> applications = dialogModel.getApplications();
setViewerInput(applications);
return Status.OK_STATUS;
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-03-07 16:40:58 UTC (rev 39342)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionDialogModel.java 2012-03-07 16:41:48 UTC (rev 39343)
@@ -38,6 +38,14 @@
this.selectedApplication = wizardModel.getApplication();
}
+ public void refresh() {
+ try {
+ getUser().refresh();
+ } catch (OpenShiftException e) {
+ Logger.error("Failed to refresh User's account", e);
+ }
+ }
+
public List<IApplication> getApplications() {
try {
IUser user = getUser();
14 years, 1 month
JBoss Tools SVN: r39342 - trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-03-07 11:40:58 -0500 (Wed, 07 Mar 2012)
New Revision: 39342
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java
Log:
JBIDE-10244 Cleaning up Runtime plugin
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java 2012-03-07 15:37:42 UTC (rev 39341)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java 2012-03-07 16:40:58 UTC (rev 39342)
@@ -57,7 +57,7 @@
Shell shell = Display.getCurrent().getActiveShell();
Set<RuntimePath> runtimePaths = new HashSet<RuntimePath>();
for (RuntimePath runtimePath:RuntimeUIActivator.getDefault().getRuntimePaths()) {
- if (runtimePath.isScanOnEveryStartup()) {
+ if (runtimePath.isScanOnEveryStartup() || firstStart) {
runtimePaths.add(runtimePath);
}
}
14 years, 1 month
JBoss Tools SVN: r39341 - branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-03-07 10:37:42 -0500 (Wed, 07 Mar 2012)
New Revision: 39341
Modified:
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
Log:
JBIDE-11166 to beta1 branch, slim patch
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-03-07 15:12:24 UTC (rev 39340)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-03-07 15:37:42 UTC (rev 39341)
@@ -100,7 +100,12 @@
if( module.length > 1 )
return 0;
+ // Magic Project
String destProjName = ExpressServerUtils.getExpressDeployProject(behaviour.getServer());
+
+ if( isInDestProjectTree(destProjName, module))
+ return IServer.PUBLISH_STATE_NONE;
+
IProject destProj = ResourcesPlugin.getWorkspace().getRoot().getProject(destProjName);
if( destProj.equals(module[module.length-1].getProject()))
@@ -138,6 +143,19 @@
}
return 0;
}
+
+ protected boolean isInDestProjectTree(String magicProject, IModule[] module) {
+ IProject magic = magicProject == null ? null :
+ ResourcesPlugin.getWorkspace().getRoot().getProject(magicProject);
+ IProject moduleProject = module == null ? null : module.length == 0 ? null : module[module.length-1].getProject();
+ if( magic == null || moduleProject == null )
+ return false;
+
+ IPath moduleProjectRoot = moduleProject.getLocation();
+ IPath magicProjectRoot = magic.getLocation();
+ boolean ret = magicProjectRoot.isPrefixOf(moduleProjectRoot);
+ return ret;
+ }
protected PushOperationResult commitAndPushProject(IProject p,
DeployableServerBehavior behaviour, IProgressMonitor monitor) throws CoreException {
14 years, 1 month
JBoss Tools SVN: r39340 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-03-07 10:12:24 -0500 (Wed, 07 Mar 2012)
New Revision: 39340
Modified:
trunk/build/parent/pom.xml
Log:
JBIDE-11157
Added a <distributionManagement> configuration
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2012-03-07 15:11:11 UTC (rev 39339)
+++ trunk/build/parent/pom.xml 2012-03-07 15:12:24 UTC (rev 39340)
@@ -823,23 +823,20 @@
</pluginRepository>
</pluginRepositories>
- <!-- commented to check if it is added by default on hudson but with https:// -->
- <!-- pluginRepositories> <pluginRepository> <id>jboss-public-repository-group</id>
- <name>JBoss Public Repository Group</name> <url>http://repository.jboss.org/nexus/content/groups/public/</url>
- <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled>
- </snapshots> </pluginRepository> </pluginRepositories -->
-
+ <!-- To deploy parent to Nexus -->
+ <!-- Don't change "id" since it should match credentials entry in $M2_REPO/settings.xml -->
<distributionManagement>
<snapshotRepository>
<id>jboss-snapshots-repository</id>
<name>JBoss Snapshots Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
+ <uniqueVersion>false</uniqueVersion>
</snapshotRepository>
- <!-- <repository> <id>jboss-releases-repository</id> <name>JBoss Releases
- Repository</name> <uniqueVersion>false</uniqueVersion> <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
- <layout>default</layout> </repository> <snapshotRepository> <id>jboss-snapshots-repository</id>
- <name>JBoss Snapshot Repository</name> <uniqueVersion>false</uniqueVersion>
- <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
- <layout>default</layout> </snapshotRepository> -->
+ <repository>
+ <id>jboss-staging-repository</id>
+ <name>JBoss Staging Repository</name>
+ <uniqueVersion>false</uniqueVersion>
+ <url>https://repository.jboss.org/nexus/content/groups/staging/</url>
+ </repository>
</distributionManagement>
</project>
14 years, 1 month
JBoss Tools SVN: r39339 - trunk/documentation/whatsnew/openshift.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-03-07 10:11:11 -0500 (Wed, 07 Mar 2012)
New Revision: 39339
Added:
trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
Removed:
trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta1.html
Log:
[JBIDE-11031] renamed what's-new file to reflect jboss tools version
Deleted: trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta1.html 2012-03-07 14:57:52 UTC (rev 39338)
+++ trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta1.html 2012-03-07 15:11:11 UTC (rev 39339)
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Language" content="en-us" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<link rel="stylesheet" href="../whatsnew.css" />
-<title>OpenShift Tools 2.3.0.Beta1 What's New</title>
-<script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push([ '_setAccount', 'UA-17645367-5' ]);
- _gaq.push([ '_trackPageview' ]);
-
- (function() {
- var ga = document.createElement('script');
- ga.type = 'text/javascript';
- ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl'
- : 'http://www')
- + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(ga, s);
- })();
-</script>
-</head>
-<body>
- <h1>OpenShift 2.3.0.Beta1 What's New</h1>
-
- <p align="right">
- <a href="../index.html">< Main Index</a> <a
- href="../as/as-news-3.3.0.Beta1.html">Server Tools ></a>
- </p>
- <table border="0" cellpadding="10" cellspacing="0" width="80%">
-
- <tr>
- <td colspan="2">
- <hr />
- <h3>OpenShift Express Console</h3>
- <hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <a name="itemname3" id="itemname3"></a>
- <b>OpenShift Express Console</b>
- </td>
- <td valign="top">
- We reworked the whole UI for OpenShift in JBoss Tools 3.3.0 Beta1. Was was a single wizard in M5 is now split up
- into different parts with concise aims. The central entry point is now what we call the <b>OpenShift Express console</b>.
- <p>
- <img src="images/openshift-console.png" alt="OpenShift Express Console" />
- </p>
- The OpenShift Express console will list your accounts and
- applications and allow you to manage your resources on the Red Hat
- PaaS. Actions in the context menu allow you to create new users,
- manage domains, applications, etc. The OpenShift console also allows
- you to import OpenShift applications to projects in your local
- workspace, to create Eclipse WTP server adapters etc. <br />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>Properties</b>
- </td>
- <td valign="top">Details to what's selected in the in the
- OpenShift Express console are shown in the <b>Properties view</b>
- <p>
- <img src="images/openshift-properties.png" alt="OpenShift Express Properties" />
- </p>
- <p>
- <small> <a
- href="https://issues.jboss.org/browse/JBIDE-10528">Related
- Jira</a>
- </small>
- </p>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <hr />
- <h3>OpenShift Server</h3>
- <hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>OpenShift Server Runtime</b></td>
- <td valign="top">
- You may now create the server adapter for an <b>OpenShift
- Express Application</b> by choosing <b>Create a Server Adapter</b> in the
- context menu of the <b>OpenShift Express Console</b>
- <p>
- <img src="images/console-create-a-server-adapter.png" alt="create server adapter" />
- </p>
- <p>
- <small>
- <a href="https://issues.jboss.org/browse/JBIDE-10716">Related Jira</a>
- </small>
- </p>
- </td>
- </tr>
- </table>
-</body>
-
-</html>
-
-
Copied: trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html (from rev 39297, trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta1.html)
===================================================================
--- trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html (rev 0)
+++ trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html 2012-03-07 15:11:11 UTC (rev 39339)
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css" />
+<title>OpenShift Tools 2.3.0.Beta1 What's New</title>
+<script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push([ '_setAccount', 'UA-17645367-5' ]);
+ _gaq.push([ '_trackPageview' ]);
+
+ (function() {
+ var ga = document.createElement('script');
+ ga.type = 'text/javascript';
+ ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl'
+ : 'http://www')
+ + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(ga, s);
+ })();
+</script>
+</head>
+<body>
+ <h1>OpenShift 2.3.0.Beta1 What's New</h1>
+
+ <p align="right">
+ <a href="../index.html">< Main Index</a> <a
+ href="../as/as-news-3.3.0.Beta1.html">Server Tools ></a>
+ </p>
+ <table border="0" cellpadding="10" cellspacing="0" width="80%">
+
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>OpenShift Express Console</h3>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemname3" id="itemname3"></a>
+ <b>OpenShift Express Console</b>
+ </td>
+ <td valign="top">
+ We reworked the whole UI for OpenShift in JBoss Tools 3.3.0 Beta1. Was was a single wizard in M5 is now split up
+ into different parts with concise aims. The central entry point is now what we call the <b>OpenShift Express console</b>.
+ <p>
+ <img src="images/openshift-console.png" alt="OpenShift Express Console" />
+ </p>
+ The OpenShift Express console will list your accounts and
+ applications and allow you to manage your resources on the Red Hat
+ PaaS. Actions in the context menu allow you to create new users,
+ manage domains, applications, etc. The OpenShift console also allows
+ you to import OpenShift applications to projects in your local
+ workspace, to create Eclipse WTP server adapters etc. <br />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>Properties</b>
+ </td>
+ <td valign="top">Details to what's selected in the in the
+ OpenShift Express console are shown in the <b>Properties view</b>
+ <p>
+ <img src="images/openshift-properties.png" alt="OpenShift Express Properties" />
+ </p>
+ <p>
+ <small> <a
+ href="https://issues.jboss.org/browse/JBIDE-10528">Related
+ Jira</a>
+ </small>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>OpenShift Server</h3>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>OpenShift Server Runtime</b></td>
+ <td valign="top">
+ You may now create the server adapter for an <b>OpenShift
+ Express Application</b> by choosing <b>Create a Server Adapter</b> in the
+ context menu of the <b>OpenShift Express Console</b>
+ <p>
+ <img src="images/console-create-a-server-adapter.png" alt="create server adapter" />
+ </p>
+ <p>
+ <small>
+ <a href="https://issues.jboss.org/browse/JBIDE-10716">Related Jira</a>
+ </small>
+ </p>
+ </td>
+ </tr>
+ </table>
+</body>
+
+</html>
+
+
Property changes on: trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 1 month