JBoss Tools SVN: r35249 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-09-30 19:57:59 -0400 (Fri, 30 Sep 2011)
New Revision: 35249
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
Log:
Tests for org.jboss.tools.cdi.ui.refactoring package https://issues.jboss.org/browse/JBIDE-9791
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2011-09-30 23:05:57 UTC (rev 35248)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2011-09-30 23:57:59 UTC (rev 35249)
@@ -42,6 +42,7 @@
org.jboss.tools.cdi.ui.ca,
org.jboss.tools.cdi.ui.marker,
org.jboss.tools.cdi.ui.preferences,
+ org.jboss.tools.cdi.ui.refactoring,
org.jboss.tools.cdi.ui.search,
org.jboss.tools.cdi.ui.wizard,
org.jboss.tools.cdi.ui.wizard.xpl
13 years, 3 months
JBoss Tools SVN: r35248 - in trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui: META-INF and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-09-30 19:05:57 -0400 (Fri, 30 Sep 2011)
New Revision: 35248
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/error.png
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/ok.png
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/openshift-logo-dark-icon.png
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/openshift-logo-dark.png
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/openshift-logo-white-icon.png
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/openshift-logo-white.png
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/warning.png
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/OpenshiftImages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/OpenshiftUIActivator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/common/
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/common/ImageRepository.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/AbstractOpenshiftWizardPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ApplicationWizardPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizard.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizardModel.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerWizardPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/TrimTrailingSlashConverter.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/OpenshiftUIActivator.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/build.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/plugin.xml
Log:
[JBIDE-9793] implemented ServerConnectionWizardPage, started ApplicationSelectionWizardPage
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/META-INF/MANIFEST.MF 2011-09-30 23:04:48 UTC (rev 35247)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/META-INF/MANIFEST.MF 2011-09-30 23:05:57 UTC (rev 35248)
@@ -3,8 +3,17 @@
Bundle-Name: Openshift UI
Bundle-SymbolicName: org.jboss.ide.eclipse.as.openshift.ui;singleton:=true
Bundle-Version: 2.3.0.qualifier
-Bundle-Activator: org.jboss.ide.eclipse.as.openshift.ui.OpenshiftUIActivator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
+Bundle-Activator: org.jboss.ide.eclipse.as.openshift.ui.internal.OpenshiftUIActivator
+Require-Bundle: org.jboss.ide.eclipse.as.openshift.core;bundle-version="[2.3.0,3.0.0)",
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.databinding;bundle-version="1.4.0",
+ org.eclipse.core.databinding.beans;bundle-version="1.2.100",
+ org.eclipse.core.databinding.observable;bundle-version="1.4.0",
+ org.eclipse.core.databinding.property;bundle-version="1.4.0",
+ org.eclipse.jface.databinding;bundle-version="1.5.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.jboss.tools.common.databinding,
+ org.jboss.tools.common.ui,
+ org.jboss.tools.common.ui.databinding
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/build.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/build.properties 2011-09-30 23:04:48 UTC (rev 35247)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/build.properties 2011-09-30 23:05:57 UTC (rev 35248)
@@ -1,4 +1,11 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ plugin.xml
+src.includes = .classpath,\
+ .project,\
+ META-INF/,\
+ build.properties,\
+ plugin.xml,\
+ pom.xml
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/error.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/error.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/ok.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/ok.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/openshift-logo-dark-icon.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/openshift-logo-dark-icon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/openshift-logo-dark.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/openshift-logo-dark.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/openshift-logo-white-icon.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/openshift-logo-white-icon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/openshift-logo-white.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/openshift-logo-white.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/warning.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/icons/warning.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/plugin.xml 2011-09-30 23:04:48 UTC (rev 35247)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/plugin.xml 2011-09-30 23:05:57 UTC (rev 35248)
@@ -1,4 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <category
+ id="org.jboss.ide.eclipse.as.openshift.express.ui.wizard.category"
+ name="Openshift Express">
+ </category>
+ <wizard
+ category="org.jboss.ide.eclipse.as.openshift.express.ui.wizard.category"
+ class="org.jboss.ide.eclipse.as.openshift.ui.internal.wizard.ServerAdapterWizard"
+ icon="icons/openshift-logo-white-icon.png"
+ id="org.jboss.ide.eclipse.as.openshift.express.ui.wizard.NewServerAdapter"
+ name="New Server Adapter">
+ </wizard>
+ </extension>
</plugin>
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/OpenshiftUIActivator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/OpenshiftUIActivator.java 2011-09-30 23:04:48 UTC (rev 35247)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/OpenshiftUIActivator.java 2011-09-30 23:05:57 UTC (rev 35248)
@@ -1,50 +0,0 @@
-package org.jboss.ide.eclipse.as.openshift.ui;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class OpenshiftUIActivator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.ide.eclipse.as.openshift.ui"; //$NON-NLS-1$
-
- // The shared instance
- private static OpenshiftUIActivator plugin;
-
- /**
- * The constructor
- */
- public OpenshiftUIActivator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static OpenshiftUIActivator getDefault() {
- return plugin;
- }
-
-}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/OpenshiftImages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/OpenshiftImages.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/OpenshiftImages.java 2011-09-30 23:05:57 UTC (rev 35248)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.ide.eclipse.as.openshift.ui.internal;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.jboss.ide.eclipse.as.openshift.ui.internal.common.ImageRepository;
+
+public class OpenshiftImages {
+
+ private static final String ICONS_FOLDER = "icons/";
+
+ private static final ImageRepository repo =
+ new ImageRepository(ICONS_FOLDER, OpenshiftUIActivator.getDefault(), OpenshiftUIActivator.getDefault().getImageRegistry());
+
+ public static final ImageDescriptor OPENSHIFT_LOGO_DARK = repo.create("openshift-logo-dark.png"); //$NON-NLS-1$
+ public static final ImageDescriptor OPENSHIFT_LOGO_WHITE = repo.create("openshift-logo-white.png"); //$NON-NLS-1$
+
+ public static final ImageDescriptor OK = repo.create("ok.png"); //$NON-NLS-1$
+ public static final ImageDescriptor ERROR = repo.create("error.png"); //$NON-NLS-1$
+ public static final ImageDescriptor WARNING = repo.create("warning.png"); //$NON-NLS-1$
+
+
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/OpenshiftImages.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/OpenshiftUIActivator.java (from rev 35151, trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/OpenshiftUIActivator.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/OpenshiftUIActivator.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/OpenshiftUIActivator.java 2011-09-30 23:05:57 UTC (rev 35248)
@@ -0,0 +1,60 @@
+package org.jboss.ide.eclipse.as.openshift.ui.internal;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class OpenshiftUIActivator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.ide.eclipse.as.openshift.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static OpenshiftUIActivator plugin;
+
+ /**
+ * The constructor
+ */
+ public OpenshiftUIActivator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static OpenshiftUIActivator getDefault() {
+ return plugin;
+ }
+
+ public static void log(IStatus status) {
+ plugin.getLog().log(status);
+ }
+
+ public static void log(Throwable e) {
+ log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, e.getMessage(), e));
+ }
+
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/OpenshiftUIActivator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/common/ImageRepository.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/common/ImageRepository.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/common/ImageRepository.java 2011-09-30 23:05:57 UTC (rev 35248)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.ide.eclipse.as.openshift.ui.internal.common;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.osgi.util.NLS;
+import org.jboss.ide.eclipse.as.openshift.ui.internal.OpenshiftUIActivator;
+
+public class ImageRepository {
+
+ private ImageRegistry imageRegistry;
+ private URL baseUrl;
+ private Plugin plugin;
+ private String imageFolder;
+
+ public ImageRepository(String imageFolder, Plugin plugin, ImageRegistry imageRegistry) {
+ this.imageFolder = imageFolder;
+ this.plugin = plugin;
+ this.imageRegistry = imageRegistry;
+ }
+
+ protected URL getBaseUrl() {
+ try {
+ if (baseUrl == null) {
+ this.baseUrl = new URL(plugin.getBundle().getEntry("/"), imageFolder);
+ }
+ return baseUrl;
+ } catch (MalformedURLException e) {
+ OpenshiftUIActivator.log(e);
+ return null;
+ }
+ }
+
+ public ImageDescriptor create(String name) {
+ return create(imageRegistry, name);
+ }
+
+ private ImageDescriptor create(ImageRegistry registry,String name) {
+ return create(registry, name, getBaseUrl());
+ }
+
+ private ImageDescriptor create(ImageRegistry registry, String name, URL baseUrl) {
+ if (baseUrl == null) {
+ return null;
+ }
+
+ ImageDescriptor imageDescriptor =
+ ImageDescriptor.createFromURL(createFileURL(name, baseUrl));
+ registry.put(name, imageDescriptor);
+ return imageDescriptor;
+ }
+
+ private URL createFileURL(String name, URL baseUrl) {
+ try {
+ return new URL(baseUrl, name);
+ } catch (MalformedURLException e) {
+ plugin.getLog().log(
+ new Status(IStatus.ERROR, plugin.getBundle().getSymbolicName(), NLS.bind(
+ "Could not create URL for image {0}", name), e));
+ return null;
+ }
+ }
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/common/ImageRepository.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/AbstractOpenshiftWizardPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/AbstractOpenshiftWizardPage.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/AbstractOpenshiftWizardPage.java 2011-09-30 23:05:57 UTC (rev 35248)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * 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.ide.eclipse.as.openshift.ui.internal.wizard;
+
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.jboss.ide.eclipse.as.openshift.ui.internal.OpenshiftImages;
+import org.jboss.tools.common.ui.databinding.ParametrizableWizardPageSupport;
+
+/**
+ * @author André Dietisheim
+ */
+public abstract class AbstractOpenshiftWizardPage extends WizardPage {
+
+ protected ServerAdapterWizardModel model;
+
+ protected AbstractOpenshiftWizardPage(String title, String description, String pageName, IWizard wizard, ServerAdapterWizardModel model) {
+ super(pageName);
+ this.model = model;
+ setWizard(wizard);
+ setTitle(title);
+ setDescription(description);
+ setImageDescriptor(OpenshiftImages.OPENSHIFT_LOGO_WHITE);
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ DataBindingContext dbc = new DataBindingContext();
+ ParametrizableWizardPageSupport.create(
+ IStatus.ERROR | IStatus.INFO | IStatus.WARNING | IStatus.CANCEL, this,
+ dbc);
+ Composite container = new Composite(parent, SWT.NONE);
+ setControl(container);
+ doCreateControls(container, dbc);
+ }
+
+ protected abstract void doCreateControls(Composite parent, DataBindingContext dbc);
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/AbstractOpenshiftWizardPage.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ApplicationWizardPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ApplicationWizardPage.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ApplicationWizardPage.java 2011-09-30 23:05:57 UTC (rev 35248)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.ide.eclipse.as.openshift.ui.internal.wizard;
+
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author André Dietisheim
+ */
+public class ApplicationWizardPage extends AbstractOpenshiftWizardPage {
+
+ protected ApplicationWizardPage(IWizard wizard, ServerAdapterWizardModel model) {
+ super("Application selection", "Please select an Openshift Express application to use", "Application selection", wizard, model);
+ }
+
+ @Override
+ protected void doCreateControls(Composite container, DataBindingContext dbc) {
+ GridLayoutFactory.fillDefaults().numColumns(1).margins(10, 10).applyTo(container);
+
+ }
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ApplicationWizardPage.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizard.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizard.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizard.java 2011-09-30 23:05:57 UTC (rev 35248)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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.ide.eclipse.as.openshift.ui.internal.wizard;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+/**
+ * @author André Dietisheim
+ */
+public class ServerAdapterWizard extends Wizard implements INewWizard {
+
+ public ServerAdapterWizard() {
+ }
+
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ setWindowTitle("Create new Openshift Express Server Adapter");
+ setNeedsProgressMonitor(true);
+ }
+
+ @Override
+ public boolean performFinish() {
+ return true;
+ }
+
+ @Override
+ public void addPages() {
+ ServerAdapterWizardModel model = new ServerAdapterWizardModel();
+ addPage(new ServerWizardPage(this, model));
+ addPage(new ApplicationWizardPage(this, model));
+ }
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizard.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizardModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizardModel.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizardModel.java 2011-09-30 23:05:57 UTC (rev 35248)
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * 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.ide.eclipse.as.openshift.ui.internal.wizard;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.jboss.ide.eclipse.as.openshift.core.IOpenshiftService;
+import org.jboss.ide.eclipse.as.openshift.core.IUser;
+import org.jboss.ide.eclipse.as.openshift.core.OpenshiftException;
+import org.jboss.ide.eclipse.as.openshift.core.User;
+import org.jboss.ide.eclipse.as.openshift.ui.internal.OpenshiftUIActivator;
+import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
+
+/**
+ * @author André Dietisheim
+ */
+public class ServerAdapterWizardModel extends ObservableUIPojo {
+
+ public static final String PROPERTY_SERVER_URL = "serverUrl";
+ public static final String PROPERTY_RHLOGIN = "rhLogin";
+ public static final String PROPERTY_PASSWORD = "password";
+ public static final String PROPERTY_CREDENTIALSVALIDITY = "credentialsValidity";
+
+ private String serverUrl;
+ private String rhLogin;
+ private String password;
+ private IStatus credentialsValidity;
+
+ public ServerAdapterWizardModel() {
+ this.serverUrl = IOpenshiftService.BASE_URL;
+ }
+
+ public String getServerUrl() {
+ return serverUrl;
+ }
+
+ public void setServerUrl(String serverUrl) {
+ firePropertyChange(PROPERTY_SERVER_URL, this.serverUrl, this.serverUrl = serverUrl);
+ }
+
+ public String getRhLogin() {
+ return rhLogin;
+ }
+
+ public void setRhLogin(String rhLogin) {
+ firePropertyChange(PROPERTY_RHLOGIN, this.rhLogin, this.rhLogin = rhLogin);
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ firePropertyChange(PROPERTY_PASSWORD, this.password, this.password = password);
+ }
+
+ private void setCredentialsStatus(IStatus status) {
+ firePropertyChange(PROPERTY_CREDENTIALSVALIDITY, this.credentialsValidity,
+ this.credentialsValidity = status);
+ }
+
+ public IStatus getCredentialsValidity() {
+ return credentialsValidity;
+ }
+
+ public void validateCredentials() {
+ IStatus status = new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID, "Your credentails are not valid.");
+ try {
+ IUser user = new User(getRhLogin(), getPassword());
+ if(user.isValid()) {
+ status = Status.OK_STATUS;
+ }
+ } catch (OpenshiftException e) {
+ // do nothing
+ }
+ setCredentialsStatus(status);
+ }
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizardModel.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerWizardPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerWizardPage.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerWizardPage.java 2011-09-30 23:05:57 UTC (rev 35248)
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * 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.ide.eclipse.as.openshift.ui.internal.wizard;
+
+import org.eclipse.core.databinding.AggregateValidationStatus;
+import org.eclipse.core.databinding.Binding;
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.UpdateValueStrategy;
+import org.eclipse.core.databinding.ValidationStatusProvider;
+import org.eclipse.core.databinding.beans.BeanProperties;
+import org.eclipse.core.databinding.observable.IObservableCollection;
+import org.eclipse.core.databinding.observable.list.WritableList;
+import org.eclipse.core.databinding.observable.value.WritableValue;
+import org.eclipse.core.databinding.validation.IValidator;
+import org.eclipse.core.databinding.validation.ValidationStatus;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Text;
+import org.jboss.ide.eclipse.as.openshift.ui.internal.OpenshiftUIActivator;
+import org.jboss.tools.common.ui.BrowserUtil;
+import org.jboss.tools.common.ui.WizardUtils;
+import org.jboss.tools.common.ui.databinding.MandatoryStringValidator;
+import org.jboss.tools.common.ui.databinding.Status2BooleanConverter;
+
+/**
+ * @author André Dietisheim
+ */
+public class ServerWizardPage extends AbstractOpenshiftWizardPage {
+
+ protected static final String OPENSHIFT_EXPRESS_SIGNUP_URL = "https://openshift.redhat.com/app/user/new/express"; //$NON-NLS-1$
+
+ private Button validateButton;
+
+ public ServerWizardPage(IWizard wizard, ServerAdapterWizardModel model) {
+ super("Server connetion", "Please provide the credentails of your user account on Openshift Express", "Server Connection", wizard, model);
+ this.model = model;
+ }
+
+ protected void doCreateControls(Composite container, DataBindingContext dbc) {
+ GridLayoutFactory.fillDefaults().numColumns(3).margins(10, 10).applyTo(container);
+
+ Link signupLink = new Link(container, SWT.WRAP);
+ signupLink.setText("If you have no user account on Openshit Express yet, please sign up <a>here</a>.");
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).span(3, 1).hint(SWT.DEFAULT, 30).applyTo(signupLink);
+ signupLink.addSelectionListener(onSignupLinkClicked());
+
+ // Label serverUrlLabel = new Label(container, SWT.NONE);
+ // serverUrlLabel.setText("Server URL");
+ // GridDataFactory.fillDefaults().align(SWT.LEFT,
+ // SWT.CENTER).applyTo(serverUrlLabel);
+ // Text serverUrlText = new Text(container, SWT.BORDER);
+ // GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true,
+ // false).span(2, 1).applyTo(serverUrlText);
+ // dbc.bindValue(
+ // WidgetProperties.text(SWT.Modify).observe(serverUrlText),
+ // BeanProperties.value(
+ // ServerAdapterWizardModel.class,
+ // ServerAdapterWizardModel.PROPERTY_SERVER_URL).observe(model),
+ // new UpdateValueStrategy()
+ // .setAfterGetValidator(new
+ // MandatoryStringValidator("You have to provide a value for the server url."))
+ // .setBeforeSetValidator(new SimpleUrlStringValidator())
+ // .setConverter(new TrimTrailingSlashConverter()),
+ // null);
+
+ Label rhLoginLabel = new Label(container, SWT.NONE);
+ rhLoginLabel.setText("&Username");
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(rhLoginLabel);
+ Text rhLoginText = new Text(container, SWT.BORDER);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(2, 1).applyTo(rhLoginText);
+ Binding rhLoginBining = bindMandatoryTextField(
+ rhLoginText, "Username", ServerAdapterWizardModel.PROPERTY_RHLOGIN, model, dbc);
+
+ Label passwordLabel = new Label(container, SWT.NONE);
+ passwordLabel.setText("&Password");
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(passwordLabel);
+ Text passwordText = new Text(container, SWT.BORDER | SWT.PASSWORD);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(2, 1).applyTo(passwordText);
+ Binding passwordBinding = bindMandatoryTextField(
+ passwordText, "Password", ServerAdapterWizardModel.PROPERTY_PASSWORD, model, dbc);
+
+ Label spacerLabel = new Label(container, SWT.None);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).span(2, 1).applyTo(spacerLabel);
+
+ // Label credentialsValidatyLabel = new Label(container, SWT.None);
+ // GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).hint(64,
+ // 64).applyTo(credentialsValidatyLabel);
+
+ this.validateButton = new Button(container, SWT.NONE);
+ validateButton.setText("&Validate");
+ GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).indent(0, 10).hint(100, 34).applyTo(validateButton);
+ bindValidateButtonEnablement(validateButton, dbc, toObservableCollection(rhLoginBining, passwordBinding));
+ validateButton.addSelectionListener(onValidate(dbc));
+ dbc.bindValue(
+ new WritableValue(null, IStatus.class),
+ BeanProperties.value(ServerAdapterWizardModel.PROPERTY_CREDENTIALSVALIDITY).observe(model),
+ new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER),
+ new UpdateValueStrategy().setAfterGetValidator(
+ new CredentialsStatusValidator()));
+ }
+
+ protected SelectionAdapter onValidate(final DataBindingContext dbc) {
+ return new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ try {
+ WizardUtils.runInWizard(
+ new Job("Testing user credentials") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ model.validateCredentials();
+ return Status.OK_STATUS;
+ }
+ }, getWizard().getContainer(), dbc);
+ } catch (Exception ex) {
+ // ignore
+ }
+ };
+ };
+ }
+
+ protected SelectionAdapter onSignupLinkClicked() {
+ return new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ BrowserUtil.checkedCreateInternalBrowser(OPENSHIFT_EXPRESS_SIGNUP_URL, OPENSHIFT_EXPRESS_SIGNUP_URL,
+ OpenshiftUIActivator.PLUGIN_ID, OpenshiftUIActivator.getDefault().getLog());
+ getWizard().getContainer().getShell().close();
+ }
+ };
+ }
+
+ private Binding bindMandatoryTextField(Text text, String fieldName, String modelProperty,
+ ServerAdapterWizardModel model,
+ DataBindingContext dbc) {
+ Binding binding = dbc.bindValue(
+ WidgetProperties.text(SWT.Modify).observe(text),
+ BeanProperties.value(modelProperty).observe(model),
+ new UpdateValueStrategy().setAfterGetValidator(
+ new MandatoryStringValidator(NLS.bind("You have to provide a value for the {0}.", fieldName))),
+ null);
+ ControlDecorationSupport.create(binding, SWT.LEFT | SWT.TOP);
+ return binding;
+ }
+
+ private void bindValidateButtonEnablement(final Button testButton, DataBindingContext dbc,
+ IObservableCollection validationStatusProviders) {
+ dbc.bindValue(
+ WidgetProperties.enabled().observe(testButton),
+ new AggregateValidationStatus(validationStatusProviders, AggregateValidationStatus.MAX_SEVERITY),
+ new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER),
+ new UpdateValueStrategy().setConverter(new Status2BooleanConverter(IStatus.ERROR)));
+ }
+
+ protected IObservableCollection toObservableCollection(ValidationStatusProvider... validationStatusProviders) {
+ WritableList validationProviders = new WritableList();
+ for (ValidationStatusProvider provider : validationStatusProviders) {
+ validationProviders.add(provider);
+ }
+ return validationProviders;
+ }
+
+ private static class CredentialsStatusValidator implements IValidator {
+ public IStatus validate(Object value) {
+ if (value instanceof IStatus) {
+ int currentSeverity = ((IStatus) value).getSeverity();
+ if (currentSeverity < IStatus.ERROR) {
+ return ValidationStatus.ok();
+ }
+ } else if (value == null) {
+ return ValidationStatus.info("You have to validate your credentials");
+ }
+ return ValidationStatus.error("The given credentials are not valid");
+ }
+ }
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerWizardPage.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/TrimTrailingSlashConverter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/TrimTrailingSlashConverter.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/TrimTrailingSlashConverter.java 2011-09-30 23:05:57 UTC (rev 35248)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.ide.eclipse.as.openshift.ui.internal.wizard;
+
+import org.eclipse.core.databinding.conversion.Converter;
+import org.eclipse.core.runtime.Assert;
+
+/**
+ * @author André Dietisheim
+ */
+public class TrimTrailingSlashConverter extends Converter {
+
+ public TrimTrailingSlashConverter() {
+ super(String.class, String.class);
+ }
+
+ @Override
+ public Object convert(Object fromObject) {
+ Assert.isLegal(fromObject instanceof String);
+ String url = (String) fromObject;
+ if (url.charAt(url.length() - 1) == '/') {
+ return url.substring(0, url.length() - 1);
+ }
+ return url;
+ }
+}
\ No newline at end of file
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/TrimTrailingSlashConverter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 3 months
JBoss Tools SVN: r35247 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/commands and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-09-30 19:04:48 -0400 (Fri, 30 Sep 2011)
New Revision: 35247
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/common/databinding/validator/MandatoryStringValidator.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/WizardUtils.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/ManageKeysHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
Log:
[JBIDE-9805] moved MandatoryStringValidator, WizardUtils, etc. to org.jboss.tools.common.ui
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2011-09-30 22:54:43 UTC (rev 35246)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2011-09-30 23:04:48 UTC (rev 35247)
@@ -29,4 +29,5 @@
org.jboss.tools.deltacloud.ui.preferences,
org.jboss.tools.deltacloud.ui.wizard,
org.jboss.tools.internal.deltacloud.ui.utils;x-friends:="org.jboss.tools.deltacloud.test,org.jboss.tools.deltacloud.integration"
-Import-Package: org.jboss.tools.common.ui.databinding
+Import-Package: org.jboss.tools.common.ui,
+ org.jboss.tools.common.ui.databinding
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java 2011-09-30 22:54:43 UTC (rev 35246)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java 2011-09-30 23:04:48 UTC (rev 35247)
@@ -20,8 +20,8 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
import org.jboss.tools.internal.deltacloud.ui.utils.WorkbenchUtils;
import org.jboss.tools.internal.deltacloud.ui.wizards.ImageFilterWizard;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java 2011-09-30 22:54:43 UTC (rev 35246)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java 2011-09-30 23:04:48 UTC (rev 35247)
@@ -20,8 +20,8 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
import org.jboss.tools.internal.deltacloud.ui.utils.WorkbenchUtils;
import org.jboss.tools.internal.deltacloud.ui.wizards.InstanceFilterWizard;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/ManageKeysHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/ManageKeysHandler.java 2011-09-30 22:54:43 UTC (rev 35246)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/ManageKeysHandler.java 2011-09-30 23:04:48 UTC (rev 35247)
@@ -20,8 +20,8 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
import org.jboss.tools.internal.deltacloud.ui.utils.WorkbenchUtils;
import org.jboss.tools.internal.deltacloud.ui.wizards.ManageKeysWizard;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java 2011-09-30 22:54:43 UTC (rev 35246)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java 2011-09-30 23:04:48 UTC (rev 35247)
@@ -19,7 +19,7 @@
import org.eclipse.ui.IWorkbenchWizard;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
-import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
+import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.internal.deltacloud.ui.utils.WorkbenchUtils;
import org.jboss.tools.internal.deltacloud.ui.wizards.NewCloudConnectionWizard;
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/common/databinding/validator/MandatoryStringValidator.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/common/databinding/validator/MandatoryStringValidator.java 2011-09-30 22:54:43 UTC (rev 35246)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/common/databinding/validator/MandatoryStringValidator.java 2011-09-30 23:04:48 UTC (rev 35247)
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.internal.deltacloud.ui.common.databinding.validator;
-
-import org.eclipse.core.databinding.validation.IValidator;
-import org.eclipse.core.databinding.validation.ValidationStatus;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A {@link IValidator} that validates ok if the string it shall validate is not empty.
- */
-public class MandatoryStringValidator implements IValidator {
-
- private String errorMessage;
-
- public MandatoryStringValidator(String errorMessage) {
- this.errorMessage = errorMessage;
- }
-
- /**
- *
- * validates the given string. Validation passes only if the given value is
- * not <tt>null</tt> and it's length's larger than 0
- *
- */
- public IStatus validate(Object value) {
- if (!((value instanceof String) && ((String) value).length() > 0)) {
- return ValidationStatus.error(errorMessage);
- }
- return ValidationStatus.ok();
- }
-}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/WizardUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/WizardUtils.java 2011-09-30 22:54:43 UTC (rev 35246)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/WizardUtils.java 2011-09-30 23:04:48 UTC (rev 35247)
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.internal.deltacloud.ui.utils;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.concurrent.CountDownLatch;
-
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardContainer;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author André Dietisheim
- */
-public class WizardUtils {
-
- /**
- * Runs the given job in the given wizard container. In order to have the
- * wizard displaying a progress bar, you need to set
- * Wizard#setNeedsProgressMonitor to <code>true</code>.
- *
- *
- * @param job
- * the job to run
- * @param container
- * the wizard container to run the job in
- * @throws InvocationTargetException
- * the invocation target exception
- * @throws InterruptedException
- * the interrupted exception
- *
- * @author André Dietisheim
- *
- * @see IWizardContainer#run(boolean, boolean, IRunnableWithProgress)
- * @see Job
- */
- public static void runInWizard(final Job job, IWizardContainer container) throws InvocationTargetException,
- InterruptedException {
- container.run(true, false, new IRunnableWithProgress() {
- @Override
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- monitor.beginTask(job.getName(), IProgressMonitor.UNKNOWN);
- final CountDownLatch latch = new CountDownLatch(1);
- job.addJobChangeListener(new JobChangeAdapter() {
-
- @Override
- public void done(IJobChangeEvent event) {
- latch.countDown();
- }
- });
- job.schedule();
- latch.await();
- monitor.done();
- }
- });
- }
-
- /**
- * Runs the given job in the given wizard container.
- * <p>
- * Furhtermore it updates the models and targets of the given data binding
- * context. This might be necessary if the given job will change widget
- * enablements in the calling wizard page. The reason for is that the runner
- * saves the widget enablement states when it's up to execute the runnable.
- * It then restores those states once he finished executing the runnable. It
- * may therefore restore incorrect states since the job changed the
- * enablements when it was run.
- *
- * @param job
- * the job
- * @param container
- * the container
- * @param dbc
- * the dbc
- * @throws InvocationTargetException
- * the invocation target exception
- * @throws InterruptedException
- * the interrupted exception
- */
- public static void runInWizard(final Job job, IWizardContainer container, final DataBindingContext dbc)
- throws InvocationTargetException, InterruptedException {
- runInWizard(job, container);
- dbc.updateTargets();
- dbc.updateModels();
- }
-
- /**
- * Flips to the next wizard page or finishes the current wizard.
- *
- * @param wizardPage
- * the wizard page this call is executed in
- */
- public static void nextPageOrFinish(IWizardPage wizardPage) {
- IWizard wizard = wizardPage.getWizard();
- if (wizardPage.canFlipToNextPage()) {
- IWizardPage nextPage = wizard.getNextPage(wizardPage);
- wizard.getContainer().showPage(nextPage);
- } else if (wizard.canFinish()) {
- if (wizard.performFinish()) {
- wizard.getContainer().getShell().close();
- }
- }
- }
-
- public static void openWizardDialog(IWizard wizard, Shell shell) {
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2011-09-30 22:54:43 UTC (rev 35246)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2011-09-30 23:04:48 UTC (rev 35247)
@@ -56,6 +56,7 @@
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.common.log.LogHelper;
+import org.jboss.tools.common.ui.databinding.MandatoryStringValidator;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudDriver;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
@@ -65,7 +66,6 @@
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
import org.jboss.tools.deltacloud.ui.preferences.StringPreferenceValue;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.CompositeValidator;
-import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.MandatoryStringValidator;
import org.jboss.tools.internal.deltacloud.ui.common.swt.JFaceUtils;
import org.jboss.tools.internal.deltacloud.ui.utils.ControlDecorationAdapter;
import org.jboss.tools.internal.deltacloud.ui.utils.DataBindingUtils;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java 2011-09-30 22:54:43 UTC (rev 35246)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java 2011-09-30 23:04:48 UTC (rev 35247)
@@ -16,13 +16,13 @@
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbench;
+import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudDriver;
import org.jboss.tools.deltacloud.core.job.AbstractCloudJob;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
import org.jboss.tools.deltacloud.ui.preferences.StringPreferenceValue;
-import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
/**
* @author Jeff Johnston
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2011-09-30 22:54:43 UTC (rev 35246)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2011-09-30 23:04:48 UTC (rev 35247)
@@ -39,6 +39,7 @@
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
+import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudImage;
@@ -51,7 +52,6 @@
import org.jboss.tools.deltacloud.ui.views.Columns.Column;
import org.jboss.tools.deltacloud.ui.views.cloudelements.ITableContentAndLabelProvider;
import org.jboss.tools.deltacloud.ui.views.cloudelements.TableViewerColumnComparator;
-import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
/**
* @author Jeff Johnston
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-09-30 22:54:43 UTC (rev 35246)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-09-30 23:04:48 UTC (rev 35247)
@@ -51,6 +51,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.common.log.StatusFactory;
+import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudKey;
@@ -61,7 +62,6 @@
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.ObjectNotNullToBoolean;
import org.jboss.tools.internal.deltacloud.ui.utils.LayoutUtils;
-import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
/**
* @author Jeff Johnston
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2011-09-30 22:54:43 UTC (rev 35246)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2011-09-30 23:04:48 UTC (rev 35247)
@@ -19,6 +19,7 @@
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.jboss.tools.common.log.StatusFactory;
+import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudDriver;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
@@ -27,7 +28,6 @@
import org.jboss.tools.deltacloud.ui.ErrorUtils;
import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
import org.jboss.tools.deltacloud.ui.preferences.StringPreferenceValue;
-import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
/**
* @author Jeff Johnston
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-09-30 22:54:43 UTC (rev 35246)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-09-30 23:04:48 UTC (rev 35247)
@@ -63,6 +63,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.PreferencesUtil;
import org.jboss.tools.common.log.StatusFactory;
+import org.jboss.tools.common.ui.databinding.MandatoryStringValidator;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudHardwareProfile;
@@ -74,7 +75,6 @@
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
-import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.MandatoryStringValidator;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.SelectedComboItemValidator;
import org.jboss.tools.internal.deltacloud.ui.utils.DataBindingUtils;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
13 years, 3 months
JBoss Tools SVN: r35246 - in trunk/cdi/tests/org.jboss.tools.cdi.ui.test: src/org/jboss/tools/cdi/ui/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-09-30 18:54:43 -0400 (Fri, 30 Sep 2011)
New Revision: 35246
Added:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIRefactoringTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
Log:
Tests for org.jboss.tools.cdi.ui.refactoring package https://issues.jboss.org/browse/JBIDE-9791
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2011-09-30 22:32:04 UTC (rev 35245)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2011-09-30 22:54:43 UTC (rev 35246)
@@ -31,5 +31,6 @@
org.eclipse.wst.validation;bundle-version="1.2.300",
org.jboss.tools.jst.web.kb.test,
org.jboss.tools.common.validation,
- org.jboss.tools.jst.jsp
+ org.jboss.tools.jst.jsp,
+ org.eclipse.ltk.ui.refactoring;bundle-version="3.6.0"
Export-Package: org.jboss.tools.cdi.ui.test
Added: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIRefactoringTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIRefactoringTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIRefactoringTest.java 2011-09-30 22:54:43 UTC (rev 35246)
@@ -0,0 +1,38 @@
+package org.jboss.tools.cdi.ui.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.ltk.core.refactoring.participants.RenameRefactoring;
+import org.jboss.tools.cdi.internal.core.refactoring.RenameNamedBeanProcessor;
+import org.jboss.tools.cdi.ui.refactoring.CDIRefactorContributionFactory;
+import org.jboss.tools.cdi.ui.refactoring.RenameNamedBeanWizard;
+import org.jboss.tools.cdi.ui.test.testmodel.CDIBean;
+import org.jboss.tools.cdi.ui.test.testmodel.CDIProject;
+
+public class CDIRefactoringTest extends TestCase {
+ public void testCDIRefactorContributionFactory(){
+ String location = "location";
+ String namespace = "namespace";
+ CDIRefactorContributionFactory factory = new CDIRefactorContributionFactory(location, namespace);
+
+ assertEquals("CDIRefactorContributionFactory returns wrong location", location, factory.getLocation());
+
+ assertEquals("CDIRefactorContributionFactory returns wrong namespace", namespace, factory.getNamespace());
+ }
+
+ public void testRenameNamedBeanWizard(){
+ CDIProject project = new CDIProject();
+ CDIBean bean = new CDIBean(project, "org.test.CustomBean");
+ RenameNamedBeanProcessor processor = new RenameNamedBeanProcessor(bean);
+ //processor.setNewName("CustomMyBean");
+ RenameRefactoring refactoring = new RenameRefactoring(processor);
+
+ RenameNamedBeanWizard wizard = new RenameNamedBeanWizard(refactoring, bean);
+
+ assertEquals("RenameNamedBeanWizard returns wrong refactoring",refactoring, wizard.getRefactoring());
+
+ String title = "Title";
+ wizard.setWindowTitle(title);
+ assertEquals("RenameNamedBeanWizard returns wrong title",title, wizard.getWindowTitle());
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIRefactoringTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2011-09-30 22:32:04 UTC (rev 35245)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2011-09-30 22:54:43 UTC (rev 35246)
@@ -61,6 +61,8 @@
suiteAll.addTest(new CDICoreTestSetup(suite));
suiteAll.addTestSuite(AddQualifiersToBeanWizardTest.class);
+
+ suiteAll.addTestSuite(CDIRefactoringTest.class);
return suiteAll;
}
13 years, 3 months
JBoss Tools SVN: r35245 - in trunk: cdi/tests and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-09-30 18:32:04 -0400 (Fri, 30 Sep 2011)
New Revision: 35245
Modified:
trunk/build/pom.xml
trunk/cdi/tests/pom.xml
trunk/vpe/tests/pom.xml
Log:
profiles with coverage now are activated by different properties so it would not end up with dublicate artifacts error
Modified: trunk/build/pom.xml
===================================================================
--- trunk/build/pom.xml 2011-09-30 20:17:36 UTC (rev 35244)
+++ trunk/build/pom.xml 2011-09-30 22:32:04 UTC (rev 35245)
@@ -18,16 +18,6 @@
-->
<profile>
- <id>parent</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <modules>
- <module>parent</module>
- </modules>
- </profile>
-
- <profile>
<id>libs</id>
<activation>
<activeByDefault>true</activeByDefault>
Modified: trunk/cdi/tests/pom.xml
===================================================================
--- trunk/cdi/tests/pom.xml 2011-09-30 20:17:36 UTC (rev 35244)
+++ trunk/cdi/tests/pom.xml 2011-09-30 22:32:04 UTC (rev 35245)
@@ -18,7 +18,7 @@
<id>cdi-tests-libs</id>
<activation>
<property>
- <name>coverage</name>
+ <name>cdi-coverage</name>
</property>
</activation>
<modules>
@@ -31,7 +31,7 @@
<activation>
<activeByDefault>true</activeByDefault>
<property>
- <name>coverage</name>
+ <name>cdi-coverage</name>
</property>
</activation>
<modules>
Modified: trunk/vpe/tests/pom.xml
===================================================================
--- trunk/vpe/tests/pom.xml 2011-09-30 20:17:36 UTC (rev 35244)
+++ trunk/vpe/tests/pom.xml 2011-09-30 22:32:04 UTC (rev 35245)
@@ -17,7 +17,7 @@
<id>vpe-tests-libs</id>
<activation>
<property>
- <name>coverage</name>
+ <name>vpe-coverage</name>
</property>
</activation>
<modules>
@@ -30,7 +30,7 @@
<activation>
<activeByDefault>true</activeByDefault>
<property>
- <name>coverage</name>
+ <name>vpe-coverage</name>
</property>
</activation>
<modules>
@@ -49,7 +49,7 @@
<id>vpe-tests-coverage-report</id>
<activation>
<property>
- <name>coverage</name>
+ <name>vpe-coverage</name>
</property>
</activation>
<modules>
13 years, 3 months
JBoss Tools SVN: r35243 - in branches/jbosstools-3.2.x/esb/tests/org.jboss.tools.esb.core.test: src/org/jboss/tools/esb/core/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-09-30 16:13:15 -0400 (Fri, 30 Sep 2011)
New Revision: 35243
Added:
branches/jbosstools-3.2.x/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.3/jboss-esb-bpel.xml
Modified:
branches/jbosstools-3.2.x/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java
Log:
JBIDE-9771
https://issues.jboss.org/browse/JBIDE-9771
Test is added. (merged to branch 3.2.x)
Added: branches/jbosstools-3.2.x/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.3/jboss-esb-bpel.xml
===================================================================
--- branches/jbosstools-3.2.x/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.3/jboss-esb-bpel.xml (rev 0)
+++ branches/jbosstools-3.2.x/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.3/jboss-esb-bpel.xml 2011-09-30 20:13:15 UTC (rev 35243)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<jbossesb
+ xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml..."
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml... http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schem...">
+ <services>
+ <service category="c" description="d" name="s">
+ <actions>
+ <action class="org.jboss.soa.esb.actions.bpel.BPELInvoke" name="action2">
+ <property name="service" value="{http://www.jboss.org/bpel/examples/wsdl}HelloService"/>
+ <property name="operation" value="hello"/>
+ <property name="port" value="HelloPort"/>
+ <property name="requestPartName" value="TestPart"/>
+ <property name="responsePartName" value="TestPart"/>
+ </action>
+ </actions>
+ </service>
+ </services>
+</jbossesb>
Property changes on: branches/jbosstools-3.2.x/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.3/jboss-esb-bpel.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: branches/jbosstools-3.2.x/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java
===================================================================
--- branches/jbosstools-3.2.x/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java 2011-09-30 20:11:02 UTC (rev 35242)
+++ branches/jbosstools-3.2.x/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java 2011-09-30 20:13:15 UTC (rev 35243)
@@ -339,7 +339,15 @@
public void testRiftsawBPELExample() {
XModelObject object = getFileObject("esb-1.2", "jboss-esb-bpel.xml", ESBConstants.ENT_ESB_FILE_120);
+ assertNotNull(object);
+ doTestRiftsawBPELExample(object);
+ object = getFileObject("esb-1.3", "jboss-esb-bpel.xml", ESBConstants.ENT_ESB_FILE_130);
+ assertNotNull(object);
+ doTestRiftsawBPELExample(object);
+ }
+
+ public void doTestRiftsawBPELExample(XModelObject object) {
StringBuffer errorList = new StringBuffer();
String bpelActionPath = "Services/s/Actions/action2";
13 years, 3 months
JBoss Tools SVN: r35242 - in trunk/esb/tests/org.jboss.tools.esb.core.test: src/org/jboss/tools/esb/core/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-09-30 16:11:02 -0400 (Fri, 30 Sep 2011)
New Revision: 35242
Added:
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.3/jboss-esb-bpel.xml
Modified:
trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java
Log:
JBIDE-9771
https://issues.jboss.org/browse/JBIDE-9771
Test is added.
Added: trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.3/jboss-esb-bpel.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.3/jboss-esb-bpel.xml (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.3/jboss-esb-bpel.xml 2011-09-30 20:11:02 UTC (rev 35242)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<jbossesb
+ xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml..."
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml... http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schem...">
+ <services>
+ <service category="c" description="d" name="s">
+ <actions>
+ <action class="org.jboss.soa.esb.actions.bpel.BPELInvoke" name="action2">
+ <property name="service" value="{http://www.jboss.org/bpel/examples/wsdl}HelloService"/>
+ <property name="operation" value="hello"/>
+ <property name="port" value="HelloPort"/>
+ <property name="requestPartName" value="TestPart"/>
+ <property name="responsePartName" value="TestPart"/>
+ </action>
+ </actions>
+ </service>
+ </services>
+</jbossesb>
Property changes on: trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.3/jboss-esb-bpel.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java 2011-09-30 19:49:28 UTC (rev 35241)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java 2011-09-30 20:11:02 UTC (rev 35242)
@@ -339,7 +339,15 @@
public void testRiftsawBPELExample() {
XModelObject object = getFileObject("esb-1.2", "jboss-esb-bpel.xml", ESBConstants.ENT_ESB_FILE_120);
+ assertNotNull(object);
+ doTestRiftsawBPELExample(object);
+ object = getFileObject("esb-1.3", "jboss-esb-bpel.xml", ESBConstants.ENT_ESB_FILE_130);
+ assertNotNull(object);
+ doTestRiftsawBPELExample(object);
+ }
+
+ public void doTestRiftsawBPELExample(XModelObject object) {
StringBuffer errorList = new StringBuffer();
String bpelActionPath = "Services/s/Actions/action2";
13 years, 3 months
JBoss Tools SVN: r35241 - trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-09-30 15:49:28 -0400 (Fri, 30 Sep 2011)
New Revision: 35241
Added:
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/Messages.java
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/messages.properties
Modified:
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/ELProposalProcessor.java
Log:
JBIDE-9792
EL Content Assistant for java files should show sources of El elements as it does for jsp files.
Displaying text and an additional information are fixed over the EL proposals for Java Editor
Modified: trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/ELProposalProcessor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/ELProposalProcessor.java 2011-09-30 19:35:29 UTC (rev 35240)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/ELProposalProcessor.java 2011-09-30 19:49:28 UTC (rev 35241)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * Copyright (c) 2007-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,
@@ -11,13 +11,23 @@
package org.jboss.tools.common.el.ui.ca;
+import java.io.Reader;
+import java.io.StringReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.text.javadoc.JavadocContentAccess2;
+import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks;
+import org.eclipse.jdt.ui.JavaElementLabels;
import org.eclipse.jdt.ui.PreferenceConstants;
+import org.eclipse.jface.internal.text.html.HTMLPrinter;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.DocumentEvent;
@@ -46,6 +56,7 @@
import org.eclipse.wst.xml.ui.internal.util.SharedXMLEditorPluginImageHelper;
import org.jboss.tools.common.el.core.ELReference;
import org.jboss.tools.common.el.core.ca.AbstractELCompletionEngine;
+import org.jboss.tools.common.el.core.ca.ELTextProposal;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELResolver;
@@ -77,6 +88,9 @@
private final String fNewPrefix;
private final int fOffset;
private int fNewPosition;
+ private String fDisplayString;
+ private String fAdditionalProposalInfo;
+ private IJavaElement[] fJavaElements;
private Image fImage;
@@ -85,24 +99,29 @@
}
public Proposal(String string, String prefix, int offset, int newPosition) {
- this(string, prefix, prefix, offset, offset + string.length(), null);
+ this(string, prefix, prefix, offset, offset + string.length(), null, null, null, null);
}
- public Proposal(String string, String prefix, int offset, int newPosition, Image image) {
- this(string, prefix, prefix, offset, offset + string.length(), image);
+ public Proposal(String string, String prefix, int offset, int newPosition, Image image, String displayString, String additionalProposalInfo, IJavaElement[] javaElements) {
+ this(string, prefix, prefix, offset, offset + string.length(), image, displayString, additionalProposalInfo, javaElements);
}
public Proposal(String string, String prefix, String newPrefix, int offset, int newPosition) {
- this(string, prefix, newPrefix, offset, newPosition, null);
+ this(string, prefix, newPrefix, offset, newPosition, null, null, null, null);
}
- public Proposal(String string, String prefix, String newPrefix, int offset, int newPosition, Image image) {
+ public Proposal(String string, String prefix, String newPrefix, int offset, int newPosition, Image image, String displayString, String additionalProposalInfo, IJavaElement[] javaElements) {
fString = string;
fPrefix = prefix;
fNewPrefix = newPrefix;
fOffset = offset;
fNewPosition = newPosition;
fImage = image;
+ fDisplayString = displayString;
+ fAdditionalProposalInfo = additionalProposalInfo;
+ fJavaElements = javaElements;
+ if (fJavaElements != null && fJavaElements.length > 0)
+ fAdditionalProposalInfo = null; // Drop it due to valculate it later based on java elements
}
/*
@@ -123,13 +142,147 @@
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
*/
public String getAdditionalProposalInfo() {
+ if (fAdditionalProposalInfo == null) {
+ if (this.fJavaElements != null && this.fJavaElements.length > 0) {
+ this.fAdditionalProposalInfo = extractProposalContextInfo(fJavaElements);
+ }
+ }
+ if (fAdditionalProposalInfo == null)
+ fAdditionalProposalInfo = ""; // This is to prevent repeat of extracting Java Info //$NON-NLS-1$
+ return fAdditionalProposalInfo;
+ }
+
+ /*
+ * Extracts the additional proposal information based on Javadoc for the stored IJavaElement objects
+ */
+ private String extractProposalContextInfo(IJavaElement[] elements) {
+ int nResults= elements.length;
+ StringBuffer buffer= new StringBuffer();
+ boolean hasContents= false;
+ IJavaElement element= null;
+
+ if (nResults > 1) {
+ /* for (int i= 0; i < elements.length; i++) {
+ if (elements[i] == null) continue;
+ if (elements[i] instanceof IMember ||
+ elements[i].getElementType() == IJavaElement.LOCAL_VARIABLE ||
+ elements[i].getElementType() == IJavaElement.TYPE_PARAMETER) {
+ buffer.append('\uE467').append(' ').append(getInfoText(elements[i]));
+ hasContents= true;
+ }
+ buffer.append("<br/>"); //$NON-NLS-1$
+ }
+ */
+ for (int i=0; i < elements.length; i++) {
+ if (elements[i] == null) continue;
+ if (elements[i] instanceof IMember ||
+ elements[i].getElementType() == IJavaElement.LOCAL_VARIABLE ||
+ elements[i].getElementType() == IJavaElement.TYPE_PARAMETER) {
+ buffer.append('\uE467').append(' ');
+ addFullInfo(buffer, elements[i]);
+ buffer.append("<br/>"); //$NON-NLS-1$
+ hasContents = true;
+ }
+ }
+ } else {
+ element= elements[0];
+ if (element instanceof IMember ||
+ element.getElementType() == IJavaElement.LOCAL_VARIABLE ||
+ element.getElementType() == IJavaElement.TYPE_PARAMETER) {
+ addFullInfo(buffer, element);
+ hasContents= true;
+ }
+ }
+
+ if (!hasContents)
+ return null;
+
+ if (buffer.length() > 0) {
+ HTMLPrinter.insertPageProlog(buffer, 0, (String)null);
+ HTMLPrinter.addPageEpilog(buffer);
+ return buffer.toString();
+ }
+
return null;
}
+ private static final long LABEL_FLAGS= JavaElementLabels.ALL_FULLY_QUALIFIED
+ | JavaElementLabels.M_PRE_RETURNTYPE | JavaElementLabels.M_PARAMETER_TYPES | JavaElementLabels.M_PARAMETER_NAMES | JavaElementLabels.M_EXCEPTIONS
+ | JavaElementLabels.F_PRE_TYPE_SIGNATURE | JavaElementLabels.M_PRE_TYPE_PARAMETERS | JavaElementLabels.T_TYPE_PARAMETERS
+ | JavaElementLabels.USE_RESOLVED;
+ private static final long LOCAL_VARIABLE_FLAGS= LABEL_FLAGS & ~JavaElementLabels.F_FULLY_QUALIFIED | JavaElementLabels.F_POST_QUALIFIED;
+ private static final long TYPE_PARAMETER_FLAGS= LABEL_FLAGS | JavaElementLabels.TP_POST_QUALIFIED;
+
+ /*
+ * Returns the label for the IJavaElement objects
+ */
+ private String getInfoText(IJavaElement element) {
+ long flags;
+ switch (element.getElementType()) {
+ case IJavaElement.LOCAL_VARIABLE:
+ flags= LOCAL_VARIABLE_FLAGS;
+ break;
+ case IJavaElement.TYPE_PARAMETER:
+ flags= TYPE_PARAMETER_FLAGS;
+ break;
+ default:
+ flags= LABEL_FLAGS;
+ break;
+ }
+ StringBuffer label= new StringBuffer(JavaElementLinks.getElementLabel(element, flags));
+
+ // The following lines were commented out because of JBIDE-8923 faced in Eclipse 3.7
+ //
+// StringBuffer buf= new StringBuffer();
+// buf.append("<span style='word-wrap:break-word;'>"); //$NON-NLS-1$
+// buf.append(label);
+// buf.append("</span>"); //$NON-NLS-1$
+
+// return buf.toString();
+ return label.toString();
+ }
+
/*
+ * Adds full information to the additional proposal information
+ *
+ * @param buffer
+ * @param element
+ * @return
+ */
+ private void addFullInfo(StringBuffer buffer, IJavaElement element) {
+ if (element instanceof IMember) {
+ IMember member= (IMember) element;
+ HTMLPrinter.addSmallHeader(buffer, getInfoText(member));
+ Reader reader = null;
+ try {
+ String content= JavadocContentAccess2.getHTMLContent(member, true);
+ reader= content == null ? null : new StringReader(content);
+ } catch (JavaModelException ex) {
+ JavaPlugin.log(ex);
+ }
+
+ if (reader == null) {
+ reader = new StringReader(Messages.NO_JAVADOC);
+ }
+
+ if (reader != null) {
+ buffer.append("<br/>"); //$NON-NLS-1$
+ buffer.append(HTMLPrinter.read(reader));
+// HTMLPrinter.addParagraph(buffer, reader);
+ }
+
+ } else if (element.getElementType() == IJavaElement.LOCAL_VARIABLE || element.getElementType() == IJavaElement.TYPE_PARAMETER) {
+ HTMLPrinter.addSmallHeader(buffer, getInfoText(element));
+ }
+ }
+
+ /*
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
*/
public String getDisplayString() {
+ if (fDisplayString != null)
+ return fDisplayString;
+
String dispString = (fNewPrefix == null ? fPrefix : fNewPrefix) + fString;
if (dispString != null) {
if (dispString.indexOf('{') == -1
@@ -401,11 +554,19 @@
if (string.length() > 0 && ('#' == string.charAt(0) || '$' == string.charAt(0)))
string = elStartChar + string.substring(1);
+ String additionalProposalInfo = (kbProposal.getContextInfo() == null ? "" : kbProposal.getContextInfo()); //$NON-NLS-1$
+ IJavaElement[] javaElements = null;
+ if (kbProposal instanceof ELTextProposal) {
+ javaElements = ((ELTextProposal)kbProposal).getAllJavaElements();
+ }
+
if (string.startsWith("['") && string.endsWith("']") && prefix != null && prefix.endsWith(".")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
String newPrefix = prefix.substring(0, prefix.length() - 1);
- resultList.add(new Proposal(string, prefix, newPrefix, offset, offset - 1 + string.length() - proposalSufix.length(), image));
+ resultList.add(new Proposal(string, prefix, newPrefix, offset, offset - 1 + string.length() - proposalSufix.length(), image,
+ kbProposal.getLabel(), additionalProposalInfo, javaElements));
} else {
- resultList.add(new Proposal(string, prefix, offset, offset + string.length() - proposalSufix.length(), image));
+ resultList.add(new Proposal(string, prefix, offset, offset + string.length() - proposalSufix.length(), image,
+ kbProposal.getLabel(), additionalProposalInfo, javaElements));
}
}
}
Added: trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/Messages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/Messages.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/Messages.java 2011-09-30 19:49:28 UTC (rev 35241)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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.common.el.ui.ca;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ *
+ * @author jeremy
+ *
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.el.ui.ca.messages";//$NON-NLS-1$
+
+ private Messages() {
+ // Do not instantiate
+ }
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ public static String NO_JAVADOC;
+}
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/Messages.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/messages.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/messages.properties 2011-09-30 19:49:28 UTC (rev 35241)
@@ -0,0 +1 @@
+NO_JAVADOC=No Javadoc could be found<br>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/messages.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 3 months
JBoss Tools SVN: r35240 - branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-09-30 15:35:29 -0400 (Fri, 30 Sep 2011)
New Revision: 35240
Modified:
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-riftsaw-actions.meta
Log:
JBIDE-9771
https://issues.jboss.org/browse/JBIDE-9771
BPELInvoke action registered for version 1.3.0 in ESB editor. (merged to branch 3.2.x)
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-riftsaw-actions.meta
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-riftsaw-actions.meta 2011-09-30 19:33:46 UTC (rev 35239)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-riftsaw-actions.meta 2011-09-30 19:35:29 UTC (rev 35240)
@@ -91,4 +91,29 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
+ <XEntityExtension name="ESBActions130">
+ <XChildrenEntities>
+ <XChildEntity name="ESBPreActionBPELInvoke120"/>
+ </XChildrenEntities>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
+ <XActionItem displayName="Add Pre-Packed Action" kind="list" name="PrePackedAction">
+ <XActionItem displayName="BPEL" group="1" kind="list" name="BPEL">
+ <XActionItem HIDE="disabled"
+ HandlerClassName="org.jboss.tools.esb.core.model.handlers.AddBPELInvokeHandler"
+ ICON="action.empty" PROPERTIES="validator.add=true"
+ WizardClassName="%Default%" displayName="BPEL Invoke Action..."
+ kind="action" name="AddBPELInvoke">
+ <EntityData EntityName="ESBPreActionBPELInvoke120">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="service"/>
+ <AttributeData AttributeName="operation"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XEntityExtension>
</XModelEntityGroup>
13 years, 3 months