JBoss Tools SVN: r21784 - trunk/jsf/docs/userguide/en-US.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-04-28 12:04:31 -0400 (Wed, 28 Apr 2010)
New Revision: 21784
Modified:
trunk/jsf/docs/userguide/en-US/editors.xml
Log:
TOOLSDOC-4 Tool tips in editors - section about jave files is added
Modified: trunk/jsf/docs/userguide/en-US/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/editors.xml 2010-04-28 15:43:04 UTC (rev 21783)
+++ trunk/jsf/docs/userguide/en-US/editors.xml 2010-04-28 16:04:31 UTC (rev 21784)
@@ -277,6 +277,11 @@
</listitem>
<listitem>
<para>
+ <link linkend="ContentAssistForJavaFiles">Java files</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<link linkend="ContentAssistForRF">RichFaces components</link>
</para>
</listitem>
@@ -288,11 +293,7 @@
<link linkend="ContentAssistForInsertTag">Insert Tag Wizard</link>
</para>
</listitem>
- <listitem>
- <para>
- <link linkend="ContentAssistForExpressionLanguageShowsJavaDoc">JavaDoc for EL</link>
- </para>
- </listitem>
+
</itemizedlist>
<para>Notice, that code completion for EL variables has icons illustrating what they are
from. The most of this icons are described in the table below.</para>
@@ -819,6 +820,8 @@
</figure>
</section>
</section>
+
+
<section id="ContentAssistForXHTMLPages">
<title>Content Assist for XHTML Pages</title>
<para>The code completion for the Seam components in a Seam project shows the
@@ -836,6 +839,20 @@
linkend="contentAssistForCustomFacelets">"Content Assist for Custom
Facelets Components"</link> later in this guide.</para>
</section>
+
+ <section id="ContentAssistForJavaFiles">
+ <title>Content Assist for Java Files</title>
+ <para>Various tools tips provide you additional information about java elements (JavaDocs, source classes, return types, method names, params, and etc.) when working with java files</para>
+ <figure>
+ <title>Content assist for JavaDoc</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_33.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
<section id="ContentAssistForInsertTag">
<title>Content Assist for Insert Tag Wizard</title>
<para>Content Assist is also available for any attribute value of <emphasis>Insert
@@ -968,19 +985,7 @@
</listitem>
</itemizedlist>
</section>
- <section id="ContentAssistForExpressionLanguageShowsJavaDoc">
- <title>JavaDoc for Expression Language</title>
- <para>Content assist for expression language shows Java doc if available for referenced methods.</para>
- <figure>
- <title>Expression Language Content assist shows Java doc</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/editors_features/editors_features_33.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
+
</section>
<section id="FullControlOverSourceFiles-SynchronizedSourcAndVisualEditing74">
<title>Synchronized Source and Visual Editing</title>
14 years, 8 months
JBoss Tools SVN: r21783 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-28 11:43:04 -0400 (Wed, 28 Apr 2010)
New Revision: 21783
Modified:
branches/modular_build/build/build.xml
Log:
add collect.all.test.results method to summarize all test passes/failures at end of build
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-04-28 14:15:51 UTC (rev 21782)
+++ branches/modular_build/build/build.xml 2010-04-28 15:43:04 UTC (rev 21783)
@@ -37,7 +37,9 @@
cd /home/nboldt/workspace36/jbosstools-modular_build; ant -DCOMPONENTS=tests,common -Dbuild.if.sources.unchanged=true
-->
- <target name="run" depends="init, get.bootstrap.scripts, get.sources, get.components.to.build, run.build" />
+ <target name="run"
+ depends="init, get.bootstrap.scripts, get.sources, get.components.to.build, run.build, collect.all.test.results"
+ />
<!-- override for local build -->
<condition property="isInHudson" value="true">
@@ -299,6 +301,7 @@
</ant>
<echo level="verbose">Exe: ${COMMON_TOOLS}/apache-maven-${maven.version}/bin/mvn</echo>
<echo level="verbose">Pom: ${WORKINGDIR}/(a){COMPONENT}/pom.xml</echo>
+ <!-- 3 hr timeout = 10800000ms -->
<exec executable="${COMMON_TOOLS}/apache-maven-${maven.version}/bin/mvn"
dir="${WORKINGDIR}/@{COMPONENT}"
failifexecutionfails="true"
@@ -325,12 +328,69 @@
<!-- collect test results by copying ${WORKINGDIR}/${COMPONENT}/**/target/surefire-reports/*.xml into ${basedir}/surefire-reports/${COMPONENT} -->
<delete dir="${basedir}/surefire-reports/${COMPONENT}" includeemptydirs="true" />
<mkdir dir="${basedir}/surefire-reports/${COMPONENT}" />
- <copy todir="${basedir}/surefire-reports/${COMPONENT}" flatten="true" preservelastmodified="true" overwrite="true">
+ <copy todir="${basedir}/surefire-reports/${COMPONENT}"
+ flatten="true"
+ preservelastmodified="true"
+ overwrite="true"
+ >
<fileset dir="${WORKINGDIR}/${COMPONENT}" includes="**/target/surefire-reports/*.xml" />
</copy>
- <!-- TODO parse test results files for output to dump into log :: look for lines with ERROR or FAILURE -->
</target>
+ <target name="collect.all.test.results">
+ <!-- Parse this: <testsuite errors="0" skipped="0" tests="10" time="0.042" failures="0" name="org.jboss.tools.jmx.ui.JMXUIAllTests"> -->
+ <for param="testresultfile" delimiter=",
+ ">
+ <path>
+ <fileset dir="${basedir}/surefire-reports/" includes="**/*.xml" />
+ </path>
+ <sequential>
+ <var name="testsuite.name" unset="true" />
+ <var name="testsuite.tests" unset="true" />
+ <var name="testsuite.time" unset="true" />
+ <var name="testsuite.skipped" unset="true" />
+ <var name="testsuite.errors" unset="true" />
+ <var name="testsuite.failures" unset="true" />
+ <xmlproperty file="@{testresultfile}" keepRoot="true" collapseAttributes="true" />
+ <for param="ts" list="testsuite.skipped, testsuite.errors, testsuite.failures" delimiter=", ">
+ <sequential>
+ <propertyregex override="true"
+ property="ts.label"
+ defaultvalue="@{ts}"
+ input="@{ts}"
+ regexp="testsuite\.(.+)"
+ replace="\1"
+ />
+ <if>
+ <isset property="@{ts}" />
+ <then>
+ <if>
+ <equals arg1="${@{ts}}" arg2="0" />
+ <then>
+ <var name="@{ts}" value="" />
+ </then>
+ <else>
+ <var name="@{ts}" value="; ${@{ts}} ${ts.label}" />
+ </else>
+ </if>
+ </then>
+ </if>
+
+ </sequential>
+ </for>
+ <echo level="info">${testsuite.name} ran ${testsuite.tests} tests in ${testsuite.time}s${testsuite.skipped}${testsuite.errors}${testsuite.failures}
+</echo>
+ <var name="testsuite.name" unset="true" />
+ <var name="testsuite.tests" unset="true" />
+ <var name="testsuite.time" unset="true" />
+ <var name="testsuite.skipped" unset="true" />
+ <var name="testsuite.errors" unset="true" />
+ <var name="testsuite.failures" unset="true" />
+ </sequential>
+ </for>
+ </target>
+
+
<!-- TODO: generate site.xml files for components: gensite.xml script called by build.xml -->
<!-- TODO: zip up update site zips for each component; publish to download.jboss.org as part of deploy task -->
<target name="zip.sites">
14 years, 8 months
JBoss Tools SVN: r21782 - in trunk/esb/plugins/org.jboss.tools.esb.project.ui: src/org/jboss/tools/esb/project/ui/preference/controls and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2010-04-28 10:15:51 -0400 (Wed, 28 Apr 2010)
New Revision: 21782
Removed:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/BaseField.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/BaseFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ButtonFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ComboBoxField.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ComboFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/CompositeEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/IFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/INamedElement.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ITaggedFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/LabelFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/PushButtonField.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/TextField.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/TextFieldEditor.java
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
Log:
OPEN - issue JBIDE-5522: Refactor WS and ESB preference UI framework to use the shared code in common.ui
https://jira.jboss.org/jira/browse/JBIDE-5522
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF 2010-04-28 14:15:51 UTC (rev 21782)
@@ -34,7 +34,8 @@
org.eclipse.jdt.ui;bundle-version="3.4.1",
org.jboss.ide.eclipse.as.ui;bundle-version="1.0.0",
org.jboss.ide.eclipse.as.wtp.core;bundle-version="1.0.0",
- org.jboss.ide.eclipse.as.core;bundle-version="1.0.0"
+ org.jboss.ide.eclipse.as.core;bundle-version="1.0.0",
+ org.jboss.tools.common.ui;bundle-version="3.1.0"
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.esb.project.ui
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/BaseField.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/BaseField.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/BaseField.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.esb.project.ui.preference.controls;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-
-import org.eclipse.swt.widgets.Control;
-
-/**
- * @author Grid Qian
- */
-public abstract class BaseField {
-
- public static final String PROPERTY_NAME = "value"; //$NON-NLS-1$
-
- private PropertyChangeSupport pcs = new PropertyChangeSupport(this);
-
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- pcs.addPropertyChangeListener(listener);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- pcs.removePropertyChangeListener(listener);
- }
-
- public void firePropertyChange(Object oldValue, Object newValue) {
- pcs.firePropertyChange(PROPERTY_NAME, oldValue, newValue);
- }
-
- abstract public Control getControl();
-}
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/BaseFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/BaseFieldEditor.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/BaseFieldEditor.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -1,251 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.esb.project.ui.preference.controls;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
-
-/**
- * @author Grid Qian
- */
-public abstract class BaseFieldEditor implements IFieldEditor {
-
- PropertyChangeSupport pcs = new PropertyChangeSupport(this);
-
- Set<DisposeListener> disposeListeners = new HashSet<DisposeListener>();
-
- private Object value = new Object();
-
- private String labelText;
-
- private String nameText = null;
-
- Label labelControl = null;
-
- protected Map<Object, Object> data = null;
-
- private boolean enabled = true;
-
- /**
- *
- * @param name
- * @param label
- * @param defaultValue
- */
- public BaseFieldEditor(String name, String label,Object defaultValue) {
- this.value = defaultValue;
- this.labelText = label;
- this.nameText = name;
- }
-
- /**
- *
- * @param parent
- */
- public void doFillIntoGrid(Object parent) {
- Assert.isTrue(parent instanceof Composite, JBossESBUIMessages.Error_JBoss_Basic_Editor_Composite);
- Assert.isTrue(((Composite)parent).getLayout() instanceof GridLayout,JBossESBUIMessages.Error_JBoss_Basic_Editor_Support);
- Composite aComposite = (Composite) parent;
- final Control[] controls = (Control[])getEditorControls(aComposite);
- GridLayout gl = (GridLayout)((Composite)parent).getLayout();
-
- doFillIntoGrid(aComposite,gl.numColumns);
- if(controls.length>0) {
- controls[0].addDisposeListener(new DisposeListener(){
- public void widgetDisposed(DisposeEvent e) {
- dispose();
- controls[0].removeDisposeListener(this);
- }
- });
- }
- }
-
- /**
- * @param composite
- * @param numColumns
- */
- protected void doFillIntoGrid(Composite composite, int numColumns) {
-
- }
-
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- pcs.addPropertyChangeListener(listener);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- pcs.removePropertyChangeListener(listener);
- }
-
- /**
- *
- * @param parent
- * @return
- */
- public Label createLabelControl(Composite parent) {
- if(labelControl==null) {
- labelControl = new Label(parent,SWT.NO_BACKGROUND);
- labelControl.setText(this.labelText);
- } else if(parent!=null) {
- if(labelControl.getParent()!=parent)
- throw new IllegalArgumentException(JBossESBUIMessages.Error_JBoss_Basic_Editor_Different);
- }
- return labelControl;
- }
-
- public Label getLabelControl() {
- return createLabelControl(null);
- }
-
- public abstract Object[] getEditorControls(Object composite);
-
- public abstract Object[] getEditorControls();
-
- public Control[] getSwtControls() {
- return (Control[])getEditorControls();
- }
-
- public abstract int getNumberOfControls();
-
- public Object getValue() {
- return value;
- }
-
- public String getValueAsString() {
- return getValue().toString();
- }
-
- public boolean isEnabled() {
- return this.enabled ;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- Control[] controls = getSwtControls();
- if(controls==null) {
- return;
- }
- for(int i=0;i<controls.length;i++) {
- Control control = controls[i];
- control.setEnabled(enabled);
- if(control instanceof Composite) {
- setEnabled((Composite)control, enabled);
- }
- }
- }
-
- private void setEnabled(Composite composite, boolean enabled) {
- Control[] controls = composite.getChildren();
- for(int i=0;i<controls.length;i++) {
- Control control = controls[i];
- control.setEnabled(enabled);
- if(control instanceof Composite) {
- setEnabled((Composite)control, enabled);
- }
- }
- }
-
- public boolean setFocus() {
- return true;
- }
-
- /**
- *
- * @param newValue
- */
- public void setValue(Object newValue) {
- Object oldValue = value;
- value = newValue;
- pcs.firePropertyChange(nameText,oldValue,newValue);
- }
-
- public void setValueAsString(String stringValue) {
- value = stringValue;
- }
-
- public String getName() {
- return nameText;
- }
-
- public void dispose() {
- PropertyChangeListener[] listeners = pcs.getPropertyChangeListeners();
- for (int i = 0; i < listeners.length; i++) {
- PropertyChangeListener propertyChangeListener = listeners[i];
- pcs.removePropertyChangeListener(propertyChangeListener);
- }
- }
-
- public void dispose(DisposeEvent e) {
- dispose();
- for (DisposeListener disposeListener : disposeListeners) {
- disposeListener.widgetDisposed(e);
- }
- disposeListeners.clear();
- }
-
- public void addDisposeListener(DisposeListener listener) {
- disposeListeners.add(listener);
- }
-
- public void removeDisposeListener(DisposeListener listener) {
- disposeListeners.remove(listener);
- }
-
- public String getLabelText() {
- return labelText;
- }
-
- /**
- *
- * @param labelText
- */
- public void setLabelText(String labelText) {
- this.labelText = labelText;
- }
-
- private boolean editable = true;
-
- public boolean isEditable() {
- return editable;
- }
-
- public void setEditable(boolean aEditable) {
- this.editable = aEditable;
- }
-
- public Object getData(Object key) {
- if(data==null) {
- return null;
- }
- return data.get(key);
- }
-
- public void setData(Object key, Object value) {
- if(data==null) {
- data = new HashMap<Object, Object>();
- }
- data.put(key, value);
- }
-}
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ButtonFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ButtonFieldEditor.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ButtonFieldEditor.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.esb.project.ui.preference.controls;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
-
-/**
- * @author Grid Qian
- */
-public class ButtonFieldEditor extends BaseFieldEditor {
-
- PushButtonField button= null;
- int style;
-
- private ButtonPressedAction buttonAction = new ButtonPressedAction(JBossESBUIMessages.JBoss_Button_Field_Editor_Browse) {
- @Override
- public void run() {
- throw new RuntimeException(JBossESBUIMessages.Error_JBoss_Button_Field_Editor_Not_Implemented_Yet);
- }
- };
-
- public ButtonFieldEditor(String name, String label, int style) {
- super(name, label, new Object());
- this.style = style;
- }
-
- public ButtonFieldEditor(String name, ButtonPressedAction action, Object defaultValue) {
- super(name, action.getText(), defaultValue);
- buttonAction = action;
- buttonAction.setFieldEditor(this);
- }
-
- @Override
- public void doFillIntoGrid(Object parent) {
- }
-
- @Override
- public Object[] getEditorControls() {
- if(button==null) {
- return null;
- }
- return new Control[]{button.getControl()};
- }
-
- @Override
- public boolean isEditable() {
- return false;
- }
-
- public void save(Object object) {
- }
-
- @Override
- public void setEditable(boolean ediatble) {
- }
-
- @Override
- public Object[] getEditorControls(Object composite) {
- if(button==null && composite!=null) {
- button = new PushButtonField((Composite)composite, style, buttonAction);
- setEnabled(isEnabled());
- }
- return new Control[]{button.getControl()};
- }
-
- public ButtonPressedAction getButtonaction() {
- return buttonAction;
- }
-
- public static class ButtonPressedAction extends Action implements SelectionListener{
-
- private IFieldEditor editor = null;
-
- public ButtonPressedAction(String label) {
- super(label);
- }
-
- public void setFieldEditor(IFieldEditor newEditor) {
- editor = newEditor;
- }
-
- public IFieldEditor getFieldEditor() {
- return editor;
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- public void widgetSelected(SelectionEvent e) {
- run();
- }
- }
-
- @Override
- public int getNumberOfControls() {
- return 1;
- }
-}
\ No newline at end of file
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ComboBoxField.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ComboBoxField.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ComboBoxField.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.esb.project.ui.preference.controls;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @author eskimo
- *
- */
-public class ComboBoxField extends BaseField implements ISelectionChangedListener {
-
- ComboViewer comboControl = null;
- List values = new ArrayList();
-
- public ComboBoxField(Composite parent,List values, ILabelProvider labelProvider,
- Object value, boolean flatStyle) {
- this(parent, values, value, flatStyle);
- comboControl.setLabelProvider(labelProvider);
- }
-
- public ComboBoxField(Composite parent,List values, Object value, boolean editable) {
- this.values = values;
- /*
- * Used combo box instead of custom combobox(CCombo),
- * CCombo looks ugly under MAC OS X
- */
- Combo combo;
- if(editable==true) {
-
- combo = new Combo(parent, SWT.DROP_DOWN);
- } else {
- combo = new Combo(parent, SWT.READ_ONLY);
- }
- combo.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
- comboControl = new ComboViewer(combo);
- comboControl.setContentProvider(new IStructuredContentProvider() {
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput,
- Object newInput) {
- }
-
- public Object[] getElements(Object inputElement) {
- return ComboBoxField.this.values.toArray();
- }
- });
-
- comboControl.addSelectionChangedListener(this);
- comboControl.getCombo().addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- firePropertyChange(new Object(), comboControl.getCombo().getText());
- }});
- comboControl.setLabelProvider(new ILabelProvider() {
- public void addListener(ILabelProviderListener listener) {
- }
-
- public void dispose() {
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- }
-
- public Image getImage(Object element) {
- return null;
- }
-
- public String getText(Object element) {
- return element.toString();
- }
- });
- comboControl.setInput(values);
- comboControl.setSelection(new StructuredSelection(value), true);
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- public void selectionChanged(SelectionChangedEvent event) {
- firePropertyChange("", ((StructuredSelection)event.getSelection()).getFirstElement()); //$NON-NLS-1$
- }
-
- public Combo getComboControl() {
- return comboControl.getCombo();
- }
-
- @Override
- public Control getControl() {
- return getComboControl();
- }
-
- public void setValue(Object newValue) {
- comboControl.setSelection(new StructuredSelection(newValue));
- comboControl.getCombo().setText(newValue.toString());
- }
-
- public void setTags(String[] tags,String value) {
- values = Arrays.asList(tags);
- comboControl.removeSelectionChangedListener(this);
- comboControl.refresh(true);
- comboControl.addPostSelectionChangedListener(this);
- comboControl.setSelection(new StructuredSelection(value));
- }
- /*
- * We can't modify combo, change style of this object,
- * if we such functionality please use CCombo
- *
- */
- public void setEditable(
- boolean ediatble) {
- //comboControl.getCCombo().setEditable(false);
- }
-}
\ No newline at end of file
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ComboFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ComboFieldEditor.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ComboFieldEditor.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -1,121 +0,0 @@
-
-/*******************************************************************************
- * Copyright (c) 2007 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.esb.project.ui.preference.controls;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-public class ComboFieldEditor extends BaseFieldEditor implements ITaggedFieldEditor,PropertyChangeListener{
-
- List values = null;
-
- boolean editable = false;
-
- public ComboFieldEditor(String name, String label, List values,Object defaultValue,boolean editableSelection) {
- super(name, label, defaultValue);
- this.values = Collections.unmodifiableList(values);
- this.editable = editableSelection;
- }
-
- private ComboBoxField comboField;
-
- @Override
- public Object[] getEditorControls(Object composite) {
- return new Control[] {getComboControl((Composite)composite)};
- }
-
- @Override
- public void doFillIntoGrid(Object parent) {
- }
-
- public Control getComboControl(Composite composite) {
- if(comboField == null) {
- comboField = new ComboBoxField(composite,values,getValue(),editable);
- comboField.addPropertyChangeListener(this);
- final Combo combo =comboField.getComboControl();
- combo.addDisposeListener(new DisposeListener(){
- public void widgetDisposed(DisposeEvent e) {
- dispose(e);
- combo.removeDisposeListener(this);
- }
- });
- } else if(composite!=null) {
- Assert.isTrue(comboField.getControl().getParent()==composite);
- }
- return comboField.getControl();
- }
-
- @Override
- public Object[] getEditorControls() {
- return new Control[]{comboField.getControl()};
- }
-
- public void save(Object object) {
- }
-
- public void propertyChange(PropertyChangeEvent evt) {
- setValue(evt.getNewValue());
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#getTags()
- */
- public String[] getTags() {
- return comboField.getComboControl().getItems();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#setTags(java.lang.String[])
- */
- public void setTags(String[] tags) {
- comboField.setTags(tags,getValueAsString());
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.BaseFieldEditor#getNumberOfControls()
- */
- @Override
- public int getNumberOfControls() {
- return 1;
- }
-
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.seam.ui.widget.editor.CompositeEditor#setEditable(boolean)
- */
- @Override
- public void setEditable(boolean ediatble) {
- super.setEditable(ediatble);
- comboField.setEditable(ediatble);
- }
-
- public void setValue(Object newValue) {
- if(newValue==null) {
- return;
- }
- super.setValue(newValue);
- if(comboField!=null) {
- comboField.removePropertyChangeListener(this);
- comboField.setValue(newValue.toString());
- comboField.addPropertyChangeListener(this);
- }
- }
-}
\ No newline at end of file
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/CompositeEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/CompositeEditor.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/CompositeEditor.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.esb.project.ui.preference.controls;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
-
-/**
- * @author Grid Qian
- */
-public class CompositeEditor extends BaseFieldEditor implements PropertyChangeListener {
-
- public CompositeEditor(String name, String label, Object defaultValue) {
- super(name, label, defaultValue);
- }
-
- @Override
- public void doFillIntoGrid(Object parent) {
- Assert.isTrue(parent instanceof Composite,
- JBossESBUIMessages.Error_JBoss_Basic_Editor_Composite);
- Assert.isTrue(((Composite) parent).getLayout() instanceof GridLayout,
- JBossESBUIMessages.Error_JBoss_Basic_Editor_Support);
-
- Composite aComposite = (Composite) parent;
- final Control[] controls = (Control[]) getEditorControls(aComposite);
- GridLayout gl = (GridLayout) ((Composite) parent).getLayout();
-
- for (int i = 0; i < controls.length; i++) {
- GridData gd = new GridData();
- gd.horizontalSpan = i == 1 ? gl.numColumns - controls.length + 1 : 1;
- if (controls[i] instanceof Combo && i == (controls.length - 1)) {
- gd.horizontalAlignment = SWT.BEGINNING;
- } else {
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = (i == 1);
- }
-
- controls[i].setLayoutData(gd);
- controls[i].setEnabled(isEnabled());
-
- if(i==0) {
- controls[i].addDisposeListener(new DisposeListener(){
- public void widgetDisposed(DisposeEvent e) {
- dispose();
- controls[0].removeDisposeListener(this);
- }
- });
- }
- }
- }
-
- List<Control> controls = new ArrayList<Control>();
-
- @Override
- public Object[] getEditorControls() {
- if(controls.size()>0) return controls.toArray();
- else throw new IllegalStateException(JBossESBUIMessages.JBoss_Composite_Editor_This_Method_Can_Be_Invoked);
- }
-
- @Override
- public Object[] getEditorControls(Object parent) {
- for (IFieldEditor editor : editors) {
- controls.addAll(Arrays.asList((Control[])editor.getEditorControls(parent)));
- }
- return controls.toArray(new Control[]{});
- }
-
- @Override
- public int getNumberOfControls() {
- return editors.size();
- }
-
- @Override
- public boolean isEditable() {
- return true;
- }
-
- public void save(Object object) {
- }
-
- @Override
- public void setEditable(boolean ediatble) {
- }
-
- List<IFieldEditor> editors = new ArrayList<IFieldEditor>();
-
- public CompositeEditor addFieldEditors(IFieldEditor[] editors) {
- this.editors.addAll( Arrays.asList(editors));
- for (IFieldEditor editor : Arrays.asList(editors)) {
- editor.addPropertyChangeListener(this);
- }
- return this;
- }
-
- @Override
- public void setValue(Object newValue) {
- for (IFieldEditor editor : editors) {
- editor.removePropertyChangeListener(this);
- editor.setValue(newValue);
- editor.addPropertyChangeListener(this);
- }
- super.setValue(newValue);
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- for (IFieldEditor editor : editors) {
- if(event.getSource()!=editor) {
- editor.removePropertyChangeListener(this);
- editor.setValue(event.getNewValue());
- editor.addPropertyChangeListener(this);
- }
- }
- super.setValue(event.getNewValue());
- }
-
- @Override
- public void setEnabled(boolean set) {
- for (IFieldEditor editor : editors) {
- editor.setEnabled(set);
- }
- }
-
- public List<IFieldEditor> getEditors() {
- return Collections.unmodifiableList(editors);
- }
-
- public IFieldEditor getEditorByName(String name) {
- for (IFieldEditor editor : editors) {
- if(name.equals(editor.getName())) {
- return editor;
- }
- }
- return null;
- }
-
- public void setData(Object key, Object value) {
- super.setData(key, value);
- for (IFieldEditor editor : editors) {
- editor.setData(key, value);
- }
- }
-}
\ No newline at end of file
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/IFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/IFieldEditor.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/IFieldEditor.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.esb.project.ui.preference.controls;
-
-import java.beans.PropertyChangeListener;
-
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-
-/**
- * @author Grid Qian
- */
-public interface IFieldEditor extends INamedElement {
-
- /**
- *
- * @param composite
- */
- public Object[] getEditorControls(Object composite);
-
- public Object[] getEditorControls();
-
- public int getNumberOfControls();
-
- /**
- *
- * @param parent
- */
- public void doFillIntoGrid(Object parent);
-
- /**
- *
- * @param listener
- */
- public void addPropertyChangeListener(PropertyChangeListener listener);
-
- /**
- *
- * @param listener
- */
- public void addDisposeListener(DisposeListener listener);
-
- /**
- *
- * @param listener
- */
- public void removeDisposeListener(DisposeListener listener);
-
- /**
- *
- * @param listener
- */
- public void removePropertyChangeListener(PropertyChangeListener listener);
-
- public boolean isEditable();
-
- /**
- *
- * @param aEdiatble
- */
- public void setEditable(boolean aEdiatble);
-
- public boolean setFocus();
-
- public boolean isEnabled();
-
- /**
- *
- * @param enabled
- */
- public void setEnabled(boolean enabled);
-
- public void dispose();
-
- /**
- *
- * @param e
- */
- public void dispose(DisposeEvent e);
-
- /**
- * Sets the application defined property of this editor
- *
- * @param data
- * @param key
- */
- public void setData(Object key, Object data);
-
- /**
- * Gets the application defined property of this editor
- *
- * @param key
- * @return
- */
- public Object getData(Object key);
-
-}
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/INamedElement.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/INamedElement.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/INamedElement.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.esb.project.ui.preference.controls;
-
-/**
- * @author Grid Qian
- */
-public interface INamedElement {
-
- public abstract String getName();
-
- public abstract Object getValue();
-
- public abstract void setValue(Object newValue);
-
- public abstract String getValueAsString();
-
- public abstract void setValueAsString(String aValue);
-
-}
\ No newline at end of file
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ITaggedFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ITaggedFieldEditor.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ITaggedFieldEditor.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.esb.project.ui.preference.controls;
-
-public interface ITaggedFieldEditor extends IFieldEditor {
-
- /**
- *
- * @return
- */
- public String[] getTags();
-
- /**
- *
- * @param tags
- */
- public void setTags(String[] tags);
-}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -48,6 +48,7 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Group;
+import org.jboss.tools.common.ui.widget.editor.BaseFieldEditor;
import org.jboss.tools.esb.core.runtime.JBossESBRuntime;
import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
import org.jboss.tools.esb.project.ui.preference.JBossESBUIPlugin;
@@ -197,7 +198,7 @@
}
protected void createListView(Composite parent) {
- listView = new TreeViewer(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ listView = new TreeViewer(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
listView.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
listView.setContentProvider(new ITreeContentProvider() {
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -15,7 +15,6 @@
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -66,6 +65,13 @@
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.jboss.tools.common.ui.widget.editor.BaseFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.ComboFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.CompositeEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.LabelFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.TextFieldEditor;
import org.jboss.tools.esb.core.ESBProjectConstant;
import org.jboss.tools.esb.core.runtime.JBossESBRuntime;
import org.jboss.tools.esb.core.runtime.JBossRuntimeManager;
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/LabelFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/LabelFieldEditor.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/LabelFieldEditor.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.esb.project.ui.preference.controls;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * @author Grid Qian
- */
-public class LabelFieldEditor extends BaseFieldEditor {
-
- public LabelFieldEditor(String name, String label) {
- super(name, label, ""); //$NON-NLS-1$
- }
-
- @Override
- public void doFillIntoGrid(Object parent) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public Object[] getEditorControls(Object composite) {
- // TODO Auto-generated method stub
- return new Control[]{createLabelControl((Composite)composite)};
- }
-
- @Override
- public Object[] getEditorControls() {
- return getEditorControls(null);
- }
-
- @Override
- public boolean isEditable() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void save(Object object) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void setEditable(boolean ediatble) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void setValue(Object value) {
- }
-
- @Override
- public int getNumberOfControls() {
- // TODO Auto-generated method stub
- return 1;
- }
-}
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/PushButtonField.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/PushButtonField.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/PushButtonField.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.esb.project.ui.preference.controls;
-
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.jboss.tools.esb.project.ui.preference.controls.ButtonFieldEditor.ButtonPressedAction;
-
-/**
- * @author Grid Qian
- *
- */
-public class PushButtonField extends BaseField {
-
- Button button;
-
- /**
- *
- */
- @Override
- public Control getControl() {
- return button;
- }
-
-
- public PushButtonField(Composite composite, int style, ButtonPressedAction listener) {
- button = new Button(composite, style);
- button.setText(listener.getText());
- button.addSelectionListener(listener);
- }
-}
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/TextField.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/TextField.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/TextField.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.esb.project.ui.preference.controls;
-
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author Grid Qian
- */
-public class TextField extends BaseField implements ModifyListener{
-
-
- Text textField = null;
-
- public TextField(Composite parent, int style) {
- textField = new Text(parent,style);
- textField.addModifyListener(this);
- }
-
- public void modifyText(ModifyEvent e) {
- firePropertyChange(new Object(),((Text)e.widget).getText().trim());
- }
-
- public Text getTextControl() {
- return textField;
- }
-
- public Control getControl() {
- return getTextControl();
- }
-}
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/TextFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/TextFieldEditor.java 2010-04-28 13:58:42 UTC (rev 21781)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/TextFieldEditor.java 2010-04-28 14:15:51 UTC (rev 21782)
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.esb.project.ui.preference.controls;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.util.Collection;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Text;
-import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
-
-/**
- *
- * @author Grid Qian
- *
- */
-public class TextFieldEditor extends BaseFieldEditor implements PropertyChangeListener{
-
- public static final int UNLIMITED = -1;
-
- protected int style = -1;
-
- /**
- *
- * @param name
- * @param aLabelText
- * @param defaultvalue
- */
- public TextFieldEditor(String name,String aLabelText,String defaultvalue) {
- super(name, aLabelText, defaultvalue);
- }
-
- /**
- *
- * @param name
- * @param aLabelText
- * @param defaultvalue
- * @param editable
- */
- public TextFieldEditor(String name,String aLabelText,String defaultvalue,boolean editable) {
- super(name, aLabelText, defaultvalue);
- setEditable(editable);
- }
-
- protected TextField fTextField = null;
-
- protected int fWidthInChars = 0;
-
- @Override
- public Object[] getEditorControls() {
- return new Control[] {getTextControl()};
- }
-
- @Override
- public void doFillIntoGrid(Object aParent) {
- Assert.isTrue(aParent instanceof Composite, JBossESBUIMessages.Error_JBoss_Basic_Editor_Composite);
- Assert.isTrue(((Composite)aParent).getLayout() instanceof GridLayout,JBossESBUIMessages.Error_JBoss_Basic_Editor_Support);
- Composite aComposite = (Composite) aParent;
- getEditorControls(aComposite);
- GridLayout gl = (GridLayout)((Composite)aParent).getLayout();
- getTextControl(aComposite);
-
- GridData gd = new GridData();
-
- gd.horizontalSpan = gl.numColumns - 1;
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = true;
-
- fTextField.getTextControl().setLayoutData(gd);
- }
-
- /**
- *
- * @param parent
- * @return
- */
- public Text getTextControl(Composite parent) {
- if (fTextField == null) {
- fTextField = new TextField(parent, getInitialStyle());
- Text textField = fTextField.getTextControl();
- textField.setFont(parent.getFont());
- textField.setText(getValue().toString());
- textField.setEditable(isEditable());
- textField.setEnabled(isEnabled());
- fTextField.addPropertyChangeListener(this);
- } else if (parent!=null){
- Assert.isTrue(parent==fTextField.getTextControl().getParent());
- }
- return fTextField.getTextControl();
- }
-
- protected void updateWidgetValues() {
- setValueAsString(getValueAsString());
- }
-
- protected int getInitialStyle() {
- if(this.style >= 0) return style;
- return SWT.SINGLE | SWT.BORDER;
- }
-
- /*
- * @param value
- * @return
- */
- @SuppressWarnings({ "unchecked", "unused" })
- private String checkCollection(Object value){
-
- return value != null && (((Collection)value).size() > 0) ? prepareCollectionToString((Collection)value) : ""; //$NON-NLS-1$
- }
-
- /*
- * @param collection
- * @return
- */
- @SuppressWarnings("unchecked")
- private String prepareCollectionToString(Collection collection)
- {
- String stringValue = ""; //$NON-NLS-1$
- Object[] objects = collection.toArray();
- for(int i = 0; i < objects.length; i++){
- stringValue += objects[i];
- if(i < objects.length - 1)
- stringValue += " "; //$NON-NLS-1$
- }
- return stringValue;
- }
-
-
- /*
- * @param value
- * @return
- */
- @SuppressWarnings("unused")
- private String checkSimple(Object value){
- return (value != null) ? value.toString() : ""; //$NON-NLS-1$
- }
-
- @Override
- public int getNumberOfControls() {
- return 2;
- }
-
- /**
- * Returns this field editor's text control.
- *
- * @return the text control, or <code>null</code> if no
- * text field is created yet
- */
- protected Text getTextControl() {
- return fTextField!=null?fTextField.getTextControl():null;
- }
-
- @Override
- public boolean setFocus() {
- boolean setfocus = false;
- if(fTextField!=null && !fTextField.getTextControl().isDisposed())
- setfocus = fTextField.getTextControl().setFocus();
- return setfocus;
- }
-
- @Override
- public Object[] getEditorControls(Object composite) {
- return new Control[]{getTextControl((Composite)composite)};
- }
-
- /**
- *
- * @param object
- */
- public void save(Object object) {
- }
-
- /**
- *
- */
- @Override
- public void setValue(Object newValue) {
- super.setValue(newValue);
- if(fTextField!=null){
- fTextField.removePropertyChangeListener(this);
- fTextField.getTextControl().setText(newValue.toString());
- fTextField.addPropertyChangeListener(this);
- }
- }
-
- @Override
- public void setEditable(boolean aEditable) {
- super.setEditable(aEditable);
- if(getTextControl()!=null) getTextControl().setEditable(aEditable);
- }
-
- public void propertyChange(PropertyChangeEvent evt) {
- super.setValue(evt.getNewValue());
- }
-}
\ No newline at end of file
14 years, 8 months
JBoss Tools SVN: r21781 - in trunk: hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-04-28 09:58:42 -0400 (Wed, 28 Apr 2010)
New Revision: 21781
Modified:
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/META-INF/MANIFEST.MF
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/META-INF/MANIFEST.MF
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF
Log:
Remove not used plugin dependencies
Modified: trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 13:56:59 UTC (rev 21780)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 13:58:42 UTC (rev 21781)
@@ -9,8 +9,6 @@
org.jboss.tools.jst.ui.bot.test;bundle-version="1.0.0",
org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
- org.eclipse.swtbot.eclipse.spy;bundle-version="2.0.0",
- org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.junit4;bundle-version="4.5.0",
org.jboss.tools.ui.bot.ext;bundle-version="1.0.0",
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 13:56:59 UTC (rev 21780)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 13:58:42 UTC (rev 21781)
@@ -12,7 +12,6 @@
org.eclipse.jdt.ui,
org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
- org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.jboss.tools.hibernate.ui;bundle-version="3.3.0",
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 13:56:59 UTC (rev 21780)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 13:58:42 UTC (rev 21781)
@@ -11,8 +11,6 @@
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.apache.log4j;bundle-version="1.2.13",
org.junit4;bundle-version="4.5.0",
- org.eclipse.swtbot.eclipse.spy;bundle-version="2.0.0",
- org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
org.jboss.tools.ui.bot.ext
Bundle-ActivationPolicy: lazy
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2010-04-28 13:56:59 UTC (rev 21780)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2010-04-28 13:58:42 UTC (rev 21781)
@@ -8,7 +8,6 @@
org.eclipse.core.runtime,
org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
- org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.hamcrest;bundle-version="1.1.0",
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 13:56:59 UTC (rev 21780)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 13:58:42 UTC (rev 21781)
@@ -9,8 +9,6 @@
org.jboss.tools.jst.ui.bot.test;bundle-version="1.0.0",
org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
- org.eclipse.swtbot.eclipse.spy;bundle-version="2.0.0",
- org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.apache.log4j;bundle-version="1.2.13",
org.junit4;bundle-version="4.5.0",
Modified: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 13:56:59 UTC (rev 21780)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 13:58:42 UTC (rev 21781)
@@ -9,9 +9,7 @@
org.jboss.tools.jst.ui.bot.test;bundle-version="1.0.0",
org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
- org.eclipse.swtbot.eclipse.spy;bundle-version="2.0.0",
- org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
- org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
+ org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.junit4;bundle-version="4.5.0",
org.jboss.tools.ui.bot.ext;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 13:56:59 UTC (rev 21780)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 13:58:42 UTC (rev 21781)
@@ -10,8 +10,6 @@
org.jboss.tools.jst.ui.bot.test;bundle-version="1.0.0",
org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
- org.eclipse.swtbot.eclipse.spy;bundle-version="2.0.0",
- org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.apache.log4j;bundle-version="1.2.13",
org.eclipse.core.resources;bundle-version="3.5.0",
14 years, 8 months
JBoss Tools SVN: r21780 - branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-28 09:56:59 -0400 (Wed, 28 Apr 2010)
New Revision: 21780
Modified:
branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java
branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteDropCommand.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5963
Modified: branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java
===================================================================
--- branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java 2010-04-28 12:56:38 UTC (rev 21779)
+++ branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java 2010-04-28 13:56:59 UTC (rev 21780)
@@ -31,6 +31,7 @@
String startText = texts[0];
if(startText != null && startText.startsWith("<%@ taglib")) { //$NON-NLS-1$
if(PaletteTaglibInserter.inserTaglibInXml(v, p)) {
+ texts[0] = "";
return;
}
} else {
Modified: branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteDropCommand.java
===================================================================
--- branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteDropCommand.java 2010-04-28 12:56:38 UTC (rev 21779)
+++ branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteDropCommand.java 2010-04-28 13:56:59 UTC (rev 21780)
@@ -82,7 +82,7 @@
if(endText != null) properties.setProperty(PaletteInsertHelper.PROPOPERTY_END_TEXT, endText);
if(reformat != null) properties.setProperty(PaletteInsertHelper.PROPOPERTY_REFORMAT_BODY, reformat);
if(newLine != null) properties.setProperty(PaletteInsertHelper.PROPOPERTY_NEW_LINE, newLine);
- PaletteInsertHelper.getInstance().insertIntoEditor(
+ JSPPaletteInsertHelper.getInstance().insertIntoEditor(
getDefaultModel().getDropData().getSourceViewer(),
properties
);
14 years, 8 months
JBoss Tools SVN: r21779 - trunk/as/docs/reference/en-US/images/perspective.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2010-04-28 08:56:38 -0400 (Wed, 28 Apr 2010)
New Revision: 21779
Added:
trunk/as/docs/reference/en-US/images/perspective/perspective_7a.png
Log:
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans Serif">
<p>https://jira.jboss.org/jira/browse/TOOLSDOC-25 - Updated JBoss Server Manager Reference Guide according to the forum post http://community.jboss.org/thread/149945?tstart=30. Added the info about Deployment tab and how to change the deployment path. </p>
</body></html>
Added: trunk/as/docs/reference/en-US/images/perspective/perspective_7a.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en-US/images/perspective/perspective_7a.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
14 years, 8 months
JBoss Tools SVN: r21778 - trunk/as/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2010-04-28 08:55:52 -0400 (Wed, 28 Apr 2010)
New Revision: 21778
Modified:
trunk/as/docs/reference/en-US/perspective.xml
Log:
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans Serif">
<p>https://jira.jboss.org/jira/browse/TOOLSDOC-25 - Updated JBoss Server Manager Reference Guide according to the forum post http://community.jboss.org/thread/149945?tstart=30. Added the info about Deployment tab and how to change the deployment path. </p>
</body></html>
Modified: trunk/as/docs/reference/en-US/perspective.xml
===================================================================
--- trunk/as/docs/reference/en-US/perspective.xml 2010-04-28 12:35:16 UTC (rev 21777)
+++ trunk/as/docs/reference/en-US/perspective.xml 2010-04-28 12:55:52 UTC (rev 21778)
@@ -844,6 +844,23 @@
</emphasis> should add it properly. Also, <emphasis>
<property>Restore Default Entries</property>
</emphasis> will also remove any extra entries you added yourself.</para>
+ <para>Using <emphasis>Deployment tab</emphasis> you configure local deployment settings.</para>
+
+
+ <figure>
+ <title>Deployment tab</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_7a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Using the group of radio buttons in <property>Default Settings section</property>
+ a user can set where the application will
+ be deployed to.By default it is deployed to the user's workspace folder,
+ exactly to <property>[workspaceDirecotry]\.metadata\.plugins</property>.If you would like the application to be deployed to your Jboss
+ server deploy folder select <emphasis><property>Use the JBoss deploy folder</property></emphasis>.
+ The option to specify your custom deploy folder is also available.</para>
</section>
<section>
14 years, 8 months
JBoss Tools SVN: r21777 - in trunk/ws/tests: org.jboss.tools.ws.ui.bot.test and 12 other directories.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2010-04-28 08:35:16 -0400 (Wed, 28 Apr 2010)
New Revision: 21777
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.classpath
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/bin/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/build.properties
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/BottomUpJbossWStest.java.servlet
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassA.java.ws
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.java.ws
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.wsdl
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/SampleWStest.java.servlet
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TopDownJbossWStest.java.servlet
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TwoServicesJbossWStest.java.servlet
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/log4j.xml
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/Activator.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/BottomUpWebService.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JbossWSTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/SampleWebService.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TopDownWebService.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TwoBUWSInOneProject.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
Log:
added WS UI bot test plugin
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.classpath
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.classpath (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.classpath 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="resources"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.ws.ui.bot.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.core.springbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.springframework.ide.eclipse.core.springnature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/org.eclipse.jdt.core.prefs 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,8 @@
+#Mon Aug 31 15:12:26 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: WebService SWTBot Tests
+Bundle-SymbolicName: org.jboss.tools.ws.ui.bot.test
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.ws.ui.bot.test.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.apache.log4j;bundle-version="1.2.13",
+ org.jboss.tools.ui.bot.ext,
+ org.eclipse.jdt.ui,
+ org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
+ org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
+ org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
+ org.eclipse.ui.ide;bundle-version="3.5.1",
+ org.eclipse.ui.forms;bundle-version="3.4.1",
+ org.junit4;bundle-version="4.5.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Eclipse-RegisterBuddy: org.apache.log4j
+Bundle-ClassPath: .
+Export-Package: org.jboss.tools.ws.ui.bot.test
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/build.properties
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/build.properties (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/build.properties 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,5 @@
+source.. = src/,\
+ resources/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/BottomUpJbossWStest.java.servlet
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/BottomUpJbossWStest.java.servlet (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/BottomUpJbossWStest.java.servlet 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,47 @@
+package jbossws;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class testWS
+ */
+public class BottomUpJbossWStest extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * @see HttpServlet#HttpServlet()
+ */
+ public BottomUpJbossWStest() {
+ super();
+ }
+
+ /**
+ * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ System.out.println("***********************");
+ System.out.println("Create Web Service Client...");
+ ClassAService service1 = new ClassAService();
+ System.out.println("Create Web Service...");
+ ClassA port1 = service1.getClassAPort();
+ System.out.println("Call Web Service Operation...");
+ int resp = port1.method();
+ System.out.println("Server said: " + resp);
+ System.out.println("***********************");
+ System.out.println("Call Over!");
+ response.getOutputStream().print("<html><head></head><body>Web service said :'"+resp+"'</body></html>");
+
+ }
+
+ /**
+ * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ // TODO Auto-generated method stub
+ }
+
+}
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassA.java.ws
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassA.java.ws (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassA.java.ws 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,14 @@
+package jbossws;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService()
+public class ClassA {
+
+ @WebMethod()
+ public int method() {
+ System.out.println("JbossWS Service : method() was called");
+ return 1234567890;
+ }
+}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.java.ws
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.java.ws (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.java.ws 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,14 @@
+package jbossws;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService()
+public class ClassB {
+
+ @WebMethod()
+ public int method() {
+ System.out.println("JbossWS Service : method() was called");
+ return 11111;
+ }
+}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.wsdl
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.wsdl (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.wsdl 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,45 @@
+<definitions name='ClassBService' targetNamespace='http://jbossws/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://jbossws/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <xs:schema targetNamespace='http://jbossws/' version='1.0' xmlns:tns='http://jbossws/' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:element name='method' type='tns:method'/>
+ <xs:element name='methodResponse' type='tns:methodResponse'/>
+ <xs:complexType name='method'>
+ <xs:sequence/>
+ </xs:complexType>
+ <xs:complexType name='methodResponse'>
+ <xs:sequence>
+ <xs:element name='return' type='xs:int'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name='ClassB_methodResponse'>
+ <part element='tns:methodResponse' name='methodResponse'></part>
+ </message>
+ <message name='ClassB_method'>
+ <part element='tns:method' name='method'></part>
+ </message>
+ <portType name='ClassB'>
+ <operation name='method' parameterOrder='method'>
+ <input message='tns:ClassB_method'></input>
+ <output message='tns:ClassB_methodResponse'></output>
+ </operation>
+ </portType>
+ <binding name='ClassBBinding' type='tns:ClassB'>
+ <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='method'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='ClassBService'>
+ <port binding='tns:ClassBBinding' name='ClassBPort'>
+ <soap:address location='http://localhost:8080/JbossWS/ClassB'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/SampleWStest.java.servlet
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/SampleWStest.java.servlet (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/SampleWStest.java.servlet 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,50 @@
+package jbossws;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.samples.webservices.HelloWorld;
+import org.jboss.samples.webservices.HelloWorldService;
+
+/**
+ * Servlet implementation class testWS
+ */
+public class SampleWStest extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * @see HttpServlet#HttpServlet()
+ */
+ public SampleWStest() {
+ super();
+ }
+
+ /**
+ * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ System.out.println("***********************");
+ System.out.println("Create Web Service Client...");
+ HelloWorldService service1 = new HelloWorldService();
+ System.out.println("Create Web Service...");
+ HelloWorld port1 = service1.getHelloWorldPort();
+ System.out.println("Call Web Service Operation...");
+ String resp = port1.sayHello("abcdefgh");
+ System.out.println("Server said: " + resp);
+ System.out.println("***********************");
+ System.out.println("Call Over!");
+ response.getOutputStream().print("<html><head></head><body>Web service said :'"+resp+"'</body></html>");
+
+ }
+
+ /**
+ * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ // TODO Auto-generated method stub
+ }
+
+}
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TopDownJbossWStest.java.servlet
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TopDownJbossWStest.java.servlet (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TopDownJbossWStest.java.servlet 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,48 @@
+package jbossws;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class testWS
+ */
+public class TopDownJbossWStest extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * @see HttpServlet#HttpServlet()
+ */
+ public TopDownJbossWStest() {
+ super();
+ }
+
+ /**
+ * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ System.out.println("***********************");
+ System.out.println("Create Web Service Client...");
+ ClassB_Service service1 = new ClassB_Service();
+ System.out.println("Create Web Service...");
+ ClassB port1 = service1.getClassBImplPort();
+ System.out.println("Call Web Service Operation...");
+ int resp = port1.method();
+ System.out.println("Server said: " + resp);
+ System.out.println("***********************");
+ System.out.println("Call Over!");
+
+ response.getOutputStream().print("<html><head></head><body>Web service said :'"+resp+"'</body></html>");
+
+ }
+
+ /**
+ * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ // TODO Auto-generated method stub
+ }
+
+}
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TwoServicesJbossWStest.java.servlet
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TwoServicesJbossWStest.java.servlet (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TwoServicesJbossWStest.java.servlet 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,60 @@
+package jbossws;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class testWS
+ */
+public class TwoServicesJbossWStest extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * @see HttpServlet#HttpServlet()
+ */
+ public TwoServicesJbossWStest() {
+ super();
+ }
+
+ /**
+ * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ System.out.println("***********************");
+ System.out.println("Create Web Service Client...");
+ ClassAService service1 = new ClassAService();
+ System.out.println("Create Web Service...");
+ ClassA port1 = service1.getClassAPort();
+ System.out.println("Call Web Service Operation...");
+ int resp1 = port1.method();
+ System.out.println("Server said: " + resp1);
+ System.out.println("***********************");
+ System.out.println("Call Over!");
+ System.out.println("***********************");
+ System.out.println("Create Web Service Client...");
+ ClassBService service2 = new ClassBService();
+ System.out.println("Create Web Service...");
+ ClassB port2 = service2.getClassBPort();
+ System.out.println("Call Web Service Operation...");
+ int resp2 = port2.method();
+ System.out.println("Server said: " + resp2);
+ System.out.println("***********************");
+ System.out.println("Call Over!");
+ response.getOutputStream().print("<html><head></head><body>");
+ response.getOutputStream().print("<p>Web serviceA said :'"+resp1+"'</p>");
+ response.getOutputStream().print("<p>Web serviceA said :'"+resp2+"'</p>");
+ response.getOutputStream().print("</body></html>");
+
+ }
+
+ /**
+ * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ // TODO Auto-generated method stub
+ }
+
+}
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/log4j.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/log4j.xml (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/log4j.xml 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
+ debug="false">
+
+ <appender name="consoleAppender" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <!--
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) - %m%n" />
+ -->
+ <param name="ConversionPattern"
+ value="(%C{1}.java:%L) - %m%n" />
+
+ </layout>
+ </appender>
+
+ <appender name="fileAppender" class="org.apache.log4j.FileAppender">
+ <param name="File" value="/tmp/debug.log" />
+ <param name="Append" value="false" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) - %m%n" />
+ </layout>
+ </appender>
+
+ <appender name="asyncAppender" class="org.apache.log4j.AsyncAppender">
+ <appender-ref ref="consoleAppender" />
+ <appender-ref ref="fileAppender" />
+ </appender>
+
+ <!-- don't log matchers, this is very high amount of chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.matchers">
+ <priority value="OFF" />
+ </category>
+
+ <!--
+ don't log widget notification events, this is moderately high chatter
+ -->
+ <category name="org.eclipse.swtbot.swt.finder.widgets">
+ <priority value="OFF" />
+ </category>
+
+ <!-- don't log finders, this is moderate chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.finders">
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot.swt.finder.keyboard">
+ <!-- set to a value higher than debug to turn on. -->
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot">
+ <priority value="ALL" />
+ </category>
+
+ <root>
+ <priority value="INFO" />
+ <appender-ref ref="consoleAppender" />
+ <appender-ref ref="fileAppender" />
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/Activator.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/Activator.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/Activator.java 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,66 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ws.ui.bot.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.ws.ui.bot.test";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (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 Activator getDefault() {
+ return plugin;
+ }
+
+}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/BottomUpWebService.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/BottomUpWebService.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/BottomUpWebService.java 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,51 @@
+package org.jboss.tools.ws.ui.bot.test;
+
+import org.jboss.tools.ui.bot.ext.config.Annotations.*;
+import org.junit.Test;
+
+
+@SWTBotTestRequires(server=@Server(),perspective="Java EE")
+public class BottomUpWebService extends JbossWSTest {
+
+ @Test
+ public void bottomUpJbossWS() {
+ int testlevel=4;
+ for (int i=0;i<testlevel;i++) {
+ for (int j=0;j<testlevel;j++) {
+ bottomUpJbossWebService(i, j);
+ }
+ }
+ }
+
+ protected void bottomUpJbossWebService(int serverType, int clientType) {
+ log.info(" * Running test ServiceType: '"+wizardConfigTexts.get(serverType)+"', ClientType: '"+wizardConfigTexts.get(clientType)+"'");
+ createEARProject(EAR_PROJECT_NAME);
+ createProject(BOTTOMUP_WS_PROJ_NAME);
+ bottomUpService(BOTTOMUP_WS_PROJ_NAME, CLASS_A,serverType);
+ assertServiceDeployed(BOTTOMUP_WS_WSDL_URL);
+ // generate client stubs
+ createClient(BOTTOMUP_WS_CLIENT_PROJ_NAME, BOTTOMUP_WS_CLIENT_SERVLET_NAME, BOTTOMUP_WS_WSDL_URL, clientType);
+ servers.removeAllProjectsFromServer(configuredState.getServer().name);
+ if (serverType >= SERVICE_SCALE_ASSEMBLE) {
+ // service was not assembled into EAR
+ projectExplorer.runOnServer(BOTTOMUP_WS_PROJ_NAME);
+ } else {
+ projectExplorer.runOnServer(EAR_PROJECT_NAME);
+ }
+ if (clientType >= CLIENT_SCALE_ASSEMBLE) {
+ // client was not assembled into EAR
+ projectExplorer.runOnServer(BOTTOMUP_WS_CLIENT_PROJ_NAME);
+
+ } else {
+ projectExplorer.runOnServer(EAR_PROJECT_NAME);
+ }
+ // but we need to run any of wars on server (to get browser)
+ projectExplorer.runOnServer(BOTTOMUP_WS_PROJ_NAME);
+ assertServiceResponseToClient(BOTTOMUP_WS_CLIENT_SERVLET_URL,
+ "1234567890");
+ servers.removeAllProjectsFromServer(configuredState.getServer().name);
+ assertServiceNotDeployed(BOTTOMUP_WS_WSDL_URL);
+ servers.removeAllProjectsFromServer();
+ projectExplorer.deleteAllProjects();
+ }
+}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JbossWSTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JbossWSTest.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JbossWSTest.java 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,201 @@
+package org.jboss.tools.ws.ui.bot.test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.Class;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.JavaEEEnterpriseApplicationProject;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebDynamicWebProject;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWebService;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWebServiceClient;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServlet;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotBrowserExt;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotHyperlinkExt;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotScaleExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class JbossWSTest extends SWTTestExt {
+
+ public static final String EAR_PROJECT_NAME="EAR";
+ public static final String PKG_NAME="jbossws";
+
+ public static final String SAMPLE_WS_PROJ_NAME="SampleWS";
+ public static final String SAMPLE_WS_SERVICE_NAME="HelloWorld";
+ public static final String SAMPLE_WS_WSDL_URL="http://localhost:8080/"+SAMPLE_WS_PROJ_NAME+"/"+SAMPLE_WS_SERVICE_NAME+"?wsdl";
+ public static final String SAMPLE_WSCLIENT_PROJ_NAME = "SampleWSClient";
+ public static final String SAMPLE_WSCLIENT_SERVLET_NAME = "SampleWStest";
+ public static final String SAMPLE_WSCLIENT_SERVLET_URL = "http://localhost:8080/"+SAMPLE_WSCLIENT_PROJ_NAME+"/"+SAMPLE_WSCLIENT_SERVLET_NAME;
+ public static final String CLASS_A="ClassA";
+ public static final String CLASS_B="ClassB";
+ public static final String CLASS_C="ClassC";
+ public static final String BOTTOMUP_WS_PROJ_NAME="BottomUpJbossWS";
+ public static final String BOTTOMUP_WS_WSDL_URL="http://localhost:8080/"+BOTTOMUP_WS_PROJ_NAME+"/"+CLASS_A+"?wsdl";
+ public static final String BOTTOMUP_WS_CLIENT_PROJ_NAME = "BottomUpJbossWSClient";
+ public static final String BOTTOMUP_WS_CLIENT_SERVLET_NAME = "BottomUpJbossWStest";
+ public static final String BOTTOMUP_WS_CLIENT_SERVLET_URL = "http://localhost:8080/"+BOTTOMUP_WS_CLIENT_PROJ_NAME+"/"+BOTTOMUP_WS_CLIENT_SERVLET_NAME;
+ public static final String TWO_SERVICES_CLIENT_SERVLET_NAME="TwoServicesJbossWStest";
+ public static final String TWO_SERVICES_CLIENT_SERVLET_URL = "http://localhost:8080/"+BOTTOMUP_WS_CLIENT_PROJ_NAME+"/"+TWO_SERVICES_CLIENT_SERVLET_NAME;
+ public static final String TOPDOWN_WS_PROJ_NAME="TopDownJbossWS";
+ public static final String TOPDOWN_WS_WSDL_URL="http://localhost:8080/"+TOPDOWN_WS_PROJ_NAME+"/"+CLASS_B+"?wsdl";
+ public static final String TOPDOWN_WS_CLIENT_PROJ_NAME = "TopDownJbossWSClient";
+ public static final String TOPDOWN_WS_CLIENT_SERVLET_NAME = "TopDownJbossWStest";
+ public static final String TOPDOWN_WS_CLIENT_SERVLET_URL = "http://localhost:8080/"+TOPDOWN_WS_CLIENT_PROJ_NAME+"/"+TOPDOWN_WS_CLIENT_SERVLET_NAME;
+ public static final String JBOSSWS_CRED_LOGIN="admin";
+ public static final String JBOSSWS_CRED_PASS="admin";
+ public static final int CLIENT_SCALE_DEVELOP=5;
+ public static final int CLIENT_SCALE_ASSEMBLE=4;
+ public static final int CLIENT_SCALE_DEPLOY=3;
+ public static final int CLIENT_SCALE_INSTALL=2;
+ public static final int CLIENT_SCALE_START=1;
+ public static final int CLIENT_SCALE_TEST=0;
+ public static final int SERVICE_SCALE_DEVELOP=5;
+ public static final int SERVICE_SCALE_ASSEMBLE=4;
+ public static final int SERVICE_SCALE_DEPLOY=3;
+ public static final int SERVICE_SCALE_INSTALL=2;
+ public static final int SERVICE_SCALE_START=1;
+ public static final int SERVICE_SCALE_TEST=0;
+ protected static Map<Integer,String> wizardConfigTexts = new HashMap<Integer, String>();
+
+
+ public JbossWSTest() {
+
+ }
+
+ static {
+ wizardConfigTexts.put(0, "Test");
+ wizardConfigTexts.put(1, "Start");
+ wizardConfigTexts.put(2, "Install");
+ wizardConfigTexts.put(3, "Deploy");
+ wizardConfigTexts.put(4, "Assemble");
+ wizardConfigTexts.put(5, "Develop");
+ }
+
+ protected void createClient(String projectName, String servletName,String wsdlDef, int type) {
+ createProject(projectName);
+ SWTBot wiz = open.newObject(WebServicesWebServiceClient.LABEL);
+ wiz.comboBoxWithLabel(
+ WebServicesWebServiceClient.TEXT_SERVICE_DEFINITION).setText(
+ wsdlDef);
+ SWTBotScaleExt slider = bot.scale();
+ slider.setSelection(type);
+ selectJbossWSRuntime();
+ bot.sleep(TIME_1S); // wait for wizard to validate wsdl url and
+ // enable Finish button
+ open.finish(wiz);
+ projectExplorer.selectProject(projectName);
+ // create servlet which will inovke service
+ createInvokingServlet(servletName);
+ }
+
+ /**
+ * checks if 'Web Service Runtime' is set to 'JbossWS' and possibly sets it correctly
+ * @param wiz wizard page of new Web Service
+ */
+ protected void selectJbossWSRuntime() {
+ SWTBotHyperlinkExt link = bot.hyperlink(1);
+ String linkText = link.getText();
+ if (!linkText.contains("JBossWS")) {
+ link.click();
+ SWTBot dBot = bot.activeShell().bot();
+ dBot.tree().select("JBossWS");
+ open.finish(dBot,IDELabel.Button.OK);
+ }
+ }
+
+ protected void bottomUpService(String projName, String serviceClass, int serverType) {
+ SWTBot wiz = open.newObject(Class.LABEL);
+ wiz.textWithLabel(Class.TEXT_PACKAGE).setText(PKG_NAME);
+ wiz.textWithLabel(Class.TEXT_NAME).setText(serviceClass);
+ open.finish(wiz);
+ eclipse.setClassContentFromResource(bot.editorByTitle(serviceClass
+ + ".java"), true,
+ org.jboss.tools.ws.ui.bot.test.Activator.PLUGIN_ID,
+ PKG_NAME, serviceClass + ".java.ws");
+ wiz = open.newObject(ActionItem.NewObject.WebServicesWebService.LABEL);
+ wiz.textWithLabel(WebServicesWebService.TEXT_SERVICE_IMPLEMENTATION)
+ .setText(PKG_NAME + "." + serviceClass);
+ SWTBotScaleExt slider = bot.scale();
+ slider.setSelection(serverType);
+ selectJbossWSRuntime();
+ open.finish(wiz);
+ projectExplorer.runOnServer(projName);
+ }
+
+ protected void createInvokingServlet(String servletName) {
+ SWTBot wiz = open.newObject(WebServlet.LABEL);
+ wiz.textWithLabel(WebServlet.TEXT_JAVA_PACKAGE).setText(
+ PKG_NAME);
+ wiz.textWithLabel(WebServlet.TEXT_CLASS_NAME).setText(
+ servletName);
+ open.finish(wiz);
+ eclipse.setClassContentFromResource(bot
+ .editorByTitle(servletName
+ + ".java"), true,
+ org.jboss.tools.ws.ui.bot.test.Activator.PLUGIN_ID,
+ PKG_NAME, servletName
+ + ".java.servlet");
+ }
+
+ protected void createProject(String name) {
+ SWTBot wiz = open.newObject(WebDynamicWebProject.LABEL);
+ wiz.textWithLabel(WebDynamicWebProject.TEXT_PROJECT_NAME).setText(name);
+ open.finish(wiz);
+ assertTrue(projectExplorer.existsResource(name));
+ projectExplorer.selectProject(name);
+ }
+
+ protected void createEARProject(String name) {
+ SWTBot wiz = open.newObject(JavaEEEnterpriseApplicationProject.LABEL);
+ wiz.textWithLabel(JavaEEEnterpriseApplicationProject.TEXT_PROJECT_NAME).setText(name);
+ // set EAR version
+ SWTBotCombo combo = wiz.comboBox(1);
+ combo.setSelection(combo.itemCount()-1);
+ wiz.button(IDELabel.Button.NEXT).click();
+ wiz.checkBox("Generate application.xml deployment descriptor").click();
+ open.finish(wiz);
+ assertTrue(projectExplorer.existsResource(name));
+ projectExplorer.selectProject(name);
+ }
+
+ protected void assertServiceDeployed(String wsdlURL) {
+ SWTBotBrowserExt b = bot.browser();
+ b.goURL("http://localhost:8080/jbossws/services");
+ util.waitForBrowserLoadsPage(b,JBOSSWS_CRED_LOGIN,JBOSSWS_CRED_PASS);
+ boolean wsdlOK = b.followLink(wsdlURL);
+ assertTrue(
+ "Service was not sucessfully deployed, WSDL '"+wsdlURL+"' is not listed in JbossWS endpoint registry",
+ wsdlOK);
+ util.waitForBrowserLoadsPage(b);
+ b.back();
+ util.waitForBrowserLoadsPage(b);
+ }
+
+ protected void assertServiceNotDeployed(String wsdlURL) {
+ SWTBotBrowserExt b = bot.browser();
+ b.goURL("http://localhost:8080/jbossws/services");
+ util.waitForBrowserLoadsPage(b,JBOSSWS_CRED_LOGIN,JBOSSWS_CRED_PASS);
+ boolean wsdlOK = !b.getText().contains(wsdlURL);
+ assertTrue(
+ "Project was not sucessfully undeployed, WSDL '"+wsdlURL+"' is listed in JbossWS endpoint registry",
+ wsdlOK);
+ }
+
+ protected void assertServiceResponseToClient(String startServlet, String response) {
+ SWTBotBrowserExt b = bot.browser();
+ b.goURL(startServlet);
+ util.waitForBrowserLoadsPage(b);
+ String servletReturned = b.getText();
+ boolean servletRetOK = servletReturned.contains(response);
+ assertTrue(
+ "Unexpected Client servlet response, error calling web service, response is : "
+ + servletReturned, servletRetOK);
+
+ }
+}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/SampleWebService.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/SampleWebService.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/SampleWebService.java 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,49 @@
+package org.jboss.tools.ws.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.JBossToolsCreateaSampleWebService;
+import org.junit.Test;
+
+
+@SWTBotTestRequires(server=@Server(),perspective="Java EE")
+public class SampleWebService extends JbossWSTest {
+
+
+ @Test
+ public void sampleWebService() {
+ console.show().toolbarToggleButton("Show Console When Standard Out Changes").deselect();
+ console.show().toolbarToggleButton("Show Console When Standard Error Changes").deselect();
+ int testlevel = 3;
+ for (int i=0;i<testlevel;i++) {
+ sampleWebService(i);
+ }
+ }
+
+ private void sampleWebService(int clientType) {
+ log.info(" * Running test with ClientType: '"+wizardConfigTexts.get(clientType)+"'");
+ createEARProject(EAR_PROJECT_NAME);
+ createProject(SAMPLE_WS_PROJ_NAME);
+ SWTBot wiz = open.newObject(JBossToolsCreateaSampleWebService.LABEL);
+ wiz.comboBox().setText(SAMPLE_WS_PROJ_NAME);
+ open.finish(wiz);
+ open.viewOpen(ActionItem.View.ServerServers.LABEL);
+ projectExplorer.runOnServer(SAMPLE_WS_PROJ_NAME);
+ // browse WSDL
+ assertServiceDeployed(SAMPLE_WS_WSDL_URL);
+ // create and run WS Sample Client
+ createClient(SAMPLE_WSCLIENT_PROJ_NAME, SAMPLE_WSCLIENT_SERVLET_NAME, SAMPLE_WS_WSDL_URL, clientType);
+ // re run project
+ if (clientType<=CLIENT_SCALE_DEPLOY) {
+ servers.removeProjectFromServers(EAR_PROJECT_NAME);
+ }
+ projectExplorer.runOnServer(SAMPLE_WSCLIENT_PROJ_NAME);
+ assertServiceResponseToClient(SAMPLE_WSCLIENT_SERVLET_URL, "abcdefg");
+ servers.removeAllProjectsFromServer(configuredState.getServer().name);
+ assertServiceNotDeployed(SAMPLE_WS_WSDL_URL);
+ servers.removeAllProjectsFromServer();
+ projectExplorer.deleteAllProjects();
+ }
+}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TopDownWebService.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TopDownWebService.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TopDownWebService.java 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,66 @@
+package org.jboss.tools.ws.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.jboss.tools.ui.bot.ext.config.Annotations.*;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWSDL;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWebService;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotScaleExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+@SWTBotTestRequires(server=@Server(),perspective="Java EE")
+public class TopDownWebService extends JbossWSTest {
+
+ @Test
+ public void topDownJbossWS() {
+ int testLevel = 3;
+ for (int i=0;i<testLevel;i++) {
+ for (int j=0;j<testLevel;j++) {
+ topDownJbossWebService(i, j);
+ }
+ }
+ }
+ private void topDownJbossWebService(int serverType, int clientType) {
+ log.info(" * Running test ServiceType: '"+wizardConfigTexts.get(serverType)+"', ClientType: '"+wizardConfigTexts.get(clientType)+"'");
+ createEARProject(EAR_PROJECT_NAME);
+ createProject(TOPDOWN_WS_PROJ_NAME);
+ SWTBot wiz = open.newObject(WebServicesWSDL.LABEL);
+ wiz.textWithLabel(WebServicesWSDL.TEXT_FILE_NAME).setText(
+ CLASS_B + ".wsdl");
+ wiz.textWithLabel(
+ WebServicesWSDL.TEXT_ENTER_OR_SELECT_THE_PARENT_FOLDER)
+ .setText(TOPDOWN_WS_PROJ_NAME + "/src");
+ wiz.button(IDELabel.Button.NEXT).click();
+ open.finish(wiz);
+ eclipse.setClassContentFromResource(bot.editorByTitle(CLASS_B
+ + ".wsdl"), true,
+ org.jboss.tools.ws.ui.bot.test.Activator.PLUGIN_ID,
+ PKG_NAME, CLASS_B + ".wsdl");
+ wiz = open.newObject(WebServicesWebService.LABEL);
+ wiz.comboBoxWithLabel(WebServicesWebService.TEXT_WEB_SERVICE_TYPE)
+ .setSelection(1);
+ wiz.comboBoxWithLabel("Service definition:").setText(
+ "/" + TOPDOWN_WS_PROJ_NAME + "/src/"
+ + CLASS_B + ".wsdl");
+ SWTBotScaleExt slider = bot.scale();
+ slider.setSelection(serverType);
+ selectJbossWSRuntime();
+ open.finish(wiz);
+ servers.removeProjectFromServers(EAR_PROJECT_NAME);
+ projectExplorer.runOnServer(TOPDOWN_WS_PROJ_NAME);
+ assertServiceDeployed(TOPDOWN_WS_WSDL_URL);
+ // create and run client
+
+ createClient(TOPDOWN_WS_CLIENT_PROJ_NAME, TOPDOWN_WS_CLIENT_SERVLET_NAME, TOPDOWN_WS_WSDL_URL, clientType);
+
+ servers.removeProjectFromServers(EAR_PROJECT_NAME);
+ projectExplorer.runOnServer(TOPDOWN_WS_PROJ_NAME);
+ projectExplorer.runOnServer(TOPDOWN_WS_CLIENT_PROJ_NAME);
+
+ assertServiceResponseToClient(TOPDOWN_WS_CLIENT_SERVLET_URL, "0");
+ servers.removeAllProjectsFromServer(configuredState.getServer().name);
+ assertServiceNotDeployed(TOPDOWN_WS_WSDL_URL);
+ servers.removeAllProjectsFromServer();
+ projectExplorer.deleteAllProjects();
+ }
+}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TwoBUWSInOneProject.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TwoBUWSInOneProject.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TwoBUWSInOneProject.java 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,57 @@
+package org.jboss.tools.ws.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWebServiceClient;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+@SWTBotTestRequires(server=@Server(),perspective="Java EE")
+public class TwoBUWSInOneProject extends JbossWSTest {
+
+ @AfterClass
+ public static void after() {
+ bot.sleep(Long.MAX_VALUE);
+ }
+ @Test
+ public void twoServices() {
+ createEARProject(EAR_PROJECT_NAME);
+ createProject(BOTTOMUP_WS_PROJ_NAME);
+ // service A
+ bottomUpService(BOTTOMUP_WS_PROJ_NAME, CLASS_A,SERVICE_SCALE_START);
+ // service B
+ bottomUpService(BOTTOMUP_WS_PROJ_NAME, CLASS_B,SERVICE_SCALE_START);
+
+ assertServiceDeployed(BOTTOMUP_WS_WSDL_URL);
+ assertServiceDeployed(BOTTOMUP_WS_WSDL_URL.replace(CLASS_A, CLASS_B));
+
+ // generate client stubs
+ createClient(BOTTOMUP_WS_CLIENT_PROJ_NAME, TWO_SERVICES_CLIENT_SERVLET_NAME, BOTTOMUP_WS_WSDL_URL, CLIENT_SCALE_START);
+ util.waitForAll(TIME_5S);
+ // service B client
+ SWTBot wiz = open.newObject(WebServicesWebServiceClient.LABEL);
+ wiz.comboBoxWithLabel(
+ WebServicesWebServiceClient.TEXT_SERVICE_DEFINITION).setText(
+ BOTTOMUP_WS_WSDL_URL.replace(CLASS_A, CLASS_B));
+ bot.sleep(TIME_1S);// wait for wizard to validate wsdl url and enable 'Finish' button
+ selectJbossWSRuntime();
+ open.finish(wiz);
+ util.waitForAll(TIME_5S);
+ // create servlet which will inovke service
+ createInvokingServlet(TWO_SERVICES_CLIENT_SERVLET_NAME);
+
+ // we need to undeploy auto-created EAR and deploy service and client
+ // wars again
+ servers.removeAllProjectsFromServer(configuredState.getServer().name);
+ projectExplorer.runOnServer(BOTTOMUP_WS_PROJ_NAME);
+ projectExplorer.runOnServer(BOTTOMUP_WS_CLIENT_PROJ_NAME);
+ assertServiceResponseToClient(TWO_SERVICES_CLIENT_SERVLET_URL,
+ "1234567890");
+ assertServiceResponseToClient(TWO_SERVICES_CLIENT_SERVLET_URL,
+ "11111");
+ servers.removeAllProjectsFromServer(configuredState.getServer().name);
+ assertServiceNotDeployed(BOTTOMUP_WS_WSDL_URL);
+
+ }
+}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java 2010-04-28 12:35:16 UTC (rev 21777)
@@ -0,0 +1,26 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ws.ui.bot.test;
+
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+@SuiteClasses({
+ //SampleWebService.class,
+ TwoBUWSInOneProject.class,
+ //BottomUpWebService.class,
+ //TopDownWebService.class
+ })
+(a)RunWith(RequirementAwareSuite.class)
+public class WSAllBotTests {
+
+}
14 years, 8 months
JBoss Tools SVN: r21776 - in trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext: config and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2010-04-28 08:09:45 -0400 (Wed, 28 Apr 2010)
New Revision: 21776
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearProjects.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearWorkspace.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ViewBase.java
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTOpenExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotHyperlinkExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ConsoleView.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProblemsView.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
Log:
SWTbot extensions : improving custom annotations, extensions
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -1,57 +1,88 @@
- package org.jboss.tools.ui.bot.ext;
+package org.jboss.tools.ui.bot.ext;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.log4j.Logger;
+import org.eclipse.swtbot.swt.finder.junit.ScreenshotCaptureListener;
import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.config.requirement.RequirementBase;
import org.junit.runner.Runner;
+import org.junit.runner.notification.RunListener;
+import org.junit.runner.notification.RunNotifier;
import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.Suite;
import org.junit.runners.model.InitializationError;
import org.junit.runners.model.RunnerBuilder;
+import org.junit.runners.model.Statement;
/**
- * JUnit4 requirement aware testsuite runner. If suite class is annotated by @ RunWith({@link RequirementAwareSuite}) class, test classes can have {@link SWTBotTestRequires} annotations
+ * JUnit4 requirement aware testsuite runner. If suite class is annotated by @
+ * RunWith({@link RequirementAwareSuite}) class, test classes can have
+ * {@link SWTBotTestRequires} annotations
*
- * @author lzoubek(a)redhat.com
+ * @author lzoubek(a)redhat.com
*/
-public class RequirementAwareSuite extends Suite {
+public class RequirementAwareSuite extends Suite {
class ReqAwareClassRunner extends BlockJUnit4ClassRunner {
private final List<RequirementBase> requirements;
- public ReqAwareClassRunner(Class<?> klass, List<RequirementBase> requirements) throws InitializationError {
+
+ public ReqAwareClassRunner(Class<?> klass,
+ List<RequirementBase> requirements) throws InitializationError {
super(klass);
this.requirements = requirements;
}
+
@Override
- protected Object createTest() throws Exception {
- log.info("Fullfilling requirements before test "+getTestClass().getJavaClass());
- for (RequirementBase r : requirements) {
- r.fulfill();
+ public void run(RunNotifier notifier) {
+ // adding ability to create screen shot (taken from SWTBotJunit4ClassRunner)
+ RunListener failureSpy = new ScreenshotCaptureListener();
+ notifier.removeListener(failureSpy);
+ notifier.addListener(failureSpy);
+ try {
+ super.run(notifier);
}
- return super.createTest();
+ finally {
+ notifier.removeListener(failureSpy);
+ }
}
-
+ @Override
+ protected Statement withBeforeClasses(Statement statement) {
+ log.info("Fullfilling requirements before test "
+ + getTestClass().getJavaClass());
+ try {
+ for (RequirementBase r : requirements) {
+ r.fulfill();
+ }
+ } catch (Exception e) {
+ log.error("Fulfilling failed", e);
+ }
+
+ return super.withBeforeClasses(statement);
+ }
}
-
- private static final Logger log = Logger.getLogger(RequirementAwareSuite.class);
- private class RequirementAwareRunnerBuilder extends RunnerBuilder {
+
+ private static final Logger log = Logger
+ .getLogger(RequirementAwareSuite.class);
+
+ private class RequirementAwareRunnerBuilder extends RunnerBuilder {
@Override
- public Runner runnerForClass(Class<?> klass) throws Throwable {
- List<RequirementBase> reqs = TestConfigurator.getClassRequirements(klass);
- if (reqs!=null) {
- log.info("Returning runner for test class "+klass.getCanonicalName());
- return new ReqAwareClassRunner(klass,reqs);
+ public Runner runnerForClass(Class<?> klass) throws Throwable {
+ List<RequirementBase> reqs = TestConfigurator
+ .getClassRequirements(klass);
+ if (reqs != null) {
+ log.info("Returning runner for test class "
+ + klass.getCanonicalName());
+ return new ReqAwareClassRunner(klass, reqs);
}
- log.info("Skipping test class "+klass.getCanonicalName());
+ log.info("Skipping test class " + klass.getCanonicalName());
return null;
}
-
}
+
private final ArrayList<Runner> runners = new ArrayList<Runner>();
/**
@@ -65,14 +96,14 @@
* @param klass
* the root class
*/
- public RequirementAwareSuite(Class<?> klass)
- throws Throwable {
+ public RequirementAwareSuite(Class<?> klass) throws Throwable {
super(klass, Collections.<Runner> emptyList());
runners.add(new Suite(klass, new RequirementAwareRunnerBuilder()));
- }
+ }
+
@Override
protected List<Runner> getChildren() {
return runners;
- }
+ }
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTOpenExt.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTOpenExt.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTOpenExt.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -76,19 +76,7 @@
}
}
- /**
- * selects and returns given view, view must be opened
- *
- * @param view
- * @return
- */
- public SWTBotView viewSelect(IView view) {
- SWTBotView v = bot.viewByTitle(view.getName());
- v.show();
- v.setFocus();
- return v;
- }
/**
* selects given actionItem in bot's tree();
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -41,6 +41,11 @@
public static final ConsoleView console = new ConsoleView();
// config & state
+ /**
+ * represents state of configured stuff like server, runtimes etc
+ * NOTE : this state can change right before test class is instantiated (because of possibly various requirements of tests defined by its annotations),
+ * please do not bind its properties, use them directly
+ */
public static final ConfiguredState configuredState = new ConfiguredState();
public static Properties properties;
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -10,7 +10,15 @@
public class Annotations {
/**
* annotation which defines requirement of whole test Class
- * by default all sub-annotations are optional and are disabled
+ * by default all sub-annotations are optional and are disabled, please go through
+ * documentation of all items.
+ * <ul>
+ * <li>{@link SWTBotTestRequires#clearProjects()}</li>
+ * <li>{@link SWTBotTestRequires#clearWorkspace()}</li>
+ * <li>{@link SWTBotTestRequires#perspective()}</li>
+ * <li>{@link Server}</li>
+ * <li>{@link Seam}</li>
+ * </ul>
* @author lzoubek
*
*/
@@ -21,12 +29,28 @@
* optionally require server
*/
Server server() default @Server( required = false );
+ /**
+ * optionally require seam runtime
+ * @return
+ */
Seam seam() default @Seam( required = false );
/**
* name of perspective to run within
* @return
*/
String perspective() default "";
+ /**
+ * my default workspace is cleaned before test (attempt to close all shells and editors, closes 'Welcome' view),
+ * setting this to false will disable this feature
+ * @return
+ */
+ boolean clearWorkspace() default true;
+ /**
+ * by default all projects are undeployed from pre-configured server & deleted before test runs
+ * setting this to false will disable this feature
+ * @return
+ */
+ boolean clearProjects() default true;
}
/**
* Server requirement, by default matches all server types and versions
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -6,42 +6,58 @@
import org.jboss.tools.ui.bot.ext.config.requirement.RequirementBase;
/**
- * this class represents state of running test suite. Properties of this object should be changed only by
- * classed extending {@link RequirementBase} class.
+ * this class represents state of running test suite. Properties of this object
+ * should be changed only by classed extending {@link RequirementBase} class.
+ *
* @author lzoubek
- *
+ *
*/
public class ConfiguredState {
- private List<String> jreList = new Vector<String>();
+ private List<String> jreList = new Vector<String>();
private Server server = new Server();
private Seam seam = new Seam();
-
+ private boolean welcomeViewVisible = true;
+
+ public boolean isWelcomeViewVisible() {
+ return welcomeViewVisible;
+ }
+
+ public void setWelcomeViewVisible(boolean welcomeViewVisible) {
+ this.welcomeViewVisible = welcomeViewVisible;
+ }
+
/**
* gets list of installed jre's (without the default one)
+ *
* @return
*/
public List<String> getJreList() {
return jreList;
}
+
/**
* gets configured seam runtime
+ *
* @return
*/
public Seam getSeam() {
return seam;
}
+
/**
* gets configured server state
+ *
* @return
*/
public Server getServer() {
return server;
}
+
public class Server {
/**
- * is server runtime & server added?
+ * is server runtime & server added?
*/
- public boolean isConfigured=false;
+ public boolean isConfigured = false;
/**
* is server running?
*/
@@ -49,12 +65,12 @@
/**
* version of server
*/
- public String version=null;
+ public String version = null;
/**
* type (EAP | JbossAS )
*/
- public String type=null;
+ public String type = null;
/**
* name of added server/runtime
*/
@@ -62,20 +78,21 @@
/**
* version of java configured to server (1.5 or 1.6)
*/
- public String withJavaVersion=null;
+ public String withJavaVersion = null;
}
+
public class Seam {
/**
* version of seam runtime
*/
- public String version=null;
+ public String version = null;
/**
* is configured?
*/
- public boolean isConfiured=false;
+ public boolean isConfiured = false;
/**
* name of added runtime
*/
- public String name=null;
+ public String name = null;
}
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -5,19 +5,20 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import java.util.Properties;
import org.jboss.tools.ui.bot.ext.Activator;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.*;
-import org.jboss.tools.ui.bot.ext.config.requirement.AddSeam;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Seam;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
import org.jboss.tools.ui.bot.ext.config.requirement.RequirementBase;
-import org.jboss.tools.ui.bot.ext.config.requirement.StartServer;
-import org.jboss.tools.ui.bot.ext.config.requirement.SwitchPerspective;
public class TestConfigurator {
-
-
+
public class Keys {
public static final String SERVER = "SERVER";
public static final String SEAM = "SEAM";
@@ -63,8 +64,8 @@
} catch (Exception ex) {
ex.printStackTrace();
}
-
- //properties got loaded
+
+ // properties got loaded
try {
server = ServerBean.fromString(getProperty(Keys.SERVER));
seam = SeamBean.fromString(getProperty(Keys.SEAM));
@@ -75,9 +76,12 @@
}
/**
- * returns null when given Server annotation does not match global test configuration
- * (e.g. Test wants Server type EAP but we are running on JbossAS)
- * @param s Server annotation
+ * returns null when given Server annotation does not match global test
+ * configuration (e.g. Test wants Server type EAP but we are running on
+ * JbossAS)
+ *
+ * @param s
+ * Server annotation
* @return StartServer requirement otherwise
*/
private static RequirementBase getServerRequirement(Server s) {
@@ -85,22 +89,27 @@
return null;
}
if (!s.type().equals(ServerType.ALL)) {
- if (s.type().equals(ServerType.EAP) && !server.type.equals(ServerBean.ServerType.EAP)) {
+ if (s.type().equals(ServerType.EAP)
+ && !server.type.equals(ServerBean.ServerType.EAP)) {
return null;
}
- if (s.type().equals(ServerType.JbossAS) && !server.type.equals(ServerBean.ServerType.JBOSS_AS)) {
+ if (s.type().equals(ServerType.JbossAS)
+ && !server.type.equals(ServerBean.ServerType.JBOSS_AS)) {
return null;
}
}
-
+
if (!matches(server.version, s.operator(), s.version())) {
return null;
}
- return new StartServer();
+ return RequirementBase.createStartServer();
}
+
/**
- * returns null when given Seam annotation does not match global test configuration
- * (e.g. Test wants Seam version 2.2 but we are running on 1.2)
+ * returns null when given Seam annotation does not match global test
+ * configuration (e.g. Test wants Seam version 2.2 but we are running on
+ * 1.2)
+ *
* @param s
* @return AddSeam requirement otherwise
*/
@@ -111,62 +120,80 @@
if (!matches(seam.version, s.operator(), s.version())) {
return null;
}
- return new AddSeam();
+ return RequirementBase.createAddSeam();
}
+
/**
- * returns list of requirements if given class (Test) can run, all this is done by exploring class'es
- * annotations (see {@link SWTBotTestRequires}
- * if class cannot run returns null
+ * returns list of requirements if given class (Test) can run, all this is
+ * done by exploring class'es annotations (see {@link SWTBotTestRequires} if
+ * class cannot run returns null
*/
public static List<RequirementBase> getClassRequirements(Class<?> klass) {
-
- SWTBotTestRequires requies = klass.getAnnotation(SWTBotTestRequires.class);
- // all not annotated classes can run
- if (requies==null) {
- return null;
- }
+
+ SWTBotTestRequires requies = klass
+ .getAnnotation(SWTBotTestRequires.class);
// internal list
List<RequirementBase> reqs = new ArrayList<RequirementBase>();
-
+ // all not annotated classes can run
+ if (requies == null) {
+ return reqs;
+ }
if (requies.server().required()) {
RequirementBase req = getServerRequirement(requies.server());
- if (req==null) {
+ if (req == null) {
return null;
}
reqs.add(req);
}
if (requies.seam().required()) {
RequirementBase req = getSeamRequirement(requies.seam());
- if (req==null) {
+ if (req == null) {
return null;
}
reqs.add(req);
}
if (!"".equals(requies.perspective())) {
- reqs.add(new SwitchPerspective(requies.perspective()));
+ reqs.add(RequirementBase.createSwitchPerspective(requies
+ .perspective()));
}
+ if (requies.clearWorkspace()) {
+ reqs.add(RequirementBase.createClearWorkspace());
+ }
+ if (requies.clearProjects()) {
+ reqs.add(RequirementBase.createClearProjects());
+ }
+ // sort requirements by priority
+ Collections.sort(reqs, new Comparator<RequirementBase>() {
+ public int compare(RequirementBase o1, RequirementBase o2) {
+ return o1.getPriority() - o2.getPriority();
+ }
+ });
+
return reqs;
}
+
/**
* implements comparison of 2 params by given operator (in this order)
- * params are expected version strings (in form X.X or XX)
- * if param1 or param2 is '*' true is returned
+ * params are expected version strings (in form X.X or XX) if param1 or
+ * param2 is '*' true is returned
+ *
* @param param1
- * @param operator (=,<,>=<=,>=,!=)
+ * @param operator
+ * (=,<,>=<=,>=,!=)
* @param param2
*
* @return
*/
- public static boolean matches(String param1,String operator,String param2) {
- if ("*".equals(param1)||"*".equals(param2)) {
+ public static boolean matches(String param1, String operator, String param2) {
+ if ("*".equals(param1) || "*".equals(param2)) {
return true;
}
if ("=".equals(operator)) {
- return param1.equals(param2);
+ return param1.equals(param2);
}
if ("!=".equals(operator)) {
- return !param1.equals(param2);
- }
+ return !param1.equals(param2);
+ }
int ver1 = versionToNumber(param1);
int ver2 = versionToNumber(param2);
if (">".equals(operator)) {
@@ -183,11 +210,13 @@
}
return false;
}
+
private static int versionToNumber(String version) {
return Integer.parseInt(version.replaceAll("\\.", ""));
}
+
public static String getProperty(String key) {
return swtTestProperties.getProperty(key);
- //return SWTTestExt.util.getValue(swtTestProperties, key);
+ // return SWTTestExt.util.getValue(swtTestProperties, key);
}
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -25,7 +25,7 @@
public AddServer() {
String javaVer = getNeededJavaVersion(TestConfigurator.server.withJavaVersion);
if (javaVer!=null) {
- AddJRE addJava = new AddJRE(javaVer);
+ AddJRE addJava = createAddJRE(javaVer);
getDependsOn().add(addJava);
javaName=addJava.getAddedAsName();
}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearProjects.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearProjects.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearProjects.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -0,0 +1,36 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+/**
+ * undeploys and deletes all projects
+ * @author lzoubek(a)redhat.com
+ *
+ */
+public class ClearProjects extends RequirementBase {
+
+ @Override
+ public boolean checkFulfilled() {
+ try {
+ SWTBotTreeItem[] items = SWTTestExt.projectExplorer.show().bot().tree().getAllItems();
+ if (items.length!=0) {
+ for (SWTBotTreeItem item : items) {
+ log.info("Item "+item.getText());
+ }
+ }
+ return items.length==0;
+ }
+ catch (Exception ex) {
+ log.error("Unable to determine count of projects",ex);
+ return false;
+ }
+ }
+
+ @Override
+ public void handle() {
+ SWTTestExt.servers.removeAllProjectsFromServer();
+ SWTTestExt.projectExplorer.deleteAllProjects();
+
+ }
+
+}
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearProjects.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearWorkspace.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearWorkspace.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearWorkspace.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -0,0 +1,38 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+import java.util.List;
+import java.util.Vector;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.gen.IView;
+
+public class ClearWorkspace extends RequirementBase {
+
+ @Override
+ public boolean checkFulfilled() {
+ try {
+ return SWTTestExt.bot.shells().length>=2 && SWTTestExt.bot.editors().isEmpty() && !SWTTestExt.configuredState.isWelcomeViewVisible();
+ }
+ catch (Exception ex) {
+ log.error("Cannot determine, if all editors and shells are closed", ex);
+ return false;
+ }
+ }
+
+ @Override
+ public void handle() {
+ SWTTestExt.bot.closeAllShells();
+ SWTTestExt.bot.closeAllEditors();
+ SWTTestExt.open.viewClose(new IView(){
+ public List<String> getGroupPath() {
+ // TODO Auto-generated method stub
+ return new Vector<String>();
+ }
+ public String getName() {
+ // TODO Auto-generated method stub
+ return "Welcome";
+ }});
+ SWTTestExt.configuredState.setWelcomeViewVisible(false);
+
+ }
+
+}
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearWorkspace.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -4,67 +4,139 @@
import java.util.Vector;
import org.apache.log4j.Logger;
+
/**
* An abstract class for all requirements
+ *
* @author lzoubek
- *
+ *
*/
public abstract class RequirementBase {
+ private int priority = 0;
protected final Logger log = Logger.getLogger(this.getClass());
- public RequirementBase() {
+
+ public RequirementBase() {
}
-
+
private List<RequirementBase> dependsOn;
+
/**
* gets the list of reqs on which this one depends
+ *
* @return
*/
public List<RequirementBase> getDependsOn() {
- if (dependsOn==null) {
+ if (dependsOn == null) {
dependsOn = new Vector<RequirementBase>();
}
return dependsOn;
}
+
/**
* fulfills this requirement. First fulfills the dependent ones, then this.
+ *
* @throws RequirementNotFulfilledException
*/
public void fulfill() throws RequirementNotFulfilledException {
- log.info("Fulfilling requirement '"+this.getClass().getName()+"'");
+ log.info("Fulfilling requirement '" + this.getClass().getName() + "'");
try {
- for (RequirementBase dep : getDependsOn()) {
- dep.fulfill();
- }
- if (!checkFulfilled()) {
- handle();
+ if (!getDependsOn().isEmpty()) {
+ log.info("Fulfilling dependencies");
+ for (RequirementBase dep : getDependsOn()) {
+ dep.fulfill();
+ }
+ log.info("All dependencies fulfilled");
+ }
if (!checkFulfilled()) {
- throw new Exception("Requirement implementation error, checkFulfilled() failed after calling handle();");
+ handle();
+ if (!checkFulfilled()) {
+ throw new Exception(
+ "Requirement implementation error, checkFulfilled() failed after calling "
+ + this.getClass().getName() + ".handle();");
+ }
}
- }
} catch (Exception ex) {
- log.info("Unable to fulfill requirement '"+this.getClass().getName()+"'");
- throw new RequirementNotFulfilledException("Unable to fulfill requirement "+this.getClass().getCanonicalName(),ex);
+ log.error("Unable to fulfill requirement '"
+ + this.getClass().getName() + "'", ex);
+ throw new RequirementNotFulfilledException(
+ "Unable to fulfill requirement "
+ + this.getClass().getCanonicalName(), ex);
}
- log.info("Requirement '"+this.getClass().getName()+"' fulfilled");
-
+ log.info("Requirement '" + this.getClass().getName() + "' fulfilled");
+
}
+
/**
* must return true if the Requirement is already fulfilled
+ *
* @return
*/
public abstract boolean checkFulfilled();
+
/**
- * handles (should do everything to fulfill requirement), {@link RequirementBase#checkFulfilled()}
- * should return true after calling this method
+ * handles (should do everything to fulfill requirement),
+ * {@link RequirementBase#checkFulfilled()} should return true after calling
+ * this method
*/
public abstract void handle();
-
- @Override
- public int hashCode() {
- return getClass().hashCode();
+
+ /**
+ * gets requirement priority, higher values are fulfilled later
+ *
+ * @return
+ */
+ public int getPriority() {
+ return priority;
}
- @Override
- public boolean equals(Object obj) {
- return this.getClass().equals(obj.getClass());
+
+ /**
+ * sets requirement priority, higher values are fulfilled later
+ *
+ * @param priority
+ */
+ public void setPriority(int priority) {
+ this.priority = priority;
}
+
+ // need to have requirement's creation methods at one place to have overview
+ // by priority
+
+ public static RequirementBase createAddServer() {
+ RequirementBase req = new AddServer();
+ return req;
+ }
+
+ public static RequirementBase createStartServer() {
+ RequirementBase req = new StartServer();
+ return req;
+ }
+
+ public static RequirementBase createAddSeam() {
+ RequirementBase req = new AddSeam();
+ return req;
+ }
+
+ public static AddJRE createAddJRE(String version) {
+ AddJRE req = new AddJRE(version);
+ return req;
+ }
+
+ public static RequirementBase createSwitchPerspective(String name) {
+ RequirementBase req = new SwitchPerspective(name);
+ req.setPriority(1);
+ return req;
+ }
+
+ public static RequirementBase createClearWorkspace() {
+ RequirementBase req = new ClearWorkspace();
+ req.setPriority(-2);
+ return req;
+ }
+
+ public static RequirementBase createClearProjects() {
+ RequirementBase req = new ClearProjects();
+ req.setPriority(-1);
+ return req;
+ }
+
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -10,7 +10,7 @@
public StartServer() {
// define dependency
- getDependsOn().add(new AddServer());
+ getDependsOn().add(createAddServer());
}
@Override
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -16,6 +16,8 @@
import static org.hamcrest.Matchers.instanceOf;
import java.util.Arrays;
+import java.util.List;
+import java.util.Vector;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Control;
@@ -49,6 +51,7 @@
*/
public static MenuItem getContextMenu(final AbstractSWTBot<?> bot,
final String text, final boolean hideAfterwards) {
+ final List<String> foundMenuItems = new Vector<String>();
final MenuItem menuItem = UIThreadRunnable
.syncExec(new WidgetResult<MenuItem>() {
@SuppressWarnings("unchecked")
@@ -56,7 +59,7 @@
MenuItem menuItem = null;
Menu menu = getWidgetMenu(bot.widget);
Matcher<?> matcher = allOf(instanceOf(MenuItem.class),withMnemonic(text));
- menuItem = show(menu, matcher, hideAfterwards);
+ menuItem = show(menu, matcher, hideAfterwards, foundMenuItems);
if (menuItem != null) {
menu = menuItem.getMenu();
} else {
@@ -66,7 +69,7 @@
}
});
if (menuItem == null) {
- throw new WidgetNotFoundException("Could not find menu: " + text);
+ throw new WidgetNotFoundException("Could not find menu: '" + text+"', found items :"+Arrays.toString(foundMenuItems.toArray()));
}
else{
if (hideAfterwards){
@@ -86,14 +89,18 @@
* @param menu
* @param matcher
* @param hideAfterwards
+ * @param foundMenuItems list of menuItems found (useful for debugging), items found in menu are appended into given list, can be null
* @return
*/
- private static MenuItem show(final Menu menu, final Matcher<?> matcher, final boolean hideAfterwards) {
+ private static MenuItem show(final Menu menu, final Matcher<?> matcher, final boolean hideAfterwards, List<String> foundMenuItems) {
if (menu != null) {
menu.notifyListeners(SWT.Show, new Event());
MenuItem[] items = menu.getItems();
for (final MenuItem menuItem : items) {
- if (matcher.matches(menuItem)) {
+ if (foundMenuItems!=null) {
+ foundMenuItems.add(menuItem.getText());
+ }
+ if (matcher.matches(menuItem)) {
return menuItem;
}
}
@@ -191,7 +198,7 @@
for (String text : texts) {
Matcher<?> matcher = allOf(instanceOf(MenuItem.class),
withMnemonic(text));
- menuItem = show(menu, matcher,false);
+ menuItem = show(menu, matcher,false,null);
if (menuItem != null) {
menu = menuItem.getMenu();
} else {
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotHyperlinkExt.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotHyperlinkExt.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotHyperlinkExt.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -17,6 +17,7 @@
/**
* activates hyper-link by sending special key do widget
+ * NOTE : this does not work well when SWTBot is running inside VNC
* @return
*/
public AbstractSWTBot<Hyperlink> activate() {
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ConsoleView.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ConsoleView.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ConsoleView.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -10,24 +10,18 @@
******************************************************************************/
package org.jboss.tools.ui.bot.ext.view;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.GeneralConsole;
-
import org.apache.log4j.Logger;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
-import org.jboss.tools.ui.bot.ext.SWTBotExt;
-import org.jboss.tools.ui.bot.ext.SWTOpenExt;
-import org.jboss.tools.ui.bot.ext.gen.IView;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.GeneralConsole;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
/**
* Manage Console View related tasks
* @author Vlado Pakan
*
*/
-public class ConsoleView extends SWTBotExt {
- protected IView viewObject;
- protected final SWTOpenExt open;
+public class ConsoleView extends ViewBase {
public static final int PROBLEMS_DESCRIPTION_COLUMN_INDEX = 0;
public static final int PROBLEMS_RESOURCE_COLUMN_INDEX = 1;
public static final int PROBLEMS_PATH_COLUMN_INDEX = 2;
@@ -35,15 +29,8 @@
Logger log = Logger.getLogger(ConsoleView.class);
public ConsoleView() {
viewObject = GeneralConsole.LABEL;
- open = new SWTOpenExt(this);
}
-
- /**
- * shows Explorer view
- */
- public void show() {
- open.viewOpen(viewObject);
- }
+
/**
* Returns actual console text
* @return
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -3,7 +3,6 @@
import java.util.List;
import java.util.Vector;
-import org.apache.log4j.Logger;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
@@ -13,12 +12,9 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
-import org.jboss.tools.ui.bot.ext.SWTOpenExt;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
import org.jboss.tools.ui.bot.ext.Timing;
-import org.jboss.tools.ui.bot.ext.gen.IView;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
/**
@@ -26,23 +22,11 @@
* @author lzoubek
*
*/
-public abstract class ExplorerBase extends SWTBotExt {
- /**
- * view object representing current view, MUST be defined in derived constructor (for use, see {@link SWTOpenExt#viewOpen(IView)}
- */
- protected IView viewObject;
- protected final SWTOpenExt open;
- Logger log = Logger.getLogger(ExplorerBase.class);
+public abstract class ExplorerBase extends ViewBase {
+
public ExplorerBase() {
- open = new SWTOpenExt(this);
+
}
-
- /**
- * shows Explorer view
- */
- public void show() {
- open.viewOpen(viewObject);
- }
/*
* Selects given project in Package Explorer
*/
@@ -78,7 +62,8 @@
checkBox().click();
}
open.finish(this,IDELabel.Button.OK);
- new SWTUtilExt(this).waitForNonIgnoredJobs();
+ new SWTUtilExt(this).waitForNonIgnoredJobs();
+ new SWTUtilExt(this).waitForAll(Timing.time3S());
}
/**
* deletes all projects from workspace
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProblemsView.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProblemsView.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProblemsView.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -10,9 +10,6 @@
******************************************************************************/
package org.jboss.tools.ui.bot.ext.view;
-import org.jboss.tools.ui.bot.ext.SWTEclipseExt.StringConditionType;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.GeneralProblems;
-
import java.util.LinkedList;
import org.apache.log4j.Logger;
@@ -22,8 +19,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
-import org.jboss.tools.ui.bot.ext.SWTOpenExt;
-import org.jboss.tools.ui.bot.ext.gen.IView;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt.StringConditionType;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.types.ViewType;
/**
@@ -31,25 +27,17 @@
* @author Vlado Pakan
*
*/
-public class ProblemsView extends SWTBotExt {
- protected IView viewObject;
- protected final SWTOpenExt open;
+public class ProblemsView extends ViewBase {
+
public static final int PROBLEMS_DESCRIPTION_COLUMN_INDEX = 0;
public static final int PROBLEMS_RESOURCE_COLUMN_INDEX = 1;
public static final int PROBLEMS_PATH_COLUMN_INDEX = 2;
public static final int PROBLEMS_TYPE_COLUMN_INDEX = 4;
Logger log = Logger.getLogger(ProblemsView.class);
public ProblemsView() {
- viewObject = GeneralProblems.LABEL;
- open = new SWTOpenExt(this);
+
}
-
- /**
- * shows Explorer view
- */
- public void show() {
- open.viewOpen(viewObject);
- }
+
/**
* Returns all warnings nodes filtered by input parameters
* @param bot
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java 2010-04-28 12:09:06 UTC (rev 21775)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -1,55 +1,46 @@
package org.jboss.tools.ui.bot.ext.view;
-import org.apache.log4j.Logger;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.SWTBotExt;
-import org.jboss.tools.ui.bot.ext.SWTOpenExt;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
import org.jboss.tools.ui.bot.ext.Timing;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem.View;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.ServerServers;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
-public class ServersView extends SWTBotExt {
+public class ServersView extends ViewBase {
- Logger log = Logger.getLogger(ProjectExplorer.class);
- private final SWTOpenExt open;
public ServersView() {
- open = new SWTOpenExt(this);
+ viewObject = ServerServers.LABEL;
}
/**
- * shows Project Explorer view
- */
- public void show() {
- open.viewOpen(ActionItem.View.ServerServers.LABEL);
- }
-
- /**
* removes all projects from server with given name
* @param serverName
*/
public void removeAllProjectsFromServer(String serverName) {
- SWTBot bot = open.viewSelect(ServerServers.LABEL).bot();
- SWTBotTree tree = bot.tree();
+ if (serverName==null) {
+ return;
+ }
+ SWTBotTree tree = show().bot().tree();
SWTBotTreeItem server = findServerByName(tree,serverName);
if (server!=null) {
ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.ADD_AND_REMOVE, false)).click();
try {
- shell(IDELabel.Menu.ADD_AND_REMOVE).activate();
- SWTBotButton btRemoveAll=button("<< Remove All");
+ SWTBotShell shell = shell(IDELabel.Menu.ADD_AND_REMOVE);
+ shell.activate();
+ SWTBotButton btRemoveAll=shell.bot().button("<< Remove All");
if (btRemoveAll.isEnabled()) {
btRemoveAll.click();
log.info("Removing all projects from server '"+serverName+"'");
}
- open.finish(this, IDELabel.Button.FINISH);
+ open.finish(shell.bot(), IDELabel.Button.FINISH);
new SWTUtilExt(this).waitForNonIgnoredJobs();
new SWTUtilExt(this).waitForAll(Timing.time3S());
} catch (WidgetNotFoundException ex) {
@@ -65,7 +56,7 @@
* @param serverName
*/
public void stopServer(String serverName) {
- SWTBot bot = open.viewSelect(ServerServers.LABEL).bot();
+ SWTBot bot = open.viewOpen(ServerServers.LABEL).bot();
SWTBotTree tree = bot.tree();
SWTBotTreeItem server = findServerByName(tree,serverName);
if (server!=null) {
@@ -82,7 +73,7 @@
*/
public void startServer(String serverName) {
show();
- SWTBot bot = open.viewSelect(ServerServers.LABEL).bot();
+ SWTBot bot = open.viewOpen(ServerServers.LABEL).bot();
SWTBotTree tree = bot.tree();
SWTBotTreeItem server = findServerByName(tree,serverName);
if (server!=null) {
@@ -108,9 +99,8 @@
* @param projectName
*/
public void removeProjectFromServers(String projectName){
-
- SWTBot bot = open.viewOpen(View.ServerServers.LABEL).bot();
- SWTBotTree serverTree = bot.tree();
+
+ SWTBotTree serverTree = show().bot().tree();
// Expand All
for (SWTBotTreeItem serverTreeItem : serverTree.getAllItems()){
serverTreeItem.expand();
@@ -128,8 +118,9 @@
log.info("Found project to be removed from server: " + serverTreeItemChildren[itemIndex].getText());
ContextMenuHelper.prepareTreeItemForContextMenu(serverTree,serverTreeItemChildren[itemIndex]);
new SWTBotMenu(ContextMenuHelper.getContextMenu(serverTree, IDELabel.Menu.REMOVE, false)).click();
- bot.shell("Server").activate();
- open.finish(this, IDELabel.Button.OK);
+ SWTBotShell shell = shell("Server");
+ shell.activate();
+ open.finish(shell.bot(), IDELabel.Button.OK);
log.info("Removed project from server: " + serverTreeItemChildren[itemIndex].getText());
new SWTUtilExt(this).waitForNonIgnoredJobs();
} else {
@@ -139,7 +130,12 @@
}
}
/**
- * removes project with given name from all servers
+ * removes projects from pre-configured server
* @param projectName
*/
+ public void removeAllProjectsFromServer() {
+ removeAllProjectsFromServer(SWTTestExt.configuredState.getServer().name);
+
+ }
+
}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ViewBase.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ViewBase.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ViewBase.java 2010-04-28 12:09:45 UTC (rev 21776)
@@ -0,0 +1,33 @@
+package org.jboss.tools.ui.bot.ext.view;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTOpenExt;
+import org.jboss.tools.ui.bot.ext.gen.IView;
+/**
+ * base class for all view extensions
+ * @author lzoubek(a)redhat.com
+ *
+ */
+public class ViewBase extends SWTBotExt {
+ /**
+ * view object representing current view, MUST be defined in derived
+ * constructor (for use, see {@link SWTOpenExt#viewOpen(IView)}
+ */
+ protected IView viewObject;
+ protected final SWTOpenExt open;
+ Logger log = Logger.getLogger(ViewBase.class);
+
+ public ViewBase() {
+ open = new SWTOpenExt(this);
+ }
+
+ /**
+ * shows view
+ */
+ public SWTBotView show() {
+ return open.viewOpen(viewObject);
+ }
+
+}
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ViewBase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 8 months
JBoss Tools SVN: r21775 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-04-28 08:09:06 -0400 (Wed, 28 Apr 2010)
New Revision: 21775
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
Log:
TOOLSDOC-45 - link to development (workshop) database broken - fixed, link points to http://docs.jboss.org/tools/resources/GSG_database.zip now
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2010-04-28 03:52:28 UTC (rev 21774)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2010-04-28 12:09:06 UTC (rev 21775)
@@ -23,9 +23,9 @@
<section id="start_dev_db">
<title>Start Development Database</title>
- <para>Before opening the JBoss Developer studio you need to <ulink
- url="http://anonsvn.jboss.org/repos/jbosstools/trunk/documentation/guides/Gett..."
- >download</ulink> and start a Workshop Database.</para>
+ <para>Before opening the JBoss Developer studio you need to download and start <ulink
+ url="http://docs.jboss.org/tools/resources/GSG_database.zip"
+ >Workshop Database</ulink> .</para>
<para>To start the database just run <property>./runDBServer.sh</property> or
<property>runDBServer.bat</property> from the database directory.</para>
<para>The end result should be a console window that looks like:</para>
14 years, 8 months