JBoss Tools SVN: r20994 - trunk.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-03-23 16:50:50 -0400 (Tue, 23 Mar 2010)
New Revision: 20994
Modified:
trunk/parent-pom.xml
Log:
Modified: trunk/parent-pom.xml
===================================================================
--- trunk/parent-pom.xml 2010-03-23 20:22:57 UTC (rev 20993)
+++ trunk/parent-pom.xml 2010-03-23 20:50:50 UTC (rev 20994)
@@ -8,19 +8,19 @@
<packaging>pom</packaging>
<properties>
- <tychoVersion>0.5.0</tychoVersion>
+ <tychoVersion>0.7.0</tychoVersion>
</properties>
<build>
<plugins>
<plugin>
- <groupId>org.codehaus.tycho</groupId>
+ <groupId>org.sonatype.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tychoVersion}</version>
<extensions>true</extensions>
</plugin>
<plugin>
- <groupId>org.codehaus.tycho</groupId>
+ <groupId>org.sonatype.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tychoVersion}</version>
<configuration>
@@ -44,16 +44,4 @@
</repository>
</repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>plugins</id>
- <url>http://repository.sonatype.org/content/repositories/all-003</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </pluginRepository>
- </pluginRepositories>
</project>
14 years, 7 months
JBoss Tools SVN: r20993 - trunk.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-03-23 16:22:57 -0400 (Tue, 23 Mar 2010)
New Revision: 20993
Added:
trunk/genpom.scala
trunk/parent-pom.xml
Log:
files for tycho experiment
Added: trunk/genpom.scala
===================================================================
--- trunk/genpom.scala (rev 0)
+++ trunk/genpom.scala 2010-03-23 20:22:57 UTC (rev 20993)
@@ -0,0 +1,195 @@
+import java.io.File
+import scala.io.Source
+import scala.xml.XML
+
+object HelloWorld {
+
+ case class GVA(groupId : String, artifactId : String, version : String)
+
+ var aggregatorcount = 0
+ var modulecount = 0
+
+ def main(args: Array[String]) {
+
+ generateAggregator(new File("/Users/max/Documents/code/jbosstools/trunk"),
+ new File("parent-pom.xml"),
+ GVA("org.jboss.tools", "org.jboss.tools.parent.pom", "0.0.1-SNAPSHOT"),
+ GVA("org.jboss.tools", "trunk", "0.0.1-SNAPSHOT")
+ )
+
+ println("Modules: " + modulecount + " Aggregator: " + aggregatorcount)
+ }
+
+ def generateModule(dir : File, parentPom : File, parent : GVA, me : GVA) {
+ modulecount = modulecount + 1
+
+ var module =
+ <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>{parentPom.getPath()}</relativePath>
+ <groupId>{parent.groupId}</groupId>
+ <artifactId>{parent.artifactId}</artifactId>
+ <version>{parent.version}</version>
+ </parent>
+ <groupId>{me.groupId}</groupId>
+ <artifactId>{me.artifactId}</artifactId>
+ <version>{getVersion(dir)}</version>
+ <packaging>{
+ if (dir.getParentFile().getName().equals("tests"))
+ "eclipse-test-plugin"
+ else if (dir.getParentFile().getName().equals("features"))
+ "eclipse-feature"
+ else
+ "eclipse-plugin"}</packaging>
+ </project>;
+
+ val pp = new scala.xml.PrettyPrinter(80,2)
+
+
+ writePom("Module ", pp.format(module), dir)
+
+ }
+
+ def writePom(n : String, pp : String, dir : File) {
+ val pomxml = new File(dir, "pom.xml")
+
+ val out = new java.io.FileWriter(pomxml)
+ out.write(pp)
+ out.close
+
+ }
+
+ def getVersion(dir : File) : String = {
+
+ var mf = new File(new File(dir, "META-INF"), "MANIFEST.MF")
+ var featurexml = new File(dir, "feature.xml")
+
+ if(mf.exists()) {
+ val lines = Source.fromFile(mf).getLines
+ for(l <- lines)
+ if(l.contains("Bundle-Version:")) {
+ return l.substring("Bundle-Version:".length()).trim()
+ }
+ } else if (featurexml.exists()) {
+ val data = XML.loadFile(featurexml)
+ return (data \ "@version").text
+ }
+ return dir + " " + featurexml.exists() + " " + mf.exists()
+ }
+
+ def getArtifactId(dir : File) : String = {
+
+ var mf = new File(new File(dir, "META-INF"), "MANIFEST.MF")
+ var featurexml = new File(dir, "feature.xml")
+
+ if(mf.exists()) {
+ val lines = Source.fromFile(mf).getLines
+ for(l <- lines)
+ if(l.contains("Bundle-SymbolicName:")) {
+ val x = l.substring("Bundle-SymbolicName:".length()).trim()
+ if(x.indexOf(";")>=0) {
+ return x.substring(0, x.indexOf(";"))
+ } else {
+ return x
+ }
+ }
+ } else if (featurexml.exists()) {
+ val data = XML.loadFile(featurexml)
+ return (data \ "@id").text
+ }
+ return dir + " " + featurexml.exists() + " " + mf.exists()
+ }
+
+ def dump(dirs : Collection[File], parentPom : File, parent : GVA, me : GVA) {
+ for(f <- dirs) {
+
+ val manifest = new File(new File(f, "META-INF"), "MANIFEST.MF")
+ val plugins = new File(f, "plugins")
+ val tests = new File(f, "tests")
+ val features = new File(f, "features")
+ val featurexml = new File(f, "feature.xml")
+
+ if(manifest.exists() || featurexml.exists()) {
+ generateModule(f,
+ new File("../" + parentPom.getPath()),
+ parent,
+ GVA(me.groupId, getArtifactId(f), me.version))
+ }
+
+ if(plugins.exists()) {
+ generateAggregator(plugins,
+ new File("../../" + parentPom.getPath()),
+ parent,
+ GVA(me.groupId, f.getName() , "0.0.1-SNAPSHOT")
+ )
+ }
+
+ if(tests.exists()) {
+ generateAggregator(tests,
+ new File("../../" + parentPom.getPath()),
+ parent,
+ GVA(me.groupId, f.getName() , "0.0.1-SNAPSHOT")
+ )
+ }
+
+ if(features.exists()) {
+ generateAggregator(features,
+ new File("../../" + parentPom.getPath()),
+ parent,
+ GVA(me.groupId, f.getName() , "0.0.1-SNAPSHOT")
+ )
+ }
+
+ }
+ }
+
+ def generateAggregator(dir : File,
+ parentPom : File,
+ parent : GVA,
+ me : GVA
+ ) {
+ aggregatorcount = aggregatorcount + 1
+
+ val dirs = dir.listFiles().filter(
+ (n) => n.isDirectory() && !n.getName().startsWith(".")
+ )
+
+ val realModules = dirs.filter(
+ (n) => n.isDirectory() && !n.getName().startsWith(".") && new File(new File(n, "META-INF"), "MANIFEST.MF").exists()
+ )
+ var modules =
+ <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>{parentPom.getPath()}</relativePath>
+ <groupId>{parent.groupId}</groupId>
+ <artifactId>{parent.artifactId}</artifactId>
+ <version>{parent.version}</version>
+ </parent>
+ <groupId>{me.groupId}</groupId>
+ <artifactId>{me.artifactId}.{dir.getName()}</artifactId>
+ <version>{me.version}</version>
+ <packaging>pom</packaging>
+ <modules>
+ {
+ for(f <- realModules) yield {
+ <module>{ f.getName() }</module>
+ }
+ }
+ </modules>
+ </project>;
+
+ val pp = new scala.xml.PrettyPrinter(80,2)
+ writePom("Aggregator ", pp.format(modules),dir)
+ //println(pp.format(modules))
+
+ dump(dirs, parentPom, parent, me)
+
+
+ }
+
+}
+
+
+HelloWorld.main(args)
Added: trunk/parent-pom.xml
===================================================================
--- trunk/parent-pom.xml (rev 0)
+++ trunk/parent-pom.xml 2010-03-23 20:22:57 UTC (rev 20993)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <name>JBoss Tools Parent</name>
+ <packaging>pom</packaging>
+
+ <properties>
+ <tychoVersion>0.5.0</tychoVersion>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <resolver>p2</resolver>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>galileo</id>
+ <url>http://download.eclipse.org/releases/galileo</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ </repositories>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>plugins</id>
+ <url>http://repository.sonatype.org/content/repositories/all-003</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </pluginRepository>
+ </pluginRepositories>
+</project>
14 years, 7 months
JBoss Tools SVN: r20992 - in trunk: hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2010-03-23 12:23:45 -0400 (Tue, 23 Mar 2010)
New Revision: 20992
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProjectExplorer.java
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/DaliTest.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/Project.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ObjectMultiPageEditorBot.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/PerspectiveType.java
Log:
Dali JPA test initiated
BotExt requirements added
ObjectMultiPageEditor commented because of container bundle problem
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/DaliTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/DaliTest.java 2010-03-23 16:12:44 UTC (rev 20991)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/DaliTest.java 2010-03-23 16:23:45 UTC (rev 20992)
@@ -12,25 +12,70 @@
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
+import org.jboss.tools.hibernate.ui.bot.testsuite.Project;
+import org.jboss.tools.ui.bot.ext.types.EntityType;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.types.PerspectiveType;
+import org.jboss.tools.ui.bot.ext.view.ProjectExplorer;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(SWTBotJunit4ClassRunner.class)
public class DaliTest extends HibernateTest {
-
+
+ static boolean projectCreated = false;
+
+ @BeforeClass
+ public static void prepare() {
+ bot.viewByTitle("Welcome").close();
+ eclipse.openPerspective(PerspectiveType.JPA);
+ util.waitForNonIgnoredJobs();
+ }
+
/**
* TC 22
*/
@Test
public void createJPAProject() {
+ if (projectCreated) return;
+
+ EntityType type = EntityType.JPA_PROJECT;
+ eclipse.createNew(type);
+
+ // JPA Project Page
+ eclipse.waitForShell("New JPA Project");
+ bot.textWithLabel("Project name:").setText(Project.JPA_PRJ_NAME);
+ bot.button(IDELabel.Button.NEXT).click();
+
+ // Java Page
+ bot.button(IDELabel.Button.NEXT).click();
+
+ // JPA Facet Page
+ bot.comboBoxInGroup("Platform").setSelection("Hibernate");
+ // Finish
+ bot.button(IDELabel.Button.FINISH).click();
+ eclipse.waitForClosedShell(bot.shell("New JPA Project"));
+ util.waitForNonIgnoredJobs();
+
+ projectCreated = true;
}
+
+ @Test
+ public void openPersitenceXML() {
+ ProjectExplorer explorer = new ProjectExplorer();
+ explorer.openFile(Project.JPA_PRJ_NAME, "JPA Content", "persistence.xml");
+ }
+
/**
* TC 24
*/
@Test
public void generateDDL() {
+
}
@@ -65,5 +110,17 @@
public void checkCAInMappingEditor() {
}
+
+ public static boolean isPRojectCreated() {
+ if (projectCreated) {
+ log.info("JPA Project is already created");
+ }
+ return projectCreated;
+ }
+ @AfterClass
+ public static void cleanup() {
+
+ }
+
}
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/Project.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/Project.java 2010-03-23 16:12:44 UTC (rev 20991)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/Project.java 2010-03-23 16:23:45 UTC (rev 20992)
@@ -27,4 +27,7 @@
public static final String CONF_FILE_NAME2 = "hibernate2.cfg.xml";
public static final String DB_FILE = "mydb";
public static final String DB_NAME = "xdb";
+
+ // JPA Project
+ public static final String JPA_PRJ_NAME = "jpatest1";
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-03-23 16:12:44 UTC (rev 20991)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-03-23 16:23:45 UTC (rev 20992)
@@ -125,6 +125,9 @@
case DB_DEVELOPMENT:
perspectiveLabel = IDELabel.SelectPerspectiveDialog.DB_DEVELOPMENT;
break;
+ case JPA:
+ perspectiveLabel = IDELabel.SelectPerspectiveDialog.JPA;
+ break;
default:
fail("Unknown perspective to open");
}
@@ -141,6 +144,7 @@
bot.button(IDELabel.Button.OK).click();
}
+
// ------------------------------------------------------------
// Create related methods
// ------------------------------------------------------------
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ObjectMultiPageEditorBot.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ObjectMultiPageEditorBot.java 2010-03-23 16:12:44 UTC (rev 20991)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ObjectMultiPageEditorBot.java 2010-03-23 16:23:45 UTC (rev 20992)
@@ -11,7 +11,7 @@
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.common.editor.ObjectMultiPageEditor;
+// import org.jboss.tools.common.editor.ObjectMultiPageEditor;
/**
*
@@ -55,6 +55,7 @@
}
public void selectPage(final String pageName) {
+ /*
//assertTrue(ref.getPart(true) instanceof Hibernate3CompoundEditor);
assertTrue(ref.getPart(true) instanceof ObjectMultiPageEditor);
@@ -67,7 +68,8 @@
public void run() {
editor.selectPageByName(pageName);
}
- });
+ });
+ */
}
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java 2010-03-23 16:12:44 UTC (rev 20991)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java 2010-03-23 16:23:45 UTC (rev 20992)
@@ -21,7 +21,7 @@
*/
public enum EntityType {
HIBERNATE_MAPPING_FILE, JAVA_PROJECT, JAVA_CLASS, HIBERNATE_REVERSE_FILE, HIBERNATE_CONSOLE,
- HIBERNATE_CONFIGURATION_FILE, STRUTS_PROJECT;
+ HIBERNATE_CONFIGURATION_FILE, STRUTS_PROJECT, JPA_PROJECT;
public List<String> getGroupsLabels() {
List<String> groupLabel = new LinkedList<String>();
@@ -34,6 +34,7 @@
case HIBERNATE_CONFIGURATION_FILE: groupLabel.add(IDELabel.EntityGroup.HIBERNATE); break;
case HIBERNATE_CONSOLE: groupLabel.add(IDELabel.EntityGroup.HIBERNATE); break;
case STRUTS_PROJECT: groupLabel.add(IDELabel.EntityGroup.JBOSS_TOOLS_WEB); groupLabel.add(IDELabel.EntityGroup.STRUTS);break;
+ case JPA_PROJECT: groupLabel.add(IDELabel.EntityGroup.JPA);break;
default: fail("Unknown Entity Type");
}
@@ -55,6 +56,7 @@
case JAVA_PROJECT: entityLabel = IDELabel.EntityLabel.JAVA_PROJECT; break;
case JAVA_CLASS: entityLabel = IDELabel.EntityLabel.JAVA_CLASS; break;
case STRUTS_PROJECT: entityLabel = IDELabel.EntityLabel.STRUTS_PROJECT; break;
+ case JPA_PROJECT: entityLabel = IDELabel.EntityLabel.JPA_PROJECT; break;
default: fail("Unknown Entity Type");
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-03-23 16:12:44 UTC (rev 20991)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-03-23 16:23:45 UTC (rev 20992)
@@ -113,6 +113,7 @@
public static final String SEAM = "Seam";
public static final String STRUTS = "Struts";
public static final String JBOSS_TOOLS_WEB = "JBoss Tools Web";
+ public static final String JPA = "JPA";
}
public class EntityLabel {
@@ -124,6 +125,7 @@
public static final String SEAM_PROJECT = "Seam Web Project";
public static final String HIBERNATE_CONFIGURATION_FILE = "Hibernate Configuration File (cfg.xml)";
public static final String STRUTS_PROJECT = "Struts Project";
+ public static final String JPA_PROJECT = "JPA Project";
}
public class JavaProjectWizard {
@@ -164,6 +166,7 @@
public static final String SEAM = "Seam";
public static final String WEB_DEVELOPMENT = "Web Development";
public static final String DB_DEVELOPMENT = "Database Development";
+ public static final String JPA = "JPA";
}
/**
* Hibernate Console Wizard (ConsoleConfigurationCreationWizard) Labels (
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/PerspectiveType.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/PerspectiveType.java 2010-03-23 16:12:44 UTC (rev 20991)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/PerspectiveType.java 2010-03-23 16:23:45 UTC (rev 20992)
@@ -16,6 +16,6 @@
*
*/
public enum PerspectiveType {
- SEAM, JAVA, WEB_DEVELOPMENT, HIBERNATE, DB_DEVELOPMENT;
+ SEAM, JAVA, WEB_DEVELOPMENT, HIBERNATE, DB_DEVELOPMENT, JPA;
}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProjectExplorer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProjectExplorer.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProjectExplorer.java 2010-03-23 16:23:45 UTC (rev 20992)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.view;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+
+/**
+ * Eclipse project type enum
+ *
+ * @author jpeterka
+ *
+ */
+public class ProjectExplorer extends SWTBotExt {
+
+ Logger log = Logger.getLogger(ProjectExplorer.class);
+
+ public SWTBotEditor openFile(String projectName, String... path) {
+ SWTBot viewBot = viewByTitle(IDELabel.View.PROJECT_EXPLORER).bot();
+
+ viewByTitle(IDELabel.View.PROJECT_EXPLORER).show();
+ viewByTitle(IDELabel.View.PROJECT_EXPLORER).setFocus();
+ SWTBotTree tree = viewBot.tree();
+ SWTBotTreeItem item = tree.expandNode(projectName);
+ StringBuilder builder = new StringBuilder(projectName);
+
+ // Go through path
+ for (String nodeName : path) {
+ item = item.expandNode(nodeName);
+ builder.append("/" + nodeName);
+ }
+
+ item.select().doubleClick();
+ log.info("File Opened:" + builder.toString());
+
+ SWTBotEditor editor = activeEditor();
+ return editor;
+ }
+}
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ProjectExplorer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 7 months
JBoss Tools SVN: r20991 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2010-03-23 12:12:44 -0400 (Tue, 23 Mar 2010)
New Revision: 20991
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml
trunk/documentation/guides/GettingStartedGuide/en-US/manage.xml
trunk/documentation/guides/GettingStartedGuide/en-US/master.xml
trunk/documentation/guides/GettingStartedGuide/en-US/rad_jsf_application.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-1135 - The obsolete figure is updated.
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2010-03-23 16:11:52 UTC (rev 20990)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2010-03-23 16:12:44 UTC (rev 20991)
@@ -278,8 +278,7 @@
<imageobject>
<imagedata fileref="images/first_seam/first_seam15.png"/>
</imageobject>
- </inlinemediaobject> ) in the
- JBoss Server View.</para>
+ </inlinemediaobject> ) in the <property>Servers</property>.</para>
<para>Then run the project by selecting the project and use <emphasis><property>Run As... >
Run on Server</property>.</emphasis></para>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml 2010-03-23 16:11:52 UTC (rev 20990)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml 2010-03-23 16:12:44 UTC (rev 20991)
@@ -303,7 +303,7 @@
</listitem>
<listitem>
<para>Then run in console:</para>
- <programlisting role="JAVA"><![CDATA[java -jar jbdevstudio-eap-linux-gtk-2.1.0.GA.jar
+ <programlisting role="JAVA"><![CDATA[java -jar jbdevstudio-eap-linux-gtk-3.0.0.GA.jar
]]></programlisting>
</listitem>
<listitem>
@@ -352,7 +352,7 @@
<note>
<title>Note:</title>
- <para>JBoss Developer Studio needs Java 5 and "gij" isn't available on
+ <para>JBoss Developer Studio needs Java 6 and "gij" isn't available on
every platform.</para>
</note>
@@ -363,8 +363,8 @@
<property>Yes</property></emphasis> to use it in JBoss Developer Studio.</para>
<note>
<title>Note:</title>
- <para>JBDS 2.0.0.GA comes integrated with JBoss EAP 4.3, while the current 2.1.0.GA release of JBDS comes with JBoss EAP 5 that support EAP 5 adapter
- and Seam 2.2.</para>
+ <para>Like in the previous version of JBDS, JBDS 3.0.0.GA comes integrated with JBoss EAP 5.0
+ that supports EAP 5 adapter and Seam 2.2.</para>
</note>
<para>This step lets you configure locally available JBoss Application Servers: </para>
@@ -400,7 +400,8 @@
</itemizedlist>
<itemizedlist>
- <listitem> <para>You can also add servers one by one using the <emphasis><property>Add</property></emphasis> button:</para>
+ <listitem><para>You can also add servers one by one using the
+ <emphasis><property>Add</property></emphasis> button:</para>
</listitem>
</itemizedlist>
@@ -442,9 +443,7 @@
</mediaobject>
</figure>
<para/>
-
-
-
+
<!-- <note>
<title>Note:</title>
<para>The installer installs JBoss Enterprise Application Platform for running your applications
@@ -568,7 +567,7 @@
<note>
<title>Note:</title>
- <para>Remember to choose the download that matches your OS and use Java 5 when you run
+ <para>Remember to choose the download that matches your OS and use Java 6 when you run
it.</para>
</note>
<para>If you need to install any standalone plug-in from JBoss Tools visit a <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">JBoss Tools Wiki</ulink> page to read
@@ -835,14 +834,21 @@
<section id="Upgrading">
<?dbhtml filename="Upgrading.html"?>
<title>Upgrading</title>
- <para>To upgrade, of course you can uninstall your current version and install the new one.</para>
- <para>Now it's possible to upgrade from JBDS 2.0 to 2.1 using the update site which is available at
- <ulink url="is available at http://devstudio.jboss.com/updates/2.1">http://devstudio.jboss.com/updates/2.1</ulink>.
- This is described more fully in the <ulink url="http://www.jboss.com/products/devstudio/update/">JBDS Update Guide</ulink>.</para>
+ <para>As opposed to upgrading your JBDS from 2.0 to 2.1 using the update site,
+ to upgrade your JBDS from 2.1 to 3.0 you have to uninstall your 2.1 version and install the new one
+ because of some platform change.</para>
+<!--
+ <para>Now it's possible to upgrade from JBDS 2.0 to 2.1 using the update site
+ which is available at <ulink url="is available at
+ http://devstudio.jboss.com/updates/2.1">http://devstudio.jboss.com/updates/2.1</ulink>.
+ This is described more fully in the
+ <ulink url="http://www.jboss.com/products/devstudio/update/">JBDS Update Guide</ulink>.</para>
<note>
<title>Note:</title>
- <para>You <emphasis><property>CAN NOT</property></emphasis> upgrade from 2.1 to 3.0 using update site because of some platform change.Full installation is required.</para>
- </note>
+ <para>You <emphasis><property>CAN NOT</property></emphasis> upgrade from 2.1 to 3.0 using update site because of some platform change.
+ Full installation is required.</para>
+ </note>
+-->
</section>
<section id="Uninstalling">
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/manage.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/manage.xml 2010-03-23 16:11:52 UTC (rev 20990)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/manage.xml 2010-03-23 16:12:44 UTC (rev 20991)
@@ -15,11 +15,10 @@
<para>In this chapter we'll focus more on how to operate the <property>JBoss
AS</property> from <property>JBoss Developer Studio</property>.</para>
- <para><property>JBoss Developer Studio 2.1.0.GA</property> is shipped with <property>JBoss EAP 5
+ <para><property>JBoss Developer Studio 3.0.0.GA</property> is shipped with <property>JBoss EAP 5
</property>. When you followed the default installation of <property>JBoss
Developer Studio</property>, you should already have a JBoss EAP 5 Server installed and
- defined. To run JBoss AS you need JDK 1.5, JDK 6 is not formally supported yet, although
- you may be able to start the server with it.</para>
+ defined. To run JBoss AS you need JDK 1.6.</para>
<section id="JBossbundled">
<?dbhtml filename="JBossbundled.html"?>
@@ -49,12 +48,12 @@
<itemizedlist>
<listitem>
<para>To launch the server click the green-with-white-arrow icon on the
- <property>JBoss Server View </property>or right click server name in
+ <property>Servers</property> or right click server name in
this view and select <emphasis>
<property>Start</property>
</emphasis>. If this view is not open, select <emphasis>
<property>Window > Show View > Other > Server
- > JBoss Server View</property>
+ > Servers</property>
</emphasis></para>
</listitem>
</itemizedlist>
@@ -80,8 +79,7 @@
</figure>
<para>When the server is started you should see <emphasis>
<property>Started</property>
- </emphasis> in the square brackets right next its name in <property>JBoss Server
- View</property>.</para>
+ </emphasis> in the square brackets right next its name in <property>Servers</property>.</para>
<figure>
<title>Server is Started</title>
@@ -92,7 +90,7 @@
</mediaobject>
</figure>
<!--para>To see event log after the server is started, expand <property>Event
- Log</property> branch beneath <property>JBoss Server View</property>:</para>
+ Log</property> branch beneath <property>Servers</property>:</para>
<figure>
<title>Event Log</title>
<mediaobject>
@@ -108,7 +106,7 @@
<title>Stopping JBoss Server</title>
<para>To stop the server, click the <emphasis>
<property>Stop</property>
- </emphasis> icon in <property>JBoss Server View</property> or right click the server
+ </emphasis> icon in <property>Servers</property> or right click the server
name and press <emphasis>
<property>Stop</property>. </emphasis></para>
@@ -196,9 +194,9 @@
Developer Studio</property>.</para>
<itemizedlist>
<listitem>
- <para>Open the <property>JBoss Server View</property> by selecting <emphasis>
+ <para>Open the <property>Servers</property> by selecting <emphasis>
<property>Window > Show View > Other > Server
- > JBoss Server View</property>
+ > Servers</property>
</emphasis></para>
</listitem>
<listitem>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/master.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/master.xml 2010-03-23 16:11:52 UTC (rev 20990)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/master.xml 2010-03-23 16:12:44 UTC (rev 20991)
@@ -39,9 +39,9 @@
<title>Getting Started Guide</title>
<copyright>
- <year>2007</year>
+ <year>2007</year>
<year>2008</year>
- <year>2009</year>
+ <year>2009</year>
<year>2010</year>
<holder>JBoss by Red Hat</holder>
</copyright>
@@ -59,7 +59,7 @@
-&getting_started;
+ &getting_started;
&manage;
&first_seam;
&jsp_application;
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/rad_jsf_application.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/rad_jsf_application.xml 2010-03-23 16:11:52 UTC (rev 20990)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/rad_jsf_application.xml 2010-03-23 16:12:44 UTC (rev 20991)
@@ -35,9 +35,9 @@
project wizard and predefined templates. Follow the next steps:</para>
<itemizedlist>
<listitem>
- <para>In Web Projects View (if it is not open select <emphasis>
+ <para>In Web Projects (if it is not open select <emphasis>
<property>Window > Show View > Others > JBoss Tools Web
- > Web Projects View</property>) </emphasis> click <emphasis>
+ > Web Projects</property></emphasis>) click <emphasis>
<property>Create New JSF Project</property>
</emphasis> button. <figure>
<title>Create New JSF Project</title>
@@ -60,7 +60,7 @@
</emphasis></para>
</listitem>
</itemizedlist>
- <para>Our project will appear in Project Explorer and Web Projects Views. As you can see
+ <para>Our project will appear in Project Explorer and Web Projects. As you can see
JBoss Developer Studio has created for us the whole skeleton for the project with all
needed libraries, faces-config.xml and web.xml files.</para>
<figure>
@@ -1064,7 +1064,7 @@
<listitem>
<para>Start up JBoss server by clicking on the <emphasis>
<property>Start</property>
- </emphasis> icon in JBoss Server view. (If JBoss is already running, stop it by
+ </emphasis> icon in <property>Servers</property>. (If JBoss is already running, stop it by
clicking on the red icon and then start it again. After the messages in the
Console tabbed view stop scrolling, JBoss is available)</para>
</listitem>
14 years, 7 months
JBoss Tools SVN: r20990 - trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2010-03-23 12:11:52 -0400 (Tue, 23 Mar 2010)
New Revision: 20990
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_1.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_2.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_3.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_3_1.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_3_2.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_3_4.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_4.png
Log:
https://jira.jboss.org/jira/browse/JBDS-1135 - The obsolete figure is updated.
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_1.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_2.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_3.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_3_1.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_3_2.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_3_4.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/getting_started_4.png
===================================================================
(Binary files differ)
14 years, 7 months
JBoss Tools SVN: r20985 - in trunk/seam/tests/org.jboss.tools.seam.ui.bot.test: src/org/jboss/tools/seam/ui/bot/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-03-23 11:39:29 -0400 (Tue, 23 Mar 2010)
New Revision: 20985
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java
Log:
Create connection profile when necessary and do not create server runtime if it's already defined
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/META-INF/MANIFEST.MF 2010-03-23 15:31:17 UTC (rev 20984)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/META-INF/MANIFEST.MF 2010-03-23 15:39:29 UTC (rev 20985)
@@ -14,6 +14,7 @@
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.apache.log4j;bundle-version="1.2.13",
org.junit4;bundle-version="4.5.0",
+ org.eclipse.datatools.connectivity;bundle-version="1.1.2",
org.jboss.tools.ui.bot.ext;bundle-version="1.0.0"
Eclipse-RegisterBuddy: org.apache.log4j
Bundle-ActivationPolicy: lazy
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java 2010-03-23 15:31:17 UTC (rev 20984)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java 2010-03-23 15:39:29 UTC (rev 20985)
@@ -1,14 +1,20 @@
package org.jboss.tools.seam.ui.bot.test;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
+
+import org.eclipse.datatools.connectivity.ConnectionProfileException;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.test.TestProperties;
import org.jboss.tools.ui.bot.ext.SWTJBTExt;
+import org.jboss.tools.ui.bot.ext.helper.DatabaseHelper;
+import org.jboss.tools.ui.bot.ext.types.DriverEntity;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.test.JBTSWTBotTestCase;
import org.jboss.tools.ui.bot.test.WidgetVariables;
@@ -98,6 +104,7 @@
SEAM_12_SETTINGS_HOME = seam12Settings.getProperty("seamRuntimePath");
SEAM_22_SETTINGS_HOME = seam22Settings.getProperty("seamRuntimePath");
SEAM_2FP_SETTINGS_HOME = seam2fpSettings.getProperty("seamRuntimePath");
+ createConnectionProfile(seam22Settings.getProperty("seamRuntimePath"),"DefaultDS");
}
/*Pre-launch operations here:*/
@@ -129,9 +136,11 @@
/**Creates any Server Runtime + Server. */
protected void createServerRuntime(Properties serverType){
- if (SWTJBTExt.isServerRuntimeDefined(bot,serverType.getProperty("runtimeName"))){
+ if (!SWTJBTExt.isServerRuntimeDefined(bot,serverType.getProperty("runtimeName"))){
bot.menu("File").menu("New").menu("Other...").click();
+ bot.shell(IDELabel.Shell.NEW).activate();
SWTBotTree tree = bot.tree();
+ delay();
tree.expandNode("Server").select("Server");
bot.button("Next >").click();
SWTBotTree tree2 = bot.tree();
@@ -148,6 +157,7 @@
/** Creates any Seam runtime. */
protected void createSeamRuntime(Properties runtimeSet, String homeFolder){
bot.menu("Window").menu("Preferences").click();
+ bot.shell(IDELabel.Shell.PREFERENCES).activate();
SWTBotTree tree = bot.tree();
delay();
tree.expandNode("JBoss Tools")
@@ -260,4 +270,28 @@
return vmArgsProps;
}
+ /**
+ * Creates connection profile in case it's not defined yet
+ * @param pathToSeamRuntime
+ * @param profileName
+ */
+ private static void createConnectionProfile(String pathToSeamRuntime, String profileName){
+
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append(pathToSeamRuntime);
+ stringBuilder.append(File.separator);
+ stringBuilder.append("lib");
+ stringBuilder.append(File.separator);
+ stringBuilder.append("hsqldb.jar");
+
+ try {
+ DriverEntity entity = new DriverEntity();
+ entity.setDrvPath(stringBuilder.toString());
+ entity.setJdbcString("jdbc:hsqldb:hsql://localhost/xdb");
+ DatabaseHelper.createDriver(entity);
+ } catch (ConnectionProfileException e) {
+ fail("Unable to create HSQL Driver" + e);
+ }
+
+ }
}
14 years, 7 months