JBoss Tools SVN: r41710 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-06-05 06:28:03 -0400 (Tue, 05 Jun 2012)
New Revision: 41710
Removed:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt
Log:
todo.txt is now unversioned
Deleted: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt 2012-06-05 07:56:43 UTC (rev 41709)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt 2012-06-05 10:28:03 UTC (rev 41710)
@@ -1,29 +0,0 @@
-refactoring - kazdy test (RESTful) bude mat importProject (ak potrebne) - ziadne dedenie prepareWorkspace
- - co najmenej pouzivat copy content from resource - hlavne import - co najjednoduchsie
- - testy nie tak dlhe - pomenovat co sa robi po krokoch => vytvaranie vela metod - lahko vyuzivatelne
- pre dalsie testy
- - este neviem co bude v RESTfulTestBase - mozno ho celkovo zrusim - nepaci sa mi az tak
- ak tam ostane tak tam bude kopa jednoduchych metod ktore moze vyuzivat kazdy
-
-RESTfulHelper - zvlastna trieda nepaci sa mi - uvidim co s nou
-
-AnnotationPropertiesView - skusit to nejak rozchodit
-
-==> napisat AnnotationPropertiesTest
-
-co zmenit v uz existujucich testoch
- - DefaultValueParamSupportTest:
- - ovela kratsie a pridat aj na MatrixParam, PathParam - mam len QueryParam
-
-nove testy:
-
-1. Parameter Dialog in WS Tester:
- - bude testovat ci dialog ponuka vsetko co ma: spravny typ, default, button OK, validacie ...
- - ked sa to potvrdi skontroluje sa URL
- - potom by sa to mohlo aj deploynut a pozriet vysledok
-
-2. pomocou WSDL otvorit WS Tester
-
-
-* Find a way to get to checkbox in Tree/Table which is not in first column (validation)
-* Complete multiple tests run (against AS 7 and EAP 5.1)
\ No newline at end of file
13 years, 4 months
JBoss Tools SVN: r41709 - in trunk/ws/tests/org.jboss.tools.ws.ui.bot.test: src/org/jboss/tools/ws/ui/bot/test and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-06-05 03:56:43 -0400 (Tue, 05 Jun 2012)
New Revision: 41709
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/DefaultValueAnnotationSupportTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/MatrixAnnotationSupportTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/QueryAnnotationSupportTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationPropertiesView.java
Removed:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/DefaultValueParamSupportTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/MatrixParamSupportTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/QueryParamSupportTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulSupportTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationProperties.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/NodeContextUtil.java
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/PathAnnotationSupportTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTFulAnnotations.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulHelper.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt
Log:
refactoring of ws bot tests
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -12,12 +12,12 @@
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.jboss.tools.ws.ui.bot.test.annotation.AnnotationPropertiesTest;
-import org.jboss.tools.ws.ui.bot.test.rest.DefaultValueParamSupportTest;
-import org.jboss.tools.ws.ui.bot.test.rest.MatrixParamSupportTest;
+import org.jboss.tools.ws.ui.bot.test.rest.DefaultValueAnnotationSupportTest;
+import org.jboss.tools.ws.ui.bot.test.rest.MatrixAnnotationSupportTest;
import org.jboss.tools.ws.ui.bot.test.rest.PathAnnotationSupportTest;
-import org.jboss.tools.ws.ui.bot.test.rest.QueryParamSupportTest;
+import org.jboss.tools.ws.ui.bot.test.rest.QueryAnnotationSupportTest;
import org.jboss.tools.ws.ui.bot.test.rest.completion.RESTfulCompletionTest;
-import org.jboss.tools.ws.ui.bot.test.rest.explorer.RESTfulSupportTest;
+import org.jboss.tools.ws.ui.bot.test.rest.explorer.RESTfulExplorerTest;
import org.jboss.tools.ws.ui.bot.test.rest.validation.ApplicationPathParameterTest;
import org.jboss.tools.ws.ui.bot.test.rest.validation.RESTfulValidationTest;
import org.jboss.tools.ws.ui.bot.test.sample.test.SampleRESTWebServiceTest;
@@ -59,11 +59,11 @@
SimpleSoapWebServiceTest.class,
SimpleRESTWebServiceTest.class,
AnnotationPropertiesTest.class,
- RESTfulSupportTest.class,
+ RESTfulExplorerTest.class,
PathAnnotationSupportTest.class,
- QueryParamSupportTest.class,
- DefaultValueParamSupportTest.class,
- MatrixParamSupportTest.class,
+ QueryAnnotationSupportTest.class,
+ MatrixAnnotationSupportTest.class,
+ DefaultValueAnnotationSupportTest.class,
RESTfulValidationTest.class,
RESTfulCompletionTest.class,
ApplicationPathParameterTest.class,
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -32,33 +32,33 @@
/**
* Basic test base for all web service bot tests
+ *
* @author jjankovi
- *
+ *
*/
-@Require(perspective="Java EE",
- server=(a)Server(type=ServerType.JbossAS,
- version = "7.1", operator = ">="))
-//@Require(perspective="Java EE",
-// server=(a)Server(type=ServerType.EAP,
-// version = "5.1", operator = ">="))
+@Require(perspective = "Java EE", server = @Server(type = ServerType.JbossAS, version = "7.1", operator = ">="))
+// @Require(perspective="Java EE",
+// server=(a)Server(type=ServerType.EAP,
+// version = "5.1", operator = ">="))
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({ WSAllBotTests.class })
public class WSTestBase extends SWTTestExt {
private Slider_Level level;
private String wsProjectName = null;
-
+
private static final String SOAP_REQUEST_TEMPLATE = "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>"
+ "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">"
+ "<soap:Body>{0}</soap:Body>" + "</soap:Envelope>";
- protected static final Logger LOGGER = Logger
- .getLogger(WSAllBotTests.class.getName());
-
- protected final String LINE_SEPARATOR = System.getProperty("line.separator");
-
+ protected static final Logger LOGGER = Logger.getLogger(WSAllBotTests.class
+ .getName());
+
+ protected final String LINE_SEPARATOR = System
+ .getProperty("line.separator");
+
protected static ResourceHelper resourceHelper = new ResourceHelper();
protected static ProjectHelper projectHelper = new ProjectHelper();
protected static DeploymentHelper deploymentHelper = new DeploymentHelper();
@@ -69,7 +69,7 @@
if (getEarProjectName() != null && !projectExists(getEarProjectName())) {
projectHelper.createEARProject(getEarProjectName());
if (!projectExists(getWsProjectName())) {
- projectHelper.createProjectForEAR(getWsProjectName(),
+ projectHelper.createProjectForEAR(getWsProjectName(),
getEarProjectName());
}
}
@@ -82,15 +82,15 @@
public void cleanup() {
servers.removeAllProjectsFromServer();
}
-
+
protected boolean projectExists(String name) {
return projectExplorer.existsResource(name);
}
-
+
protected Slider_Level getLevel() {
return level;
}
-
+
protected void setLevel(Slider_Level level) {
this.level = level;
}
@@ -118,12 +118,16 @@
public static String getSoapRequest(String body) {
return MessageFormat.format(SOAP_REQUEST_TEMPLATE, body);
}
-
+
+ protected void importWSTestProject(String projectName) {
+ String location = "/resources/projects/" + projectName;
+ importWSTestProject(location, projectName);
+ }
+
protected void importWSTestProject(String projectLocation, String dir) {
ImportHelper.importProject(projectLocation, dir, Activator.PLUGIN_ID);
-
- eclipse.addConfiguredRuntimeIntoProject(getWsProjectName(),
- configuredState.getServer().name);
+
+ eclipse.addConfiguredRuntimeIntoProject(dir, configuredState.getServer().name);
}
}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/DefaultValueAnnotationSupportTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/DefaultValueAnnotationSupportTest.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/DefaultValueAnnotationSupportTest.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ws.ui.bot.test.rest;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ws.ui.bot.test.ti.wizard.RESTFullExplorerWizard;
+import org.junit.Test;
+
+public class DefaultValueAnnotationSupportTest extends RESTfulTestBase {
+
+ private String projectName = "default1";
+
+ @Override
+ protected String getWsProjectName() {
+ return projectName;
+ }
+
+ @Override
+ public void cleanup() {
+ projectExplorer.deleteAllProjects();
+ }
+
+ @Test
+ public void testQueryParamDefaultValue() {
+
+ String queryParam = "param";
+ String defaultValue = "abc";
+ String queryParamType = "java.lang.String";
+
+ /* prepare project */
+ importRestWSProject(getWsProjectName());
+
+ /* get JAX-RS REST explorer for the project */
+ restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
+ SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
+
+ /* test JAX-RS REST explorer */
+ assertCountOfRESTServices(restServices, 1);
+ assertExpectedPathOfService(restServices[0],
+ "/rest?" + queryParam + "={" + queryParam + ":" +
+ queryParamType + "=" + defaultValue + "}");
+
+ }
+
+ @Test
+ public void testPathParamDefaultValue() {
+
+ }
+
+ @Test
+ public void testMatrixParamDefaultValue() {
+
+ }
+
+}
Deleted: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/DefaultValueParamSupportTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/DefaultValueParamSupportTest.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/DefaultValueParamSupportTest.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2012 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.ws.ui.bot.test.rest;
-
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.Timing;
-import org.jboss.tools.ws.ui.bot.test.ti.wizard.RESTFullExplorerWizard;
-import org.junit.Test;
-
-public class DefaultValueParamSupportTest extends RESTfulTestBase {
-
- private RESTFullExplorerWizard restfulWizard = null;
-
- private String projectName = "restEmpty";
-
- private final String DEFAULT_VALUE_RESOURCE = "/resources/restful/DefaultValue.java.ws";
-
- @Override
- protected String getWsProjectName() {
- return projectName;
- }
-
- @Override
- public void cleanup() {
- bot.activeEditor().toTextEditor().save();
- }
-
- @Test
- public void testDefaultValueSupport() {
-
- String queryParam = "param";
- String defaultValue = "abc";
- String defaultValueNew = "cba";
- String queryParamType = "java.lang.String";
-
- /** test showing default DefaultValue in RESTful explorer **/
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClassWithSave(bot.editorByTitle(getWsName() + ".java"),
- DefaultValueParamSupportTest.class.getResourceAsStream(DEFAULT_VALUE_RESOURCE),
- false, false, getWsPackage(), getWsName(), queryParam, defaultValue, queryParamType);
- bot.sleep(Timing.time2S());
-
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of " +
- restServices.length, restServices.length == 1);
- String path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest?" + queryParam + "={" + queryParam + ":" +
- queryParamType + "=" + defaultValue + "}", path);
-
- /** test showing edited DefaultValue value in RESTful explorer **/
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- defaultValue, defaultValueNew, false);
- bot.sleep(Timing.time2S());
-
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of " +
- restServices.length, restServices.length == 1);
- path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest?" + queryParam + "={" + queryParam + ":" +
- queryParamType + "=" + defaultValueNew + "}", path);
-
- /** test showing deleted DefaultValue value in RESTful explorer **/
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- "@DefaultValue(\"" + defaultValueNew + "\")", "", false);
- bot.sleep(Timing.time2S());
-
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of " +
- restServices.length, restServices.length == 1);
- path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest?" + queryParam + "={" + queryParam + ":" +
- queryParamType + "}", path);
-
- }
-
-}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/MatrixAnnotationSupportTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/MatrixAnnotationSupportTest.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/MatrixAnnotationSupportTest.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ws.ui.bot.test.rest;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ws.ui.bot.test.ti.wizard.RESTFullExplorerWizard;
+import org.junit.Test;
+
+public class MatrixAnnotationSupportTest extends RESTfulTestBase {
+
+ private String projectName = "matrix1";
+ private String matrixParam1 = "author";
+ private String matrixParam2 = "country";
+ private String matrixParamNew = "library";
+ private String matrixParamType1 = "java.lang.String";
+ private String matrixParamType2 = "java.lang.Integer";
+ private String matrixParamTypeNew = "java.lang.Long";
+
+ @Override
+ protected String getWsProjectName() {
+ return projectName;
+ }
+
+ @Override
+ public void cleanup() {
+ projectExplorer.deleteAllProjects();
+ }
+
+ @Test
+ public void testMatrixParamSupport() {
+
+ /* prepare project */
+ importRestWSProject("matrix1");
+
+ /* get JAX-RS REST explorer for the project */
+ restfulWizard = new RESTFullExplorerWizard("matrix1");
+ SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
+
+ /* test JAX-RS REST explorer */
+ assertCountOfRESTServices(restServices, 1);
+ assertExpectedPathOfService(restServices[0],
+ "/rest;" + matrixParam1 + "={" + matrixParamType1 + "};"
+ + matrixParam2 + "={" + matrixParamType2 + "}");
+
+ }
+
+ @Test
+ public void testEditingMatrixParam() {
+
+ /* prepare project */
+ importRestWSProject("matrix1");
+ resourceHelper.replaceInEditor(editorForClass("matrix1", "src",
+ "org.rest.test", "RestService.java").toTextEditor(),
+ matrixParam1, matrixParamNew, true);
+ bot.sleep(Timing.time2S());
+
+ /* get JAX-RS REST explorer for the project */
+ restfulWizard = new RESTFullExplorerWizard("matrix1");
+ SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
+
+ /* test JAX-RS REST explorer */
+ assertCountOfRESTServices(restServices, 1);
+ assertExpectedPathOfService(restServices[0],
+ "/rest;" + matrixParamNew + "={" + matrixParamType1 + "};"
+ + matrixParam2 + "={" + matrixParamType2 + "}");
+ }
+
+ @Test
+ public void testEditingTypeOfMatrixParam() {
+
+ /* prepare project */
+ importRestWSProject("matrix1");
+ resourceHelper.replaceInEditor(editorForClass("matrix1", "src",
+ "org.rest.test", "RestService.java").toTextEditor(),
+ matrixParamType1, matrixParamTypeNew, true);
+ bot.sleep(Timing.time2S());
+
+ /* get JAX-RS REST explorer for the project */
+ restfulWizard = new RESTFullExplorerWizard("matrix1");
+ SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
+
+ /* test JAX-RS REST explorer */
+ assertCountOfRESTServices(restServices, 1);
+ assertExpectedPathOfService(restServices[0],
+ "/rest;" + matrixParam1 + "={" + matrixParamTypeNew + "};"
+ + matrixParam2 + "={" + matrixParamType2 + "}");
+ }
+}
Deleted: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/MatrixParamSupportTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/MatrixParamSupportTest.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/MatrixParamSupportTest.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2012 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.ws.ui.bot.test.rest;
-
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.Timing;
-import org.jboss.tools.ws.ui.bot.test.ti.wizard.RESTFullExplorerWizard;
-import org.junit.Test;
-
-public class MatrixParamSupportTest extends RESTfulTestBase {
-
- private RESTFullExplorerWizard restfulWizard = null;
- private String projectName = "restEmpty";
- private final String MATRIX_PARAM_RESOURCE = "/resources/restful/MatrixParam.java.ws";
-
- private String matrixParam1 = "author";
- private String matrixParam2 = "country";
- private String matrixParamNew = "library";
- private String matrixParamType1 = "java.lang.String";
- private String matrixParamType2 = "java.lang.Integer";
- private String matrixParamTypeNew = "java.lang.Long";
-
- @Override
- protected String getWsProjectName() {
- return projectName;
- }
-
- @Override
- public void cleanup() {
- bot.activeEditor().toTextEditor().save();
- }
-
- @Test
- public void testMatrixParamSupport() {
-
- prepareWSResource(MATRIX_PARAM_RESOURCE, getWsPackage(), getWsName(),
- matrixParam1, matrixParamType1, matrixParam2, matrixParamType2);
-
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of "
- + restServices.length, restServices.length == 1);
- String path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest;" + matrixParam1 + "={" + matrixParamType1 + "};"
- + matrixParam2 + "={" + matrixParamType2 + "}", path);
-
- }
-
- @Test
- public void testEditingMatrixParam() {
-
- prepareWSResource(MATRIX_PARAM_RESOURCE, getWsPackage(), getWsName(),
- matrixParam1, matrixParamType1, matrixParam2, matrixParamType2);
-
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- matrixParam1, matrixParamNew, false);
- bot.sleep(Timing.time2S());
-
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of "
- + restServices.length, restServices.length == 1);
- String path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest;" + matrixParamNew + "={" + matrixParamType1 + "};"
- + matrixParam2 + "={" + matrixParamType2 + "}", path);
-
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- matrixParamNew, matrixParam1, false);
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- matrixParam2, matrixParamNew, false);
- bot.sleep(Timing.time2S());
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of "
- + restServices.length, restServices.length == 1);
- path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest;" + matrixParam1 + "={" + matrixParamType1 + "};"
- + matrixParamNew + "={" + matrixParamType2 + "}", path);
-
- }
-
- @Test
- public void testEditingTypeOfMatrixParam() {
-
- prepareWSResource(MATRIX_PARAM_RESOURCE, getWsPackage(), getWsName(),
- matrixParam1, matrixParamType1, matrixParam2, matrixParamType2);
-
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- matrixParamType1, matrixParamTypeNew, false);
- bot.sleep(Timing.time2S());
-
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of " +
- restServices.length, restServices.length == 1);
- String path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest;" + matrixParam1 + "={" + matrixParamTypeNew + "};"
- + matrixParam2 + "={" + matrixParamType2 + "}", path);
-
-
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- matrixParamTypeNew, matrixParamType1, false);
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- matrixParamType2, matrixParamTypeNew, false);
- bot.sleep(Timing.time2S());
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of " +
- restServices.length, restServices.length == 1);
- path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest;" + matrixParam1 + "={" + matrixParamType1 + "};"
- + matrixParam2 + "={" + matrixParamTypeNew + "}", path);
-
- }
-
- private void prepareWSResource(String streamPath, Object... parameters) {
-
- packageExplorer.openFile(getWsProjectName(), "src", getWsPackage(),
- getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClassWithSave(
- bot.editorByTitle(getWsName() + ".java"),
- QueryParamSupportTest.class.getResourceAsStream(streamPath),
- false, false, parameters);
- bot.sleep(Timing.time2S());
-
- }
-
-}
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/PathAnnotationSupportTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/PathAnnotationSupportTest.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/PathAnnotationSupportTest.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -11,9 +11,11 @@
package org.jboss.tools.ws.ui.bot.test.rest;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ws.ui.bot.test.ti.wizard.RESTFullExplorerWizard;
+import org.junit.After;
import org.junit.Test;
/**
@@ -24,135 +26,107 @@
*/
public class PathAnnotationSupportTest extends RESTfulTestBase {
- private RESTFullExplorerWizard restfulWizard = null;
-
- private String restEmptyProjectName = "restEmpty";
-
- @Override
- protected String getWsProjectName() {
- return restEmptyProjectName;
+ @After
+ public void cleanWorkspace() {
+ projectExplorer.deleteAllProjects();
}
- @Override
- public void cleanup() {
- bot.activeEditor().toTextEditor().save();
- }
-
@Test
public void testAddingSimpleRESTMethods() {
- prepareWSResource(BASIC_WS_RESOURCE);
+ /* import project */
+ importRestWSProject("restBasic");
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
+ /* get JAX-RS REST explorer for the project */
+ restfulWizard = new RESTFullExplorerWizard("restBasic");
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
- assertTrue(restServices.length + " RESTful services was found instead of 4.",
- restServices.length == 4);
- assertTrue("All RESTful services (GET, DELETE, POST, PUT) should be present but they are not",
- allRestServicesArePresent(restServices));
-
- for (SWTBotTreeItem restService : restServices) {
- assertTrue(restfulWizard.getPathForRestFulService(restService).equals("/rest"));
- assertTrue(restfulWizard.getConsumesInfo(restService).equals("*/*"));
- assertTrue(restfulWizard.getProducesInfo(restService).equals("*/*"));
- }
+ /* test JAX-RS REST explorer */
+ assertCountOfRESTServices(restServices, 4);
+ assertAllRESTServicesInExplorer(restServices);
+ assertPathOfAllRESTWebServices(restServices, "/rest");
}
-
+
@Test
public void testAddingAdvancedRESTMethods() {
- prepareWSResource(ADVANCED_WS_RESOURCE);
+ /* import project */
+ importRestWSProject("restAdvanced");
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
+ /* get JAX-RS REST explorer for the project */
+ restfulWizard = new RESTFullExplorerWizard("restAdvanced");
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
- assertTrue(restServices.length + " RESTful services was found instead of 4.",
- restServices.length == 4);
- assertTrue("All RESTful services (GET, DELETE, POST, PUT) should be present but they are not",
- allRestServicesArePresent(restServices));
-
- for (SWTBotTreeItem restService : restServices) {
- if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.GET.getLabel())) {
- assertTrue(restfulWizard.getPathForRestFulService(restService).equals("/rest/{id}"));
- assertTrue(restfulWizard.getConsumesInfo(restService).equals("*/*"));
- assertTrue(restfulWizard.getProducesInfo(restService).equals("text/plain"));
- }
- if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.PUT.getLabel())) {
- assertTrue(restfulWizard.getPathForRestFulService(restService).equals("/rest/put/{id}"));
- assertTrue(restfulWizard.getConsumesInfo(restService).equals("text/plain"));
- assertTrue(restfulWizard.getProducesInfo(restService).equals("*/*"));
- }
- if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.POST.getLabel())) {
- assertTrue(restfulWizard.getPathForRestFulService(restService).equals("/rest/post/{id}"));
- assertTrue(restfulWizard.getConsumesInfo(restService).equals("text/plain"));
- assertTrue(restfulWizard.getProducesInfo(restService).equals("text/plain"));
- }
- if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.DELETE.getLabel())) {
- assertTrue(restfulWizard.getPathForRestFulService(restService).equals("/rest/delete/{id}"));
- assertTrue(restfulWizard.getConsumesInfo(restService).equals("*/*"));
- assertTrue(restfulWizard.getProducesInfo(restService).equals("*/*"));
- }
- }
-
+ /* test JAX-RS REST explorer */
+ assertCountOfRESTServices(restServices, 4);
+ assertAllRESTServicesInExplorer(restServices);
+ testAdvancedRESTServices(restServices);
}
@Test
public void testEditingSimpleRESTMethods() {
- prepareWSResource(BASIC_WS_RESOURCE);
+ /* import project */
+ importRestWSProject("restBasic");
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
-
- assertTrue("All RESTful services (GET, DELETE, POST, PUT) should be present but they are not",
- allRestServicesArePresent(restServices));
-
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(), "@DELETE", "@GET", false);
-
+ /* replace @DELETE annotation to @GET annotation */
+ resourceHelper.replaceInEditor(editorForClass("restBasic", "src",
+ "org.rest.test", "RestService.java").toTextEditor(), "@DELETE", "@GET", true);
bot.sleep(Timing.time2S());
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- restServices = restfulWizard.getAllRestServices();
- assertFalse("All RESTful services (GET, DELETE, POST, PUT) shouldnt be present but they are",
- allRestServicesArePresent(restServices));
+ /* get JAX-RS REST explorer for the project */
+ restfulWizard = new RESTFullExplorerWizard("restBasic");
+ SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
- for (SWTBotTreeItem restService : restServices) {
- if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.DELETE.getLabel())) {
- fail("There should not be DELETE RESTful services");
- }
- }
+ /* test JAX-RS REST explorer */
+ assertNotAllRESTServicesInExplorer(restServices);
+ assertAbsenceOfRESTWebService(restServices,
+ RESTFulAnnotations.DELETE.getLabel());
}
@Test
public void testEditingAdvancedRESTMethods() {
- prepareWSResource(ADVANCED_WS_RESOURCE);
+ /* import project */
+ importRestWSProject("restAdvanced");
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
+ /* edit @DELETE annotation */
+ SWTBotEclipseEditor editor = editorForClass("restAdvanced", "src",
+ "org.rest.test", "RestService.java").toTextEditor();
+ resourceHelper.replaceInEditor(editor, "/delete/{id}",
+ "delete/edited/{id}", true);
+ resourceHelper.replaceInEditor(editor, "@DELETE", "@DELETE"
+ + LINE_SEPARATOR + "@Produces(\"text/plain\")", true);
+ bot.sleep(Timing.time2S());
- assertTrue(restServices.length > 0);
+ /* get JAX-RS REST explorer for the project */
+ restfulWizard = new RESTFullExplorerWizard("restAdvanced");
+ SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
- for (SWTBotTreeItem restService : restServices) {
- if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.DELETE.getLabel())) {
- assertTrue(restfulWizard.getPathForRestFulService(restService).equals("/rest/delete/{id}"));
- assertTrue(restfulWizard.getProducesInfo(restService).equals("*/*"));
- }
- }
+ /* test JAX-RS REST explorer */
+ testEditedDeleteRestWebResource(restServices);
+ }
+
+ @Test
+ public void testDeletingRESTMethods() {
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- "/delete/{id}", "delete/edited/{id}", false);
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(), "@DELETE",
- "@DELETE" + LINE_SEPARATOR + "@Produces(\"text/plain\")", false);
-
+ /* prepare project*/
+ importRestWSProject("restBasic");
+ prepareRestfulResource(editorForClass("restBasic", "src",
+ "org.rest.test", "RestService.java"), "EmptyRestfulWS.java.ws",
+ "org.rest.test", "RestService");
bot.sleep(Timing.time2S());
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- restServices = restfulWizard.getAllRestServices();
+ /* get JAX-RS REST explorer for the project */
+ restfulWizard = new RESTFullExplorerWizard("restBasic");
+ SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
+
+ /* none of REST web services found */
+ assertNoRESTServicesInExplorerFound(restServices);
+ }
+
+ private void testEditedDeleteRestWebResource(
+ SWTBotTreeItem[] restServices) {
for (SWTBotTreeItem restService : restServices) {
if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.DELETE.getLabel())) {
assertTrue(restfulWizard.getPathForRestFulService(restService).equals("/rest/delete/edited/{id}"));
@@ -160,60 +134,30 @@
}
}
}
-
- @Test
- public void testDeletingRESTMethods() {
-
- prepareWSResource(BASIC_WS_RESOURCE);
-
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
-
- assertTrue(restServices.length + " RESTful services was found instead of 4.",
- restServices.length == 4);
-
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClassWithSave(bot.editorByTitle(getWsName() + ".java"),
- PathAnnotationSupportTest.class.
- getResourceAsStream(EMPTY_WS_RESOURCE),
- false, false, getWsPackage(), getWsName());
-
- bot.sleep(Timing.time2S());
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- restServices = restfulWizard.getAllRestServices();
-
- assertTrue(restServices.length + " RESTful services was found instead of 0.",
- restServices.length == 0);
-
- }
-
- private boolean allRestServicesArePresent(SWTBotTreeItem[] restServices) {
-
- String[] restMethods = {RESTFulAnnotations.GET.getLabel(), RESTFulAnnotations.POST.getLabel(),
- RESTFulAnnotations.POST.getLabel(), RESTFulAnnotations.DELETE.getLabel()};
- for (String restMethod : restMethods) {
- boolean serviceFound = false;
- for (SWTBotTreeItem restService : restServices) {
- if (restfulWizard.getRestServiceName(restService).equals(restMethod)) {
- serviceFound = true;
- break;
- }
- }
- if (!serviceFound) return false;
+
+ private void testAdvancedRESTServices(
+ SWTBotTreeItem[] restServices) {
+ for (SWTBotTreeItem restService : restServices) {
+ if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.GET.getLabel())) {
+ assertTrue(restfulWizard.getPathForRestFulService(restService).equals("/rest/{id}"));
+ assertTrue(restfulWizard.getConsumesInfo(restService).equals("*/*"));
+ assertTrue(restfulWizard.getProducesInfo(restService).equals("text/plain"));
+ }
+ if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.PUT.getLabel())) {
+ assertTrue(restfulWizard.getPathForRestFulService(restService).equals("/rest/put/{id}"));
+ assertTrue(restfulWizard.getConsumesInfo(restService).equals("text/plain"));
+ assertTrue(restfulWizard.getProducesInfo(restService).equals("*/*"));
+ }
+ if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.POST.getLabel())) {
+ assertTrue(restfulWizard.getPathForRestFulService(restService).equals("/rest/post/{id}"));
+ assertTrue(restfulWizard.getConsumesInfo(restService).equals("text/plain"));
+ assertTrue(restfulWizard.getProducesInfo(restService).equals("text/plain"));
+ }
+ if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.DELETE.getLabel())) {
+ assertTrue(restfulWizard.getPathForRestFulService(restService).equals("/rest/delete/{id}"));
+ assertTrue(restfulWizard.getConsumesInfo(restService).equals("*/*"));
+ assertTrue(restfulWizard.getProducesInfo(restService).equals("*/*"));
+ }
}
- return true;
}
-
- private void prepareWSResource(String streamPath) {
-
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClassWithSave(bot.editorByTitle(getWsName() + ".java"),
- PathAnnotationSupportTest.class.getResourceAsStream(streamPath),
- false, false, getWsPackage(), getWsName());
- bot.sleep(Timing.time2S());
-
- }
-
}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/QueryAnnotationSupportTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/QueryAnnotationSupportTest.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/QueryAnnotationSupportTest.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ws.ui.bot.test.rest;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ws.ui.bot.test.ti.wizard.RESTFullExplorerWizard;
+import org.junit.Test;
+
+public class QueryAnnotationSupportTest extends RESTfulTestBase {
+
+ private final String QUERY_TWO_PARAM_RESOURCE = "QueryTwoParam.java.ws";
+
+ private String queryParam1 = "param1";
+ private String queryParam2 = "param2";
+ private String queryType = "java.lang.String";
+ private String queryParam1New = "newParam1";
+ private String queryType1 = "java.lang.String";
+ private String queryType2 = "java.lang.Integer";
+ private String queryTypeNew = "java.lang.Long";
+
+ @Override
+ public void cleanup() {
+ projectExplorer.deleteAllProjects();
+ }
+
+ @Test
+ public void testQueryParamSupport() {
+
+ /* prepare project */
+ importRestWSProject("query1");
+
+ /* get JAX-RS REST explorer for the project */
+ restfulWizard = new RESTFullExplorerWizard("query1");
+ SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
+
+ /* test JAX-RS REST explorer */
+ assertCountOfRESTServices(restServices, 1);
+ assertExpectedPathOfService(restServices[0],
+ "/rest?" + queryParam1 + "={" + queryParam1 + ":" + queryType + "}");
+
+ /* prepare project*/
+ importRestWSProject("query2");
+
+ /* get JAX-RS REST explorer for the project */
+ restfulWizard = new RESTFullExplorerWizard("query2");
+ restServices = restfulWizard.getAllRestServices();
+
+ /* test JAX-RS REST explorer */
+ assertCountOfRESTServices(restServices, 1);
+ assertExpectedPathOfService(restServices[0],
+ "/rest?" + queryParam1 + "={" + queryParam1 + ":" + queryType + "}&" +
+ queryParam2 + "={" + queryParam2 + ":" + queryType + "}");
+ }
+
+ @Test
+ public void testEditingQueryParam() {
+
+ /* prepare project */
+ importRestWSProject("query2");
+
+ /* replace param1 to newParam1 */
+ resourceHelper.replaceInEditor(editorForClass("query2", "src",
+ "org.rest.test", "RestService.java").toTextEditor(),
+ queryParam1, queryParam1New, true);
+ bot.sleep(Timing.time2S());
+
+ /* get JAX-RS REST explorer for the project */
+ restfulWizard = new RESTFullExplorerWizard("query2");
+ SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
+
+ /* test JAX-RS REST explorer */
+ assertCountOfRESTServices(restServices, 1);
+ assertExpectedPathOfService(restServices[0],
+ "/rest?" + queryParam1New + "={" + queryParam1New + ":" + queryType + "}&" +
+ queryParam2 + "={" + queryParam2 + ":" + queryType + "}");
+ }
+
+ @Test
+ public void testEditingTypeOfQueryParam() {
+
+ /* prepare project anc class */
+ importRestWSProject("query2");
+ prepareRestfulResource(editorForClass("query2", "src",
+ "org.rest.test", "RestService.java"), QUERY_TWO_PARAM_RESOURCE,
+ "org.rest.test", "RestService",
+ queryParam1, queryType1, queryParam2, queryType2);
+ resourceHelper.replaceInEditor(editorForClass("query2", "src",
+ "org.rest.test", "RestService.java").toTextEditor(),
+ queryType1, queryTypeNew, true);
+ bot.sleep(Timing.time2S());
+
+ /* get JAX-RS REST explorer for the project */
+ restfulWizard = new RESTFullExplorerWizard("query2");
+ SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
+
+ /* test JAX-RS REST explorer */
+ assertCountOfRESTServices(restServices, 1);
+ assertExpectedPathOfService(restServices[0],
+ "/rest?" + queryParam1 + "={" + queryParam1 + ":" + queryTypeNew + "}&" +
+ queryParam2 + "={" + queryParam2 + ":" + queryType2 + "}");
+ }
+}
Deleted: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/QueryParamSupportTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/QueryParamSupportTest.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/QueryParamSupportTest.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2012 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.ws.ui.bot.test.rest;
-
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.Timing;
-import org.jboss.tools.ws.ui.bot.test.ti.wizard.RESTFullExplorerWizard;
-import org.junit.Test;
-
-public class QueryParamSupportTest extends RESTfulTestBase {
-
- private RESTFullExplorerWizard restfulWizard = null;
- private String projectName = "restEmpty";
- private final String QUERY_ONE_PARAM_RESOURCE = "/resources/restful/QueryOneParam.java.ws";
- private final String QUERY_TWO_PARAM_RESOURCE = "/resources/restful/QueryTwoParam.java.ws";
-
- private String queryParam1 = "param1";
- private String queryParam2 = "param2";
- private String queryType = "java.lang.String";
- private String queryParam1New = "newParam1";
- private String queryParam2New = "newParam2";
- private String queryType1 = "java.lang.String";
- private String queryType2 = "java.lang.Integer";
- private String queryTypeNew = "java.lang.Long";
-
-
- @Override
- protected String getWsProjectName() {
- return projectName;
- }
-
- @Override
- public void cleanup() {
- bot.activeEditor().toTextEditor().save();
- }
-
- @Test
- public void testSupportInExplorer() {
-
- prepareWSResource(QUERY_ONE_PARAM_RESOURCE,
- getWsPackage(), getWsName(), queryParam1, queryType);
-
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of " +
- restServices.length, restServices.length == 1);
- String path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest?" + queryParam1 + "={" + queryParam1 + ":" + queryType + "}", path);
-
- prepareWSResource(QUERY_TWO_PARAM_RESOURCE, getWsPackage(), getWsName(),
- queryParam1, queryType, queryParam2, queryType);
-
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of " +
- restServices.length, restServices.length == 1);
-
- path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest?" + queryParam1 + "={" + queryParam1 + ":" + queryType + "}&" +
- queryParam2 + "={" + queryParam2 + ":" + queryType + "}", path);
- }
-
- @Test
- public void testEditingQueryParam() {
-
- prepareWSResource(QUERY_TWO_PARAM_RESOURCE, getWsPackage(), getWsName(),
- queryParam1, queryType, queryParam2, queryType);
-
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- queryParam1, queryParam1New, false);
- bot.sleep(Timing.time2S());
-
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of " +
- restServices.length, restServices.length == 1);
- String path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest?" + queryParam1New + "={" + queryParam1New + ":" + queryType + "}&" +
- queryParam2 + "={" + queryParam2 + ":" + queryType + "}", path);
-
-
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- queryParam1New, queryParam1, false);
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- queryParam2, queryParam2New, false);
- bot.sleep(Timing.time2S());
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of " +
- restServices.length, restServices.length == 1);
- path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest?" + queryParam1 + "={" + queryParam1 + ":" + queryType + "}&" +
- queryParam2New + "={" + queryParam2New + ":" + queryType + "}", path);
-
- }
-
- @Test
- public void testEditingTypeOfQueryParam() {
-
- prepareWSResource(QUERY_TWO_PARAM_RESOURCE, getWsPackage(), getWsName(),
- queryParam1, queryType1, queryParam2, queryType2);
-
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- queryType1, queryTypeNew, false);
- bot.sleep(Timing.time2S());
-
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of " +
- restServices.length, restServices.length == 1);
- String path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest?" + queryParam1 + "={" + queryParam1 + ":" + queryTypeNew + "}&" +
- queryParam2 + "={" + queryParam2 + ":" + queryType2 + "}", path);
-
-
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- queryTypeNew, queryType1, false);
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
- queryType2, queryTypeNew, false);
- bot.sleep(Timing.time2S());
- restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
- restServices = restfulWizard.getAllRestServices();
-
- assertTrue("There should be one RESTful web service instead of " +
- restServices.length, restServices.length == 1);
- path = restfulWizard.getPathForRestFulService(restServices[0]);
- assertEquals("/rest?" + queryParam1 + "={" + queryParam1 + ":" + queryType1 + "}&" +
- queryParam2 + "={" + queryParam2 + ":" + queryTypeNew + "}", path);
-
- }
-
- private void prepareWSResource(String streamPath, Object... parameters) {
-
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClassWithSave(bot.editorByTitle(getWsName() + ".java"),
- QueryParamSupportTest.class.getResourceAsStream(streamPath),
- false, false, parameters);
- bot.sleep(Timing.time2S());
-
- }
-
-}
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTFulAnnotations.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTFulAnnotations.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTFulAnnotations.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -2,7 +2,6 @@
public enum RESTFulAnnotations {
- CONFIGURE_MENU_LABEL("Configure"),
REST_SUPPORT_MENU_LABEL_ADD("Add JAX-RS 1.1 support..."),
REST_SUPPORT_MENU_LABEL_REMOVE("Remove JAX-RS 1.1 support..."),
REST_EXPLORER_LABEL("JAX-RS REST Web Services"),
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulHelper.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulHelper.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulHelper.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -18,6 +18,7 @@
import java.util.List;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
@@ -28,9 +29,10 @@
import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
import org.jboss.tools.ui.bot.ext.gen.IPreference;
import org.jboss.tools.ui.bot.ext.helper.BuildPathHelper;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.view.ProblemsView;
import org.jboss.tools.ui.bot.ext.view.ProjectExplorer;
-import org.jboss.tools.ws.ui.bot.test.utils.NodeContextUtil;
import org.jboss.tools.ws.ui.bot.test.utils.ResourceHelper;
public class RESTfulHelper {
@@ -160,12 +162,13 @@
projectExplorer.selectProject(wsProjectName);
SWTBotTree tree = projectExplorer.bot().tree();
SWTBotTreeItem item = tree.getTreeItem(wsProjectName);
- item.expand();
- NodeContextUtil.nodeContextMenu(tree, item,
- RESTFulAnnotations.CONFIGURE_MENU_LABEL.getLabel(),
- option == ConfigureOption.ADD ? RESTFulAnnotations.REST_SUPPORT_MENU_LABEL_ADD
- .getLabel() : RESTFulAnnotations.REST_SUPPORT_MENU_LABEL_REMOVE
- .getLabel()).click();
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
+ SWTBotMenu menu = new SWTBotMenu(
+ ContextMenuHelper.getContextMenu(
+ tree, IDELabel.Menu.PACKAGE_EXPLORER_CONFIGURE, false));
+ menu.menu(option == ConfigureOption.ADD ? RESTFulAnnotations.REST_SUPPORT_MENU_LABEL_ADD
+ .getLabel() : RESTFulAnnotations.REST_SUPPORT_MENU_LABEL_REMOVE
+ .getLabel()).click();
bot.sleep(Timing.time2S());
util.waitForAll();
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -11,11 +11,14 @@
package org.jboss.tools.ws.ui.bot.test.rest;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
import org.jboss.tools.ws.ui.bot.test.WSTestBase;
+import org.jboss.tools.ws.ui.bot.test.ti.wizard.RESTFullExplorerWizard;
/**
* Test base for bot tests using RESTFul support
@@ -23,64 +26,165 @@
* @author jjankovi
*
*/
-@Require(server = @Server(state=ServerState.NotRunning), perspective = "Java EE")
+@Require(server = @Server(state = ServerState.NotRunning), perspective = "Java EE")
public class RESTfulTestBase extends WSTestBase {
protected final RESTfulHelper restfulHelper = new RESTfulHelper();
-
- protected final String CONFIGURE_MENU_LABEL = "Configure";
- protected final String REST_SUPPORT_MENU_LABEL_ADD = "Add JAX-RS 1.1 support...";
- protected final String REST_SUPPORT_MENU_LABEL_REMOVE = "Remove JAX-RS 1.1 support...";
- protected final String REST_EXPLORER_LABEL = "JAX-RS REST Web Services";
- protected final String REST_EXPLORER_LABEL_BUILD = "Building RESTful Web Services...";
-
- protected final String BASIC_WS_RESOURCE = "/resources/restful/BasicRestfulWS.java.ws";
-
- protected final String ADVANCED_WS_RESOURCE = "/resources/restful/AdvancedRestfulWS.java.ws";
-
- protected final String EMPTY_WS_RESOURCE = "/resources/restful/EmptyRestfulWS.java.ws";
-
- protected final String SIMPLE_REST_WS_RESOURCE = "/resources/restful/SimpleRestWS.java.ws";
+ protected RESTFullExplorerWizard restfulWizard = null;
+
+ protected final String SIMPLE_REST_WS_RESOURCE = "SimpleRestWS.java.ws";
+
protected String getWsPackage() {
return "org.rest.test";
}
-
+
protected String getWsName() {
return "RestService";
}
-
+
@Override
- public void setup() {
- prepareRestProject();
+ public void setup() {
+
}
-
+
@Override
- public void cleanup() {
-
+ public void cleanup() {
+
}
-
- protected void prepareRestProject() {
-
- if (!projectExists(getWsProjectName())) {
-
- //importing project without targeted runtime set
- importWSTestProject("resources/projects/" +
- getWsProjectName(), getWsProjectName());
-
- projectExplorer.selectProject(getWsProjectName());
- eclipse.cleanAllProjects();
- bot.sleep(Timing.time3S());
-
- if (!restfulHelper.isRestSupportEnabled(getWsProjectName())) {
- // workaround for EAP 5.1
- if (configuredState.getServer().type.equals("EAP") &&
- configuredState.getServer().version.equals("5.1")) {
- restfulHelper.addRestEasyLibs(getWsProjectName());
+
+ protected void importRestWSProject(String projectName) {
+
+ // importing project without targeted runtime set
+ importWSTestProject(projectName);
+
+ projectExplorer.selectProject(projectName);
+ eclipse.cleanAllProjects();
+ bot.sleep(Timing.time3S());
+
+ // workaround for EAP 5.1
+ if (configuredState.getServer().type.equals("EAP")
+ && configuredState.getServer().version.equals("5.1")) {
+ restfulHelper.addRestEasyLibs(projectName);
+ }
+ }
+
+ protected void assertRestFullSupport(String projectName) {
+ assertTrue("JAX-RS REST Web Services explorer is missing in "
+ + "project \"" + projectName + "\"",
+ restfulHelper.isRestSupportEnabled(getWsProjectName()));
+ }
+
+ protected void assertCountOfRESTServices(SWTBotTreeItem[] restServices,
+ int expectedCount) {
+ assertTrue(restServices.length + " RESTful services"
+ + " was found instead of " + expectedCount,
+ restServices.length == expectedCount);
+ }
+
+ protected void assertAllRESTServicesInExplorer(SWTBotTreeItem[] restServices) {
+ assertTrue("All RESTful services (GET, DELETE, POST, PUT) "
+ + "should be present but they are not",
+ allRestServicesArePresent(restServices));
+ }
+
+ protected void assertNotAllRESTServicesInExplorer(
+ SWTBotTreeItem[] restServices) {
+ assertFalse("All RESTful services (GET, DELETE, POST, PUT) "
+ + "shouldnt be present but they are",
+ allRestServicesArePresent(restServices));
+ }
+
+ protected void assertNoRESTServicesInExplorerFound(
+ SWTBotTreeItem[] restServices) {
+ assertTrue(restServices.length
+ + " RESTful services was found instead of 0.",
+ restServices.length == 0);
+ }
+
+ protected void assertPathOfAllRESTWebServices(
+ SWTBotTreeItem[] restServices, String path) {
+ for (SWTBotTreeItem restService : restServices) {
+ assertTrue(
+ "RESTful Web Service \""
+ + restfulWizard.getRestServiceName(restService)
+ + "\" has been set wrong path", restfulWizard
+ .getPathForRestFulService(restService).equals(path));
+ }
+ }
+
+ protected void assertAbsenceOfRESTWebService(SWTBotTreeItem[] restServices,
+ String restWebService) {
+ for (SWTBotTreeItem restService : restServices) {
+ if (restfulWizard.getRestServiceName(restService).equals(
+ restWebService)) {
+ fail("There should not be " + restWebService
+ + "RESTful services");
+ }
+ }
+ }
+
+ protected void assertPresenceOfRESTWebService(
+ SWTBotTreeItem[] restServices, String restWebService) {
+ boolean found = false;
+ for (SWTBotTreeItem restService : restServices) {
+ if (restfulWizard.getRestServiceName(restService).equals(
+ restWebService)) {
+ found = true;
+ break;
+ }
+ }
+ assertTrue("There should be " + restWebService + "RESTful services",
+ found);
+ }
+
+ protected void assertExpectedPathOfService(SWTBotTreeItem service,
+ String expectedPath) {
+ String path = restfulWizard.getPathForRestFulService(service);
+ assertEquals("Expected path: " + expectedPath + " <--> found path: "
+ + path, expectedPath, path);
+ }
+
+ protected void assertCoundOfValidationErrors(String projectName,
+ int expectedCount) {
+ int foundErrors = restfulHelper.getRESTValidationErrors(projectName).length;
+ assertTrue("There should be " + expectedCount
+ + " validation error. Found: " + foundErrors,
+ foundErrors == expectedCount);
+ }
+
+ protected SWTBotEditor editorForClass(String projectName, String... path) {
+ return packageExplorer.openFile(projectName, path);
+ }
+
+ protected void prepareRestfulResource(SWTBotEditor editor,
+ String resourceFile, Object... parameters) {
+ String streamPath = "/resources/restful/" + resourceFile;
+ resourceHelper.copyResourceToClassWithSave(editor,
+ QueryAnnotationSupportTest.class
+ .getResourceAsStream(streamPath), true, false,
+ parameters);
+ bot.sleep(Timing.time2S());
+ }
+
+ private boolean allRestServicesArePresent(SWTBotTreeItem[] restServices) {
+
+ String[] restMethods = { RESTFulAnnotations.GET.getLabel(),
+ RESTFulAnnotations.POST.getLabel(),
+ RESTFulAnnotations.POST.getLabel(),
+ RESTFulAnnotations.DELETE.getLabel() };
+ for (String restMethod : restMethods) {
+ boolean serviceFound = false;
+ for (SWTBotTreeItem restService : restServices) {
+ if (restfulWizard.getRestServiceName(restService).equals(
+ restMethod)) {
+ serviceFound = true;
+ break;
}
- restfulHelper.addRestSupport(getWsProjectName());
}
+ if (!serviceFound)
+ return false;
}
+ return true;
}
-
}
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -29,25 +29,32 @@
private final String CORRECT_PATH_PARAM = "userId";
private final String INCORRECT_PATH_PARAM = "someId";
private final String PATH_PARAM_NAVIGATION = "@PathParam(";
- private final List<String> EXP_NON_EMPTY_COMPLETION_RESULT = Arrays.asList("userId - JAX-RS Mapping");
- private final List<String> EXP_EMPTY_COMPLETION_RESULT = Arrays.asList("No Default Proposals");
+ private final List<String> EXP_NON_EMPTY_COMPLETION_RESULT =
+ Arrays.asList("userId - JAX-RS Mapping");
+ private final List<String> EXP_EMPTY_COMPLETION_RESULT =
+ Arrays.asList("No Default Proposals");
@Override
protected String getWsProjectName() {
return "restEmpty";
}
+ @Override
+ public void cleanup() {
+ projectExplorer.deleteAllProjects();
+ }
+
@Test
public void testWithEmptyPrefix() {
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulCompletionTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
- false, getWsPackage(), getWsName(), GET_METHOD_PATH, "");
+ /* prepare project */
+ importRestWSProject(getWsProjectName());
+ prepareRestfulResource(editorForClass(getWsProjectName(), "src",
+ "org.rest.test", "RestService.java"), SIMPLE_REST_WS_RESOURCE,
+ "org.rest.test", "RestService",
+ GET_METHOD_PATH, "");
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
+ /* test content assist proposal */
ContentAssistHelper.checkContentAssistContent(bot,
getWsName() + ".java", PATH_PARAM_NAVIGATION, PATH_PARAM_NAVIGATION.length() + 1,
0, EXP_NON_EMPTY_COMPLETION_RESULT);
@@ -57,14 +64,14 @@
@Test
public void testWithValidPrefixAtTheEnd() {
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulCompletionTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
- false, getWsPackage(), getWsName(), GET_METHOD_PATH, CORRECT_PATH_PARAM);
+ /* prepare project */
+ importRestWSProject(getWsProjectName());
+ prepareRestfulResource(editorForClass(getWsProjectName(), "src",
+ "org.rest.test", "RestService.java"), SIMPLE_REST_WS_RESOURCE,
+ "org.rest.test", "RestService",
+ GET_METHOD_PATH, CORRECT_PATH_PARAM);
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
+ /* test content assist proposal */
ContentAssistHelper.checkContentAssistContent(bot,
getWsName() + ".java", PATH_PARAM_NAVIGATION, PATH_PARAM_NAVIGATION.length() +
CORRECT_PATH_PARAM.length() + 1,
@@ -75,14 +82,14 @@
@Test
public void testWithValidPrefixInTheBeginning() {
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulCompletionTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
- false, getWsPackage(), getWsName(), GET_METHOD_PATH, CORRECT_PATH_PARAM);
+ /* prepare project */
+ importRestWSProject(getWsProjectName());
+ prepareRestfulResource(editorForClass(getWsProjectName(), "src",
+ "org.rest.test", "RestService.java"), SIMPLE_REST_WS_RESOURCE,
+ "org.rest.test", "RestService",
+ GET_METHOD_PATH, CORRECT_PATH_PARAM);
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
+ /* test content assist proposal */
ContentAssistHelper.checkContentAssistContent(bot,
getWsName() + ".java", PATH_PARAM_NAVIGATION, PATH_PARAM_NAVIGATION.length() + 1,
0, EXP_NON_EMPTY_COMPLETION_RESULT);
@@ -92,14 +99,14 @@
@Test
public void testWithInvalidPrefixAtTheEnd() {
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulCompletionTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
- false, getWsPackage(), getWsName(), GET_METHOD_PATH, INCORRECT_PATH_PARAM);
+ /* prepare project */
+ importRestWSProject(getWsProjectName());
+ prepareRestfulResource(editorForClass(getWsProjectName(), "src",
+ "org.rest.test", "RestService.java"), SIMPLE_REST_WS_RESOURCE,
+ "org.rest.test", "RestService",
+ GET_METHOD_PATH, INCORRECT_PATH_PARAM);
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
+ /* test content assist proposal */
ContentAssistHelper.checkContentAssistContent(bot,
getWsName() + ".java", PATH_PARAM_NAVIGATION, PATH_PARAM_NAVIGATION.length() +
INCORRECT_PATH_PARAM.length() + 1,
@@ -110,14 +117,14 @@
@Test
public void testWithInvalidPrefixInTheBeginning() {
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulCompletionTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
- false, getWsPackage(), getWsName(), GET_METHOD_PATH, INCORRECT_PATH_PARAM);
+ /* prepare project */
+ importRestWSProject(getWsProjectName());
+ prepareRestfulResource(editorForClass(getWsProjectName(), "src",
+ "org.rest.test", "RestService.java"), SIMPLE_REST_WS_RESOURCE,
+ "org.rest.test", "RestService",
+ GET_METHOD_PATH, INCORRECT_PATH_PARAM);
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
+ /* test content assist proposal */
ContentAssistHelper.checkContentAssistContent(bot,
getWsName() + ".java", PATH_PARAM_NAVIGATION, PATH_PARAM_NAVIGATION.length() + 1,
0, EXP_NON_EMPTY_COMPLETION_RESULT);
@@ -127,14 +134,14 @@
@Test
public void testWithAllInvalidParamSelection() {
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulCompletionTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
- false, getWsPackage(), getWsName(), GET_METHOD_PATH, INCORRECT_PATH_PARAM);
+ /* prepare project */
+ importRestWSProject(getWsProjectName());
+ prepareRestfulResource(editorForClass(getWsProjectName(), "src",
+ "org.rest.test", "RestService.java"), SIMPLE_REST_WS_RESOURCE,
+ "org.rest.test", "RestService",
+ GET_METHOD_PATH, INCORRECT_PATH_PARAM);
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
+ /* test content assist proposal */
ContentAssistHelper.checkContentAssistContent(bot,
getWsName() + ".java", PATH_PARAM_NAVIGATION, PATH_PARAM_NAVIGATION.length() + 1,
INCORRECT_PATH_PARAM.length(), EXP_NON_EMPTY_COMPLETION_RESULT);
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ws.ui.bot.test.rest.explorer;
+
+import org.jboss.tools.ws.ui.bot.test.rest.RESTfulTestBase;
+import org.junit.Test;
+
+/**
+ * Test checks if context menu 'Add RESTful 1.1 Support' works properly
+ * @author jjankovi
+ *
+ */
+public class RESTfulExplorerTest extends RESTfulTestBase {
+
+ protected String getWsProjectName() {
+ return "RestExplorerTest";
+ }
+
+ @Test
+ public void testJaxRsExplorerSupport() {
+
+ /* create dynamic web project */
+ projectHelper.createProject(getWsProjectName());
+
+ /* add RESTful support into project */
+ restfulHelper.addRestSupport(getWsProjectName());
+
+ /* test if RESYful explorer is not missing */
+ assertRestFullSupport(getWsProjectName());
+
+ }
+
+}
Deleted: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulSupportTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulSupportTest.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulSupportTest.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2011 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.ws.ui.bot.test.rest.explorer;
-
-import org.jboss.tools.ws.ui.bot.test.rest.RESTfulTestBase;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Test checks if context menu 'Add RESTful 1.1 Support' works properly
- * @author jjankovi
- *
- */
-public class RESTfulSupportTest extends RESTfulTestBase {
-
- protected String getWsProjectName() {
- return "RestExplorerTest";
- }
-
- @Before
- public void setup() {
- if (!projectExists(getWsProjectName())) {
- projectHelper.createProject(getWsProjectName());
- }
- }
-
-
- @Test
- public void test_JAXRS_ExplorerSupport() {
-
- restfulHelper.addRestSupport(getWsProjectName());
- assertTrue(restfulHelper.isRestSupportEnabled(getWsProjectName()));
-
- }
-
-}
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -30,87 +30,96 @@
return "restEmpty";
}
+ @Override
+ public void cleanup() {
+ projectExplorer.deleteAllProjects();
+ }
+
@Test
public void testCorrectValueValidation() {
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulValidationTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
- false, getWsPackage(), getWsName(), GET_METHOD_PATH, CORRECT_PATH_PARAM);
+ /* prepare project */
+ importRestWSProject(getWsProjectName());
+ prepareRestfulResource(editorForClass(getWsProjectName(), "src",
+ "org.rest.test", "RestService.java"), SIMPLE_REST_WS_RESOURCE,
+ "org.rest.test", "RestService",
+ GET_METHOD_PATH, CORRECT_PATH_PARAM);
- assertTrue(restfulHelper.getRESTValidationErrors(getWsProjectName()).length == 0);
+ /* test count of validation errors */
+ assertCoundOfValidationErrors(getWsProjectName(), 0);
}
+
+
@Test
public void testBadValueValidation() {
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulValidationTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
- false, getWsPackage(), getWsName(), GET_METHOD_PATH, BAD_PATH_PARAM);
+ /* prepare project */
+ importRestWSProject(getWsProjectName());
+ prepareRestfulResource(editorForClass(getWsProjectName(), "src",
+ "org.rest.test", "RestService.java"), SIMPLE_REST_WS_RESOURCE,
+ "org.rest.test", "RestService",
+ GET_METHOD_PATH, BAD_PATH_PARAM);
- assertTrue("" + restfulHelper.getRESTValidationErrors(getWsProjectName()).length,
- restfulHelper.getRESTValidationErrors(getWsProjectName()).length == 1);
+ /* test count of validation errors */
+ assertCoundOfValidationErrors(getWsProjectName(), 1);
}
@Test
public void testCorrectToBadValueValidation() {
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulValidationTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
- false, getWsPackage(), getWsName(), GET_METHOD_PATH, CORRECT_PATH_PARAM);
+ /* prepare project */
+ importRestWSProject(getWsProjectName());
+ prepareRestfulResource(editorForClass(getWsProjectName(), "src",
+ "org.rest.test", "RestService.java"), SIMPLE_REST_WS_RESOURCE,
+ "org.rest.test", "RestService",
+ GET_METHOD_PATH, CORRECT_PATH_PARAM);
+ prepareRestfulResource(bot.activeEditor(), SIMPLE_REST_WS_RESOURCE,
+ "org.rest.test", "RestService",
+ GET_METHOD_PATH, BAD_PATH_PARAM);
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulValidationTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
- false, getWsPackage(), getWsName(), GET_METHOD_PATH, BAD_PATH_PARAM);
-
- assertTrue("" + restfulHelper.getRESTValidationErrors(getWsProjectName()).length,
- restfulHelper.getRESTValidationErrors(getWsProjectName()).length == 1);
+ /* test count of validation errors */
+ assertCoundOfValidationErrors(getWsProjectName(), 1);
}
@Test
public void testBadToCorrectValueValidation() {
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulValidationTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
- false, getWsPackage(), getWsName(), GET_METHOD_PATH, BAD_PATH_PARAM);
+ /* prepare project */
+ importRestWSProject(getWsProjectName());
+ prepareRestfulResource(editorForClass(getWsProjectName(), "src",
+ "org.rest.test", "RestService.java"), SIMPLE_REST_WS_RESOURCE,
+ "org.rest.test", "RestService",
+ GET_METHOD_PATH, BAD_PATH_PARAM);
+ prepareRestfulResource(bot.activeEditor(), SIMPLE_REST_WS_RESOURCE,
+ "org.rest.test", "RestService",
+ GET_METHOD_PATH, CORRECT_PATH_PARAM);
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulValidationTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
- false, getWsPackage(), getWsName(), GET_METHOD_PATH, CORRECT_PATH_PARAM);
-
- assertTrue("" + restfulHelper.getRESTValidationErrors(getWsProjectName()).length,
- restfulHelper.getRESTValidationErrors(getWsProjectName()).length == 0);
+ /* test count of validation errors */
+ assertCoundOfValidationErrors(getWsProjectName(), 0);
}
@Test
- public void testJAX_RS_Validator() {
+ public void testJaxRsValidator() {
+ /* disable restful validation */
restfulHelper.disableRESTValidation();
- packageExplorer.openFile(getWsProjectName(), "src",
- getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulValidationTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
- false, getWsPackage(), getWsName(), GET_METHOD_PATH, BAD_PATH_PARAM);
+ /* prepare project */
+ importRestWSProject(getWsProjectName());
+ prepareRestfulResource(editorForClass(getWsProjectName(), "src",
+ "org.rest.test", "RestService.java"), SIMPLE_REST_WS_RESOURCE,
+ "org.rest.test", "RestService",
+ GET_METHOD_PATH, BAD_PATH_PARAM);
- assertTrue("" + restfulHelper.getRESTValidationErrors(getWsProjectName()).length,
- restfulHelper.getRESTValidationErrors(getWsProjectName()).length == 0);
+ /* test count of validation errors */
+ assertCoundOfValidationErrors(getWsProjectName(), 0);
+ /* enable restful validation */
restfulHelper.enableRESTValidation();
- assertTrue("" + restfulHelper.getRESTValidationErrors(getWsProjectName()).length,
- restfulHelper. getRESTValidationErrors(getWsProjectName()).length == 1);
+ /* test count of validation errors */
+ assertCoundOfValidationErrors(getWsProjectName(), 1);
}
}
Deleted: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationProperties.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationProperties.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationProperties.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2011 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.ws.ui.bot.test.uiutils.views;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
-import org.jboss.tools.ui.bot.ext.view.ViewBase;
-
-/**
- *
- * @author jjankovi
- *
- */
-public class AnnotationProperties extends ViewBase {
-
- public AnnotationProperties() {
- viewObject = ActionItem.View.JAXWSAnnotationProperties.LABEL;
- }
-
- public List<SWTBotTreeItem> getAllAnnotations() {
-
- List<SWTBotTreeItem> annotations = new ArrayList<SWTBotTreeItem>();
- SWTBotTree annotationViewTree = null;
-
- annotationViewTree = show().bot().tree();
- for (SWTBotTreeItem ti : annotationViewTree.getAllItems()) {
- annotations.add(ti);
- }
-
- return annotations;
- }
-
- public List<SWTBotTreeItem> getAnnotationValues(SWTBotTreeItem annotation) {
-
- List<SWTBotTreeItem> annotValues = new ArrayList<SWTBotTreeItem>();
- for (SWTBotTreeItem ti : annotValues) {
- annotValues.add(ti);
- }
- return annotValues;
-
- }
-
- //!!!not working
- public boolean isAnnotationPresence(SWTBotTreeItem annotation) {
- return annotation.isChecked();
- }
-
- //!!!not working
- public List<SWTBotTreeItem> getAllActiveAnnotation() {
-
- List<SWTBotTreeItem> activeAnnotations = new ArrayList<SWTBotTreeItem>();
- for (SWTBotTreeItem ti : getAllAnnotations()) {
- if (isAnnotationPresence(ti)) {
- activeAnnotations.add(ti);
- }
- }
- return activeAnnotations;
-
- }
-
- //!!!not working
- public SWTBotTreeItem activateAnnotation(SWTBotTreeItem annotation) {
- annotation.check();
- return annotation;
- }
-
- //!!!not working
- public SWTBotTreeItem deactivateAnnotation(SWTBotTreeItem annotation) {
- annotation.uncheck();
- return annotation;
- }
-
- public SWTBotTreeItem changeAnnotationParamValue(SWTBotTreeItem annotation,
- String param, String newValue) {
- for (SWTBotTreeItem parameter : getAnnotationValues(annotation)) {
- if (parameter.equals(param)) {
- // change value of parameter no newValue
- break;
- }
- }
- return annotation;
- }
-
-}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationPropertiesView.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationPropertiesView.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationPropertiesView.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ws.ui.bot.test.uiutils.views;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.view.ViewBase;
+
+/**
+ *
+ * @author jjankovi
+ *
+ */
+public class AnnotationPropertiesView extends ViewBase {
+
+ public AnnotationPropertiesView() {
+ viewObject = ActionItem.View.JAXWSAnnotationProperties.LABEL;
+ }
+
+ public List<SWTBotTreeItem> getAllAnnotations() {
+
+ List<SWTBotTreeItem> annotations = new ArrayList<SWTBotTreeItem>();
+ SWTBotTree annotationViewTree = null;
+
+ annotationViewTree = show().bot().tree();
+ for (SWTBotTreeItem ti : annotationViewTree.getAllItems()) {
+ annotations.add(ti);
+ }
+
+ return annotations;
+ }
+
+ public List<SWTBotTreeItem> getAnnotationValues(SWTBotTreeItem annotation) {
+
+ List<SWTBotTreeItem> annotValues = new ArrayList<SWTBotTreeItem>();
+ for (SWTBotTreeItem ti : annotValues) {
+ annotValues.add(ti);
+ }
+ return annotValues;
+
+ }
+
+ //!!!not working
+ public boolean isAnnotationPresence(SWTBotTreeItem annotation) {
+ return annotation.isChecked();
+ }
+
+ //!!!not working
+ public List<SWTBotTreeItem> getAllActiveAnnotation() {
+
+ List<SWTBotTreeItem> activeAnnotations = new ArrayList<SWTBotTreeItem>();
+ for (SWTBotTreeItem ti : getAllAnnotations()) {
+ if (isAnnotationPresence(ti)) {
+ activeAnnotations.add(ti);
+ }
+ }
+ return activeAnnotations;
+
+ }
+
+ //!!!not working
+ public SWTBotTreeItem activateAnnotation(SWTBotTreeItem annotation) {
+ annotation.check();
+ return annotation;
+ }
+
+ //!!!not working
+ public SWTBotTreeItem deactivateAnnotation(SWTBotTreeItem annotation) {
+ annotation.uncheck();
+ return annotation;
+ }
+
+ public SWTBotTreeItem changeAnnotationParamValue(SWTBotTreeItem annotation,
+ String param, String newValue) {
+ for (SWTBotTreeItem parameter : getAnnotationValues(annotation)) {
+ if (parameter.equals(param)) {
+ // change value of parameter no newValue
+ break;
+ }
+ }
+ return annotation;
+ }
+
+}
Deleted: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/NodeContextUtil.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/NodeContextUtil.java 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/NodeContextUtil.java 2012-06-05 07:56:43 UTC (rev 41709)
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.ws.ui.bot.test.utils;
-
-import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
-import org.eclipse.swtbot.swt.finder.results.Result;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
-
-public class NodeContextUtil {
-
- private NodeContextUtil() {
- throw new AssertionError();
- }
-
- public static SWTBotMenu nodeContextMenu(final SWTBotTree tree,
- SWTBotTreeItem item, final String... menu) {
- assert menu.length > 0;
- ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
- return UIThreadRunnable.syncExec(new Result<SWTBotMenu>() {
-
- public SWTBotMenu run() {
- SWTBotMenu m = new SWTBotMenu(ContextMenuHelper.getContextMenu(
- tree, menu[0], false));
- for (int i = 1; i < menu.length; i++) {
- m = m.menu(menu[i]);
- }
- return m;
- }
- });
- }
-
-}
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt 2012-06-05 07:54:21 UTC (rev 41708)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt 2012-06-05 07:56:43 UTC (rev 41709)
@@ -1,5 +1,29 @@
-* Find a way to get to checkbox in Tree/Table which is not in first column
-* Fix AnnotationProperties to be able to change Annotation parameter value
-* Complete AnnotationPropertiesTest
-* Complete multiple tests run (against AS 7 and EAP 5.1)
-* Complete maven integration
\ No newline at end of file
+refactoring - kazdy test (RESTful) bude mat importProject (ak potrebne) - ziadne dedenie prepareWorkspace
+ - co najmenej pouzivat copy content from resource - hlavne import - co najjednoduchsie
+ - testy nie tak dlhe - pomenovat co sa robi po krokoch => vytvaranie vela metod - lahko vyuzivatelne
+ pre dalsie testy
+ - este neviem co bude v RESTfulTestBase - mozno ho celkovo zrusim - nepaci sa mi az tak
+ ak tam ostane tak tam bude kopa jednoduchych metod ktore moze vyuzivat kazdy
+
+RESTfulHelper - zvlastna trieda nepaci sa mi - uvidim co s nou
+
+AnnotationPropertiesView - skusit to nejak rozchodit
+
+==> napisat AnnotationPropertiesTest
+
+co zmenit v uz existujucich testoch
+ - DefaultValueParamSupportTest:
+ - ovela kratsie a pridat aj na MatrixParam, PathParam - mam len QueryParam
+
+nove testy:
+
+1. Parameter Dialog in WS Tester:
+ - bude testovat ci dialog ponuka vsetko co ma: spravny typ, default, button OK, validacie ...
+ - ked sa to potvrdi skontroluje sa URL
+ - potom by sa to mohlo aj deploynut a pozriet vysledok
+
+2. pomocou WSDL otvorit WS Tester
+
+
+* Find a way to get to checkbox in Tree/Table which is not in first column (validation)
+* Complete multiple tests run (against AS 7 and EAP 5.1)
\ No newline at end of file
13 years, 4 months
JBoss Tools SVN: r41708 - in trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects: default1 and 35 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-06-05 03:54:21 -0400 (Tue, 05 Jun 2012)
New Revision: 41708
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.classpath
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.project
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/.jsdtscope
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.jdt.core.prefs
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.common.component
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/WebContent/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/WebContent/META-INF/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/WebContent/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/WebContent/WEB-INF/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/WebContent/WEB-INF/lib/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/build/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/src/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/src/org/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/src/org/rest/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/src/org/rest/test/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/src/org/rest/test/RestService.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.classpath
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.project
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/.jsdtscope
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.jdt.core.prefs
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.common.component
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/WebContent/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/WebContent/META-INF/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/WebContent/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/WebContent/WEB-INF/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/WebContent/WEB-INF/lib/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/build/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/src/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/src/org/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/src/org/rest/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/src/org/rest/test/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/src/org/rest/test/RestService.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.classpath
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.project
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/.jsdtscope
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.jdt.core.prefs
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.common.component
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/WebContent/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/WebContent/META-INF/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/WebContent/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/WebContent/WEB-INF/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/WebContent/WEB-INF/lib/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/build/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/src/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/src/org/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/src/org/rest/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/src/org/rest/test/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/src/org/rest/test/RestService.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.classpath
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.project
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/.jsdtscope
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.jdt.core.prefs
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.common.component
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/WebContent/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/WebContent/META-INF/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/WebContent/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/WebContent/WEB-INF/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/WebContent/WEB-INF/lib/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/build/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/src/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/src/org/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/src/org/rest/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/src/org/rest/test/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/src/org/rest/test/RestService.java
Log:
new resource projects added for restful tests
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.classpath
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.classpath (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.classpath 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 7.1.0 Runtime ">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.web"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.project
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.project (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.project 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>default1</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.ws.jaxrs.metamodelBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ <nature>org.jboss.tools.ws.jaxrs.nature</nature>
+ </natures>
+</projectDescription>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/.jsdtscope
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/.jsdtscope (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/.jsdtscope 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.jdt.core.prefs 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.common.component 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="default1">
+ <wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="context-root" value="default1"/>
+ <property name="java-output-path" value="/default1/build/classes"/>
+ </wb-module>
+</project-modules>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.common.project.facet.core.xml 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 7.1.0 Runtime "/>
+ <fixed facet="jst.web"/>
+ <fixed facet="wst.jsdt.web"/>
+ <fixed facet="java"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="3.0"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.jsdt.ui.superType.container 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/.settings/org.eclipse.wst.jsdt.ui.superType.name 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/WebContent/META-INF/MANIFEST.MF 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/src/org/rest/test/RestService.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/src/org/rest/test/RestService.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/default1/src/org/rest/test/RestService.java 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,16 @@
+package org.rest.test;
+
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.QueryParam;
+
+@Path("/rest")
+public class RestService {
+
+ @GET
+ public void method(@QueryParam("param") @DefaultValue("abc") java.lang.String parameter) {
+
+ }
+
+}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.classpath
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.classpath (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.classpath 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 7.1.0 Runtime ">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.web"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.project
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.project (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.project 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>matrix1</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.ws.jaxrs.metamodelBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ <nature>org.jboss.tools.ws.jaxrs.nature</nature>
+ </natures>
+</projectDescription>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/.jsdtscope
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/.jsdtscope (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/.jsdtscope 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.jdt.core.prefs 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.common.component 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="matrix1">
+ <wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="context-root" value="matrix1"/>
+ <property name="java-output-path" value="/matrix1/build/classes"/>
+ </wb-module>
+</project-modules>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.common.project.facet.core.xml 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 7.1.0 Runtime "/>
+ <fixed facet="jst.web"/>
+ <fixed facet="wst.jsdt.web"/>
+ <fixed facet="java"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="3.0"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.jsdt.ui.superType.container 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/.settings/org.eclipse.wst.jsdt.ui.superType.name 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/WebContent/META-INF/MANIFEST.MF 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/src/org/rest/test/RestService.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/src/org/rest/test/RestService.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/matrix1/src/org/rest/test/RestService.java 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,16 @@
+package org.rest.test;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.MatrixParam;
+import javax.ws.rs.Path;
+
+@Path("/rest")
+public class RestService {
+
+ @GET
+ public void getBooks(@MatrixParam("author") java.lang.String param1,
+ @MatrixParam("country") java.lang.Integer param2) {
+
+ }
+
+}
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.classpath
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.classpath (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.classpath 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 7.1.0 Runtime ">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.web"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.project
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.project (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.project 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>query1</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.ws.jaxrs.metamodelBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ <nature>org.jboss.tools.ws.jaxrs.nature</nature>
+ </natures>
+</projectDescription>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/.jsdtscope
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/.jsdtscope (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/.jsdtscope 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.jdt.core.prefs 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.common.component 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="query1">
+ <wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="context-root" value="query1"/>
+ <property name="java-output-path" value="/query1/build/classes"/>
+ </wb-module>
+</project-modules>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.common.project.facet.core.xml 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 7.1.0 Runtime "/>
+ <fixed facet="jst.web"/>
+ <fixed facet="wst.jsdt.web"/>
+ <fixed facet="java"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="3.0"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.jsdt.ui.superType.container 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/.settings/org.eclipse.wst.jsdt.ui.superType.name 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/WebContent/META-INF/MANIFEST.MF 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/src/org/rest/test/RestService.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/src/org/rest/test/RestService.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query1/src/org/rest/test/RestService.java 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,15 @@
+package org.rest.test;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.QueryParam;
+
+@Path("/rest")
+public class RestService {
+
+ @GET
+ public void method(@QueryParam("param1")String parameter) {
+
+ }
+
+}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.classpath
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.classpath (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.classpath 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 7.1.0 Runtime ">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.web"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.project
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.project (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.project 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>query2</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.ws.jaxrs.metamodelBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ <nature>org.jboss.tools.ws.jaxrs.nature</nature>
+ </natures>
+</projectDescription>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/.jsdtscope
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/.jsdtscope (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/.jsdtscope 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.jdt.core.prefs 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.common.component 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="query2">
+ <wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="context-root" value="query2"/>
+ <property name="java-output-path" value="/query2/build/classes"/>
+ </wb-module>
+</project-modules>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.common.project.facet.core.xml 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 7.1.0 Runtime "/>
+ <fixed facet="jst.web"/>
+ <fixed facet="wst.jsdt.web"/>
+ <fixed facet="java"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="3.0"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.jsdt.ui.superType.container 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/.settings/org.eclipse.wst.jsdt.ui.superType.name 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/WebContent/META-INF/MANIFEST.MF 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/src/org/rest/test/RestService.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/src/org/rest/test/RestService.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/query2/src/org/rest/test/RestService.java 2012-06-05 07:54:21 UTC (rev 41708)
@@ -0,0 +1,16 @@
+package org.rest.test;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.QueryParam;
+
+@Path("/rest")
+public class RestService {
+
+ @GET
+ public void method(@QueryParam("param1") String parameter1,
+ @QueryParam("param2") String parameter2) {
+
+ }
+
+}
13 years, 4 months
JBoss Tools SVN: r41707 - in trunk/download.jboss.org/jbosstools/updates/stable: indigo and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-06-05 01:22:33 -0400 (Tue, 05 Jun 2012)
New Revision: 41707
Added:
trunk/download.jboss.org/jbosstools/updates/stable/indigo/
trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/
trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/README.txt
trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/core/
trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/core/si...
trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/soa-too...
trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/soa-too...
trunk/download.jboss.org/jbosstools/updates/stable/indigo/site.xml
trunk/download.jboss.org/jbosstools/updates/stable/indigo/soa-tooling/
trunk/download.jboss.org/jbosstools/updates/stable/indigo/soa-tooling/sit...
Log:
add empty placeholders for forthcoming sites (JBIDE-11622)
Added: trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/README.txt
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/README.txt (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/README.txt 2012-06-05 05:22:33 UTC (rev 41707)
@@ -0,0 +1,2 @@
+This folder contains composite sites which allow a user to resolve all of a Central connector's upstream deps via a single URL.
+
Added: trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/core/si...
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/core/si... (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/core/si... 2012-06-05 05:22:33 UTC (rev 41707)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>
+ Placeholder Empty Site. This site contains no updates at this time.
+ </description>
+</site>
Added: trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/soa-too...
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/soa-too... (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/stable/indigo/central/soa-too... 2012-06-05 05:22:33 UTC (rev 41707)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>
+ Placeholder Empty Site. This site contains no updates at this time.
+ </description>
+</site>
Added: trunk/download.jboss.org/jbosstools/updates/stable/indigo/site.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/stable/indigo/site.xml (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/stable/indigo/site.xml 2012-06-05 05:22:33 UTC (rev 41707)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>
+ Placeholder Empty Site. This site contains no updates at this time.
+ </description>
+</site>
Added: trunk/download.jboss.org/jbosstools/updates/stable/indigo/soa-tooling/sit...
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/stable/indigo/soa-tooling/sit... (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/stable/indigo/soa-tooling/sit... 2012-06-05 05:22:33 UTC (rev 41707)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>
+ Placeholder Empty Site. This site contains no updates at this time.
+ </description>
+</site>
13 years, 4 months
JBoss Tools SVN: r41706 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-06-04 23:31:45 -0400 (Mon, 04 Jun 2012)
New Revision: 41706
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml
trunk/documentation/guides/GettingStartedGuide/en-US/introduction.xml
Log:
updated with new info
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-06-04 23:42:39 UTC (rev 41705)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-06-05 03:31:45 UTC (rev 41706)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>5.0</productnumber>
<edition>5.0.0</edition>
-<pubsnumber>19</pubsnumber>
+<pubsnumber>20</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml 2012-06-04 23:42:39 UTC (rev 41705)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml 2012-06-05 03:31:45 UTC (rev 41706)
@@ -94,12 +94,13 @@
</para>
<note>
- <title>Note</title>
<para>
If the JDK is not listed by the alternatives command, you can manually add it with the following commands (substitute the location of your JDK for <filename>/usr/java/jdk1.6.0_24</filename> where appropriate):
- <screen>
- sudo /usr/sbin/alternatives --install "/usr/bin/java" "java" "/usr/java/jdk1.6.0_24/bin/java" 1 sudo /usr/sbin/alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk1.6.0_24/bin/javac" 1 sudo /usr/sbin/alternatives --install "/usr/lib/jvm/java-1.6.0" "java_sdk_1.6.0" "/usr/java/jdk1.6.0_24" 1
- </screen>
+<screen>
+sudo /usr/sbin/alternatives --install "/usr/bin/java" "java" "/usr/java/jdk1.6.0_24/bin/java"
+sudo /usr/sbin/alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk1.6.0_24/bin/javac"
+sudo /usr/sbin/alternatives --install "/usr/lib/jvm/java-1.6.0" "java_sdk_1.6.0" "/usr/java/jdk1.6.0_24" 1
+</screen>
</para>
</note>
</listitem>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/introduction.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/introduction.xml 2012-06-04 23:42:39 UTC (rev 41705)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/introduction.xml 2012-06-05 03:31:45 UTC (rev 41706)
@@ -183,7 +183,7 @@
</entry>
<entry>
<para>
- JBoss WS is a web service framework developed as a part of the JBoss Application Server. It implements the JAX-WS specification that defines a programming model and run-time architecture for implementing web services in Java, targeted at the Java Platform, Enterprise Edition 5 (Java EE 5).
+ JBoss WS is a web service framework developed as a part of the JBoss Application Server. It implements the JAX-WS specification that defines a programming model and run-time architecture for implementing web services in Java.
</para>
</entry>
</row>
@@ -203,7 +203,7 @@
</table>
<para>
- <property>JBoss Developer Studio</property> requires JDK 5+ (JDK 6 in case of JBoss Enterprise Application Platform 5.0 and above). Also it is important that the architecture of the Java Virtual Machine (JVM) matches the particular <property>JBoss Developer Studio</property> build. For example, if you are using a 64-bit system and use the 64-bit JVM, you need the 64-bit JBoss Developer Studio.
+ <property>JBoss Developer Studio</property> requires JDK 6 or above. It is important that the architecture of the Java Virtual Machine (JVM) matches the particular <property>JBoss Developer Studio</property> build. For example, if you are using a 64-bit system and use the 64-bit JVM, you need the 64-bit JBoss Developer Studio.
</para>
<para>
13 years, 4 months
JBoss Tools SVN: r41705 - trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-06-04 19:42:39 -0400 (Mon, 04 Jun 2012)
New Revision: 41705
Added:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/AbstractTemporaryAnnotation.java
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationAnnotation.java
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/DisabledAnnotation.java
Log:
https://issues.jboss.org/browse/JBIDE-10738 As-you-type EL validation
Added: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/AbstractTemporaryAnnotation.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/AbstractTemporaryAnnotation.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/AbstractTemporaryAnnotation.java 2012-06-04 23:42:39 UTC (rev 41705)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.validation;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationAccessExtension;
+import org.eclipse.jface.text.source.IAnnotationPresentation;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.internal.util.BundleUtility;
+import org.eclipse.ui.texteditor.AnnotationPreference;
+import org.eclipse.ui.texteditor.AnnotationPreferenceLookup;
+import org.eclipse.ui.texteditor.ImageUtilities;
+
+/**
+ * @author Alexey Kazakov
+ */
+public abstract class AbstractTemporaryAnnotation extends Annotation implements IAnnotationPresentation {
+
+ private static final int WARNING_LAYER;
+ private static final int ERROR_LAYER;
+
+ private Map<String, Object> fAttributes = new HashMap<String, Object>();
+
+ private int seveirty = WARNING_LAYER;
+
+ static {
+ AnnotationPreferenceLookup lookup = EditorsUI.getAnnotationPreferenceLookup();
+ WARNING_LAYER = computeLayer("org.eclipse.wst.sse.ui.temp.warning", lookup); //$NON-NLS-1$
+ ERROR_LAYER = computeLayer("org.eclipse.wst.sse.ui.temp.error", lookup); //$NON-NLS-1$
+ }
+
+ private static int computeLayer(String annotationType, AnnotationPreferenceLookup lookup) {
+ Annotation annotation = new Annotation(annotationType, false, null);
+ AnnotationPreference preference= lookup.getAnnotationPreference(annotation);
+ if (preference != null) {
+ return preference.getPresentationLayer() + 1;
+ } else {
+ return IAnnotationAccessExtension.DEFAULT_LAYER + 1;
+ }
+ }
+
+ public AbstractTemporaryAnnotation(String type, boolean isPersistent, String text, boolean warning) {
+ super(type, isPersistent, text);
+ this.seveirty = warning?WARNING_LAYER:ERROR_LAYER;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.text.source.IAnnotationPresentation#getLayer()
+ */
+ @Override
+ public int getLayer() {
+ return seveirty;
+ }
+
+ protected abstract String getWarningIconPath();
+
+ protected abstract String getErrorIconPath();
+
+ @Override
+ public void paint(GC gc, Canvas canvas, Rectangle bounds) {
+ String path = seveirty==WARNING_LAYER? getWarningIconPath() : getErrorIconPath();
+ URL url = BundleUtility.find(IDEWorkbenchPlugin.IDE_WORKBENCH, path);
+ ImageDescriptor descriptor = ImageDescriptor.createFromURL(url);
+ Image image = descriptor.createImage(false);
+ ImageUtilities.drawImage(image, gc, canvas, bounds, SWT.CENTER, SWT.TOP);
+ }
+
+ public Object getAttribute(String key) {
+ return fAttributes.get(key);
+ }
+
+ public void setAttribute(String key, Object value) {
+ fAttributes.put(key, value);
+ }
+}
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/AbstractTemporaryAnnotation.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/DisabledAnnotation.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/DisabledAnnotation.java 2012-06-04 22:32:58 UTC (rev 41704)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/DisabledAnnotation.java 2012-06-04 23:42:39 UTC (rev 41705)
@@ -10,79 +10,35 @@
******************************************************************************/
package org.jboss.tools.common.validation;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.IAnnotationAccessExtension;
-import org.eclipse.jface.text.source.IAnnotationPresentation;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.ui.editors.text.EditorsUI;
import org.eclipse.ui.internal.WorkbenchImages;
-import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
-import org.eclipse.ui.internal.util.BundleUtility;
-import org.eclipse.ui.texteditor.AnnotationPreference;
-import org.eclipse.ui.texteditor.AnnotationPreferenceLookup;
-import org.eclipse.ui.texteditor.ImageUtilities;
/**
* @author Alexey Kazakov
*/
-public class DisabledAnnotation extends Annotation implements IAnnotationPresentation {
+public class DisabledAnnotation extends AbstractTemporaryAnnotation {
- private static final int WARNING_LAYER;
- private static final int ERROR_LAYER;
+ private static final String warningPath = WorkbenchImages.ICONS_PATH + "dlcl16/showwarn_tsk.gif";
+ private static final String errorPath = WorkbenchImages.ICONS_PATH + "dlcl16/showerr_tsk.gif";
- private Map<String, Object> fAttributes = new HashMap<String, Object>();
-
- private int seveirty = WARNING_LAYER;
-
- static {
- AnnotationPreferenceLookup lookup = EditorsUI.getAnnotationPreferenceLookup();
- WARNING_LAYER = computeLayer("org.eclipse.wst.sse.ui.temp.warning", lookup); //$NON-NLS-1$
- ERROR_LAYER = computeLayer("org.eclipse.wst.sse.ui.temp.error", lookup); //$NON-NLS-1$
- }
-
- private static int computeLayer(String annotationType, AnnotationPreferenceLookup lookup) {
- Annotation annotation = new Annotation(annotationType, false, null);
- AnnotationPreference preference= lookup.getAnnotationPreference(annotation);
- if (preference != null) {
- return preference.getPresentationLayer() + 1;
- } else {
- return IAnnotationAccessExtension.DEFAULT_LAYER + 1;
- }
- }
-
- public DisabledAnnotation(String type, boolean isPersistent, String text, boolean warning) {
- super(type, isPersistent, text);
- this.seveirty = warning?WARNING_LAYER:ERROR_LAYER;
+ public DisabledAnnotation(String type, boolean isPersistent, String text, boolean warning) {
+ super(type, isPersistent, text, warning);
}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.validation.AbstractTemporaryAnnotation#getWarningIconPath()
+ */
@Override
- public int getLayer() {
- return seveirty;
+ protected String getWarningIconPath() {
+ return warningPath;
}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.validation.AbstractTemporaryAnnotation#getErrorIconPath()
+ */
@Override
- public void paint(GC gc, Canvas canvas, Rectangle bounds) {
- String path = seveirty==WARNING_LAYER? (WorkbenchImages.ICONS_PATH + "dlcl16/showwarn_tsk.gif") : (WorkbenchImages.ICONS_PATH + "dlcl16/showerr_tsk.gif"); //$NON-NLS-1$
- URL url = BundleUtility.find(IDEWorkbenchPlugin.IDE_WORKBENCH, path);
- ImageDescriptor descriptor = ImageDescriptor.createFromURL(url);
- Image image = descriptor.createImage(false);
- ImageUtilities.drawImage(image, gc, canvas, bounds, SWT.CENTER, SWT.TOP);
+ protected String getErrorIconPath() {
+ return errorPath;
}
-
- public Object getAttribute(String key) {
- return fAttributes.get(key);
- }
-
- public void setAttribute(String key, Object value) {
- fAttributes.put(key, value);
- }
}
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationAnnotation.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationAnnotation.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationAnnotation.java 2012-06-04 23:42:39 UTC (rev 41705)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.validation;
+
+import org.eclipse.ui.internal.WorkbenchImages;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class ValidationAnnotation extends AbstractTemporaryAnnotation {
+
+ private static final String warningPath = WorkbenchImages.ICONS_PATH + "elcl16/showwarn_tsk.gif";
+ private static final String errorPath = WorkbenchImages.ICONS_PATH + "elcl16/showerr_tsk.gif";
+
+ /**
+ * @param type
+ * @param isPersistent
+ * @param text
+ * @param warning
+ */
+ public ValidationAnnotation(String type, boolean isPersistent, String text, boolean warning) {
+ super(type, isPersistent, text, warning);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.common.validation.AbstractTemporaryAnnotation#getWarningIconPath()
+ */
+ @Override
+ protected String getWarningIconPath() {
+ return warningPath;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.common.validation.AbstractTemporaryAnnotation#getErrorIconPath()
+ */
+ @Override
+ protected String getErrorIconPath() {
+ return errorPath;
+ }
+}
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationAnnotation.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 4 months
JBoss Tools SVN: r41704 - branches/jbosstools-3.3.0.Beta3/maven/plugins/org.jboss.tools.maven.core.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-06-04 18:32:58 -0400 (Mon, 04 Jun 2012)
New Revision: 41704
Modified:
branches/jbosstools-3.3.0.Beta3/maven/plugins/org.jboss.tools.maven.core/plugin.xml
Log:
Reverse merged revision(s) 41701 from branches/jbosstools-3.3.0.Beta3/maven/plugins/org.jboss.tools.maven.core/plugin.xml:
JBIDE-12066 : remove the JBoss nexus index <= was applied to wrong branch
Modified: branches/jbosstools-3.3.0.Beta3/maven/plugins/org.jboss.tools.maven.core/plugin.xml
===================================================================
--- branches/jbosstools-3.3.0.Beta3/maven/plugins/org.jboss.tools.maven.core/plugin.xml 2012-06-04 22:30:18 UTC (rev 41703)
+++ branches/jbosstools-3.3.0.Beta3/maven/plugins/org.jboss.tools.maven.core/plugin.xml 2012-06-04 22:32:58 UTC (rev 41704)
@@ -306,4 +306,10 @@
</enablement>
</provider>
</extension>
+
+ <extension point="org.eclipse.m2e.core.indexes">
+ <index indexId="jboss-releases-repository" isShort="true"
+ repositoryUrl="https://repository.jboss.org/nexus/content/repositories/releases/">
+ </index>
+ </extension>
</plugin>
13 years, 4 months
JBoss Tools SVN: r41703 - trunk/maven/plugins/org.jboss.tools.maven.core.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-06-04 18:30:18 -0400 (Mon, 04 Jun 2012)
New Revision: 41703
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/plugin.xml
Log:
JBIDE-12066 : remove the JBoss nexus index
Modified: trunk/maven/plugins/org.jboss.tools.maven.core/plugin.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.core/plugin.xml 2012-06-04 22:28:40 UTC (rev 41702)
+++ trunk/maven/plugins/org.jboss.tools.maven.core/plugin.xml 2012-06-04 22:30:18 UTC (rev 41703)
@@ -331,10 +331,4 @@
</enablement>
</provider>
</extension>
-
- <extension point="org.eclipse.m2e.core.indexes">
- <index indexId="jboss-releases-repository" isShort="true"
- repositoryUrl="https://repository.jboss.org/nexus/content/repositories/releases/">
- </index>
- </extension>
</plugin>
13 years, 4 months
JBoss Tools SVN: r41702 - branches/jbosstools-3.3.x/maven/plugins/org.jboss.tools.maven.core.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-06-04 18:28:40 -0400 (Mon, 04 Jun 2012)
New Revision: 41702
Modified:
branches/jbosstools-3.3.x/maven/plugins/org.jboss.tools.maven.core/plugin.xml
Log:
JBIDE-12066 : remove the JBoss nexus index
Modified: branches/jbosstools-3.3.x/maven/plugins/org.jboss.tools.maven.core/plugin.xml
===================================================================
--- branches/jbosstools-3.3.x/maven/plugins/org.jboss.tools.maven.core/plugin.xml 2012-06-04 22:26:31 UTC (rev 41701)
+++ branches/jbosstools-3.3.x/maven/plugins/org.jboss.tools.maven.core/plugin.xml 2012-06-04 22:28:40 UTC (rev 41702)
@@ -332,9 +332,4 @@
</provider>
</extension>
- <extension point="org.eclipse.m2e.core.indexes">
- <index indexId="jboss-releases-repository" isShort="true"
- repositoryUrl="https://repository.jboss.org/nexus/content/repositories/releases/">
- </index>
- </extension>
</plugin>
13 years, 4 months
JBoss Tools SVN: r41701 - branches/jbosstools-3.3.0.Beta3/maven/plugins/org.jboss.tools.maven.core.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-06-04 18:26:31 -0400 (Mon, 04 Jun 2012)
New Revision: 41701
Modified:
branches/jbosstools-3.3.0.Beta3/maven/plugins/org.jboss.tools.maven.core/plugin.xml
Log:
JBIDE-12066 : remove the JBoss nexus index
Modified: branches/jbosstools-3.3.0.Beta3/maven/plugins/org.jboss.tools.maven.core/plugin.xml
===================================================================
--- branches/jbosstools-3.3.0.Beta3/maven/plugins/org.jboss.tools.maven.core/plugin.xml 2012-06-04 22:13:14 UTC (rev 41700)
+++ branches/jbosstools-3.3.0.Beta3/maven/plugins/org.jboss.tools.maven.core/plugin.xml 2012-06-04 22:26:31 UTC (rev 41701)
@@ -306,10 +306,4 @@
</enablement>
</provider>
</extension>
-
- <extension point="org.eclipse.m2e.core.indexes">
- <index indexId="jboss-releases-repository" isShort="true"
- repositoryUrl="https://repository.jboss.org/nexus/content/repositories/releases/">
- </index>
- </extension>
</plugin>
13 years, 4 months