JBoss Tools SVN: r36782 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui: src/org/jboss/tools/openshift/express/internal/core and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2011-11-30 09:37:03 -0500 (Wed, 30 Nov 2011)
New Revision: 36782
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/TailServerLog.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
Log:
OPEN - issue JBIDE-10152: enable console for openshift server rhc-tailfiles
https://issues.jboss.org/browse/JBIDE-10152
First step: POC in a basic java application (no Eclipse integration yet)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-11-30 14:08:41 UTC (rev 36781)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-11-30 14:37:03 UTC (rev 36782)
@@ -29,7 +29,10 @@
org.eclipse.team.ui;bundle-version="3.6.100",
org.jboss.tools.openshift.egit.core;bundle-version="2.3.0",
org.eclipse.jdt.launching;bundle-version="3.6.0",
- org.eclipse.debug.ui;bundle-version="3.7.0"
+ org.eclipse.debug.ui;bundle-version="3.7.0",
+ com.jcraft.jsch.source;bundle-version="0.1.44";resolution:=optional,
+ org.eclipse.ui.navigator;bundle-version="3.5.100",
+ org.apache.commons.io;bundle-version="1.4.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.jboss.tools.common.databinding,
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/TailServerLog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/TailServerLog.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/TailServerLog.java 2011-11-30 14:37:03 UTC (rev 36782)
@@ -0,0 +1,156 @@
+package org.jboss.tools.openshift.express.internal.core.console;
+
+/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+
+import org.apache.commons.io.IOUtils;
+import org.eclipse.jgit.util.Base64;
+
+import com.jcraft.jsch.Channel;
+import com.jcraft.jsch.ChannelExec;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Logger;
+import com.jcraft.jsch.Session;
+import com.jcraft.jsch.UserInfo;
+
+public class TailServerLog {
+
+ public static void main(String[] args) {
+ TailServerLog tailer = new TailServerLog();
+ if(args.length != 3) {
+ System.out.println("Usage: TailServerLog <appId> <host> <file>");
+ }
+ String user = args[0]; // eg: "c883f7e5f7824c49bff4682731ec6e56"
+ String host = args[1]; // eg: "jee-xcoulon.rhcloud.com";
+ String filePath = args[2]; // eg: "jee/logs/server.log";
+ String options = "-f -n 100"; // well, you change it here ;-)
+ try {
+ tailer.tail(user, host, filePath, options, System.out);
+ } catch (JSchException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ public void tail(final String user, final String host, final String filePath, final String options,
+ final OutputStream out) throws JSchException, IOException {
+
+ JSch.setLogger(new MyLogger());
+ final JSch jsch = new JSch();
+ final String libraRSAPrivateKeyPath = System.getProperty("user.home") + "/.ssh/libra_id_rsa";
+ jsch.addIdentity(libraRSAPrivateKeyPath);
+ final Session session = jsch.getSession(user, host, 22);
+
+ // username and password will be given via UserInfo interface.
+ session.setUserInfo(new MyUserInfo());
+ session.connect();
+
+ // the rhc-tail-files command template
+ // ssh_cmd =
+ // "ssh -t #{app_uuid}(a)#{app}-#{namespace}.#{rhc_domain} 'tail#{opt['opts'] ? ' --opts ' + Base64::encode64(opt['opts']).chomp : ''} #{file_glob}'"
+ final String command = buildCommand(filePath, options);
+ final Channel channel = session.openChannel("exec");
+ ((ChannelExec) channel).setCommand(command);
+
+ // get I/O streams for remote tail
+ final InputStream in = channel.getInputStream();
+ try {channel.connect();
+ out.write("...\n".getBytes());
+ IOUtils.copy(in, out);
+ } catch(Throwable e) {
+ e.printStackTrace();
+ }
+ finally {
+ session.disconnect();
+ }
+
+ }
+
+ private String buildCommand(final String filePath, final String options) {
+ StringBuilder commandBuilder = new StringBuilder("tail ");
+ if (options != null && !options.isEmpty()) {
+ final String opts = Base64.encodeBytes(options.getBytes());
+ commandBuilder.append("--opts ").append(opts).append(" ");
+ }
+ commandBuilder.append(filePath);
+ final String command = commandBuilder.toString();
+ System.out.println("cmd= '" + command + "'");
+ return command;
+ }
+
+
+ public static class MyUserInfo implements UserInfo {
+
+ private String passphrase = null;
+
+ public String getPassword() {
+ return null;
+ }
+
+ public boolean promptYesNo(String str) {
+ // always accept
+ System.out.println("Answering yes to: " + str);
+ return true;
+ }
+
+ public String getPassphrase() {
+ return passphrase;
+ }
+
+ public boolean promptPassphrase(String message) {
+ // prompt the user to enter their name
+ System.out.print("Enter your passphrase for : ");
+ // open up standard input
+ BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
+ // read the username from the command-line; need to use try/catch
+ // with the
+ // readLine() method
+ try {
+ passphrase = br.readLine();
+ } catch (IOException ioe) {
+ System.out.println("IO error trying to read your passphrase!");
+ System.exit(1);
+ }
+ return true;
+ }
+
+ public boolean promptPassword(String message) {
+ return true;
+ }
+
+ public void showMessage(String message) {
+ System.out.println(message);
+ }
+
+ }
+
+ static class MyLogger implements Logger {
+
+ static java.util.Hashtable<Integer, String> name = new java.util.Hashtable<Integer, String>();
+ static {
+ name.put(new Integer(DEBUG), "DEBUG: ");
+ name.put(new Integer(INFO), "INFO: ");
+ name.put(new Integer(WARN), "WARN: ");
+ name.put(new Integer(ERROR), "ERROR: ");
+ name.put(new Integer(FATAL), "FATAL: ");
+ }
+
+ public boolean isEnabled(int level) {
+ return true;
+ }
+
+ public void log(int level, String message) {
+ System.err.print(name.get(new Integer(level)));
+ System.err.println(message);
+ }
+
+ }
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/TailServerLog.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 4 months
JBoss Tools SVN: r36781 - trunk/download.jboss.org/jbosstools/examples.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2011-11-30 09:08:41 -0500 (Wed, 30 Nov 2011)
New Revision: 36781
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.xml
Log:
JBIDE-9776 : fixed wrong webapp archetype
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.xml 2011-11-30 13:46:47 UTC (rev 36780)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.xml 2011-11-30 14:08:41 UTC (rev 36781)
@@ -1,39 +1,56 @@
<projects>
<project>
- <category>Weld archetypes</category>
+ <category>Java EE 6 Quickstarts</category>
<name>jboss-javaee6-webapp</name>
<included-projects>jboss-javaee6-webapp</included-projects>
- <shortDescription>Weld Java EE 6 example</shortDescription>
+ <shortDescription>Java EE 6 example (Maven archetype)</shortDescription>
<description>
-The example demonstrates Weld Java EE 6 application.
-It will create the jboss-javaee6-webapp project in your workspace based on the org.jboss.weld.archetypes:jboss-javaee6-webapp:1.0.1.Beta2 archetype.
+This is your project! It's a sample, deployable Maven 3 project to help you get your foot in the door developing with Java EE 6 on JBoss AS 7.
+This project is setup to allow you to create a compliant Java EE 6 application using JSF 2.0, CDI 1.0, EJB 3.1, JPA 2.0 and Bean Validation 1.0.
+It includes a persistence unit and some sample persistence and transaction code to help you get your feet wet with database access in enterprise Java.
</description>
<size>8192</size>
<url/>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.60</property>
- <property name="description">This project example requires JBoss AS 6.0</property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.610</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70</property>
+ <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
</fix>
+ <fix type="plugin">
+ <property name="id">org.eclipse.m2e.core</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
+ <property name="description">This project example requires m2e >= 1.0.</property>
+ <property name="connectorIds">org.eclipse.m2e.feature</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.maven.ide.eclipse.wtp</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
+ <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
+ <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.jboss.tools.maven.core</property>
+ <property name="versions">[1.3.0,1.4.0)</property>
+ <property name="description">This project example requires JBoss Maven Tools.</property>
+ <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature,org.jboss.tools.maven.hibernate.feature,org.jboss.tools.maven.jaxrs.feature,org.jboss.tools.maven.portlet.feature,org.jboss.tools.maven.seam.feature</property>
+ </fix>
</fixes>
<importType>mavenArchetype</importType>
- <importTypeDescription>The project example requires the m2eclipse-core, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <importTypeDescription>The project example requires the m2e, m2eclipse-wtp and JBoss Maven Integration feature.</importTypeDescription>
<mavenArchetype>
- <archetypeGroupId>org.jboss.weld.archetypes</archetypeGroupId>
+ <archetypeGroupId>org.jboss.spec.archetypes</archetypeGroupId>
<archetypeArtifactId>jboss-javaee6-webapp</archetypeArtifactId>
- <archetypeVersion>1.0.1.Beta2</archetypeVersion>
- <!-- <archetypeRepository>http://repository.jboss.org/nexus/content/groups/public/</archetypeRepository> -->
+ <archetypeVersion>7.0.2-SNAPSHOT</archetypeVersion>
+ <archetypeRepository>http://anonsvn.jboss.org/repos/jbosstools/workspace/fred/repositories/sna...</archetypeRepository>
<groupId>org.jboss.tools.examples</groupId>
<artifactId>jboss-javaee6-webapp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<javaPackage>org.jboss.tools.examples</javaPackage>
- <!--
<properties>
<property name="name" value="Java EE 6 webapp project"/>
</properties>
- -->
</mavenArchetype>
</project>
<!-- Temporary EE6 project - replace with Pete's new archetype when it's ready -->
@@ -80,7 +97,7 @@
<groupId>org.jboss.tools.example</groupId>
<artifactId>multi</artifactId>
<version>0.0.1-SNAPSHOT</version>
- <javaPackage></javaPackage>
+ <javaPackage>org.jboss.tools.example</javaPackage>
</mavenArchetype>
<!--targetProjectFacet facet="jst.ear" version="6.0"/-->
</project>
12 years, 4 months
JBoss Tools SVN: r36780 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: quickfix and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2011-11-30 08:46:47 -0500 (Wed, 30 Nov 2011)
New Revision: 36780
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/FindObserverForEventTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/BeanValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/DecoratorValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/IBindingValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/InterceptorValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QualifierValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/StereotypeValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3Test.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java
Log:
Small refactoring of creating CDI components
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/FindObserverForEventTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/FindObserverForEventTest.java 2011-11-30 13:39:40 UTC (rev 36779)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/FindObserverForEventTest.java 2011-11-30 13:46:47 UTC (rev 36780)
@@ -90,25 +90,18 @@
wizard.createCDIComponent(CDIWizardType.QUALIFIER, "Q2", getPackageName(), null);
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyBean1", getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(FindObserverForEventTest.class
- .getResourceAsStream("/resources/events/MyBean1.java.cdi"),
- false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyBean1",
+ getPackageName(), null, "/resources/events/MyBean1.java.cdi");
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyBean2", getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(FindObserverForEventTest.class
- .getResourceAsStream("/resources/events/MyBean2.java.cdi"),
- false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyBean2",
+ getPackageName(), null, "/resources/events/MyBean2.java.cdi");
- wizard.createCDIComponent(CDIWizardType.BEAN, "EventsProducer", getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(FindObserverForEventTest.class
- .getResourceAsStream("/resources/events/EventsProducer.java.cdi"),
- false);
-
- wizard.createCDIComponent(CDIWizardType.BEAN, "ObserverBean", getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(FindObserverForEventTest.class
- .getResourceAsStream("/resources/events/ObserverBean.java.cdi"),
- false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "EventsProducer",
+ getPackageName(), null, "/resources/events/EventsProducer.java.cdi");
+
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "ObserverBean",
+ getPackageName(), null, "/resources/events/ObserverBean.java.cdi");
+
util.waitForNonIgnoredJobs();
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnTest.java 2011-11-30 13:39:40 UTC (rev 36779)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnTest.java 2011-11-30 13:46:47 UTC (rev 36780)
@@ -82,10 +82,9 @@
String className = "Bean1";
- wizard.createCDIComponent(CDIWizardType.BEAN, className, getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(OpenOnTest.class
- .getResourceAsStream("/resources/openon/BeanWithDisposerAndProducer.java.cdi"),
- false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, className,
+ getPackageName(), null, "/resources/openon/BeanWithDisposerAndProducer.java.cdi");
+
editResourceUtil.replaceInEditor("BeanComponent", className);
openOnUtil.openOnByOption("disposeMethod", className + ".java", "Open Bound Producer");
assertTrue(getEd().toTextEditor().getSelection().equals("produceMethod"));
@@ -96,14 +95,11 @@
@Test
public void testObserverOpenOn() {
- wizard.createCDIComponent(CDIWizardType.BEAN, "EventBean", getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(OpenOnTest.class
- .getResourceAsStream("/resources/openon/EventBean.java.cdi"),
- false);
- wizard.createCDIComponent(CDIWizardType.BEAN, "ObserverBean", getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(OpenOnTest.class
- .getResourceAsStream("/resources/openon/ObserverBean.java.cdi"),
- false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "EventBean",
+ getPackageName(), null, "/resources/openon/EventBean.java.cdi");
+
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "ObserverBean",
+ getPackageName(), null, "/resources/openon/ObserverBean.java.cdi");
bot.editorByTitle("EventBean.java").show();
setEd(bot.activeEditor().toTextEditor());
@@ -123,30 +119,21 @@
wizard.createCDIComponent(CDIWizardType.BEAN, "MyBean1", getPackageName(), null);
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyBean2", getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(OpenOnTest.class
- .getResourceAsStream("/resources/openon/InjectedPoints/MyBean2.java.cdi"),
- false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyBean2",
+ getPackageName(), null, "/resources/openon/InjectedPoints/MyBean2.java.cdi");
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyBean3", getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(OpenOnTest.class
- .getResourceAsStream("/resources/openon/InjectedPoints/MyBean3.java.cdi"),
- false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyBean3",
+ getPackageName(), null, "/resources/openon/InjectedPoints/MyBean3.java.cdi");
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyBean4", getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(OpenOnTest.class
- .getResourceAsStream("/resources/openon/InjectedPoints/MyBean4.java.cdi"),
- false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyBean4",
+ getPackageName(), null, "/resources/openon/InjectedPoints/MyBean4.java.cdi");
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyBean5", getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(OpenOnTest.class
- .getResourceAsStream("/resources/openon/InjectedPoints/MyBean5.java.cdi"),
- false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyBean5",
+ getPackageName(), null, "/resources/openon/InjectedPoints/MyBean5.java.cdi");
- wizard.createCDIComponent(CDIWizardType.BEAN, "MainBean", getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(OpenOnTest.class
- .getResourceAsStream("/resources/openon/InjectedPoints/MainBean.java.cdi"),
- false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MainBean",
+ getPackageName(), null, "/resources/openon/InjectedPoints/MainBean.java.cdi");
+
}
private void checkInjectedPoint(String injectedPoint, String option) {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/BeanValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/BeanValidationQuickFixTest.java 2011-11-30 13:39:40 UTC (rev 36779)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/BeanValidationQuickFixTest.java 2011-11-30 13:46:47 UTC (rev 36780)
@@ -96,14 +96,12 @@
String className = "Bean1";
- wizard.createCDIComponent(CDIWizardType.BEAN, className, getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/bean/ConstructorWithParam.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, className,
+ getPackageName(), null, "/resources/quickfix/bean/ConstructorWithParam.java.cdi");
editResourceUtil.replaceInEditor("BeanComponent", className);
checkQuickFix(CDIAnnotationsType.DISPOSES, CDIWizardType.BEAN);
-
editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
.getResourceAsStream("/resources/quickfix/bean/ConstructorWithParam.java.cdi"), false);
@@ -121,10 +119,9 @@
String className = "Bean2";
- wizard.createCDIComponent(CDIWizardType.BEAN, className, getPackageName(), null);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, className,
+ getPackageName(), null, "/resources/quickfix/bean/ProducerWithParam.java.cdi");
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/bean/ProducerWithParam.java.cdi"), false);
editResourceUtil.replaceInEditor("BeanComponent", className);
checkQuickFix(CDIAnnotationsType.DISPOSES, CDIWizardType.BEAN);
@@ -147,10 +144,9 @@
String className = "Bean3";
- wizard.createCDIComponent(CDIWizardType.BEAN, className, getPackageName(), null);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, className,
+ getPackageName(), null, "/resources/quickfix/bean/BeanInjectDisposes.java.cdi");
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/bean/BeanInjectDisposes.java.cdi"), false);
editResourceUtil.replaceInEditor("BeanComponent", className);
checkQuickFix(CDIAnnotationsType.DISPOSES, CDIWizardType.BEAN);
@@ -163,10 +159,9 @@
String className = "Bean4";
- wizard.createCDIComponent(CDIWizardType.BEAN, className, getPackageName(), null);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, className,
+ getPackageName(), null, "/resources/quickfix/bean/BeanInjectDisposes.java.cdi");
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/bean/BeanInjectDisposes.java.cdi"), false);
editResourceUtil.replaceInEditor("import javax.enterprise.inject.Disposes;",
"import javax.enterprise.event.Observes;");
editResourceUtil.replaceInEditor("@Disposes", "@Observes");
@@ -182,11 +177,9 @@
String className = "Bean5";
- wizard.createCDIComponent(CDIWizardType.BEAN, className, getPackageName(), null);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, className,
+ getPackageName(), null, "/resources/quickfix/bean/BeanInjectProducer.java.cdi");
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/bean/BeanInjectProducer.java.cdi"), false);
-
editResourceUtil.replaceInEditor("BeanComponent", className);
checkQuickFix(CDIAnnotationsType.PRODUCES, CDIWizardType.BEAN);
@@ -199,12 +192,9 @@
String className = "Bean6";
- wizard.createCDIComponent(CDIWizardType.BEAN, className, getPackageName(), null);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, className,
+ getPackageName(), null, "/resources/quickfix/bean/ObserverWithDisposer.java.cdi");
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/bean/ObserverWithDisposer.java.cdi"),
- false);
-
editResourceUtil.replaceInEditor("BeanComponent", className);
checkQuickFix(CDIAnnotationsType.OBSERVES, CDIWizardType.BEAN);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/DecoratorValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/DecoratorValidationQuickFixTest.java 2011-11-30 13:39:40 UTC (rev 36779)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/DecoratorValidationQuickFixTest.java 2011-11-30 13:46:47 UTC (rev 36780)
@@ -48,15 +48,10 @@
String className = "Decorator1";
- wizard.createCDIComponent(CDIWizardType.DECORATOR, className,
- getPackageName(), "java.util.set");
- bot.editorByTitle(className + ".java").show();
- setEd(bot.activeEditor().toTextEditor());
+ wizard.createCDIComponentWithContent(CDIWizardType.DECORATOR, className,
+ getPackageName(), "java.util.set", "/resources/quickfix/decorator/" +
+ "DecoratorWithStateless.java.cdi");
-
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/decorator/" +
- "DecoratorWithStateless.java.cdi"), false);
editResourceUtil.replaceInEditor("DecoratorComponent", className);
checkQuickFix(CDIAnnotationsType.STATELESS, CDIWizardType.DECORATOR);
@@ -69,15 +64,10 @@
String className = "Decorator2";
- wizard.createCDIComponent(CDIWizardType.DECORATOR, className,
- getPackageName(), "java.util.set");
- bot.editorByTitle(className + ".java").show();
- setEd(bot.activeEditor().toTextEditor());
-
-
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/decorator/" +
- "DecoratorWithNamed.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.DECORATOR, className,
+ getPackageName(), "java.util.set", "/resources/quickfix/decorator/" +
+ "DecoratorWithNamed.java.cdi");
+
editResourceUtil.replaceInEditor("DecoratorComponent", className);
checkQuickFix(CDIAnnotationsType.NAMED, CDIWizardType.DECORATOR);
@@ -90,15 +80,10 @@
String className = "Decorator3";
- wizard.createCDIComponent(CDIWizardType.DECORATOR, className,
- getPackageName(), "java.util.set");
- bot.editorByTitle(className + ".java").show();
- setEd(bot.activeEditor().toTextEditor());
+ wizard.createCDIComponentWithContent(CDIWizardType.DECORATOR, className,
+ getPackageName(), "java.util.set", "/resources/quickfix/decorator/" +
+ "DecoratorWithProducer.java.cdi");
-
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/decorator/" +
- "DecoratorWithProducer.java.cdi"), false);
editResourceUtil.replaceInEditor("DecoratorComponent", className);
checkQuickFix(CDIAnnotationsType.PRODUCES, CDIWizardType.DECORATOR);
@@ -111,15 +96,10 @@
String className = "Decorator4";
- wizard.createCDIComponent(CDIWizardType.DECORATOR, className,
- getPackageName(), "java.util.set");
- bot.editorByTitle(className + ".java").show();
- setEd(bot.activeEditor().toTextEditor());
+ wizard.createCDIComponentWithContent(CDIWizardType.DECORATOR, className,
+ getPackageName(), "java.util.set", "/resources/quickfix/decorator/" +
+ "DecoratorWithDisposes.java.cdi");
-
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/decorator/" +
- "DecoratorWithDisposes.java.cdi"), false);
editResourceUtil.replaceInEditor("DecoratorComponent", className);
checkQuickFix(CDIAnnotationsType.DISPOSES, CDIWizardType.DECORATOR);
@@ -132,15 +112,10 @@
String className = "Decorator5";
- wizard.createCDIComponent(CDIWizardType.DECORATOR, className,
- getPackageName(), "java.util.set");
- bot.editorByTitle(className + ".java").show();
- setEd(bot.activeEditor().toTextEditor());
+ wizard.createCDIComponentWithContent(CDIWizardType.DECORATOR, className,
+ getPackageName(), "java.util.set", "/resources/quickfix/decorator/" +
+ "DecoratorWithDisposes.java.cdi");
-
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/decorator/" +
- "DecoratorWithDisposes.java.cdi"), false);
editResourceUtil.replaceInEditor("import javax.enterprise.inject.Disposes;",
"import javax.enterprise.event.Observes;");
editResourceUtil.replaceInEditor("@Disposes", "@Observes");
@@ -156,15 +131,10 @@
String className = "Decorator6";
- wizard.createCDIComponent(CDIWizardType.DECORATOR, className,
- getPackageName(), "java.util.set");
- bot.editorByTitle(className + ".java").show();
- setEd(bot.activeEditor().toTextEditor());
+ wizard.createCDIComponentWithContent(CDIWizardType.DECORATOR, className,
+ getPackageName(), "java.util.set", "/resources/quickfix/decorator/" +
+ "DecoratorWithSpecializes.java.cdi");
-
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/decorator/" +
- "DecoratorWithSpecializes.java.cdi"), false);
editResourceUtil.replaceInEditor("DecoratorComponent", className);
checkQuickFix(CDIAnnotationsType.SPECIALIZES, CDIWizardType.DECORATOR);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/IBindingValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/IBindingValidationQuickFixTest.java 2011-11-30 13:39:40 UTC (rev 36779)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/IBindingValidationQuickFixTest.java 2011-11-30 13:46:47 UTC (rev 36780)
@@ -49,12 +49,10 @@
String className = "IBinding1";
wizard.createAnnotation("AAnnotation", getPackageName());
- wizard.createCDIComponent(CDIWizardType.INTERCEPTOR_BINDING,
- className, getPackageName(), null);
-
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/interceptorBinding/" +
- "IBindingWithAnnotation.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.INTERCEPTOR_BINDING,
+ className, getPackageName(), null, "/resources/quickfix/interceptorBinding/" +
+ "IBindingWithAnnotation.java.cdi");
+
editResourceUtil.replaceInEditor("IBindingComponent", className);
checkQuickFix(CDIAnnotationsType.NONBINDING, CDIWizardType.INTERCEPTOR_BINDING);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/InterceptorValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/InterceptorValidationQuickFixTest.java 2011-11-30 13:39:40 UTC (rev 36779)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/InterceptorValidationQuickFixTest.java 2011-11-30 13:46:47 UTC (rev 36780)
@@ -48,14 +48,10 @@
String className = "Interceptor1";
- wizard.createCDIComponent(CDIWizardType.INTERCEPTOR, className, getPackageName(), null);
- bot.editorByTitle(className + ".java").show();
- setEd(bot.activeEditor().toTextEditor());
-
-
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/interceptor/" +
- "InterceptorWithStateless.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.INTERCEPTOR, className,
+ getPackageName(), null, "/resources/quickfix/interceptor/" +
+ "InterceptorWithStateless.java.cdi");
+
editResourceUtil.replaceInEditor("InterceptorComponent", className);
checkQuickFix(CDIAnnotationsType.STATELESS, CDIWizardType.INTERCEPTOR);
@@ -68,14 +64,10 @@
String className = "Interceptor2";
- wizard.createCDIComponent(CDIWizardType.INTERCEPTOR, className, getPackageName(), null);
- bot.editorByTitle(className + ".java").show();
- setEd(bot.activeEditor().toTextEditor());
-
-
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/interceptor/" +
- "InterceptorWithNamed.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.INTERCEPTOR, className,
+ getPackageName(), null, "/resources/quickfix/interceptor/" +
+ "InterceptorWithNamed.java.cdi");
+
editResourceUtil.replaceInEditor("InterceptorComponent", className);
checkQuickFix(CDIAnnotationsType.NAMED, CDIWizardType.INTERCEPTOR);
@@ -88,14 +80,10 @@
String className = "Interceptor3";
- wizard.createCDIComponent(CDIWizardType.INTERCEPTOR, className, getPackageName(), null);
- bot.editorByTitle(className + ".java").show();
- setEd(bot.activeEditor().toTextEditor());
-
-
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/interceptor/" +
- "InterceptorWithProducer.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.INTERCEPTOR, className,
+ getPackageName(), null, "/resources/quickfix/interceptor/" +
+ "InterceptorWithProducer.java.cdi");
+
editResourceUtil.replaceInEditor("InterceptorComponent", className);
checkQuickFix(CDIAnnotationsType.PRODUCES, CDIWizardType.INTERCEPTOR);
@@ -108,14 +96,10 @@
String className = "Interceptor4";
- wizard.createCDIComponent(CDIWizardType.INTERCEPTOR, className, getPackageName(), null);
- bot.editorByTitle(className + ".java").show();
- setEd(bot.activeEditor().toTextEditor());
-
-
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/interceptor/" +
- "InterceptorWithDisposes.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.INTERCEPTOR, className,
+ getPackageName(), null, "/resources/quickfix/interceptor/" +
+ "InterceptorWithDisposes.java.cdi");
+
editResourceUtil.replaceInEditor("InterceptorComponent", className);
checkQuickFix(CDIAnnotationsType.DISPOSES, CDIWizardType.INTERCEPTOR);
@@ -128,14 +112,10 @@
String className = "Interceptor5";
- wizard.createCDIComponent(CDIWizardType.INTERCEPTOR, className, getPackageName(), null);
- bot.editorByTitle(className + ".java").show();
- setEd(bot.activeEditor().toTextEditor());
+ wizard.createCDIComponentWithContent(CDIWizardType.INTERCEPTOR, className,
+ getPackageName(), null, "/resources/quickfix/interceptor/" +
+ "InterceptorWithDisposes.java.cdi");
-
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/interceptor/" +
- "InterceptorWithDisposes.java.cdi"), false);
editResourceUtil.replaceInEditor("import javax.enterprise.inject.Disposes;",
"import javax.enterprise.event.Observes;");
editResourceUtil.replaceInEditor("@Disposes", "@Observes");
@@ -151,14 +131,10 @@
String className = "Interceptor6";
- wizard.createCDIComponent(CDIWizardType.INTERCEPTOR, className, getPackageName(), null);
- bot.editorByTitle(className + ".java").show();
- setEd(bot.activeEditor().toTextEditor());
-
-
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/interceptor/" +
- "InterceptorWithSpecializes.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.INTERCEPTOR, className,
+ getPackageName(), null, "/resources/quickfix/interceptor/" +
+ "InterceptorWithSpecializes.java.cdi");
+
editResourceUtil.replaceInEditor("InterceptorComponent", className);
checkQuickFix(CDIAnnotationsType.SPECIALIZES, CDIWizardType.INTERCEPTOR);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QualifierValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QualifierValidationQuickFixTest.java 2011-11-30 13:39:40 UTC (rev 36779)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QualifierValidationQuickFixTest.java 2011-11-30 13:46:47 UTC (rev 36780)
@@ -84,10 +84,10 @@
String className = "Qualifier3";
wizard.createAnnotation("AAnnotation", getPackageName());
- wizard.createCDIComponent(CDIWizardType.QUALIFIER, className, getPackageName(), null);
+ wizard.createCDIComponentWithContent(CDIWizardType.QUALIFIER, className,
+ getPackageName(), null, "/resources/quickfix/" +
+ "qualifier/QualifierWithAnnotation.java.cdi");
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/qualifier/QualifierWithAnnotation.java.cdi"), false);
editResourceUtil.replaceInEditor("QualifierComponent", className);
checkQuickFix(CDIAnnotationsType.NONBINDING, CDIWizardType.QUALIFIER);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/StereotypeValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/StereotypeValidationQuickFixTest.java 2011-11-30 13:39:40 UTC (rev 36779)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/StereotypeValidationQuickFixTest.java 2011-11-30 13:46:47 UTC (rev 36780)
@@ -83,9 +83,9 @@
String className = "Stereotype3";
- wizard.createCDIComponent(CDIWizardType.STEREOTYPE, className, getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/stereotype/StereotypeWithNamed.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.STEREOTYPE, className,
+ getPackageName(), null, "/resources/quickfix/stereotype/StereotypeWithNamed.java.cdi");
+
editResourceUtil.replaceInEditor("StereotypeComponent", className);
checkQuickFix(CDIAnnotationsType.NAMED, CDIWizardType.STEREOTYPE);
@@ -98,10 +98,9 @@
String className = "Stereotype4";
- wizard.createCDIComponent(CDIWizardType.STEREOTYPE, className, getPackageName(), null);
+ wizard.createCDIComponentWithContent(CDIWizardType.STEREOTYPE, className,
+ getPackageName(), null, "/resources/quickfix/stereotype/StereotypeWithTyped.java.cdi");
- editResourceUtil.replaceClassContentByResource(QuickFixTestBase.class
- .getResourceAsStream("/resources/quickfix/stereotype/StereotypeWithTyped.java.cdi"), false);
editResourceUtil.replaceInEditor("StereotypeComponent", className);
checkQuickFix(CDIAnnotationsType.TYPED, CDIWizardType.STEREOTYPE);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3Test.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3Test.java 2011-11-30 13:39:40 UTC (rev 36779)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3Test.java 2011-11-30 13:46:47 UTC (rev 36780)
@@ -77,9 +77,8 @@
wizard.createCDIComponent(CDIWizardType.BEANS_XML, "beans.xml", getProjectName() + "/WebContent/WEB-INF", null);
- wizard.createCDIComponent(CDIWizardType.BEAN, className, getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(Seam3Test.class
- .getResourceAsStream("/resources/seam3/Bean.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, className,
+ getPackageName(), null, "/resources/seam3/Bean.java.cdi");
editResourceUtil.replaceInEditor("BeanComponent", className);
openOnUtil.openOnByOption("beansXml", className + ".java", "Open Resource");
@@ -140,57 +139,47 @@
/**
* injectable beans + qualifiers + generic configuration components
*/
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyBean", getGenericPackageName(), null);
- editResourceUtil.replaceClassContentByResource(Seam3Test.class
- .getResourceAsStream("/resources/generic/MyBean.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyBean",
+ getGenericPackageName(), null, "/resources/generic/MyBean.java.cdi");
editResourceUtil.replaceInEditor("MyBeanX", "MyBean");
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyBean2", getGenericPackageName(), null);
- editResourceUtil.replaceClassContentByResource(Seam3Test.class
- .getResourceAsStream("/resources/generic/MyBean.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyBean2",
+ getGenericPackageName(), null, "/resources/generic/MyBean.java.cdi");
editResourceUtil.replaceInEditor("MyBeanX", "MyBean2");
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyBean3", getGenericPackageName(), null);
- editResourceUtil.replaceClassContentByResource(Seam3Test.class
- .getResourceAsStream("/resources/generic/MyBean.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyBean3",
+ getGenericPackageName(), null, "/resources/generic/MyBean.java.cdi");
editResourceUtil.replaceInEditor("MyBeanX", "MyBean3");
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyConfiguration", getGenericPackageName(), null);
- editResourceUtil.replaceClassContentByResource(Seam3Test.class
- .getResourceAsStream("/resources/generic/MyBean.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyConfiguration",
+ getGenericPackageName(), null, "/resources/generic/MyBean.java.cdi");
editResourceUtil.replaceInEditor("MyBeanX", "MyConfiguration");
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyGenericType", getGenericPackageName(), null);
- editResourceUtil.replaceClassContentByResource(Seam3Test.class
- .getResourceAsStream("/resources/generic/MyGenericType.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyGenericType",
+ getGenericPackageName(), null, "/resources/generic/MyGenericType.java.cdi");
wizard.createCDIComponent(CDIWizardType.QUALIFIER, "Qualifier1", getGenericPackageName(), null);
wizard.createCDIComponent(CDIWizardType.QUALIFIER, "Qualifier2", getGenericPackageName(), null);
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyExtendedConfiguration", getGenericPackageName(), null);
- editResourceUtil.replaceClassContentByResource(Seam3Test.class
- .getResourceAsStream("/resources/generic/MyExtendConfig.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyExtendedConfiguration",
+ getGenericPackageName(), null, "/resources/generic/MyExtendConfig.java.cdi");
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyConfigurationProducer", getGenericPackageName(), null);
- editResourceUtil.replaceClassContentByResource(Seam3Test.class
- .getResourceAsStream("/resources/generic/MyConfigProd.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyConfigurationProducer",
+ getGenericPackageName(), null, "/resources/generic/MyConfigProd.java.cdi");
/**
* beans which include atributes suggesting opening all the available
* generic configurations
*/
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyBeanInjections", getGenericPackageName(), null);
- editResourceUtil.replaceClassContentByResource(Seam3Test.class
- .getResourceAsStream("/resources/generic/MyBeanInjections.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyBeanInjections",
+ getGenericPackageName(), null, "/resources/generic/MyBeanInjections.java.cdi");
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyGenericBean", getGenericPackageName(), null);
- editResourceUtil.replaceClassContentByResource(Seam3Test.class
- .getResourceAsStream("/resources/generic/MyGenericBean.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyGenericBean",
+ getGenericPackageName(), null, "/resources/generic/MyGenericBean.java.cdi");
- wizard.createCDIComponent(CDIWizardType.BEAN, "MyGenericBean2", getGenericPackageName(), null);
- editResourceUtil.replaceClassContentByResource(Seam3Test.class
- .getResourceAsStream("/resources/generic/MyGenericBean2.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, "MyGenericBean2",
+ getGenericPackageName(), null, "/resources/generic/MyGenericBean2.java.cdi");
}
private void checkMyBeanInjections() {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java 2011-11-30 13:39:40 UTC (rev 36779)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java 2011-11-30 13:46:47 UTC (rev 36780)
@@ -28,6 +28,18 @@
public class BeansXMLValidationHelper extends CDITestBase {
+ private static final String CLEAR_BEANS_XML = "/resources/beansXML/beans.xml.cdi";
+ private static final String CLEAR_BEANS_XML_WITH_TAG = "/resources/beansXML/" +
+ "beansXmlWithEmptyTag.xml.cdi";
+ private static final String BEANS_XML_WITH_INTERCEPTOR = "/resources/beansXML/" +
+ "beansXmlWithInterceptor.xml.cdi";
+ private static final String BEANS_XML_WITH_DECORATOR = "/resources/beansXML/" +
+ "beansXmlWithDecorator.xml.cdi";
+ private static final String BEANS_XML_WITH_STEREOTYPE = "/resources/beansXML/" +
+ "beansXmlWithStereotype.xml.cdi";
+ private static final String BEANS_XML_WITH_ALTERNATIVE = "/resources/beansXML/" +
+ "beansXmlWithAlternative.xml.cdi";
+
/**
* Method checks if there is validation problem with text
* specified by parameter validationErrors for entered project
@@ -59,7 +71,8 @@
/**
* Method checks if there is no validation problem when
* creating interceptor component with entered className
- * packageName for project with name projectName
+ * packageName for project with name projectName and
+ * insert tag containing this interceptor
* @param projectName
* @param packageName
* @param className
@@ -74,7 +87,8 @@
/**
* Method checks if there is no validation problem when
* creating decorator component with entered className
- * packageName for project with name projectName
+ * packageName for project with name projectName and
+ * insert tag containing this decorator
* @param projectName
* @param packageName
* @param className
@@ -89,7 +103,8 @@
/**
* Method checks if there is no validation problem when
* creating alternative bean component with entered className
- * packageName for project with name projectName
+ * packageName for project with name projectName and
+ * insert tag containing this alternative
* @param projectName
* @param packageName
* @param className
@@ -117,7 +132,7 @@
*/
public void createClearBeansXML(String projectName) {
- createBeansXMLWithContent(projectName, "/resources/beansXML/beans.xml.cdi");
+ createBeansXMLWithContent(projectName, CLEAR_BEANS_XML);
}
@@ -127,8 +142,7 @@
*/
public void createClearBeansXMLWithEmptyTag(String projectName) {
- createBeansXMLWithContent(projectName, "/resources/beansXML/" +
- "beansXmlWithEmptyTag.xml.cdi");
+ createBeansXMLWithContent(projectName, CLEAR_BEANS_XML_WITH_TAG);
}
/**
@@ -143,8 +157,7 @@
public void createBeansXMLWithInterceptor(String projectName, String packageName,
String className) {
- createBeansXMLWithContent(projectName, "/resources/beansXML/" +
- "beansXmlWithInterceptor.xml.cdi");
+ createBeansXMLWithContent(projectName, BEANS_XML_WITH_INTERCEPTOR);
if (className == null || className.length() == 0) {
editResourceUtil.replaceInEditor("<class>Component</class>",
"<class></class>");
@@ -166,8 +179,7 @@
public void createBeansXMLWithDecorator(String projectName, String packageName,
String className) {
- createBeansXMLWithContent(projectName, "/resources/beansXML/" +
- "beansXmlWithDecorator.xml.cdi");
+ createBeansXMLWithContent(projectName, BEANS_XML_WITH_DECORATOR);
if (className == null || className.length() == 0) {
editResourceUtil.replaceInEditor("<class>Component</class>",
"<class></class>");
@@ -189,8 +201,7 @@
public void createBeansXMLWithStereotype(String projectName, String packageName,
String className) {
- createBeansXMLWithContent(projectName, "/resources/beansXML/" +
- "beansXmlWithStereotype.xml.cdi");
+ createBeansXMLWithContent(projectName, BEANS_XML_WITH_STEREOTYPE);
if (className == null || className.length() == 0) {
editResourceUtil.replaceInEditor("<stereotype>Component</stereotype>",
"<stereotype></stereotype>");
@@ -212,8 +223,7 @@
public void createBeansXMLWithAlternative(String projectName, String packageName,
String className) {
- createBeansXMLWithContent(projectName, "/resources/beansXML/" +
- "beansXmlWithAlternative.xml.cdi");
+ createBeansXMLWithContent(projectName, BEANS_XML_WITH_ALTERNATIVE);
if (className == null || className.length() == 0) {
editResourceUtil.replaceInEditor("<class>Component</class>",
"<class></class>");
@@ -235,7 +245,8 @@
"WebContent/META-INF/beans.xml".split("/")) &&
!projectExplorer.isFilePresent(projectName,
"WebContent/WEB-INF/beans.xml".split("/"))) {
- wizard.createCDIComponent(CDIWizardType.BEANS_XML, null, projectName + "/WebContent/WEB-INF", null);
+ wizard.createCDIComponent(CDIWizardType.BEANS_XML, null,
+ projectName + "/WebContent/WEB-INF", null);
}
if (!projectExplorer.isFilePresent(projectName,
"WebContent/META-INF/beans.xml".split("/"))) {
12 years, 4 months
JBoss Tools SVN: r36779 - in trunk: maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-11-30 08:39:40 -0500 (Wed, 30 Nov 2011)
New Revision: 36779
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenArchetypeProjectExample.java
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/MavenProjectExamplesActivator.java
Log:
JBIDE-10284 JBoss AS 7 quickstarts and JBoss AS 7.1
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml 2011-11-30 13:27:33 UTC (rev 36778)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml 2011-11-30 13:39:40 UTC (rev 36779)
@@ -50,8 +50,8 @@
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70</property>
- <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71</property>
+ <property name="description">This project example requires JBoss AS 7.0/7.1</property>
<property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
</fix>
<fix type="plugin">
@@ -95,8 +95,8 @@
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70</property>
- <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71</property>
+ <property name="description">This project example requires JBoss AS 7.0/7.1</property>
<property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
</fix>
<fix type="plugin">
@@ -136,8 +136,8 @@
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70</property>
- <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71</property>
+ <property name="description">This project example requires JBoss AS 7.0/7.1</property>
<property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
</fix>
<fix type="plugin">
@@ -177,8 +177,8 @@
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70</property>
- <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71</property>
+ <property name="description">This project example requires JBoss AS 7.0/7.1</property>
<property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
</fix>
<fix type="plugin">
@@ -219,8 +219,8 @@
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70</property>
- <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71</property>
+ <property name="description">This project example requires JBoss AS 7.0/7.1</property>
<property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
</fix>
<fix type="plugin">
@@ -261,8 +261,8 @@
<url/>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70</property>
- <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71</property>
+ <property name="description">This project example requires JBoss AS 7.0/7.1</property>
<property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
</fix>
<fix type="plugin">
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenArchetypeProjectExample.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenArchetypeProjectExample.java 2011-11-30 13:27:33 UTC (rev 36778)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenArchetypeProjectExample.java 2011-11-30 13:39:40 UTC (rev 36779)
@@ -107,35 +107,7 @@
ret[0] = false;
}
}
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- if (project != null && project.isAccessible()) {
- try {
- project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
- } catch (CoreException e) {
- // ignore
- }
- }
- if (includedProjects.size() > 0) {
- IProject[] selectedProjects = new IProject[includedProjects.size()];
- int i = 0;
-
- for (String selectedProjectName:includedProjects) {
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(selectedProjectName);
- selectedProjects[i++] = project;
- try {
- project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
- } catch (CoreException e) {
- // ignore
- }
- }
- Job updateJob = new UpdateConfigurationJob(selectedProjects , true, false);
- updateJob.schedule();
- try {
- updateJob.join();
- } catch (InterruptedException e) {
- // ignore
- }
- }
+ MavenProjectExamplesActivator.updateMavenConfiguration(projectName, includedProjects, monitor);
}
});
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java 2011-11-30 13:27:33 UTC (rev 36778)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java 2011-11-30 13:39:40 UTC (rev 36779)
@@ -116,8 +116,10 @@
List<String> projectNames = importMavenProjects(destination, projectDescription, monitor);
new OpenMavenConsoleAction().run();
- projectDescription.getIncludedProjects().clear();
+ List<String> includedProjects = projectDescription.getIncludedProjects();
+ includedProjects.clear();
projectDescription.getIncludedProjects().addAll(projectNames);
+ MavenProjectExamplesActivator.updateMavenConfiguration(projectName, includedProjects, monitor);
return true;
}
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/MavenProjectExamplesActivator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/MavenProjectExamplesActivator.java 2011-11-30 13:27:33 UTC (rev 36778)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/MavenProjectExamplesActivator.java 2011-11-30 13:39:40 UTC (rev 36779)
@@ -1,20 +1,25 @@
package org.jboss.tools.maven.project.examples;
import java.io.File;
+import java.util.List;
import org.apache.maven.model.Model;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.project.MavenProjectInfo;
import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.core.ui.internal.UpdateConfigurationJob;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -108,4 +113,36 @@
public static ImageDescriptor getNewWizardImageDescriptor() {
return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, "icons/new_wiz.png");
}
+
+ public static void updateMavenConfiguration(String projectName, List<String> includedProjects,final IProgressMonitor monitor) {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ if (project != null && project.isAccessible()) {
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ } catch (CoreException e) {
+ // ignore
+ }
+ }
+ if (includedProjects.size() > 0) {
+ IProject[] selectedProjects = new IProject[includedProjects.size()];
+ int i = 0;
+
+ for (String selectedProjectName:includedProjects) {
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject(selectedProjectName);
+ selectedProjects[i++] = project;
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ } catch (CoreException e) {
+ // ignore
+ }
+ }
+ Job updateJob = new UpdateConfigurationJob(selectedProjects , true, false);
+ updateJob.schedule();
+ try {
+ updateJob.join();
+ } catch (InterruptedException e) {
+ // ignore
+ }
+ }
+ }
}
12 years, 4 months
JBoss Tools SVN: r36778 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-11-30 08:27:33 -0500 (Wed, 30 Nov 2011)
New Revision: 36778
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java
Log:
JBIDE-10232 - renameTo error on windows
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java 2011-11-30 13:23:11 UTC (rev 36777)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java 2011-11-30 13:27:33 UTC (rev 36778)
@@ -241,17 +241,15 @@
InputStream in = new FileInputStream(tempFile);
IStatus status = copyFile(in, file.getPath());
throwOnErrorStatus(file, status);
+ return;
} catch (FileNotFoundException e) {
// shouldn't occur
} finally {
tempFile.delete();
}
- /*if (!safeDelete(file, 8)) {
- tempFile.delete();
- throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorDeleting, file.toString()), null));
- }*/
}
}
+ // At this point, the file should be guaranteed not to exist.
if (!safeRename(tempFile, file, 10))
throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, IEventCodes.JST_PUB_ASSEMBLE_FAIL,
NLS.bind(org.jboss.ide.eclipse.as.core.Messages.PublishRenameFailure,
12 years, 4 months
JBoss Tools SVN: r36777 - trunk/download.jboss.org/jbosstools/examples.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2011-11-30 08:23:11 -0500 (Wed, 30 Nov 2011)
New Revision: 36777
Added:
trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.M...
Log:
JBIDE-9776 : created a temporary project-examples-maven-3.3.M5.xml in lieu of project-examples-maven-3.3.xml, to keep JBT 3.3.0 M4 users happy.
It'll be renamed/copied over project-examples-maven-3.3.xml after M5 is out
Added: trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.M...
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.M... (rev 0)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.M... 2011-11-30 13:23:11 UTC (rev 36777)
@@ -0,0 +1,250 @@
+<projects>
+
+ <project>
+ <category>Weld archetypes</category>
+ <name>jboss-javaee6-webapp</name>
+ <included-projects>jboss-javaee6-webapp</included-projects>
+ <shortDescription>Weld Java EE 6 example</shortDescription>
+ <description>
+The example demonstrates Weld Java EE 6 application.
+It will create the jboss-javaee6-webapp project in your workspace based on the org.jboss.weld.archetypes:jboss-javaee6-webapp:1.0.1.Beta2 archetype.
+ </description>
+ <size>8192</size>
+ <url/>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.60</property>
+ <property name="description">This project example requires JBoss AS 6.0</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.610</property>
+ </fix>
+ </fixes>
+ <importType>mavenArchetype</importType>
+ <importTypeDescription>The project example requires the m2eclipse-core, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <mavenArchetype>
+ <archetypeGroupId>org.jboss.weld.archetypes</archetypeGroupId>
+ <archetypeArtifactId>jboss-javaee6-webapp</archetypeArtifactId>
+ <archetypeVersion>1.0.1.Beta2</archetypeVersion>
+ <!-- <archetypeRepository>http://repository.jboss.org/nexus/content/groups/public/</archetypeRepository> -->
+ <groupId>org.jboss.tools.examples</groupId>
+ <artifactId>jboss-javaee6-webapp</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <javaPackage>org.jboss.tools.examples</javaPackage>
+ <!--
+ <properties>
+ <property name="name" value="Java EE 6 webapp project"/>
+ </properties>
+ -->
+ </mavenArchetype>
+ </project>
+
+ <project>
+ <category>JBoss AS 7 Quickstarts</category>
+ <name>helloworld</name>
+ <included-projects>jboss-as-helloworld</included-projects>
+ <shortDescription>Helloworld Example</shortDescription>
+ <description>
+This example demonstrates the use of CDI 1.0 and Servlet 3 in JBoss AS 7.
+The example can be deployed using Maven from the command line or from Eclipse using JBoss Tools.
+ </description>
+ <size>8192</size>
+ <url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70</property>
+ <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.eclipse.m2e.core</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
+ <property name="description">This project example requires m2e >= 1.0.</property>
+ <property name="connectorIds">org.eclipse.m2e.feature</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.maven.ide.eclipse.wtp</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
+ <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
+ <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.jboss.tools.maven.core</property>
+ <property name="versions">[1.3.0,1.4.0)</property>
+ <property name="description">This project example requires JBoss Maven Tools.</property>
+ <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature,org.jboss.tools.maven.hibernate.feature,org.jboss.tools.maven.jaxrs.feature, org.jboss.tools.maven.portlet.feature,org.jboss.tools.maven.seam.feature</property>
+ </fix>
+ </fixes>
+ <importType>maven</importType>
+ <importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <welcome type="cheatsheets" url="/jboss-as-helloworld/cheatsheets/helloworld.xml"/>
+ </project>
+
+ <project>
+ <category>JBoss AS 7 Quickstarts</category>
+ <name>helloworld-osgi</name>
+ <included-projects>jboss-as-helloworld-osgi</included-projects>
+ <shortDescription>Helloworld OSGi Example</shortDescription>
+ <description>
+This example demonstrates the use of OSGi in JBoss AS 7.
+The example can be deployed using Maven from the command line, by using the AS 7 web console or by dropping the OSGi bundle in the deployments folder.
+
+To deploy to JBoss AS 7 using JBoss Tools, start JBoss AS 7, right-click the project, select Run As>Maven build..., enter "package jboss-as:deploy" in the Goals field and click the Run button.
+This will build, deploy and start the OSGi bundle.
+You will see a Hello AS7 World!! message appear on the console when this is done.
+ </description>
+ <size>8192</size>
+ <url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70</property>
+ <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.eclipse.m2e.core</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
+ <property name="description">This project example requires m2e >= 1.0.</property>
+ <property name="connectorIds">org.eclipse.m2e.feature</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.maven.ide.eclipse.wtp</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
+ <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
+ <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.jboss.tools.maven.core</property>
+ <property name="versions">[1.3.0,1.4.0)</property>
+ <property name="description">This project example requires JBoss Maven Tools.</property>
+ <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature,org.jboss.tools.maven.hibernate.feature,org.jboss.tools.maven.jaxrs.feature, org.jboss.tools.maven.portlet.feature,org.jboss.tools.maven.seam.feature</property>
+ </fix>
+ </fixes>
+ <importType>maven</importType>
+ <importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ </project>
+
+
+ <project>
+ <category>JBoss AS 7 Quickstarts</category>
+ <name>login</name>
+ <included-projects>jboss-as-login</included-projects>
+ <shortDescription>Login Example</shortDescription>
+ <description>
+This example demonstrates the use of CDI 1.0, JPA 2.0, JTA 1.1, EJB 3.1 and JSF 2.0 in JBoss AS 7.
+The example can be deployed using Maven from the command line or from Eclipse using JBoss Tools.
+ </description>
+<size>8192</size>
+ <url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70</property>
+ <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.eclipse.m2e.core</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
+ <property name="description">This project example requires m2e >= 1.0.</property>
+ <property name="connectorIds">org.eclipse.m2e.feature</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.maven.ide.eclipse.wtp</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
+ <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
+ <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.jboss.tools.maven.core</property>
+ <property name="versions">[1.3.0,1.4.0)</property>
+ <property name="description">This project example requires JBoss Maven Tools.</property>
+ <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature,org.jboss.tools.maven.hibernate.feature,org.jboss.tools.maven.jaxrs.feature, org.jboss.tools.maven.portlet.feature,org.jboss.tools.maven.seam.feature</property>
+ </fix>
+ </fixes>
+ <importType>maven</importType>
+ <importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <welcome type="cheatsheets" url="/jboss-as-login/cheatsheets/login.xml"/>
+ </project>
+
+ <project>
+ <category>JBoss AS 7 Quickstarts</category>
+ <name>numberguess</name>
+ <included-projects>jboss-as-numberguess</included-projects>
+ <shortDescription>Numberguess Example</shortDescription>
+ <description>
+This example demonstrates the use of CDI 1.0 and JSF 2.0 in JBoss AS 7.
+The example can be deployed using Maven from the command line or from Eclipse using JBoss Tools.
+ </description>
+<size>8192</size>
+ <url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70</property>
+ <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.eclipse.m2e.core</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
+ <property name="description">This project example requires m2e >= 1.0.</property>
+ <property name="connectorIds">org.eclipse.m2e.feature</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.maven.ide.eclipse.wtp</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
+ <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
+ <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.jboss.tools.maven.core</property>
+ <property name="versions">[1.3.0,1.4.0)</property>
+ <property name="description">This project example requires JBoss Maven Tools.</property>
+ <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature,org.jboss.tools.maven.hibernate.feature,org.jboss.tools.maven.jaxrs.feature, org.jboss.tools.maven.portlet.feature,org.jboss.tools.maven.seam.feature</property>
+ </fix>
+ </fixes>
+ <importType>maven</importType>
+ <importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <welcome type="cheatsheets" url="/jboss-as-numberguess/cheatsheets/numberguess.xml"/>
+ </project>
+
+ <project>
+ <category>JBoss AS 7 Quickstarts</category>
+ <name>kitchensink</name>
+ <included-projects>jboss-as-kitchensink</included-projects>
+ <shortDescription>Kitchensink Example</shortDescription>
+ <description>
+This is your project! It's a sample, deployable Maven 3 project to help you get your foot in the door developing with Java EE 6 on JBoss AS 7.
+This project is setup to allow you to create a compliant Java EE 6 application using JSF 2.0, CDI 1.0, EJB 3.1, JPA 2.0 and Bean Validation 1.0.
+It includes a persistence unit and some sample persistence and transaction code to help you get your feet wet with database access in enterprise Java.
+ </description>
+<size>8192</size>
+ <url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70</property>
+ <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.eclipse.m2e.core</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
+ <property name="description">This project example requires m2e >= 1.0.</property>
+ <property name="connectorIds">org.eclipse.m2e.feature</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.maven.ide.eclipse.wtp</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
+ <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
+ <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.jboss.tools.maven.core</property>
+ <property name="versions">[1.3.0,1.4.0)</property>
+ <property name="description">This project example requires JBoss Maven Tools.</property>
+ <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature,org.jboss.tools.maven.hibernate.feature,org.jboss.tools.maven.jaxrs.feature, org.jboss.tools.maven.portlet.feature,org.jboss.tools.maven.seam.feature</property>
+ </fix>
+ </fixes>
+ <importType>maven</importType>
+ <importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <welcome type="cheatsheets" url="/jboss-as-kitchensink/cheatsheets/kitchensink.xml"/>
+ </project>
+
+</projects>
12 years, 4 months
JBoss Tools SVN: r36776 - trunk/download.jboss.org/jbosstools/examples.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2011-11-30 08:12:04 -0500 (Wed, 30 Nov 2011)
New Revision: 36776
Added:
trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.xml
Log:
JBIDE-9776 : move *the* 5 archetypes to a shared component
Added: trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.xml (rev 0)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.xml 2011-11-30 13:12:04 UTC (rev 36776)
@@ -0,0 +1,230 @@
+<projects>
+
+ <project>
+ <category>Weld archetypes</category>
+ <name>jboss-javaee6-webapp</name>
+ <included-projects>jboss-javaee6-webapp</included-projects>
+ <shortDescription>Weld Java EE 6 example</shortDescription>
+ <description>
+The example demonstrates Weld Java EE 6 application.
+It will create the jboss-javaee6-webapp project in your workspace based on the org.jboss.weld.archetypes:jboss-javaee6-webapp:1.0.1.Beta2 archetype.
+ </description>
+ <size>8192</size>
+ <url/>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.60</property>
+ <property name="description">This project example requires JBoss AS 6.0</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.610</property>
+ </fix>
+ </fixes>
+ <importType>mavenArchetype</importType>
+ <importTypeDescription>The project example requires the m2eclipse-core, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <mavenArchetype>
+ <archetypeGroupId>org.jboss.weld.archetypes</archetypeGroupId>
+ <archetypeArtifactId>jboss-javaee6-webapp</archetypeArtifactId>
+ <archetypeVersion>1.0.1.Beta2</archetypeVersion>
+ <!-- <archetypeRepository>http://repository.jboss.org/nexus/content/groups/public/</archetypeRepository> -->
+ <groupId>org.jboss.tools.examples</groupId>
+ <artifactId>jboss-javaee6-webapp</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <javaPackage>org.jboss.tools.examples</javaPackage>
+ <!--
+ <properties>
+ <property name="name" value="Java EE 6 webapp project"/>
+ </properties>
+ -->
+ </mavenArchetype>
+ </project>
+ <!-- Temporary EE6 project - replace with Pete's new archetype when it's ready -->
+ <project>
+ <category>Java EE 6 Quickstarts</category>
+ <name>multi-javaee6-archetype</name>
+ <included-projects>multi-javaee6-archetype</included-projects>
+ <shortDescription>JBoss AS 7 / Java EE 6 EAR Webapp(Maven archetype)</shortDescription>
+ <description>An archetype that generates a starter Java EE 6 webapp project for JBoss AS 7 / EAP 6. The project is an EAR, with an EJB-JAR and WAR</description>
+ <size>13806</size>
+ <url/>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
+ <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.eclipse.m2e.core</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
+ <property name="description">This project example requires m2e >= 1.0.</property>
+ <property name="connectorIds">org.eclipse.m2e.feature</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.maven.ide.eclipse.wtp</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
+ <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
+ <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.jboss.tools.maven.core</property>
+ <property name="versions">[1.3.0,1.4.0)</property>
+ <property name="description">This project example requires JBoss Maven Tools.</property>
+ <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature</property>
+ </fix>
+ </fixes>
+ <importType>mavenArchetype</importType>
+ <importTypeDescription>The project example requires the m2e, m2eclipse-wtp and JBoss Maven Integration feature.</importTypeDescription>
+ <mavenArchetype>
+ <archetypeGroupId>org.jboss.spec.archetypes</archetypeGroupId>
+ <archetypeArtifactId>jboss-javaee6-ear-webapp</archetypeArtifactId>
+ <archetypeVersion>7.0.2-SNAPSHOT</archetypeVersion>
+ <archetypeRepository>http://anonsvn.jboss.org/repos/jbosstools/workspace/fred/repositories/sna...</archetypeRepository>
+ <groupId>org.jboss.tools.example</groupId>
+ <artifactId>multi</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <javaPackage></javaPackage>
+ </mavenArchetype>
+ <!--targetProjectFacet facet="jst.ear" version="6.0"/-->
+ </project>
+ <!-- Temporary POH5 project - replace with Pete's new archetype when it's ready -->
+ <project>
+ <category>Java EE 6 Quickstarts</category>
+ <name>jboss-javaee6-poh5-archetype</name>
+ <included-projects>jboss-javaee6-poh5</included-projects>
+ <shortDescription>Java EE 6 HTML5 Mobile Webapp</shortDescription>
+ <description>An archetype that generates a Java EE 6 HTML5 Mobile Webapp project for JBoss AS 7 / EAP 6</description>
+ <size>165567</size>
+ <url/>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
+ <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.eclipse.m2e.core</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
+ <property name="description">This project example requires m2e >= 1.0.</property>
+ <property name="connectorIds">org.eclipse.m2e.feature</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.maven.ide.eclipse.wtp</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
+ <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
+ <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.jboss.tools.maven.core</property>
+ <property name="versions">[1.3.0,1.4.0)</property>
+ <property name="description">This project example requires JBoss Maven Tools.</property>
+ <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature</property>
+ </fix>
+ </fixes>
+ <importType>mavenArchetype</importType>
+ <importTypeDescription>The project example requires the m2e, m2eclipse-wtp and JBoss Maven Integration feature.</importTypeDescription>
+ <defaultMavenProfiles>arq-jbossas-remote</defaultMavenProfiles>
+ <mavenArchetype>
+ <archetypeGroupId>org.jboss.spec.archetypes</archetypeGroupId>
+ <archetypeArtifactId>jboss-javaee6-html5-mobile-archetype</archetypeArtifactId>
+ <archetypeVersion>7.0.2-SNAPSHOT</archetypeVersion>
+ <archetypeRepository>http://anonsvn.jboss.org/repos/jbosstools/workspace/fred/repositories/sna...</archetypeRepository>
+ <groupId>org.jboss.tools.example</groupId>
+ <artifactId>html5-webapp</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <javaPackage>org.jboss.tools.example.html5</javaPackage>
+ </mavenArchetype>
+ </project>
+ <!-- Temporary Spring MVC project - replace with Marius' new archetype when it's ready -->
+ <project>
+ <category>Java EE 6 Quickstarts</category>
+ <name>spring-mvc-webapp</name>
+ <included-projects>spring-mvc-webapp</included-projects>
+ <shortDescription>Java EE 6 - Spring MVC Application (Maven archetype)</shortDescription>
+ <description>An archetype that generates a starter Spring MVC application with Java EE persistence settings (server bootstrapped JPA, JTA transaction management) for JBoss AS7 / EAP 6</description>
+ <size>165567</size>
+ <url/>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
+ <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.eclipse.m2e.core</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
+ <property name="description">This project example requires m2e >= 1.0.</property>
+ <property name="connectorIds">org.eclipse.m2e.feature</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.maven.ide.eclipse.wtp</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
+ <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
+ <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.jboss.tools.maven.core</property>
+ <property name="versions">[1.3.0,1.4.0)</property>
+ <property name="description">This project example requires JBoss Maven Tools.</property>
+ <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature</property>
+ </fix>
+ </fixes>
+ <importType>mavenArchetype</importType>
+ <importTypeDescription>The project example requires the m2e, m2eclipse-wtp and JBoss Maven Integration feature.</importTypeDescription>
+ <mavenArchetype>
+ <archetypeGroupId>org.jboss.spring.archetypes</archetypeGroupId>
+ <archetypeArtifactId>spring-mvc-webapp</archetypeArtifactId>
+ <archetypeVersion>1.0.0.CR1</archetypeVersion>
+ <!-- archetypeRepository>http://anonsvn.jboss.org/repos/jbosstools/workspace/fred/repositories/sna...</archetypeRepository -->
+ <groupId>org.jboss.tools.example</groupId>
+ <artifactId>springmvc</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <javaPackage>org.jboss.tools.example.springmvc</javaPackage>
+ </mavenArchetype>
+ </project>
+ <!-- Richfaces project -->
+ <project>
+ <category>Java EE 6 Quickstarts</category>
+ <name>richfaces-archetype-simpleapp</name>
+ <included-projects>richfaces-archetype-simpleapp</included-projects>
+ <shortDescription>Java EE 6 - RichFaces Simple Application (Maven archetype)</shortDescription>
+ <description>An archetype that generates a simple Richfaces application</description>
+ <size>165567</size>
+ <url/>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
+ <property name="description">This project example requires JBoss AS 7.0</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.eclipse.m2e.core</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
+ <property name="description">This project example requires m2e >= 1.0.</property>
+ <property name="connectorIds">org.eclipse.m2e.feature</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.maven.ide.eclipse.wtp</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
+ <property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
+ <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.jboss.tools.maven.core</property>
+ <property name="versions">[1.3.0,1.4.0)</property>
+ <property name="description">This project example requires JBoss Maven Tools.</property>
+ <property name="connectorIds">org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature</property>
+ </fix>
+ </fixes>
+ <importType>mavenArchetype</importType>
+ <importTypeDescription>The project example requires the m2e, m2eclipse-wtp and JBoss Maven Integration feature.</importTypeDescription>
+ <defaultMavenProfiles>jee6</defaultMavenProfiles>
+ <mavenArchetype>
+ <archetypeGroupId>org.richfaces.archetypes</archetypeGroupId>
+ <archetypeArtifactId>richfaces-archetype-simpleapp</archetypeArtifactId>
+ <archetypeVersion>4.1.0-SNAPSHOT</archetypeVersion>
+ <archetypeRepository>http://repository.jboss.org/nexus/content/repositories/snapshots/</archetypeRepository>
+ <groupId>org.jboss.tools.example</groupId>
+ <artifactId>richfaces-webapp</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <javaPackage>org.jboss.tools.example.richfaces</javaPackage>
+ </mavenArchetype>
+ </project>
+</projects>
12 years, 4 months
JBoss Tools SVN: r36775 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test: src/org/jboss/tools/cdi/bot/test and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2011-11-30 08:05:20 -0500 (Wed, 30 Nov 2011)
New Revision: 36775
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBeanNoParamNamed.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBeanParamNamed.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index1.xhtml.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index2.xhtml.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index3.xhtml.cdi
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBean.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index.xhtml.cdi
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/NamedRefactoringTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIWizardHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/XHTMLDialogWizard.java
Log:
Completion of Named Annotation Refactoring test
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBean.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBean.java.cdi 2011-11-30 11:31:46 UTC (rev 36774)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBean.java.cdi 2011-11-30 13:05:20 UTC (rev 36775)
@@ -1,16 +0,0 @@
-package cdi;
-
-import javax.inject.Named;
-
-@Named("bean")
-public class ManagedBean {
-
- public ManagedBean() {
-
- }
-
- public String submit() {
- return "OK";
- }
-
-}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBeanNoParamNamed.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBeanNoParamNamed.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBeanNoParamNamed.java.cdi 2011-11-30 13:05:20 UTC (rev 36775)
@@ -0,0 +1,16 @@
+package cdi;
+
+import javax.inject.Named;
+
+@Named
+public class ManagedBean2 {
+
+ public ManagedBean2() {
+
+ }
+
+ public String submit() {
+ return "OK";
+ }
+
+}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBeanParamNamed.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBeanParamNamed.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBeanParamNamed.java.cdi 2011-11-30 13:05:20 UTC (rev 36775)
@@ -0,0 +1,16 @@
+package cdi;
+
+import javax.inject.Named;
+
+@Named("bean")
+public class ManagedBean1 {
+
+ public ManagedBean1() {
+
+ }
+
+ public String submit() {
+ return "OK";
+ }
+
+}
\ No newline at end of file
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index.xhtml.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index.xhtml.cdi 2011-11-30 11:31:46 UTC (rev 36774)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index.xhtml.cdi 2011-11-30 13:05:20 UTC (rev 36775)
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets">
-
-<h:head></h:head>
-<body>
- <h:form>
- <h:commandButton action="#{bean.submit()}" value="Submit" />
- </h:form>
-
-</body>
-</html>
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index1.xhtml.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index1.xhtml.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index1.xhtml.cdi 2011-11-30 13:05:20 UTC (rev 36775)
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<h:head></h:head>
+<body>
+ <h:form>
+ <h:commandButton action="#{bean.submit()}" value="Submit" />
+ </h:form>
+
+</body>
+</html>
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index2.xhtml.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index2.xhtml.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index2.xhtml.cdi 2011-11-30 13:05:20 UTC (rev 36775)
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<h:head></h:head>
+<body>
+ <h:form>
+ <h:commandButton action="#{managedBean2.submit()}" value="Submit" />
+ </h:form>
+
+</body>
+</html>
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index3.xhtml.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index3.xhtml.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index3.xhtml.cdi 2011-11-30 13:05:20 UTC (rev 36775)
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<h:head></h:head>
+<body>
+ <h:form>
+ <h:commandButton action="#{bean.submit()}" value="Submit" />
+ <h:commandButton action="#{managedBean2.submit()}" value="Submit" />
+ </h:form>
+
+</body>
+</html>
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-11-30 11:31:46 UTC (rev 36774)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-11-30 13:05:20 UTC (rev 36775)
@@ -50,7 +50,7 @@
* JAVA=1.6,/space/java/sdk/jdk1.6.0_22
*
*
- * Suite duration: aprox. 25min
+ * Suite duration: aprox. 28min
*
* @author Lukas Jungmann
* @author Jaroslav Jankovic
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java 2011-11-30 11:31:46 UTC (rev 36774)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java 2011-11-30 13:05:20 UTC (rev 36775)
@@ -32,10 +32,9 @@
public class JSFTestBase extends CDITestBase {
private static final Logger LOGGER = Logger.getLogger(JSFTestBase.class.getName());
-
private JSFEnvironment env = JSFEnvironment.JSF_20;
-
private JSFTemplate template = JSFTemplate.BLANK_LIBS;
+ protected static final String WEB_FOLDER = "pages";
public JSFEnvironment getEnv() {
return env;
@@ -60,13 +59,25 @@
*/
protected void createXHTMLPage(String pageName) {
XHTMLDialogWizard xhtmlWizard = new NewXHTMLFileWizard().run();
- xhtmlWizard.setName(pageName).finish();
+ xhtmlWizard.setDestination(getProjectName() + "/WebContent/" + WEB_FOLDER).
+ setName(pageName).finish();
bot.sleep(Timing.time3S());
util.waitForNonIgnoredJobs();
setEd(bot.activeEditor().toTextEditor());
}
/**
+ * Method created new XHTML page with content of resource
+ * @param pageName
+ */
+ protected void createXHTMLPageWithContent(String pageName, String resource) {
+ createXHTMLPage(pageName);
+ editResourceUtil.replaceClassContentByResource(JSFTestBase.class.
+ getResourceAsStream(resource), false);
+ }
+
+
+ /**
* Method opens context menu for CDI Refactor for selected class
* @param className
* @throws AnnotationException if no menu for CDI Refactor was found
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/NamedRefactoringTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/NamedRefactoringTest.java 2011-11-30 11:31:46 UTC (rev 36774)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/NamedRefactoringTest.java 2011-11-30 13:05:20 UTC (rev 36775)
@@ -21,6 +21,7 @@
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
@@ -38,32 +39,76 @@
@SuiteClasses({ CDIAllBotTests.class })
public class NamedRefactoringTest extends JSFTestBase {
- private static final String MANAGED_BEAN = "ManagedBean";
- private static final String INDEX_XHTML= "index.xhtml";
+ private static final String MANAGED_BEAN_1 = "ManagedBean1";
+ private static final String MANAGED_BEAN_2 = "ManagedBean2";
+ private static final String INDEX_XHTML_1= "index1.xhtml";
+ private static final String INDEX_XHTML_2= "index2.xhtml";
+ private static final String INDEX_XHTML_3= "index3.xhtml";
+ private static final String NEW_NAMED_PARAM = "bean2";
@Override
public String getProjectName() {
return "CDIRefactoring";
}
+
+ @After
+ public void waitForJobs() {
+ editResourceUtil.deletePackage(getProjectName(), getPackageName());
+ editResourceUtil.deleteWebFolder(getProjectName(), WEB_FOLDER);
+ util.waitForNonIgnoredJobs();
+ }
+
+ @Test
+ public void testNamedAnnotationWithParamRefactor() {
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, MANAGED_BEAN_1,
+ getPackageName(), null, "/resources/jsf/ManagedBeanParamNamed.java.cdi");
+
+ createXHTMLPageWithContent(INDEX_XHTML_1, "/resources/jsf/index1.xhtml.cdi");
+ createXHTMLPageWithContent(INDEX_XHTML_3, "/resources/jsf/index3.xhtml.cdi");
+
+ bot.editorByTitle(MANAGED_BEAN_1 + ".java").show();
+ setEd(bot.activeEditor().toTextEditor());
+
+ Collection<String> affectedFiles = changeNamedAnnotation(MANAGED_BEAN_1,
+ NEW_NAMED_PARAM);
+ Collection<String> expectedAffectedFiles = Arrays.asList(
+ MANAGED_BEAN_1 + ".java", INDEX_XHTML_1, INDEX_XHTML_3);
+
+ for (String affectedFile : affectedFiles) {
+ bot.editorByTitle(affectedFile).save();
+ }
+
+ assertEquals(expectedAffectedFiles.size(), affectedFiles.size());
+ assertTrue(CollectionsUtil.compareTwoCollectionsEquality(
+ expectedAffectedFiles, affectedFiles));
+
+ assertTrue(bot.editorByTitle(MANAGED_BEAN_1 + ".java").toTextEditor().getText().
+ contains("@Named(\"" + NEW_NAMED_PARAM + "\""));
+
+ assertTrue(bot.editorByTitle(INDEX_XHTML_1).toTextEditor().getText().
+ contains("#{" + NEW_NAMED_PARAM));
+
+ assertTrue(bot.editorByTitle(INDEX_XHTML_3).toTextEditor().getText().
+ contains("#{" + NEW_NAMED_PARAM));
+
+ }
+
@Test
- public void testNamedAnnotationRefactor() {
+ public void testNamedAnnotationWithoutParamRefactor() {
- wizard.createCDIComponent(CDIWizardType.BEAN, MANAGED_BEAN, getPackageName(), null);
- editResourceUtil.replaceClassContentByResource(NamedRefactoringTest.class.
- getResourceAsStream("/resources/jsf/ManagedBean.java.cdi"), false);
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, MANAGED_BEAN_2,
+ getPackageName(), null, "/resources/jsf/ManagedBeanNoParamNamed.java.cdi");
- createXHTMLPage("index.xhtml");
- editResourceUtil.replaceClassContentByResource(NamedRefactoringTest.class.
- getResourceAsStream("/resources/jsf/index.xhtml.cdi"), false);
-
- bot.editorByTitle(MANAGED_BEAN + ".java").show();
+ createXHTMLPageWithContent(INDEX_XHTML_2, "/resources/jsf/index2.xhtml.cdi");
+ createXHTMLPageWithContent(INDEX_XHTML_3, "/resources/jsf/index3.xhtml.cdi");
+
+ bot.editorByTitle(MANAGED_BEAN_2 + ".java").show();
setEd(bot.activeEditor().toTextEditor());
- String newNamed = "bean2";
- Collection<String> affectedFiles = changeNamedAnnotation(MANAGED_BEAN, newNamed);
+ Collection<String> affectedFiles = changeNamedAnnotation(MANAGED_BEAN_2, NEW_NAMED_PARAM);
Collection<String> expectedAffectedFiles = Arrays.asList(
- MANAGED_BEAN + ".java", INDEX_XHTML);
+ MANAGED_BEAN_2 + ".java", INDEX_XHTML_2, INDEX_XHTML_3);
for (String affectedFile : affectedFiles) {
bot.editorByTitle(affectedFile).save();
@@ -73,13 +118,46 @@
assertTrue(CollectionsUtil.compareTwoCollectionsEquality(
expectedAffectedFiles, affectedFiles));
- assertTrue(bot.editorByTitle(MANAGED_BEAN + ".java").toTextEditor().getText().
- contains("@Named(\"" + newNamed + "\""));
+ assertTrue(bot.editorByTitle(MANAGED_BEAN_2 + ".java").toTextEditor().getText().
+ contains("@Named(\"" + NEW_NAMED_PARAM + "\""));
- assertTrue(bot.editorByTitle(INDEX_XHTML).toTextEditor().getText().
- contains("#{" + newNamed + ".submit()}"));
+ assertTrue(bot.editorByTitle(INDEX_XHTML_2).toTextEditor().getText().
+ contains("#{" + NEW_NAMED_PARAM));
+ assertTrue(bot.editorByTitle(INDEX_XHTML_3).toTextEditor().getText().
+ contains("#{" + NEW_NAMED_PARAM));
+
}
+
+ @Test
+ public void testNamedAnnotationWithoutELRefactoring() {
+
+ wizard.createCDIComponentWithContent(CDIWizardType.BEAN, MANAGED_BEAN_2,
+ getPackageName(), null, "/resources/jsf/ManagedBeanNoParamNamed.java.cdi");
+
+ createXHTMLPageWithContent(INDEX_XHTML_2, "/resources/jsf/index1.xhtml.cdi");
+
+ bot.editorByTitle(MANAGED_BEAN_2 + ".java").show();
+ setEd(bot.activeEditor().toTextEditor());
+
+ Collection<String> affectedFiles = changeNamedAnnotation(MANAGED_BEAN_2, NEW_NAMED_PARAM);
+ Collection<String> expectedAffectedFiles = Arrays.asList(MANAGED_BEAN_2 + ".java");
+
+ for (String affectedFile : affectedFiles) {
+ bot.editorByTitle(affectedFile).save();
+ }
+
+ assertEquals(expectedAffectedFiles.size(), affectedFiles.size());
+ assertTrue(CollectionsUtil.compareTwoCollectionsEquality(
+ expectedAffectedFiles, affectedFiles));
+
+ assertTrue(bot.editorByTitle(MANAGED_BEAN_2 + ".java").toTextEditor().getText().
+ contains("@Named(\"" + NEW_NAMED_PARAM + "\""));
+
+ assertTrue(!bot.editorByTitle(INDEX_XHTML_2).toTextEditor().getText().
+ contains("#{" + NEW_NAMED_PARAM));
+
+ }
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIWizardHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIWizardHelper.java 2011-11-30 11:31:46 UTC (rev 36774)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIWizardHelper.java 2011-11-30 13:05:20 UTC (rev 36775)
@@ -52,6 +52,21 @@
}
/**
+ * Method creates CDI component with content of resource
+ * @param component
+ * @param name
+ * @param packageName
+ * @param necessaryParam
+ * @param resource
+ */
+ public void createCDIComponentWithContent(CDIWizardType component, String name,
+ String packageName, String necessaryParam, String resource) {
+ createCDIComponent(component, name, packageName, necessaryParam);
+ editResourceUtil.replaceClassContentByResource(CDIWizardHelper.class.
+ getResourceAsStream(resource), false);
+ }
+
+ /**
* Method creates larger number("amount") of the same component.
* @param component
* @param amount
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java 2011-11-30 11:31:46 UTC (rev 36774)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java 2011-11-30 13:05:20 UTC (rev 36775)
@@ -130,6 +130,45 @@
}
/**
+ * Method deletes whole package with given name for entered project
+ * @param projectName
+ * @param packageName
+ */
+ public void deletePackage(String projectName, String packageName) {
+
+ String[] path = {projectName, "Java Resources", "JavaSource"};
+ deleteFolderInProjectExplorer(packageName, path);
+
+ }
+
+ /**
+ * Method deletes whole web folder with given name for entered project
+ * @param projectName
+ * @param packageName
+ */
+ public void deleteWebFolder(String projectName, String folder) {
+
+ String[] path = {projectName, "WebContent"};
+ deleteFolderInProjectExplorer(folder, path);
+
+ }
+
+ /**
+ * Method deletes folder with given name and path
+ * @param folderName
+ * @param path
+ */
+ public void deleteFolderInProjectExplorer(String folderName, String... path) {
+
+ SWTBotTree tree = projectExplorer.bot().tree();
+ SWTBotTreeItem item = projectExplorer.selectTreeItem(folderName, path);
+
+ NodeContextUtil.nodeContextMenu(tree, item, "Delete").click();
+ bot.sleep(Timing.time1S());
+ bot.shell("Confirm Delete").bot().button("OK").click();
+ }
+
+ /**
* Method removes the object which is located in "sourceFolder"
* is deleted
* @param object
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/XHTMLDialogWizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/XHTMLDialogWizard.java 2011-11-30 11:31:46 UTC (rev 36774)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/XHTMLDialogWizard.java 2011-11-30 13:05:20 UTC (rev 36775)
@@ -11,6 +11,11 @@
assert ("New XHTML Page").equals(getText());
}
+ public XHTMLDialogWizard setDestination(String destination) {
+ setText("Enter or select the parent folder:", destination);
+ return this;
+ }
+
public XHTMLDialogWizard setName(String nameOfPage) {
setText("File name:", nameOfPage);
return this;
12 years, 4 months
JBoss Tools SVN: r36774 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-11-30 06:31:46 -0500 (Wed, 30 Nov 2011)
New Revision: 36774
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IProvideCredentials.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/UserPassCredentialProvider.java
Log:
JBIDE-10283 - code cleanup
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IProvideCredentials.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IProvideCredentials.java 2011-11-30 10:54:34 UTC (rev 36773)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IProvideCredentials.java 2011-11-30 11:31:46 UTC (rev 36774)
@@ -25,8 +25,6 @@
/**
* Handles the fetching / requesting and subsequent delivery of these credentials
- * This method is performed asynchronously, with a Properties object
- * eventually being delivered to "inNeed" via inNeed.provideCredentials(etc)
*
* @param inNeed the object requiring access to the credentials
* @param requiredProperties a list of required properties
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java 2011-11-30 10:54:34 UTC (rev 36773)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java 2011-11-30 11:31:46 UTC (rev 36774)
@@ -23,6 +23,7 @@
import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
import org.jboss.ide.eclipse.as.core.server.IServerStatePoller.PollingException;
import org.jboss.ide.eclipse.as.core.server.IServerStatePoller.RequiresInfoException;
+import org.jboss.ide.eclipse.as.core.util.PollThreadUtils;
/**
*
@@ -303,9 +304,6 @@
}
public static void fireRequestCredentials(boolean expectedState, IServerStatePoller poller) {
- IProvideCredentials handler = ExtensionManager
- .getDefault().getFirstCredentialProvider(poller,
- poller.getRequiredProperties());
- handler.handle(poller, poller.getRequiredProperties());
+ PollThreadUtils.requestCredentialsAsynch(poller, poller.getRequiredProperties());
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java 2011-11-30 10:54:34 UTC (rev 36773)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java 2011-11-30 11:31:46 UTC (rev 36774)
@@ -131,59 +131,69 @@
* @param requester
* @param requiredProps
*/
- public static void requestCredentialsAsynch(INeedCredentials requester, List<String> requiredProps) {
+ public static void requestCredentialsAsynch(final INeedCredentials requester, final List<String> requiredProps) {
+ new Thread() {
+ public void run() {
+ requestCredentialsSynchronous(requester, requiredProps);
+ }
+ }.start();
+ }
+
+ /**
+ * The credential provider is alerted that credentials are needed.
+ * The calling thread will block until this method is finished.
+ * The requester will be told of its credentials by the provider.
+ *
+ * @param requester
+ * @param requiredProps
+ * @return
+ */
+
+ public static void requestCredentialsSynchronous(final INeedCredentials requester, List<String> requiredProps) {
IProvideCredentials provider = ExtensionManager.getDefault()
.getFirstCredentialProvider(requester, requiredProps);
provider.handle(requester, requiredProps);
}
-
+
+
/**
* The credential provider is alerted that credentials are needed.
- * The thread is then delayed until some result is provided.
+ * The calling thread will block until this method is finished.
+ * A dummy requester is created, which will receive the properties.
+ * It will then return them to the caller directly.
*
* @param requester
* @param requiredProps
- * @return
+ * @return Properties
*/
- public static Properties requestCredentialsSynchronous(final IServerProvider requester, List<String> requiredProps) {
+ public static Properties requestCredentialsSynchronous(final IServerProvider server, List<String> requiredProps) {
+ NeedCredentials requester = new NeedCredentials(server.getServer(), requiredProps);
IProvideCredentials provider = ExtensionManager.getDefault()
.getFirstCredentialProvider(requester, requiredProps);
- final Properties[] returnedProps = new Properties[1];
- final Boolean[] gotProps = new Boolean[1];
- returnedProps[0] = null;
- gotProps[0] = false;
-
- /*
- * This dummy requirer will set variables when the credentials finally arrive.
- * Then this synchronous method can finish.
- */
-
- INeedCredentials dummyRequirer = new INeedCredentials() {
- public IServer getServer() {
- return requester.getServer();
- }
- public List<String> getRequiredProperties() {
- // ignore
- return null;
- }
- public void provideCredentials(Properties credentials) {
- returnedProps[0] = credentials;
- // necessary to have a gotProps since a cancelation on the UI may
- // set null as the returned properties
- gotProps[0] = true;
- }
- };
-
- provider.handle(dummyRequirer, requiredProps);
-
- while( !gotProps[0]) {
- try {
- Thread.sleep(100);
- } catch(InterruptedException ie) {
- // ignore
- }
+ provider.handle(requester, requiredProps);
+ return requester.getReturnedCredentials();
+ }
+
+ public static class NeedCredentials implements INeedCredentials {
+ private IServer server;
+ private List<String> requiredProps;
+ private Properties returnedCredentials;
+ public NeedCredentials(IServer server, List<String> requiredProps) {
+ this.server = server;
+ this.requiredProps = requiredProps;
}
- return returnedProps[0];
+ public IServer getServer() {
+ return server;
+ }
+ public List<String> getRequiredProperties() {
+ return requiredProps;
+ }
+ public void provideCredentials(Properties credentials) {
+ returnedCredentials = credentials;
+ }
+ public Properties getReturnedCredentials() {
+ return returnedCredentials;
+ }
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/UserPassCredentialProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/UserPassCredentialProvider.java 2011-11-30 10:54:34 UTC (rev 36773)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/UserPassCredentialProvider.java 2011-11-30 11:31:46 UTC (rev 36774)
@@ -52,7 +52,7 @@
*/
public void handle(final INeedCredentials inNeed,
final List<String> requiredProperties) {
- Display.getDefault().asyncExec(new Runnable() {
+ Display.getDefault().syncExec(new Runnable() {
public void run() {
IServer server = inNeed.getServer();
IServerWorkingCopy copy = server.createWorkingCopy();
12 years, 4 months
JBoss Tools SVN: r36773 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: jsf and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2011-11-30 05:54:34 -0500 (Wed, 30 Nov 2011)
New Revision: 36773
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java
Log:
Javadoc for JSFTestBase added
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-11-30 10:53:58 UTC (rev 36772)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-11-30 10:54:34 UTC (rev 36773)
@@ -10,8 +10,24 @@
******************************************************************************/
package org.jboss.tools.cdi.bot.test;
+import org.jboss.tools.cdi.bot.test.beansxml.BeansXMLCompletionTest;
+import org.jboss.tools.cdi.bot.test.beansxml.BeansXMLValidationTest;
+import org.jboss.tools.cdi.bot.test.editor.BeansEditorTest;
import org.jboss.tools.cdi.bot.test.jsf.NamedRefactoringTest;
+import org.jboss.tools.cdi.bot.test.openon.FindObserverForEventTest;
+import org.jboss.tools.cdi.bot.test.openon.OpenOnTest;
+import org.jboss.tools.cdi.bot.test.quickfix.BeanValidationQuickFixTest;
+import org.jboss.tools.cdi.bot.test.quickfix.DecoratorValidationQuickFixTest;
+import org.jboss.tools.cdi.bot.test.quickfix.IBindingValidationQuickFixTest;
+import org.jboss.tools.cdi.bot.test.quickfix.InterceptorValidationQuickFixTest;
+import org.jboss.tools.cdi.bot.test.quickfix.QualifierValidationQuickFixTest;
+import org.jboss.tools.cdi.bot.test.quickfix.ScopeValidationQuickFixTest;
+import org.jboss.tools.cdi.bot.test.quickfix.StereotypeValidationQuickFixTest;
+import org.jboss.tools.cdi.bot.test.seam3.Seam3Test;
import org.jboss.tools.cdi.bot.test.uiutils.SWTEclipseCDIExtUtil;
+import org.jboss.tools.cdi.bot.test.wizard.ConfigurationPresetTest;
+import org.jboss.tools.cdi.bot.test.wizard.FacetTest;
+import org.jboss.tools.cdi.bot.test.wizard.WizardTest;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.jboss.tools.ui.bot.ext.types.ViewType;
import org.junit.BeforeClass;
@@ -42,23 +58,23 @@
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({
// PerspectiveTest.class,
-// ConfigurationPresetTest.class,
-// FacetTest.class,
-// WizardTest.class,
-// BeansEditorTest.class,
+ ConfigurationPresetTest.class,
+ FacetTest.class,
+ WizardTest.class,
+ BeansEditorTest.class,
NamedRefactoringTest.class,
-// BeansXMLValidationTest.class,
-// BeansXMLCompletionTest.class,
-// StereotypeValidationQuickFixTest.class,
-// QualifierValidationQuickFixTest.class,
-// ScopeValidationQuickFixTest.class,
-// BeanValidationQuickFixTest.class,
-// InterceptorValidationQuickFixTest.class,
-// DecoratorValidationQuickFixTest.class,
-// IBindingValidationQuickFixTest.class,
-// OpenOnTest.class,
-// FindObserverForEventTest.class,
-// Seam3Test.class
+ BeansXMLValidationTest.class,
+ BeansXMLCompletionTest.class,
+ StereotypeValidationQuickFixTest.class,
+ QualifierValidationQuickFixTest.class,
+ ScopeValidationQuickFixTest.class,
+ BeanValidationQuickFixTest.class,
+ InterceptorValidationQuickFixTest.class,
+ DecoratorValidationQuickFixTest.class,
+ IBindingValidationQuickFixTest.class,
+ OpenOnTest.class,
+ FindObserverForEventTest.class,
+ Seam3Test.class
})
public class CDIAllBotTests extends CDITestBase {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java 2011-11-30 10:53:58 UTC (rev 36772)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java 2011-11-30 10:54:34 UTC (rev 36773)
@@ -55,7 +55,7 @@
}
/**
- *
+ * Method created new XHTML page with selected name
* @param pageName
*/
protected void createXHTMLPage(String pageName) {
@@ -67,9 +67,9 @@
}
/**
- *
+ * Method opens context menu for CDI Refactor for selected class
* @param className
- * @throws AnnotationException
+ * @throws AnnotationException if no menu for CDI Refactor was found
*/
protected void openContextMenuForCDIRefactor(String className) throws AnnotationException {
String text = getNamedAnnotationForClass(className);
@@ -86,7 +86,7 @@
}
/**
- *
+ * Method returns @Named annotation or null if there is no such annotation
* @param className
* @return
*/
@@ -109,7 +109,7 @@
}
/**
- *
+ * Method parses @Named annotation and returns correct EL name for class
* @param className
* @param text
* @return
@@ -124,7 +124,7 @@
}
/**
- *
+ * Method opens context menu for text in eclipse editor
* @param text
* @param menu
*/
@@ -139,10 +139,10 @@
}
/**
- *
+ * Method changes @Named annotation to "newNamed" for selected class
* @param className
* @param newNamed
- * @return
+ * @return all affected files by CDI refactoring
*/
protected List<String> changeNamedAnnotation(String className, String newNamed) {
List<String> affectedFiles = new ArrayList<String>();
@@ -164,7 +164,8 @@
}
/**
- *
+ * Methods creates new JSF Project with selected name, environment and template. Finnaly
+ * it adds CDI support to this project.
* @param projectName
* @param env
* @param template
@@ -178,7 +179,7 @@
}
/**
- *
+ * Methods creates new JSF Project with selected name, environment and template.
* @param projectName
* @param env
* @param template
12 years, 4 months