Author: xcoulon
Date: 2012-05-16 08:54:06 -0400 (Wed, 16 May 2012)
New Revision: 41063
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowDetailsAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ShowDetailsActionProvider.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties
Log:
Fixed - JBIDE-11629
Make "Details..." available from OpenShift Explorer
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-05-16
12:43:18 UTC (rev 41062)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-05-16
12:54:06 UTC (rev 41063)
@@ -506,7 +506,17 @@
</enablement>
</actionProvider>
<actionProvider
-
appearsBefore="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.showPropertiesActionProvider"
+
class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.ShowDetailsActionProvider"
+
id="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.showDetailsActionProvider">
+ <enablement>
+ <or>
+ <instanceof
+ value="com.openshift.client.IApplication">
+ </instanceof>
+ </or>
+ </enablement>
+ </actionProvider>
+ <actionProvider
class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.ShowEnvironmentActionProvider"
id="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.showEnvironmentActionProvider">
<enablement>
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowDetailsAction.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowDetailsAction.java
(rev 0)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowDetailsAction.java 2012-05-16
12:54:06 UTC (rev 41063)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.ui.action;
+
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.swt.widgets.Display;
+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.ApplicationDetailsDialog;
+
+import com.openshift.client.IApplication;
+
+/**
+ * @author Xavier Coulon
+ */
+public class ShowDetailsAction extends AbstractAction {
+
+ public ShowDetailsAction() {
+ super(OpenShiftExpressUIMessages.SHOW_DETAILS_ACTION, true);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ try {
+ final ITreeSelection treeSelection = (ITreeSelection) selection;
+ if (selection instanceof ITreeSelection && treeSelection.getFirstElement()
instanceof IApplication) {
+ final IApplication application = (IApplication) treeSelection.getFirstElement();
+ new ApplicationDetailsDialog(application,
Display.getDefault().getActiveShell()).open();
+ }
+ } catch (Exception e) {
+ OpenShiftUIActivator.createErrorStatus("Failed to display application
details", e);
+ }
+
+ }
+
+}
Property changes on:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowDetailsAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java 2012-05-16
12:43:18 UTC (rev 41062)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java 2012-05-16
12:54:06 UTC (rev 41063)
@@ -43,6 +43,8 @@
public static String SHOW_ENVIRONMENT_ACTION;
+ public static String SHOW_DETAILS_ACTION;
+
public static String REFRESH_VIEWER_ACTION;
public static String REFRESH_USER_ACTION;
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties 2012-05-16
12:43:18 UTC (rev 41062)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties 2012-05-16
12:54:06 UTC (rev 41063)
@@ -14,7 +14,9 @@
EDIT_CARTRIDGES_ACTION=Edit Embedded Cartridges...
MAKE_SNAPSHOT_ACTION=Pull down Application Snapshot
-SHOW_PROPERTIES_VIEW_ACTION=Properties
+SHOW_PROPERTIES_VIEW_ACTION=Show Properties
+SHOW_DETAILS_ACTION=Show Details...
+
REFRESH_VIEWER_ACTION=Refresh
REFRESH_USER_ACTION=Refresh
SHOW_ENVIRONMENT_ACTION=Show Environment Variables
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ShowDetailsActionProvider.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ShowDetailsActionProvider.java
(rev 0)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ShowDetailsActionProvider.java 2012-05-16
12:54:06 UTC (rev 41063)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.ui.viewer.actionProvider;
+
+import org.jboss.tools.openshift.express.internal.ui.action.ShowDetailsAction;
+
+/**
+ * @author Xavier Coulon
+ */
+public class ShowDetailsActionProvider extends AbstractActionProvider {
+
+ public ShowDetailsActionProvider() {
+ super(new ShowDetailsAction(), "group.properties");
+ }
+
+}
Property changes on:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ShowDetailsActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain