JBoss Tools SVN: r26082 - trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2010-10-27 04:43:44 -0400 (Wed, 27 Oct 2010)
New Revision: 26082
Added:
trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/TeiidFilesPublishing.java
trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Utils.java
Modified:
trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/ModeshapeAllTests.java
trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Properties.java
trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Publishing.java
Log:
* New publishing test for Teiid Project Example
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/ModeshapeAllTests.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/ModeshapeAllTests.java 2010-10-27 08:06:05 UTC (rev 26081)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/ModeshapeAllTests.java 2010-10-27 08:43:44 UTC (rev 26082)
@@ -11,7 +11,8 @@
*
*/
@SuiteClasses({
- Publishing.class
+ Publishing.class,
+ TeiidFilesPublishing.class
})
@RunWith(RequirementAwareSuite.class)
public class ModeshapeAllTests {
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Properties.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Properties.java 2010-10-27 08:06:05 UTC (rev 26081)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Properties.java 2010-10-27 08:43:44 UTC (rev 26082)
@@ -7,16 +7,30 @@
*/
public class Properties {
- public static final String PROJECT_NAME = "testproject";
- public static final String FILE_NAME = "testfile";
- public static final String FILE_CONTENT = "testcontent";
+ public static final String PROJECT_NAME = "testproject";
+ public static final String FILE_NAME = "testfile";
+ public static final String FILE_CONTENT = "testcontent";
- public static final String URL = "http://localhost:8080/modeshape-rest";
- public static final String WEBDAV_URL = "http://localhost:8080/modeshape-webdav";
+ public static final String URL = "http://localhost:8080/modeshape-rest";
+ public static final String WEBDAV_URL = "http://localhost:8080/modeshape-webdav";
- public static final String REPOSITORY = "repository";
- public static final String WORKSPACE = "default";
+ public static final String REPOSITORY = "repository";
+ public static final String WORKSPACE = "default";
- public static final String USER = "admin";
- public static final String PASSWORD = "admin";
+ public static final String USER = "admin";
+ public static final String PASSWORD = "admin";
+
+
+ //~~~~~ Properties for Teiid Project Examples Publishing ~~~~~//
+ public static final String TEIID_PROJECT_NAME = "PartsProject";
+
+ public static final String TEIID_PROJECT_DESC = ".project";
+
+ public static final String ORACLE_SQL = "data/CreateDB_PartsSupplier_Oracle.sql";
+ public static final String SQLSERVER_SQL = "data/CreateDB_PartsSupplier_SQLServer.sql";
+
+ public static final String PARTS_SOURCE_A = "PartsSourceA.xmi";
+ public static final String PARTS_SOURCE_B = "PartsSourceB.xmi";
+ public static final String PARTS_VIRTUAL = "PartsVirtual.xmi";
+
}
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Publishing.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Publishing.java 2010-10-27 08:06:05 UTC (rev 26081)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Publishing.java 2010-10-27 08:43:44 UTC (rev 26082)
@@ -24,6 +24,7 @@
import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.GeneralProject;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -32,7 +33,7 @@
* @author psrna
*
*/
-@SWTBotTestRequires(server=(a)Server(type=ServerType.EAP,version="5.0"),perspective="Java EE")
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,version="5.1"),perspective="Java EE")
public class Publishing extends SWTTestExt{
private static final String CONNERR_MSG = "Unable to connect using the specified server properties." +
@@ -75,6 +76,7 @@
public void createModeShapeServer(){
openModeshapeView();
+
SWTBotView view = bot.viewByTitle("ModeShape");
assertTrue("ModeShape View must be active", view.isActive());
@@ -99,9 +101,10 @@
open.finish(shell.bot());
- assertTrue("Created server not visible in ModeShape view.", view.bot().tree().getTreeItem(Properties.URL).isVisible());
+ assertTrue("Created server not visible in ModeShape view.", view.bot().tree().getTreeItem(Properties.URL).isVisible());
+
}
-
+
private void openModeshapeView(){
bot.menu(IDELabel.Menu.WINDOW)
@@ -203,7 +206,20 @@
}
+ @AfterClass
+ public static void afterClass(){
+ bot.viewByTitle("ModeShape").show();
+ SWTBot mbot = bot.viewByTitle("ModeShape").bot();
+ mbot.tree().select(Properties.URL);
+ bot.toolbarButtonWithTooltip("Delete server from the server registry").click();
+ SWTBotShell shell = bot.shell("Confirm Delete Server");
+
+ open.finish(shell.bot(),IDELabel.Button.OK);
+ }
+
+
+
/**
*
* @return response code
@@ -212,7 +228,11 @@
try {
- URL url = new URL(Properties.WEBDAV_URL + "/" + Properties.PROJECT_NAME + "/" + Properties.FILE_NAME);
+ URL url = new URL(Properties.WEBDAV_URL + "/" +
+ Properties.REPOSITORY + "/" +
+ Properties.WORKSPACE + "/" +
+ Properties.PROJECT_NAME + "/" +
+ Properties.FILE_NAME);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
Added: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/TeiidFilesPublishing.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/TeiidFilesPublishing.java (rev 0)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/TeiidFilesPublishing.java 2010-10-27 08:43:44 UTC (rev 26082)
@@ -0,0 +1,235 @@
+package org.jboss.tools.modeshape.rest.ui.bot.tests;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.Arrays;
+
+import org.eclipse.core.internal.preferences.Base64;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+/**
+ *
+ * @author psrna
+ *
+ */
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,version="5.1"), perspective="Teiid Designer")
+public class TeiidFilesPublishing extends SWTTestExt{
+
+ private static final String CONNERR_MSG = "Unable to connect using the specified server properties." +
+ "The server properties could be invalid or the server may be offline.";
+
+ public static void importTeiidPartsModelExample(){
+
+ bot.menu(IDELabel.Menu.HELP)
+ .menu("Project Examples...").click();
+
+ SWTBotShell shell = bot.shell("New Project Example");
+ shell.activate();
+ shell.bot().tree(0).expandNode("Teiid Designer")
+ .select("Parts Model Project Set Example");
+
+ open.finish(shell.bot(), IDELabel.Button.FINISH);
+
+ }
+
+ @BeforeClass
+ public static void beforeClass(){
+ importTeiidPartsModelExample();
+
+ }
+
+ @Test
+ public void createModeShapeServer(){
+
+ openModeshapeView();
+
+ SWTBotView view = bot.viewByTitle("ModeShape");
+ assertTrue("ModeShape View must be active", view.isActive());
+
+ view.toolbarButton("Create a new server").click();
+ SWTBotShell shell = bot.shell("New Server");
+ shell.activate();
+
+ shell.bot().textWithLabel("URL:").typeText(Properties.URL);
+ shell.bot().textWithLabel("User:").typeText(Properties.USER);
+ shell.bot().textWithLabel("Password:").typeText(Properties.PASSWORD);
+
+ shell.bot().button("Test").click();
+ shell = bot.shell("Test Server Connection");
+ shell.activate();
+
+ String msg = shell.bot().label(1).getText();
+ assertTrue(CONNERR_MSG, msg.equals("Successfully connected using the specified server properties."));
+
+ open.finish(bot.activeShell().bot(), IDELabel.Button.OK);
+ shell = bot.shell("New Server");
+ shell.activate();
+
+ open.finish(shell.bot());
+
+ assertTrue("Created server not visible in ModeShape view.", view.bot().tree().getTreeItem(Properties.URL).isVisible());
+
+ }
+
+ private void openModeshapeView(){
+
+ bot.menu(IDELabel.Menu.WINDOW)
+ .menu(IDELabel.Menu.SHOW_VIEW)
+ .menu(IDELabel.Menu.OTHER).click();
+
+ SWTBotShell shell = bot.shell("Show View");
+ shell.activate();
+ shell.bot().tree().expandNode("ModeShape", false).select("ModeShape");
+
+ open.finish(bot.activeShell().bot(), IDELabel.Button.OK);
+ }
+
+
+ @Test
+ public void publishFiles(){
+
+ bot.viewByTitle("Model Explorer").show();
+ SWTBotView view = bot.viewByTitle("Model Explorer");
+ SWTBot viewBot = view.bot();
+ SWTBotTreeItem node = eclipse.selectTreeLocation(viewBot, Properties.TEIID_PROJECT_NAME);
+
+ ContextMenuHelper.prepareTreeItemForContextMenu(projectExplorer.tree(),node);
+ ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "ModeShape", "Publish");
+
+ SWTBotShell shell = bot.shell("Publish");
+ shell.activate();
+
+ SWTBotCombo serverCombo = shell.bot().comboBoxWithLabel("Server:");
+ SWTBotCombo repoCombo = shell.bot().comboBoxWithLabel("Repository:");
+ SWTBotCombo workspaceCombo = shell.bot().comboBoxWithLabel("Workspace:");
+
+ assertTrue("URL mismatch.", serverCombo.getText().equals(Properties.URL));
+ assertTrue("Repository mismatch.", repoCombo.getText().equals(Properties.REPOSITORY));
+ assertTrue("Workspace mismatch.", workspaceCombo.getText().equals(Properties.WORKSPACE));
+
+ open.finish(shell.bot());
+
+ assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.TEIID_PROJECT_DESC));
+ assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.PARTS_SOURCE_A));
+ assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.PARTS_SOURCE_B));
+ assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.PARTS_VIRTUAL));
+ assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.ORACLE_SQL));
+ assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.SQLSERVER_SQL));
+ }
+
+ @Test
+ public void unpublishFiles(){
+
+ SWTBotView view = bot.viewByTitle("Model Explorer");
+ SWTBot viewBot = view.bot();
+ SWTBotTreeItem node = eclipse.selectTreeLocation(viewBot, Properties.TEIID_PROJECT_NAME);
+
+ ContextMenuHelper.prepareTreeItemForContextMenu(projectExplorer.tree(),node);
+ ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "ModeShape", "Unpublish");
+
+ SWTBotShell shell = bot.shell("Unpublish");
+ shell.activate();
+
+ SWTBotCombo serverCombo = shell.bot().comboBoxWithLabel("Server:");
+ SWTBotCombo repoCombo = shell.bot().comboBoxWithLabel("Repository:");
+ SWTBotCombo workspaceCombo = shell.bot().comboBoxWithLabel("Workspace:");
+
+ assertTrue("URL mismatch.", serverCombo.getText().equals(Properties.URL));
+ assertTrue("Repository mismatch.", repoCombo.getText().equals(Properties.REPOSITORY));
+ assertTrue("Workspace mismatch.", workspaceCombo.getText().equals(Properties.WORKSPACE));
+
+ open.finish(shell.bot());
+
+ assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.TEIID_PROJECT_DESC));
+ assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.PARTS_SOURCE_A));
+ assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.PARTS_SOURCE_B));
+ assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.PARTS_VIRTUAL));
+ assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.ORACLE_SQL));
+ assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.SQLSERVER_SQL));
+ }
+
+ /**
+ *
+ * @return response code
+ */
+ private int testPublishedFile(String filename){
+
+ try {
+
+ URL url = new URL(Properties.WEBDAV_URL + "/" +
+ Properties.REPOSITORY + "/" +
+ Properties.WORKSPACE + "/" +
+ Properties.TEIID_PROJECT_NAME + "/" + filename);
+ HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+
+ conn.setRequestMethod("GET");
+ conn.setAllowUserInteraction(false);
+ conn.setUseCaches(false);
+ conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+
+ String authorization = Properties.USER + ":" + Properties.PASSWORD;
+ String encodedAuthorization= new String(Base64.encode(authorization.getBytes()));
+ conn.setRequestProperty("Authorization", "Basic " + encodedAuthorization);
+
+ conn.connect();
+
+ if(conn.getResponseCode() == HttpURLConnection.HTTP_OK){
+ //if HTTP_OK, test content
+
+ File file = new File(Platform.getLocation() + "/" + Properties.TEIID_PROJECT_NAME + "/" + filename);
+ byte[] file_input;
+ byte[] server_input;
+ InputStream is = conn.getInputStream();
+
+ file_input = Utils.read(file);
+ server_input = Utils.read(is,(int) file.length());
+
+ assertTrue("File content mismatch.", Arrays.equals(file_input, server_input));
+ }
+
+ //return response code
+ return conn.getResponseCode();
+
+ } catch (IOException e) {
+ fail("Unable to test the published file.");
+ log.error(e.getMessage());
+ }
+ return -1;
+ }
+
+
+ @AfterClass
+ public static void afterClass(){
+
+ bot.viewByTitle("ModeShape").show();
+ SWTBot mbot = bot.viewByTitle("ModeShape").bot();
+ mbot.tree().select(Properties.URL);
+ bot.toolbarButtonWithTooltip("Delete server from the server registry").click();
+ SWTBotShell shell = bot.shell("Confirm Delete Server");
+
+ open.finish(shell.bot(),IDELabel.Button.OK);
+ }
+
+}
Property changes on: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/TeiidFilesPublishing.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Utils.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Utils.java (rev 0)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Utils.java 2010-10-27 08:43:44 UTC (rev 26082)
@@ -0,0 +1,40 @@
+package org.jboss.tools.modeshape.rest.ui.bot.tests;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class Utils {
+
+ public static byte[] read(File file) throws IOException {
+
+ InputStream is = new FileInputStream(file);
+ if (file.length() > Integer.MAX_VALUE) {
+ // File is too large
+ throw new IOException("File " + file.toString() + " is too large!");
+ }
+
+ byte[] bytes = read(is, (int) file.length());
+
+ is.close();
+ return bytes;
+ }
+
+ public static byte[] read(InputStream is, int len) throws IOException{
+
+ byte[] bytes = new byte[len];
+ int bytesRead = 0;
+ int result = 0;
+
+ while (bytesRead < len) {
+
+ result = is.read(bytes, bytesRead, len - bytesRead);
+ if (result == -1) break;
+ bytesRead += result;
+ }
+
+ is.close();
+ return bytes;
+ }
+}
Property changes on: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Utils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 1 month
JBoss Tools SVN: r26081 - trunk/vpe/plugins/org.jboss.tools.vpe.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-10-27 04:06:05 -0400 (Wed, 27 Oct 2010)
New Revision: 26081
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/.classpath
Log:
change jre version to 1.6 such as in manifest.mf (https://jira.jboss.org/browse/JBIDE-7414)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/.classpath
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/.classpath 2010-10-27 07:49:34 UTC (rev 26080)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/.classpath 2010-10-27 08:06:05 UTC (rev 26081)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="resources"/>
<classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="output" path="bin"/>
</classpath>
14 years, 1 month
JBoss Tools SVN: r26080 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test: src/org/jboss/tools/cdi/bot/test/uiutils/wizards and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: jlukas(a)redhat.com
Date: 2010-10-27 03:49:34 -0400 (Wed, 27 Oct 2010)
New Revision: 26080
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/CdiATWizardTest.launch
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java
Log:
fixed requirement for tests and some minor cleanup
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/CdiATWizardTest.launch
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/CdiATWizardTest.launch 2010-10-27 06:31:55 UTC (rev 26079)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/CdiATWizardTest.launch 2010-10-27 07:49:34 UTC (rev 26080)
@@ -32,7 +32,7 @@
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.cdi.bot.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Djava.library.path=/space/java/sdk/jdk1.6.0_20/jre/lib/i386/client:/space/java/sdk/jdk1.6.0_20/jre/lib/i386:/usr/lib/xulrunner-addons:/usr/lib/xulrunner-addons:/usr/java/packages/lib/i386:/lib:/usr/lib:/usr/lib/jni -Xms512m -Xmx1024m -Dswtbot.test.properties.file=/home/lukas/swtbot.properties -Dusage_reporting_enabled=false"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Djava.library.path=${env_var:JAVA_HOME}/jre/lib/i386/client:${env_var:JAVA_HOME}/jre/lib/i386:/usr/lib/xulrunner-addons:/usr/lib/xulrunner-addons:/usr/java/packages/lib/i386:/lib:/usr/lib:/usr/lib/jni -Xms512m -Xmx1024m -Dswtbot.test.properties.file=${env_var:HOME}/swtbot.properties -Dusage_reporting_enabled=false"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.epp.package.jee.product"/>
<booleanAttribute key="show_selected_only" value="false"/>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java 2010-10-27 06:31:55 UTC (rev 26079)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java 2010-10-27 07:49:34 UTC (rev 26080)
@@ -12,18 +12,13 @@
import java.util.Arrays;
import java.util.List;
-import java.util.logging.Logger;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
-import org.eclipse.swtbot.swt.finder.results.BoolResult;
-import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
public class CDIWizard extends Wizard {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java 2010-10-27 06:31:55 UTC (rev 26079)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java 2010-10-27 07:49:34 UTC (rev 26080)
@@ -38,7 +38,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
-@SWTBotTestRequires(perspective = "Java EE", server = @Server(state = ServerState.NotRunning, version = "6.0", operator = "<="))
+@SWTBotTestRequires(perspective = "Java EE", server = @Server(state = ServerState.NotRunning, version = "6.0", operator = ">="))
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({ CdiATWizardTest.class })
public class CdiATWizardTest extends SWTTestExt {
14 years, 1 month
JBoss Tools SVN: r26079 - in trunk: vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-10-27 02:31:55 -0400 (Wed, 27 Oct 2010)
New Revision: 26079
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/EditingActionsTest.java
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/InsertActionsTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java
Log:
Added EditingActionsTest.
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-10-27 06:02:19 UTC (rev 26078)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-10-27 06:31:55 UTC (rev 26079)
@@ -81,6 +81,7 @@
public static final String CUT = "Cut";
public static final String COPY = "Copy";
public static final String PASTE = "Paste";
+ public static final String UNDO = "Undo";
}
public class Button {
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2010-10-27 06:02:19 UTC (rev 26078)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2010-10-27 06:31:55 UTC (rev 26079)
@@ -5,6 +5,7 @@
import junit.framework.TestSuite;
import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
import org.jboss.tools.vpe.ui.bot.test.editor.BlockCommentTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.EditingActionsTest;
import org.jboss.tools.vpe.ui.bot.test.editor.InsertActionsTest;
import org.jboss.tools.vpe.ui.bot.test.editor.ToggleCommentTest;
import org.jboss.tools.vpe.ui.bot.test.editor.VerificationOfNameSpacesTest;
@@ -68,6 +69,7 @@
suite.addTestSuite(ToolbarTextFormattingTest.class);
suite.addTestSuite(VisualEditorContextMenuTest.class);
suite.addTestSuite(InsertActionsTest.class);
+ suite.addTestSuite(EditingActionsTest.class);
return new TestSetup(suite);
}
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/EditingActionsTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/EditingActionsTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/EditingActionsTest.java 2010-10-27 06:31:55 UTC (rev 26079)
@@ -0,0 +1,170 @@
+/*******************************************************************************
+
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.editor;
+
+import java.awt.event.KeyEvent;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.helper.KeyboardHelper;
+import org.jboss.tools.vpe.ui.bot.test.tools.SWTBotWebBrowser;
+import org.mozilla.interfaces.nsIDOMNode;
+/**
+ * Tests JSP file Cut, Copy, Paste, Undo and Delete actions through Visual Editor Menu
+ * @author vlado pakan
+ *
+ */
+public class EditingActionsTest extends VPEEditorTestCase {
+
+ private SWTBotExt botExt = null;
+
+ private static final String PAGE_TEXT = "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ "<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\"%>\n" +
+ "<html>\n" +
+ " <body>\n" +
+ " <h:inputText/>\n" +
+ " <h:outputText value = \"outputText\"/>\n" +
+ " <h:inputText/>\n" +
+ " <rich:comboBox></rich:comboBox>\n" +
+ " </body>\n" +
+ "</html>";
+
+ private static final String TEST_PAGE_NAME = "EditingActionsTest.jsp";
+
+ private SWTBotEclipseEditor jspTextEditor;
+ private SWTBotWebBrowser webBrowser;
+
+ public EditingActionsTest() {
+ super();
+ botExt = new SWTBotExt();
+ }
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ eclipse.maximizeActiveShell();
+ createJspPage(EditingActionsTest.TEST_PAGE_NAME);
+ jspTextEditor = botExt.editorByTitle(EditingActionsTest.TEST_PAGE_NAME).toTextEditor();
+ webBrowser = new SWTBotWebBrowser(EditingActionsTest.TEST_PAGE_NAME,botExt);
+
+ }
+ /**
+ * Insert Tag After Selected Tag
+ */
+ public void testCutCopyPasteUndo(){
+
+ nsIDOMNode node = initJspPageBeforeInserting(EditingActionsTest.PAGE_TEXT, "INPUT");
+ // Check Copy Functionality
+ webBrowser.clickContextMenu(node,
+ SWTBotWebBrowser.COPY_MENU_LABEL);
+ jspTextEditor.setFocus();
+ jspTextEditor.selectRange(4,18,1);
+ jspTextEditor.insertText(4,18,"");
+ webBrowser.clickContextMenu(node,
+ SWTBotWebBrowser.PASTE_MENU_LABEL);
+ jspTextEditor.save();
+ botExt.sleep(Timing.time3S());
+webBrowser.displayWebBrowserDOM();
+ assertSourceEditorContains(stripHTMLSourceText(jspTextEditor.getText()),
+ "<h:inputText/><h:inputText/><h:outputTextvalue=\"outputText\"/><h:inputText/>",
+ EditingActionsTest.TEST_PAGE);
+ assertVisualEditorContainsManyNodes(webBrowser, "INPUT", 6, EditingActionsTest.TEST_PAGE);
+ assertProbelmsViewNoErrors(botExt);
+ // Check Cut Functionality
+ node = webBrowser.getDomNodeByTagName("INPUT",0);
+ webBrowser.selectDomNode(node, 0);
+ botExt.sleep(Timing.time1S());
+ webBrowser.clickContextMenu(node,
+ SWTBotWebBrowser.CUT_MENU_LABEL);
+ jspTextEditor.save();
+ botExt.sleep(Timing.time3S());
+ assertSourceEditorContains(stripHTMLSourceText(jspTextEditor.getText()),
+ "<body><h:inputText/><h:outputTextvalue=\"outputText\"/><h:inputText/><rich:comboBox>",
+ EditingActionsTest.TEST_PAGE);
+ assertVisualEditorContainsManyNodes(webBrowser, "INPUT", 5, EditingActionsTest.TEST_PAGE);
+ assertProbelmsViewNoErrors(botExt);
+ // Check Paste Functionality
+ node = webBrowser.getDomNodeByTagName("INPUT",1);
+ jspTextEditor.setFocus();
+ jspTextEditor.selectRange(6,18,1);
+ jspTextEditor.insertText(6,18,"");
+ webBrowser.clickContextMenu(node,
+ SWTBotWebBrowser.PASTE_MENU_LABEL);
+ jspTextEditor.save();
+ botExt.sleep(Timing.time3S());
+ assertSourceEditorContains(stripHTMLSourceText(jspTextEditor.getText()),
+ "<h:inputText/><h:outputTextvalue=\"outputText\"/><h:inputText/><h:inputText/>",
+ EditingActionsTest.TEST_PAGE);
+ assertVisualEditorContainsManyNodes(webBrowser, "INPUT", 6, EditingActionsTest.TEST_PAGE);
+ assertProbelmsViewNoErrors(botExt);
+ // Check Undo Functionality
+ webBrowser.setFocus();
+ KeyboardHelper.typeKeyCodeUsingAWT(KeyEvent.VK_Z, KeyEvent.VK_CONTROL);
+ jspTextEditor.save();
+ botExt.sleep(Timing.time3S());
+ assertSourceEditorContains(stripHTMLSourceText(jspTextEditor.getText()),
+ "<h:outputTextvalue=\"outputText\"/><h:inputText/><rich:comboBox>",
+ EditingActionsTest.TEST_PAGE);
+ KeyboardHelper.typeKeyCodeUsingAWT(KeyEvent.VK_Z, KeyEvent.VK_CONTROL);
+ jspTextEditor.save();
+ botExt.sleep(Timing.time3S());
+ assertSourceEditorContains(stripHTMLSourceText(jspTextEditor.getText()),
+ "<h:inputText/><h:inputText/><h:outputTextvalue=\"outputText\"/>",
+ EditingActionsTest.TEST_PAGE);KeyboardHelper.typeKeyCodeUsingAWT(KeyEvent.VK_Z, KeyEvent.VK_CONTROL);
+ jspTextEditor.save();
+ botExt.sleep(Timing.time3S());
+ assertSourceEditorContains(stripHTMLSourceText(jspTextEditor.getText()),
+ "<body><h:inputText/><h:outputTextvalue=\"outputText\"/>",
+ EditingActionsTest.TEST_PAGE);
+ // Check Delete Functionality
+ webBrowser.setFocus();
+ webBrowser.selectDomNode(webBrowser.getDomNodeByTagName("INPUT",2),0);
+ botExt.sleep(Timing.time1S());
+ KeyboardHelper.typeKeyCodeUsingAWT(KeyEvent.VK_DELETE);
+ jspTextEditor.save();
+ botExt.sleep(Timing.time3S());
+ assertSourceEditorContains(stripHTMLSourceText(jspTextEditor.getText()),
+ "<body><h:inputText/><h:outputTextvalue=\"outputText\"/><h:inputText/></body>",
+ EditingActionsTest.TEST_PAGE);
+ assertVisualEditorContainsManyNodes(webBrowser, "INPUT", 2, EditingActionsTest.TEST_PAGE);
+ }
+ /**
+ * Inits JSP Page before Tag will be inserted
+ */
+ private nsIDOMNode initJspPageBeforeInserting(String pageText , String nodeText) {
+
+ jspTextEditor.setText(pageText);
+ jspTextEditor.save();
+ botExt.sleep(Timing.time3S());
+ nsIDOMNode node = webBrowser.getDomNodeByTagName(nodeText, 0);
+ webBrowser.selectDomNode(node, 0);
+ botExt.sleep(Timing.time1S());
+
+ return node;
+
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ return false;
+ }
+ @Override
+ protected void tearDown() throws Exception {
+ jspTextEditor.close();
+ super.tearDown();
+ }
+}
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/EditingActionsTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/InsertActionsTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/InsertActionsTest.java 2010-10-27 06:02:19 UTC (rev 26078)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/InsertActionsTest.java 2010-10-27 06:31:55 UTC (rev 26079)
@@ -66,17 +66,10 @@
jspTextEditor.save();
botExt.sleep(Timing.time3S());
- String editorText = jspTextEditor.getText();
- // Check if tag <rich:calendar> was properly added
- assertTrue("File " + TEST_PAGE
- + " has to contain string '<h:inputText/><rich:calendar>' but it doesn't.\nIt contains: " + editorText,
- editorText.contains("<h:inputText/><rich:calendar>"));
-
- assertTrue("Visual Representation of file " + TEST_PAGE
- + " has to contain rich:calendar but it doesn't",
- webBrowser.containsNodeWithNameAndAttributes(webBrowser.getMozillaEditor().getDomDocument(), "SPAN",
- new String[]{"title"},new String[] {"rich:calendar"}));
-
+ // Check if tag <rich:calendar> was properly added.
+ assertSourceEditorContains(jspTextEditor.getText(), "<h:inputText/><rich:calendar>", InsertActionsTest.TEST_PAGE);
+ assertVisualEditorContains(webBrowser, "SPAN", new String[]{"title"},new String[] {"rich:calendar"},
+ InsertActionsTest.TEST_PAGE);
assertProbelmsViewNoErrors(botExt);
}
@@ -94,17 +87,11 @@
jspTextEditor.save();
botExt.sleep(Timing.time3S());
- String trimedEditorText = VPEEditorTestCase.stripHTMLSourceText(jspTextEditor.getText());
// Check if tag <rich:calendar> was properly added
- assertTrue("File " + TEST_PAGE
- + " has to contain string '<rich:calendar></rich:calendar><h:inputText/>' but it doesn't.\nIt contains: " + trimedEditorText,
- trimedEditorText.contains("<rich:calendar></rich:calendar><h:inputText/>"));
-
- assertTrue("Visual Representation of file " + TEST_PAGE
- + " has to contain rich:calendar but it doesn't",
- webBrowser.containsNodeWithNameAndAttributes(webBrowser.getMozillaEditor().getDomDocument(), "SPAN",
- new String[]{"title"},new String[] {"rich:calendar"}));
-
+ assertSourceEditorContains(VPEEditorTestCase.stripHTMLSourceText(jspTextEditor.getText()),
+ "<rich:calendar></rich:calendar><h:inputText/>", InsertActionsTest.TEST_PAGE);
+ assertVisualEditorContains(webBrowser, "SPAN", new String[]{"title"},new String[] {"rich:calendar"},
+ InsertActionsTest.TEST_PAGE);
assertProbelmsViewNoErrors(botExt);
}
@@ -131,16 +118,10 @@
jspTextEditor.save();
botExt.sleep(Timing.time3S());
- String trimedEditorText = VPEEditorTestCase.stripHTMLSourceText(jspTextEditor.getText());
// Check if tag <rich:calendar> was properly added
- assertTrue("File " + TEST_PAGE
- + " has to contain string '<form><rich:calendar></rich:calendar></form>' but it doesn't.\nIt contains: " + trimedEditorText,
- trimedEditorText.contains("<form><rich:calendar></rich:calendar></form>"));
-
- assertTrue("Visual Representation of file " + TEST_PAGE
- + " has to contain rich:calendar but it doesn't",
- webBrowser.containsNodeWithNameAndAttributes(webBrowser.getMozillaEditor().getDomDocument(), "FORM"));
-
+ assertSourceEditorContains(VPEEditorTestCase.stripHTMLSourceText(jspTextEditor.getText()),
+ "<form><rich:calendar></rich:calendar></form>", InsertActionsTest.TEST_PAGE);
+ assertVisualEditorContains(webBrowser, "FORM", null,null,InsertActionsTest.TEST_PAGE);
assertProbelmsViewNoErrors(botExt);
}
@@ -159,16 +140,10 @@
jspTextEditor.save();
botExt.sleep(Timing.time3S());
- String trimedEditorText = VPEEditorTestCase.stripHTMLSourceText(jspTextEditor.getText());
// Check if tag <h:form> was properly added
- assertTrue("File " + TEST_PAGE
- + " has to contain string '<h:form><h:inputText/></h:form>' but it doesn't.\nIt contains: " + trimedEditorText,
- trimedEditorText.contains("<h:form><h:inputText/></h:form>"));
-
- assertTrue("Visual Representation of file " + TEST_PAGE
- + " has to contain h:form but it doesn't",
- webBrowser.containsNodeWithNameAndAttributes(webBrowser.getMozillaEditor().getDomDocument(), "FORM"));
-
+ assertSourceEditorContains(VPEEditorTestCase.stripHTMLSourceText(jspTextEditor.getText()),
+ "<h:form><h:inputText/></h:form>", InsertActionsTest.TEST_PAGE);
+ assertVisualEditorContains(webBrowser, "FORM", null,null,InsertActionsTest.TEST_PAGE);
assertProbelmsViewNoErrors(botExt);
}
@@ -188,7 +163,12 @@
return node;
}
-
+ @Override
+ protected void tearDown() throws Exception {
+ jspTextEditor.close();
+ super.tearDown();
+ }
+
@Override
protected void closeUnuseDialogs() {
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java 2010-10-27 06:02:19 UTC (rev 26078)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java 2010-10-27 06:31:55 UTC (rev 26079)
@@ -12,6 +12,7 @@
import org.jboss.tools.ui.bot.test.WidgetVariables;
import org.jboss.tools.vpe.ui.bot.test.Activator;
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+import org.jboss.tools.vpe.ui.bot.test.tools.SWTBotWebBrowser;
public abstract class VPEEditorTestCase extends VPEAutoTestCase{
@@ -87,5 +88,64 @@
protected static String stripHTMLSourceText(String editorText){
return editorText.replaceAll("\n", "").replaceAll("\t", "").replaceAll(" ", "");
}
-
+ /**
+ * Asserts if sourceEditorText of file with fileName contains textToContain
+ * @param sourceEditorText
+ * @param textToContain
+ * @param fileName
+ */
+ protected static void assertSourceEditorContains (String sourceEditorText, String textToContain, String fileName){
+
+ assertTrue("File " + fileName
+ + " has to contain string '"
+ + textToContain
+ + "' but it doesn't.\nIt contains: " + sourceEditorText,
+ sourceEditorText.contains(textToContain));
+
+ }
+ /**
+ * Asserts if Visual Editor contains node with particular attributes
+ * @param webBrowser
+ * @param nodeNameToContain
+ * @param attributeNames
+ * @param attributeValues
+ * @param fileName
+ */
+ protected static void assertVisualEditorContains (SWTBotWebBrowser webBrowser,
+ String nodeNameToContain,
+ String[] attributeNames, String[] attributeValues,
+ String fileName){
+
+ assertTrue("Visual Representation of file " + fileName
+ + " has to contain "
+ + nodeNameToContain
+ + " node but it doesn't",
+ webBrowser.containsNodeWithNameAndAttributes(webBrowser.getMozillaEditor().getDomDocument(),
+ nodeNameToContain,
+ attributeNames,
+ attributeValues));
+
+ }
+ /**
+ * Asserts if Visual Editor contains node nodeNameToContain at least numOccurrencies times
+ * @param webBrowser
+ * @param nodeNameToContain
+ * @param numOccurrences
+ * @param fileName
+ */
+ protected static void assertVisualEditorContainsManyNodes (SWTBotWebBrowser webBrowser,
+ String nodeNameToContain,
+ int numOccurrences,
+ String fileName){
+
+ assertTrue("Visual Representation of file " + fileName
+ + " has to contain "
+ + nodeNameToContain
+ + " node "
+ + (numOccurrences)
+ + " times but it doesn't",
+ webBrowser.getDomNodeOccurenciesByTagName(nodeNameToContain) == numOccurrences);
+
+ }
+
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java 2010-10-27 06:02:19 UTC (rev 26078)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java 2010-10-27 06:31:55 UTC (rev 26079)
@@ -205,6 +205,16 @@
}
/**
+ * Returns number of occurrences of specified tagName
+ * @param tagName
+ * @return
+ */
+ public long getDomNodeOccurenciesByTagName(String tagName) {
+
+ return getNsIDOMDocument().getElementsByTagName(tagName).getLength();
+
+ }
+ /**
* Returns first node corresponding to specified tagName
* @param tagName
* @return
14 years, 2 months
JBoss Tools SVN: r26078 - in trunk/as/plugins: org.jboss.ide.eclipse.as.rse.core/META-INF and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-10-27 02:02:19 -0400 (Wed, 27 Oct 2010)
New Revision: 26078
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/about.html
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/about.html
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/plugin.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/about.html
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/about.html
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/about.html
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/build.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/plugin.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/build.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/build.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/build.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/build.properties
Log:
JBDS-1367 - copyright stuff
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/META-INF/MANIFEST.MF 2010-10-27 04:48:14 UTC (rev 26077)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/META-INF/MANIFEST.MF 2010-10-27 06:02:19 UTC (rev 26078)
@@ -1,6 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Core
+Bundle-Name: %Bundle-Name.0
+Bundle-Vendor: %Bundle-Vendor.0
Bundle-SymbolicName: org.jboss.ide.eclipse.as.rse.core;singleton:=true
Bundle-Version: 0.9.0.qualifier
Bundle-Activator: org.jboss.ide.eclipse.as.rse.core.RSECorePlugin
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/about.html
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/about.html (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/about.html 2010-10-27 06:02:19 UTC (rev 26078)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2010 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A href="http://www.jboss.org/tools">http://www.jboss.org/tools</A>.</P>
+
+</BODY>
+</HTML>
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/build.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/build.properties 2010-10-27 04:48:14 UTC (rev 26077)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/build.properties 2010-10-27 06:02:19 UTC (rev 26078)
@@ -3,6 +3,5 @@
bin.includes = META-INF/,\
.,\
plugin.xml,\
- plugin.properties
-src.includes = plugin.properties,\
- META-INF/
+ plugin.properties,\
+ about.html
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/plugin.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/plugin.properties 2010-10-27 04:48:14 UTC (rev 26077)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/plugin.properties 2010-10-27 06:02:19 UTC (rev 26078)
@@ -2,3 +2,5 @@
AllJBossServerTypes=org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50
AllJBTServerTypes=org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50,org.jboss.ide.eclipse.as.systemCopyServer
ServerTypesJBoss6OrHigher=org.jboss.ide.eclipse.as.60
+Bundle-Vendor.0 = JBoss by Red Hat
+Bundle-Name.0 = JBossAS RSE Tools
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/META-INF/MANIFEST.MF 2010-10-27 04:48:14 UTC (rev 26077)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/META-INF/MANIFEST.MF 2010-10-27 06:02:19 UTC (rev 26078)
@@ -1,6 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Ui
+Bundle-Name: %Bundle-Name.0
+Bundle-Vendor: %Bundle-Vendor.0
Bundle-SymbolicName: org.jboss.ide.eclipse.as.rse.ui;singleton:=true
Bundle-Version: 0.9.0.qualifier
Bundle-Activator: org.jboss.ide.eclipse.as.rse.ui.RSEUIPlugin
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/about.html
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/about.html (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/about.html 2010-10-27 06:02:19 UTC (rev 26078)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2010 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A href="http://www.jboss.org/tools">http://www.jboss.org/tools</A>.</P>
+
+</BODY>
+</HTML>
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/build.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/build.properties 2010-10-27 04:48:14 UTC (rev 26077)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/build.properties 2010-10-27 06:02:19 UTC (rev 26078)
@@ -2,4 +2,6 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- plugin.xml
+ plugin.xml,\
+ plugin.properties,\
+ about.html
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/plugin.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/plugin.properties (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/plugin.properties 2010-10-27 06:02:19 UTC (rev 26078)
@@ -0,0 +1,2 @@
+Bundle-Vendor.0 = JBoss by Red Hat
+Bundle-Name.0 = JBossAS RSE UI Tools
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/about.html
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/about.html (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/about.html 2010-10-27 06:02:19 UTC (rev 26078)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2010 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A href="http://www.jboss.org/tools">http://www.jboss.org/tools</A>.</P>
+
+</BODY>
+</HTML>
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/build.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/build.properties 2010-10-27 04:48:14 UTC (rev 26077)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/build.properties 2010-10-27 06:02:19 UTC (rev 26078)
@@ -4,4 +4,5 @@
icons/,\
.,\
plugin.xml,\
- plugin.properties
\ No newline at end of file
+ plugin.properties,\
+ about.html
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/about.html
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/about.html (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/about.html 2010-10-27 06:02:19 UTC (rev 26078)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2010 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A href="http://www.jboss.org/tools">http://www.jboss.org/tools</A>.</P>
+
+</BODY>
+</HTML>
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/build.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/build.properties 2010-10-27 04:48:14 UTC (rev 26077)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/build.properties 2010-10-27 06:02:19 UTC (rev 26078)
@@ -2,4 +2,5 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- plugin.xml
+ plugin.xml,\
+ about.html
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/about.html
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/about.html (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/about.html 2010-10-27 06:02:19 UTC (rev 26078)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2010 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A href="http://www.jboss.org/tools">http://www.jboss.org/tools</A>.</P>
+
+</BODY>
+</HTML>
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/build.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/build.properties 2010-10-27 04:48:14 UTC (rev 26077)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/build.properties 2010-10-27 06:02:19 UTC (rev 26078)
@@ -3,4 +3,5 @@
bin.includes = META-INF/,\
.,\
plugin.xml,\
- icons/
+ icons/,\
+ about.html
14 years, 2 months
JBoss Tools SVN: r26077 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-10-27 00:48:14 -0400 (Wed, 27 Oct 2010)
New Revision: 26077
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeLocator.java
Log:
JBIDE-7363 - npe
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeLocator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeLocator.java 2010-10-27 04:31:51 UTC (rev 26076)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeLocator.java 2010-10-27 04:48:14 UTC (rev 26077)
@@ -64,6 +64,7 @@
return createRuntime(path, loader);
}
File[] children = path.toFile().listFiles();
+ children = (children == null ? new File[]{} : children);
monitor.beginTask("Searching for JBoss runtime...", children.length); //$NON-NLS-1$
if( children != null ) {
for( int i = 0; i < children.length; i++ ) {
14 years, 2 months
JBoss Tools SVN: r26076 - trunk/documentation/guides/JBDS_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-10-27 00:31:51 -0400 (Wed, 27 Oct 2010)
New Revision: 26076
Modified:
trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
Log:
updated with new issues documented
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-10-26 21:23:15 UTC (rev 26075)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-10-27 04:31:51 UTC (rev 26076)
@@ -26,6 +26,51 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-6983">JBIDE-6983</ulink>: The <filename>beans.xml</filename> editor now correctly supports elements in other namespaces. This has been achieved by supporting any child element of the <beans> root element and providing dynamic extentions to <filename>beans.xml</filename> in order to support different namespaces.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6742">JBIDE-6742</ulink> and <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6743">JBIDE-6743</ulink>: Error messages have been rewritten to clarify the error that occured. For example, the error message <errorname>Session bean with a parameterized bean class declares any scope other than @Dependent</errorname> has been rewritten to say <errorname>Session bean with a parameterized bean class must have @Dependent scope</errorname>. For a list of all error messages affected view the associated JIRAs.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6728">JBIDE-6728</ulink>: Each field injection point that includes an <parameter>Event</parameter> type is now provided with a default bean. For example the injection field <code>@Inject @Any @Tame @Role("Master") Event<TamingCommand> tamingEvent</code> will now have a bean for injection.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6704">JBIDE-6704</ulink>: It is now possible to enable and disable the CDI validator at the project level. To enable project validator settings navigate to <menuchoice><guimenuitem>Project</guimenuitem><guimenuitem>Properties</guimenuitem><guimenuitem>CDI Settings</guimenuitem><guimenuitem>Validator</guimenuitem><guimenuitem>Enable project specific settings</guimenuitem></menuchoice>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6642">JBIDE-6642</ulink>: Validation has been added to ensure that <property>@Stereotype</property> annotation has the following annotation components: <property>@Target({TYPE, METHOD, FIELD})</property>, <property>@Target(TYPE)</property>, <property>@Target(METHOD)</property>, <property>@Target(FIELD)</property> or <property>@Target({METHOD, FIELD})</property>, and <property>@Retention(RUNTIME)</property>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6641">JBIDE-6641</ulink> and <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6640">JBIDE-6640</ulink>: The OpenOn menu for injection points has been upgraded to present more information concerning eligible beans and indicates the class or classes that will be injected.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6639">JBIDE-6639</ulink>: Validation has been added to ensure that <property>@Scope</property> and <property>@NormalScope</property> annotation have the following annotation components: <property>@Target({TYPE, METHOD, FIELD})</property> and <property>@Retention(RUNTIME)</property>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6637">JBIDE-6637</ulink>: Validation has been added to ensure that <property>@Qualifier</property> and <property>@NormalScope</property> annotation have the following annotation components: <property>@Target({METHOD, FIELD, PARAMETER, TYPE})</property> and <property>@Retention(RUNTIME)</property>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6636">JBIDE-6636</ulink>: Errors in the <property>@Typed</property> annotation applied to the <classname>Bean</classname> class, <methodname>Producer</methodname> method and the <property>Producer</property> field were not reported on. If <property>@Typed</property> annotation errors are present in these circumstances, the errors are now reported to the user.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6635">JBIDE-6635</ulink>: A bug existed that would ignore the decorator of a class and take a user straight to the bean when choosing the <guimenuitem>Open Injected Class</guimenuitem> option. This issue has been corrected by expanding on the list of options to choose from. New options include <guimenuitem>Open Decorator NAME</guimenuitem> and <guimenuitem>Open Interceptor NAME</guimenuitem>
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -68,6 +113,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-6908">JBIDE-6908</ulink>: Support for ESB 4.9 has been added to the ESB project editor.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6758">JBIDE-6758</ulink>: An existing <parameter>service</parameter> element without a child <parameter>security</parameter> element would not be be able to have the <parameter>security</parameter> element added through the user interface. To this issue, each <parameter>service</parameter> element now has a <parameter>security</parameter> element and a subsequent <guimenuitem>Security</guimenuitem> form automatically attached in the ESB editor. The <parameter>security</parameter> element can safely be deleted from the <parameter>service</parameter> element code without the <guimenuitem>Security</guimenuitem> form being removed in the ESB editor. This ensures that if a user wishes to re-add a <parameter>security</parameter> element at a later stage, the functionality will exist to do so within the user interface.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -127,6 +177,21 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-6974">JBIDE-6974</ulink>: Support for comments in the HQL editor has been added for this release. Comments are annotated with <emphasis>--</emphasis> at the beginning of each comment line.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6727">JBIDE-6727</ulink>: When a JPA project is created with Hibernate a console configuration is automatically created for it. However if a Hibernate JPA project did not have a console configuration associated with it an exception would occur due to the tooling assuming a console configuration existed. To avoid this situation, Hibernate JPA projects are now tested for an associated console configuration. If a console configuration is not found an error will appear in the <guilabel>Problems</guilabel> view.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6703">JBIDE-6703</ulink>: The <classname>QueryExporter</classname> has been added to the exporters for use in Hibernate code generation configurations. This is accomplished by allowing all Ant export tasks to be executed from the user interface.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6686">JBIDE-6686</ulink>: An error existed where the Hibernate platform to be used was not filtered based on the version of JPA being used. This meant that selecting the JPA version to use would present all Hibernate platforms to the user, with indistinct names. This issue has been corrected by only displaying the Hibernate platform that corresponds to the specified JPA version, and renaming these platforms for easier identification.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -183,6 +248,16 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-6973">JBIDE-6973</ulink>: A HTTP poller has been added for JBoss servers to detect if the server is running. This added feature will be useful for remote and local servers, being less resource-intensive than polling with JMX.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6796">JBIDE-6796</ulink>: Launch configuration of the server can now be altered to perform different tasks based on the server mode; sample modes include local and Remote System Explorer (RSE). This added functionality has been achieved by separating launch behaviour into seperate classes.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6707">JBIDE-6707</ulink>: The ability to <option>Explore</option> a specific resource on a server has now been expanded to encapsulate the entire server, allowing the deploy directory to be explored.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -325,6 +400,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-6805">JBIDE-6805</ulink>: New templates have been added, supporting most docbook tags.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6721">JBIDE-6721</ulink> and <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6711">JBIDE-6711</ulink>: Spring support has been added to the Visual Page Editor through the addition of a new plug-in. The plug-in is available as <filename>org.jboss.tools.vpe.spring</filename>.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -347,6 +427,21 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-6851">JBIDE-6851</ulink> and <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6850">JBIDE-6850</ulink>: A new feature has been added providing the ability to read Web Service Definition Language (WSDL) over HTTPS. This ensures that secured <methodname>GET</methodname> and <methodname>POST</methodname> methods are usable and will not produce a <exceptionname>com.sun.xml.internal.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException</exceptionname> exception.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6797">JBIDE-6797</ulink>: A new <guimenuitem>Options</guimenuitem> menu item has been added to the Web Services interface for JAX-RS. The <guimenuitem>Options</guimenuitem> menu item allows a user to test RESTful web services for allowed HTTP methods such as <methodname>POST</methodname> and <methodname>GET</methodname>. Results from the <guimenuitem>Options</guimenuitem> operation are viewable in the <property>Response Headers</property> list.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6753">JBIDE-6753</ulink>: In JBoss Application Server 6 no entries are required in the <filename>web.xml</filename> file, however entries remain mandatory for earlier releases. To reflect this upgrade, the <guilabel>Generate a Sample RESTful Web Service</guilabel> wizard now contains a checkbox to <guilabel>Update web.xml</guilabel>. By default the update option is enabled. If a user is aware that JBoss Application Server 6 is being utilized and they do not wish to update the <filename>web.xml</filename> file, this checkbox can be unchecked.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6660">JBIDE-6660</ulink>: A bug existed in the Web Services tooling such that when a user attempted to connect with a password protected URL (for example, a deltacloud) a dialog would appear requesting a username and password combination, however when the information was submitted it would not persist; this ensured the user would be asked for login details continually. This issue has been fixed by the creation of a new dialog that remembers the authentication information last used, however login information is not currently persisted between sessions (for example, closing and then reopening a workbench).
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -381,7 +476,7 @@
<!-- This issue only in release notes for JBT -->
<!-- <listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6836">JBIDE-6836</ulink>: Google Web Toolkit features are available for JBoss Tools through the update site as experimental.
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6836">JBIDE-6836</ulink> and <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6695">JBIDE-6695</ulink>: Google Web Toolkit features are available for JBoss Tools through the update site as experimental.
</para>
</listitem> -->
</itemizedlist>
14 years, 2 months
JBoss Tools SVN: r26075 - in trunk/smooks/plugins: org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/csv and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2010-10-26 17:23:15 -0400 (Tue, 26 Oct 2010)
New Revision: 26075
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/csv/CSVModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/InputDataTreeNodeModel.java
Log:
https://jira.jboss.org/browse/JBIDE-7330
Broken links in java2csv editor Smooks editor
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java 2010-10-26 17:44:41 UTC (rev 26074)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java 2010-10-26 21:23:15 UTC (rev 26075)
@@ -25,6 +25,7 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
import org.milyn.xml.DomUtils;
import javax.xml.XMLConstants;
@@ -269,4 +270,58 @@
return !enforce.equals("false"); //$NON-NLS-1$
}
+
+ /**
+ * Does the model element contain child elements.
+ * @param element The element to test.
+ * @return true if the element contains child elements, otherwise false.
+ */
+ public static boolean hasChildElements(Element element) {
+ NodeList childNodes = element.getChildNodes();
+ int numChildren = childNodes.getLength();
+
+ for(int i = 0; i < numChildren; i++) {
+ if(childNodes.item(i).getNodeType() == Node.ELEMENT_NODE) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Set the model as being strict, or not.
+ * <p/>
+ * A strict model should have cardinality info attached e.g. minOccurs/maxOccurs, required etc.
+ * @param model The model Document node.
+ * @param strict True if the model is strict, otherwise false.
+ */
+ public static void setStrictModel(Document model, boolean strict) {
+ Element documentElement = model.getDocumentElement();
+
+ if(documentElement == null) {
+ throw new IllegalStateException("Call to 'markStrictModel' before the model's root element has been added."); //$NON-NLS-1$
+ }
+
+ documentElement.setAttributeNS(NAMESPACE, "smk:strict", Boolean.toString(strict)); //$NON-NLS-1$
+ }
+
+ /**
+ * Is the model strict, or not.
+ * <p/>
+ * A strict model should have cardinality info attached e.g. minOccurs/maxOccurs, required etc.
+ * @param model The model Document node.
+ * @return True if the model is strict, otherwise false.
+ */
+ public static boolean isStrictModel(Document model) {
+ Element documentElement = model.getDocumentElement();
+
+ if(documentElement == null) {
+ throw new IllegalStateException("Call to 'isStrictModel' before the model's root element has been added."); //$NON-NLS-1$
+ }
+
+ String strict = documentElement.getAttributeNS(NAMESPACE, "strict"); //$NON-NLS-1$
+
+ return Boolean.parseBoolean(strict);
+ }
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/csv/CSVModelBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/csv/CSVModelBuilder.java 2010-10-26 17:44:41 UTC (rev 26074)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/csv/CSVModelBuilder.java 2010-10-26 21:23:15 UTC (rev 26075)
@@ -52,6 +52,9 @@
record.appendChild(fieldElement);
}
+ // The model has some cardinality metadata attached, so mark it as a strict model...
+ ModelBuilder.setStrictModel(model, true);
+
return model;
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java 2010-10-26 17:44:41 UTC (rev 26074)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java 2010-10-26 21:23:15 UTC (rev 26075)
@@ -84,6 +84,10 @@
Element documentElement = model.getDocumentElement();
+ // The model has no metadata attached since it is based on only a sample,
+ // so mark it as not being a strict model...
+ ModelBuilder.setStrictModel(model, false);
+
trimNonModelNodes(documentElement);
configureModelElementTypes(documentElement);
configureModelElementCardinality(documentElement);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java 2010-10-26 17:44:41 UTC (rev 26074)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java 2010-10-26 21:23:15 UTC (rev 26075)
@@ -91,6 +91,9 @@
Document model = createModelInstance();
expand(rootElement, 1, 1, model, model);
+ // The model has detailed metadata attached, so mark it as a strict model...
+ ModelBuilder.setStrictModel(model, true);
+
return model;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/InputDataTreeNodeModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/InputDataTreeNodeModel.java 2010-10-26 17:44:41 UTC (rev 26074)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/InputDataTreeNodeModel.java 2010-10-26 21:23:15 UTC (rev 26075)
@@ -18,6 +18,7 @@
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.configuration.editors.xml.AbstractXMLObject;
import org.jboss.tools.smooks.configuration.editors.xml.TagObject;
import org.jboss.tools.smooks.configuration.editors.xml.TagPropertyObject;
import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel;
@@ -84,25 +85,34 @@
@Override
public boolean canLinkWithTarget(Object model) {
TreeNodeModel targetNode = (TreeNodeModel) model;
- System.out.println(targetNode);
if (targetNode == this
|| targetNode.getModelRootNode() == getModelRootNode()) {
return false;
}
- Object data = AdapterFactoryEditingDomain.unwrap(targetNode.getData());
- AbstractSmooksGraphicalModel pm = targetNode;
- while (pm != null && !(pm instanceof FreemarkerTemplateGraphicalModel)) {
- pm = pm.getParent();
+ Object targetData = AdapterFactoryEditingDomain.unwrap(targetNode.getData());
+ AbstractSmooksGraphicalModel targetModel = targetNode;
+ while (targetModel != null && !(targetModel instanceof FreemarkerTemplateGraphicalModel)) {
+ targetModel = targetModel.getParent();
}
- if (data instanceof IFreemarkerTemplateModel && pm instanceof FreemarkerTemplateGraphicalModel) {
- TemplateBuilder builder = ((FreemarkerTemplateGraphicalModel) pm).getTemplateBuilder();
- if (((IFreemarkerTemplateModel) data).isHidden(builder)) {
+ if (targetData instanceof IFreemarkerTemplateModel && targetModel instanceof FreemarkerTemplateGraphicalModel) {
+ TemplateBuilder builder = ((FreemarkerTemplateGraphicalModel) targetModel).getTemplateBuilder();
+ if (((IFreemarkerTemplateModel) targetData).isHidden(builder)) {
return false;
}
- if (data instanceof FreemarkerTemplateXMLModel) {
- if (!((FreemarkerTemplateXMLModel) data).getXMLNodeChildren().isEmpty()) {
+ if (targetData instanceof FreemarkerTemplateXMLModel) {
+ FreemarkerTemplateXMLModel targetDataModel = (FreemarkerTemplateXMLModel) targetData;
+ if (!targetDataModel.getXMLNodeChildren().isEmpty()) {
+ // The target node has child nodes. The only thing it can connect to on the source is
+ // a collection node.
+ Object sourceData = AdapterFactoryEditingDomain.unwrap(this.getData());
+ if(sourceData instanceof AbstractXMLObject) {
+ Element sourceElement = ((AbstractXMLObject)sourceData).getReferenceElement();
+ if(ModelBuilder.isCollection(sourceElement) || (!ModelBuilder.isStrictModel(sourceElement.getOwnerDocument()) && ModelBuilder.hasChildElements(sourceElement))) {
+ return true;
+ }
+ }
return false;
}
}
@@ -134,17 +144,17 @@
pgm = pgm.getParent();
}
}
- if (data instanceof TagPropertyObject) {
+ if (targetData instanceof TagPropertyObject) {
// Only OK to link to an attribute from a valid Value node...
return isValidValueNode();
- } else if (data instanceof TagObject) {
+ } else if (targetData instanceof TagObject) {
if (targetNode.isValidValueNode()) {
return isValidValueNode();
} else if (targetNode.isValidCollectionNode()) {
return isValidCollectionNode();
}
- } else if (data instanceof EObject) {
- if (SmooksUIUtils.getSelectorFeature((EObject) data) != null) {
+ } else if (targetData instanceof EObject) {
+ if (SmooksUIUtils.getSelectorFeature((EObject) targetData) != null) {
return true;
}
}
14 years, 2 months
JBoss Tools SVN: r26074 - in trunk/as: plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-10-26 13:44:41 -0400 (Tue, 26 Oct 2010)
New Revision: 26074
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/test/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/test/ASPerspectiveTest.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/test/AsUiAllTests.java
Log:
Simple as perspective and view tests are added to increase code coverage
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2010-10-26 17:42:33 UTC (rev 26073)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2010-10-26 17:44:41 UTC (rev 26074)
@@ -58,6 +58,8 @@
org.jboss.ide.eclipse.as.ui.dialogs,
org.jboss.ide.eclipse.as.ui.editor,
org.jboss.ide.eclipse.as.ui.launch,
+ org.jboss.ide.eclipse.as.ui.perspective,
+ org.jboss.ide.eclipse.as.ui.views,
org.jboss.ide.eclipse.as.ui.views.server.extensions,
org.jboss.ide.eclipse.as.ui.wizards,
org.jboss.tools.as.wst.server.ui.xpl
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java 2010-10-26 17:42:33 UTC (rev 26073)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java 2010-10-26 17:44:41 UTC (rev 26074)
@@ -37,6 +37,8 @@
*/
public class ASPerspective implements IPerspectiveFactory {
+ public static final String ID = "org.jboss.ide.eclipse.as.ui.ASPerspective";
+
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/test/ASPerspectiveTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/test/ASPerspectiveTest.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/test/ASPerspectiveTest.java 2010-10-26 17:44:41 UTC (rev 26074)
@@ -0,0 +1,31 @@
+package org.jboss.ide.eclipse.as.ui.perspective.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.ide.eclipse.as.ui.perspective.ASPerspective;
+import org.jboss.ide.eclipse.as.ui.views.ServerLogView;
+
+public class ASPerspectiveTest extends TestCase {
+
+ @Override
+ protected void setUp() throws Exception {
+ PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().setPerspective(
+ PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId(ASPerspective.ID));
+ }
+
+ public void testASPerspective() {
+ IPerspectiveDescriptor perspective = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getPerspective();
+ assertEquals(perspective.getLabel(),"JBoss AS");
+ }
+
+ public void testServerLogView() throws PartInitException {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getActivePage().showView(ServerLogView.VIEW_ID);
+ }
+
+}
Property changes on: trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/test/ASPerspectiveTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/test/AsUiAllTests.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/test/AsUiAllTests.java 2010-10-26 17:42:33 UTC (rev 26073)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/test/AsUiAllTests.java 2010-10-26 17:44:41 UTC (rev 26074)
@@ -1,5 +1,6 @@
package org.jboss.ide.eclipse.as.ui.test;
+import org.jboss.ide.eclipse.as.ui.perspective.test.ASPerspectiveTest;
import org.jboss.ide.eclipse.as.ui.wizards.test.NewServerWizardTest;
import junit.framework.Test;
@@ -10,6 +11,7 @@
public static Test suite() {
TestSuite suite = new TestSuite(AsUiAllTests.class.getName());
suite.addTestSuite(NewServerWizardTest.class);
+ suite.addTestSuite(ASPerspectiveTest.class);
return suite;
}
14 years, 2 months
JBoss Tools SVN: r26073 - trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-10-26 13:42:33 -0400 (Tue, 26 Oct 2010)
New Revision: 26073
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
Log:
Fix for static field references
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2010-10-26 17:07:53 UTC (rev 26072)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2010-10-26 17:42:33 UTC (rev 26073)
@@ -82,21 +82,21 @@
// Bad name, I know, but checks if this is
// an ear, war, ejb, or other top level facet
protected boolean isPrimaryFacet(IProjectFacet facet) {
- WebtoolsProjectJBossClasspathContainerInitializer del = new WebtoolsProjectJBossClasspathContainerInitializer();
- return facet.equals(del.WEB_FACET)
- || facet.equals(del.EJB_FACET)
- || facet.equals(del.EAR_FACET)
- || facet.equals(del.CONNECTOR_FACET)
- || facet.equals(del.APP_CLIENT_FACET);
+
+ return facet.equals(WebtoolsProjectJBossClasspathContainerInitializer.WEB_FACET)
+ || facet.equals(WebtoolsProjectJBossClasspathContainerInitializer.EJB_FACET)
+ || facet.equals(WebtoolsProjectJBossClasspathContainerInitializer.EAR_FACET)
+ || facet.equals(WebtoolsProjectJBossClasspathContainerInitializer.CONNECTOR_FACET)
+ || facet.equals(WebtoolsProjectJBossClasspathContainerInitializer.APP_CLIENT_FACET);
}
-
+
// Also a bad name, but facets the server automatically knows
// how to provide classpath entries for
protected boolean isSecondaryFacet(IProjectFacet facet) {
- WebtoolsProjectJBossClasspathContainerInitializer del = new WebtoolsProjectJBossClasspathContainerInitializer();
- return facet.equals(del.JSF_FACET) || facet.equals(del.JPA_FACET);
+ return facet.equals(WebtoolsProjectJBossClasspathContainerInitializer.JSF_FACET)
+ || facet.equals(WebtoolsProjectJBossClasspathContainerInitializer.JPA_FACET);
}
-
+
public static final class Factory implements IAdapterFactory {
private static final Class[] ADAPTER_TYPES = { IClasspathProvider.class };
@@ -109,9 +109,7 @@
return ADAPTER_TYPES;
}
}
-
-
-
+
public static class RuntimeClasspathContainerInitializer extends ClasspathContainerInitializer {
public void initialize(IPath containerPath, IJavaProject project)
throws CoreException {
@@ -121,7 +119,7 @@
new IJavaProject[] {project}, new IClasspathContainer[] {container}, null);
}
}
-
+
public static class RuntimeClasspathContainer implements IClasspathContainer {
private IPath path;
private IRuntime rt;
14 years, 2 months