JBoss Tools SVN: r40281 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-18 07:18:21 -0400 (Wed, 18 Apr 2012)
New Revision: 40281
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/build.properties
Log:
removing resources from classpath in build properties
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/build.properties
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/build.properties 2012-04-18 11:11:51 UTC (rev 40280)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/build.properties 2012-04-18 11:18:21 UTC (rev 40281)
@@ -1,6 +1,4 @@
-source.. = src/,\
- resources/
+source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .,\
- projects/
+ .
13 years, 11 months
JBoss Tools SVN: r40280 - in trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects: restEmpty and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-18 07:11:51 -0400 (Wed, 18 Apr 2012)
New Revision: 40280
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.classpath
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.project
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/.jsdtscope
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.jdt.core.prefs
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.wst.common.component
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/WebContent/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/WebContent/META-INF/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/WebContent/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/WebContent/WEB-INF/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/WebContent/WEB-INF/lib/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/build/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test/RestServuce.java
Log:
new resource project for ws bot test
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.classpath
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.classpath (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.classpath 2012-04-18 11:11:51 UTC (rev 40280)
@@ -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/AS-7.0">
+ <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/restEmpty/.project
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.project (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.project 2012-04-18 11:11:51 UTC (rev 40280)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>restEmpty</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/restEmpty/.settings/.jsdtscope
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/.jsdtscope (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/.jsdtscope 2012-04-18 11:11:51 UTC (rev 40280)
@@ -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/restEmpty/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.jdt.core.prefs 2012-04-18 11:11:51 UTC (rev 40280)
@@ -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/restEmpty/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.wst.common.component 2012-04-18 11:11:51 UTC (rev 40280)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="restEmpty">
+ <wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="context-root" value="restEmpty"/>
+ <property name="java-output-path" value="/restEmpty/build/classes"/>
+ </wb-module>
+</project-modules>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.wst.common.project.facet.core.xml 2012-04-18 11:11:51 UTC (rev 40280)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="AS-7.0"/>
+ <fixed facet="jst.web"/>
+ <fixed facet="java"/>
+ <fixed facet="wst.jsdt.web"/>
+ <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/restEmpty/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.wst.jsdt.ui.superType.container 2012-04-18 11:11:51 UTC (rev 40280)
@@ -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/restEmpty/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/.settings/org.eclipse.wst.jsdt.ui.superType.name 2012-04-18 11:11:51 UTC (rev 40280)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/WebContent/META-INF/MANIFEST.MF 2012-04-18 11:11:51 UTC (rev 40280)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test/RestServuce.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test/RestServuce.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test/RestServuce.java 2012-04-18 11:11:51 UTC (rev 40280)
@@ -0,0 +1,5 @@
+package org.rest.test;
+
+public class RestServuce {
+
+}
13 years, 11 months
JBoss Tools SVN: r40279 - in trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test: rest/explorer and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-18 07:09:37 -0400 (Wed, 18 Apr 2012)
New Revision: 40279
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/explorer/RESTfulExplorerTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/ti/wizard/RESTFullExplorerWizard.java
Log:
fixing ws tests
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-04-18 10:19:53 UTC (rev 40278)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java 2012-04-18 11:09:37 UTC (rev 40279)
@@ -14,6 +14,7 @@
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;
/**
@@ -22,7 +23,7 @@
* @author jjankovi
*
*/
-@Require(server = @Server(), perspective = "Java EE")
+@Require(server = @Server(state=ServerState.NotRunning), perspective = "Java EE")
public class RESTfulTestBase extends WSTestBase {
protected final RESTfulHelper restfulHelper = new RESTfulHelper();
Modified: 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 2012-04-18 10:19:53 UTC (rev 40278)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java 2012-04-18 11:09:37 UTC (rev 40279)
@@ -30,6 +30,7 @@
private RESTFullExplorerWizard restfulWizard = null;
+ private String restEmptyProjectName = "restEmpty";
private String restBasicProjectName = "restBasic";
private String restAdvancedProjectName = "restAdvanced";
@@ -46,9 +47,16 @@
@Test
public void testAddingSimpleRESTMethods() {
- setWsProjectName(restBasicProjectName);
+ setWsProjectName(restEmptyProjectName);
prepareRestProject();
+ packageExplorer.openFile(getWsProjectName(), "src",
+ getWsPackage(), getWsName() + ".java").toTextEditor();
+ resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
+ RESTfulExplorerTest.class.getResourceAsStream(BASIC_WS_RESOURCE),
+ false, getWsPackage(), getWsName());
+ bot.sleep(Timing.time2S());
+
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
@@ -67,9 +75,16 @@
@Test
public void testAddingAdvancedRESTMethods() {
- setWsProjectName(restAdvancedProjectName);
+ setWsProjectName(restBasicProjectName);
prepareRestProject();
+ packageExplorer.openFile(getWsProjectName(), "src",
+ getWsPackage(), getWsName() + ".java").toTextEditor();
+ resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
+ RESTfulExplorerTest.class.getResourceAsStream(ADVANCED_WS_RESOURCE),
+ false, getWsPackage(), getWsName());
+ bot.sleep(Timing.time2S());
+
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/ti/wizard/RESTFullExplorerWizard.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/ti/wizard/RESTFullExplorerWizard.java 2012-04-18 10:19:53 UTC (rev 40278)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/ti/wizard/RESTFullExplorerWizard.java 2012-04-18 11:09:37 UTC (rev 40279)
@@ -23,7 +23,7 @@
String[] pathToRestExplorer = {wsProjectName};
restFulExplorer = projectExplorer.selectTreeItem(
RESTFulAnnotations.REST_EXPLORER_LABEL.getLabel(),
- pathToRestExplorer).expand();
+ pathToRestExplorer).expand().expand();
}
/**
13 years, 11 months
JBoss Tools SVN: r40278 - trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2012-04-18 06:19:53 -0400 (Wed, 18 Apr 2012)
New Revision: 40278
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java
Log:
https://issues.jboss.org/browse/JBIDE-11569 -- ScrollingTest_Jbide8701 test was commented.
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java 2012-04-18 10:17:44 UTC (rev 40277)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java 2012-04-18 10:19:53 UTC (rev 40278)
@@ -38,7 +38,7 @@
// suite.addTestSuite(VpePopupMenuTest.class);
suite.addTestSuite(VpeEditAnyDialogTest.class);
suite.addTestSuite(MultipleSelectionTest.class);
- suite.addTestSuite(ScrollingTest_Jbide8701.class);
+// suite.addTestSuite(ScrollingTest_Jbide8701.class);
suite.addTestSuite(ToggleClassCastTest_Jbide9790.class);
return new VpeTestSetup(suite);
}
13 years, 11 months
JBoss Tools SVN: r40277 - trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2012-04-18 06:17:44 -0400 (Wed, 18 Apr 2012)
New Revision: 40277
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CAELApplyMethodProposalTest.java
Log:
JBIDE-11492
When inserting methods with parameters, CA sets cursor incorrectly
JUnit Test is added
(The test is moved to another component)
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CAELApplyMethodProposalTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CAELApplyMethodProposalTest.java 2012-04-18 10:16:28 UTC (rev 40276)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CAELApplyMethodProposalTest.java 2012-04-18 10:17:44 UTC (rev 40277)
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * 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.cdi.ui.test;
-
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.swt.graphics.Point;
-import org.jboss.tools.cdi.core.test.tck.TCKTest;
-import org.jboss.tools.common.base.test.contentassist.CATestUtil;
-import org.jboss.tools.jst.jsp.contentassist.AutoContentAssistantProposal;
-import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
-import org.jboss.tools.test.util.JobUtils;
-
-/**
- * @author Victor V. Rubezhny
- */
-public class CAELApplyMethodProposalTest extends TestCase {
-
- private IProject project;
- private ContentAssistantTestCase caTest = new ContentAssistantTestCase();
- private static final String PAGE_NAME = "WebContent/ABCProducer.xhtml";
- private static final String[] EL_TO_FIND = { "#{abc.substring(1).substr",
- "#{abc.substring(1).by" };
- private static final String[] PROPOSALS_TO_APPLY = { "substring(", "bytes" };
- private static final String CURSOR_SIGNATURE = "<The cursor point>";
-
- public void setUp() {
- project = TCKTest.findTestProject();
- try {
- IProject tckProject = TCKTest
- .importPreparedProject("/ca_with_methods/");
- } catch (Exception e) {
- // Ignore all the exceptions in setUp()/tearDown() methods
- }
- caTest.setProject(project);
- }
-
- /*
- * The test case for JBIDE-11492
- */
- public void _testELApplyMethodProposal() {
-
- caTest.openEditor(PAGE_NAME);
- try {
-
- assertNotNull("Text Viewer not found", caTest.getViewer());
- IDocument document = caTest.getViewer().getDocument();
- assertNotNull("Can't obtain a test Document.", document);
-
- for (int i = 0; i < EL_TO_FIND.length; i++) {
- String elToFind = EL_TO_FIND[i];
- String proposalToApply = PROPOSALS_TO_APPLY[i];
-
- String documentContent = document.get();
- int start = (documentContent == null ? -1 : documentContent
- .indexOf(elToFind));
- assertFalse("Required text '" + elToFind
- + "' not found in document", (start == -1));
- int offsetToTest = start + elToFind.length();
-
- JobUtils.waitForIdle();
-
- List<ICompletionProposal> res = CATestUtil.collectProposals(
- caTest.getContentAssistant(), caTest.getViewer(),
- offsetToTest);
-
- assertTrue("Content Assistant returned no proposals",
- (res != null && res.size() > 0));
-
- boolean bPropoosalToApplyFound = false;
- for (ICompletionProposal p : res) {
- if (!(p instanceof AutoContentAssistantProposal))
- continue;
- AutoContentAssistantProposal proposal = (AutoContentAssistantProposal) p;
- String proposalString = proposal.getDisplayString();
-
- if (proposalString.startsWith(proposalToApply)) {
- bPropoosalToApplyFound = true;
- proposal.apply(document);
- break;
- }
- }
- assertTrue("The proposal to apply not found.",
- bPropoosalToApplyFound);
-
- try {
- JobUtils.waitForIdle();
- } catch (Exception e) {
- e.printStackTrace();
- assertTrue("Waiting for the jobs to complete has failed.",
- false);
- }
-
- Point s = caTest.getViewer().getSelectedRange();
- assertNotNull("Selection can't be obtained from the editor!", s);
-
- String documentUpdatedContent = document.get();
- String testUpdatedContent = documentUpdatedContent.substring(0,
- s.x)
- + CURSOR_SIGNATURE
- + documentUpdatedContent.substring(s.x);
- String testString = elToFind.substring(0,
- elToFind.lastIndexOf('.') + 1)
- + proposalToApply + CURSOR_SIGNATURE;
- assertTrue(
- "The proposal replacement is failed.",
- testUpdatedContent.substring(start,
- s.x + CURSOR_SIGNATURE.length()).equals(
- testString));
- }
- } finally {
- caTest.closeEditor();
- }
- }
-}
\ No newline at end of file
13 years, 11 months
JBoss Tools SVN: r40276 - trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2012-04-18 06:16:28 -0400 (Wed, 18 Apr 2012)
New Revision: 40276
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/ca_with_methods/
Log:
JBIDE-11492
When inserting methods with parameters, CA sets cursor incorrectly
JUnit Test is added
(The test is moved to another component)
13 years, 11 months
JBoss Tools SVN: r40275 - in trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf: ui/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2012-04-18 06:14:04 -0400 (Wed, 18 Apr 2012)
New Revision: 40275
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/CAELApplyMethodProposalTest.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
Log:
JBIDE-11492
When inserting methods with parameters, CA sets cursor incorrectly
JUnit Test is added
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/CAELApplyMethodProposalTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/CAELApplyMethodProposalTest.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/CAELApplyMethodProposalTest.java 2012-04-18 10:14:04 UTC (rev 40275)
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * 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.jsf.jsp.ca.test;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.swt.graphics.Point;
+import org.jboss.tools.common.base.test.contentassist.CATestUtil;
+import org.jboss.tools.jst.jsp.contentassist.AutoContentAssistantProposal;
+import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ProjectImportTestSetup;
+
+/**
+ * @author Victor V. Rubezhny
+ */
+public class CAELApplyMethodProposalTest extends ContentAssistantTestCase {
+ private static final String PROJECT_NAME = "JSF2KickStartWithoutLibs";
+ private static final String PAGE_NAME = "WebContent/pages/inputname.xhtml";
+ private static final String EL_RBRACE = "}";
+
+ private static final String[] EL_TO_FIND = { "#{user.name", "#{user.name" };
+ private static final String[] EL_TO_REPLACE_WITH = {
+ "#{user.name.substring(1).substr", "#{user.name.substring(1).by" };
+ private static final String[] PROPOSALS_TO_APPLY = { "substring(", "bytes" };
+ private static final String CURSOR_SIGNATURE = "<The cursor point>";
+
+ public void setUp() throws Exception {
+ project = ProjectImportTestSetup.loadProject(PROJECT_NAME);
+ project.build(IncrementalProjectBuilder.FULL_BUILD,
+ new NullProgressMonitor());
+ }
+
+ /*
+ * The test case for JBIDE-11492
+ */
+ public void testELApplyMethodProposal() {
+
+ openEditor(PAGE_NAME);
+ try {
+
+ assertNotNull("Text Viewer not found", getViewer());
+ IDocument document = getViewer().getDocument();
+ assertNotNull("Can't obtain a test Document.", document);
+
+ for (int i = 0; i < EL_TO_FIND.length; i++) {
+ String elToFind = EL_TO_FIND[i];
+ String elToReplaceWith = EL_TO_REPLACE_WITH[i];
+ String proposalToApply = PROPOSALS_TO_APPLY[i];
+
+ String documentContent = document.get();
+ int start = (documentContent == null ? -1 : documentContent
+ .indexOf(elToFind));
+ assertFalse("Required text '" + elToFind
+ + "' not found in document", (start == -1));
+
+ int end = (documentContent == null ? -1 : documentContent
+ .indexOf(EL_RBRACE, start));
+ assertFalse("Required text '" + EL_RBRACE
+ + "' not found in document", (end == -1));
+
+ String documentContentModified = documentContent.substring(0,
+ start)
+ + elToReplaceWith
+ + documentContent.substring(end);
+
+ int offsetToTest = start + elToReplaceWith.length();
+
+ jspTextEditor.setText(documentContentModified);
+
+ JobUtils.waitForIdle();
+
+ List<ICompletionProposal> res = CATestUtil.collectProposals(
+ getContentAssistant(), getViewer(), offsetToTest);
+
+ assertTrue("Content Assistant returned no proposals",
+ (res != null && res.size() > 0));
+
+ boolean bPropoosalToApplyFound = false;
+ for (ICompletionProposal p : res) {
+ if (!(p instanceof AutoContentAssistantProposal))
+ continue;
+ AutoContentAssistantProposal proposal = (AutoContentAssistantProposal) p;
+ String proposalString = proposal.getDisplayString();
+
+ if (proposalString.startsWith(proposalToApply)) {
+ bPropoosalToApplyFound = true;
+ proposal.apply(document);
+
+ // The following is copied from CompletionProposalPopup
+ // class that actually applies the proposal.
+ // Node that fContentAssistSubjectControlAdapter object
+ // is replaced by the Viewer object (which is equivalent
+ // in many cases).
+ // So, after the proposal is applied a new selection is
+ // set in the Editor:
+ Point selection = p.getSelection(document);
+ if (selection != null) {
+ getViewer().setSelectedRange(selection.x,
+ selection.y);
+ getViewer().revealRange(selection.x, selection.y);
+ }
+ // End of code from CompletionProposalPopup
+
+ break;
+ }
+ }
+ assertTrue("The proposal to apply not found.",
+ bPropoosalToApplyFound);
+
+ try {
+ JobUtils.waitForIdle();
+ } catch (Exception e) {
+ e.printStackTrace();
+ assertTrue("Waiting for the jobs to complete has failed.",
+ false);
+ }
+
+ Point s = getViewer().getSelectedRange();
+ assertNotNull("Selection can't be obtained from the editor!", s);
+
+ String documentUpdatedContent = document.get();
+ String testUpdatedContent = documentUpdatedContent.substring(0,
+ s.x)
+ + CURSOR_SIGNATURE
+ + documentUpdatedContent.substring(s.x);
+ String testString = elToReplaceWith.substring(0,
+ elToReplaceWith.lastIndexOf('.') + 1)
+ + proposalToApply
+ + CURSOR_SIGNATURE;
+ assertTrue(
+ "The proposal replacement is failed.",
+ testUpdatedContent.substring(start,
+ s.x + CURSOR_SIGNATURE.length()).equals(
+ testString));
+ }
+ } finally {
+ closeEditor();
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/CAELApplyMethodProposalTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2012-04-18 10:10:43 UTC (rev 40274)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2012-04-18 10:14:04 UTC (rev 40275)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2011 Red Hat, Inc.
+ * 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,
@@ -17,6 +17,7 @@
import org.eclipse.wst.validation.ValidationFramework;
import org.jboss.tools.common.base.test.validation.ValidationProjectTestSetup;
import org.jboss.tools.jsf.jsp.ca.test.CADefaultELStartingCharTest;
+import org.jboss.tools.jsf.jsp.ca.test.CAELApplyMethodProposalTest;
import org.jboss.tools.jsf.jsp.ca.test.CAELInsideTagBodyInJspFileTest;
import org.jboss.tools.jsf.jsp.ca.test.CAForCompositeComponentTest;
import org.jboss.tools.jsf.jsp.ca.test.CAForELJavaAndJSTCompareTest;
@@ -151,6 +152,11 @@
new String[] { "JSF2KickStartWithoutLibs" })); //$NON-NLS-1$
suite.addTest(new ProjectImportTestSetup(new TestSuite(
+ CAELApplyMethodProposalTest.class), "org.jboss.tools.jsf.base.test", //$NON-NLS-1$
+ new String[] { "projects/JSF2KickStartWithoutLibs", }, //$NON-NLS-1$
+ new String[] { "JSF2KickStartWithoutLibs" })); //$NON-NLS-1$
+
+ suite.addTest(new ProjectImportTestSetup(new TestSuite(
CAELInsideTagBodyInJspFileTest.class), "org.jboss.tools.jsf.ui.test", //$NON-NLS-1$
new String[] { "projects/Jbide3845Test", }, //$NON-NLS-1$
new String[] { "Jbide3845Test" })); //$NON-NLS-1$
13 years, 11 months
JBoss Tools SVN: r40274 - in trunk/maven/plugins/org.jboss.tools.maven.jpa: src/org/jboss/tools/maven/jpa/configurators and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-04-18 06:10:43 -0400 (Wed, 18 Apr 2012)
New Revision: 40274
Modified:
trunk/maven/plugins/org.jboss.tools.maven.jpa/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/JptUtils.java
trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/MavenResourceLocator.java
Log:
JBIDE-11557 : Use reflection to make the JPA Maven configurator compatible with Juno
Modified: trunk/maven/plugins/org.jboss.tools.maven.jpa/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jpa/META-INF/MANIFEST.MF 2012-04-18 09:09:41 UTC (rev 40273)
+++ trunk/maven/plugins/org.jboss.tools.maven.jpa/META-INF/MANIFEST.MF 2012-04-18 10:10:43 UTC (rev 40274)
@@ -8,7 +8,6 @@
org.eclipse.core.runtime,
org.jboss.tools.maven.core,
org.jboss.tools.maven.ui,
- org.jboss.tools.common.model,
org.eclipse.jst.j2ee.core,
org.eclipse.jst.j2ee,
org.eclipse.wst.common.emfworkbench.integration,
Modified: trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/JptUtils.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/JptUtils.java 2012-04-18 09:09:41 UTC (rev 40273)
+++ trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/JptUtils.java 2012-04-18 10:10:43 UTC (rev 40274)
@@ -10,6 +10,7 @@
************************************************************************************/
package org.jboss.tools.maven.jpa.configurators;
+import java.lang.reflect.Method;
import java.util.List;
import org.eclipse.core.resources.IFile;
@@ -36,7 +37,7 @@
* @return the IFile persitence.xml handle. Can be null.
*/
public static IFile getPersistenceXml(IProject project) {
- ResourceLocator resourceLocator = JptCommonCorePlugin.getResourceLocator(project);
+ ResourceLocator resourceLocator = getResourceLocator(project);
if (resourceLocator == null) {
return null;
}
@@ -75,5 +76,30 @@
}
return JpaFacet.FACET.getVersion(version);
}
+
+ public static ResourceLocator getResourceLocator(IProject project) {
+ Method getResourceLocator;
+ try {
+ getResourceLocator = JptCommonCorePlugin.class.getMethod("getResourceLocator", IProject.class);
+ if(getResourceLocator!=null) {
+ return (ResourceLocator)getResourceLocator.invoke(null, project);
+ }
+ } catch (NoSuchMethodException e) {
+ try {
+ Class<?> resourceLocatorManagerClass = Class.forName("org.eclipse.jpt.common.core.internal.resource.ResourceLocatorManager");
+ Object instance = resourceLocatorManagerClass.getMethod("getInstance", null).invoke(null, null);
+ getResourceLocator = resourceLocatorManagerClass.getMethod("getResourceLocator", IProject.class);
+ if(getResourceLocator!=null) {
+ return (ResourceLocator)getResourceLocator.invoke(instance, project);
+ } ;
+ } catch (Exception e1) {
+ e1.printStackTrace();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
}
Modified: trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/MavenResourceLocator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/MavenResourceLocator.java 2012-04-18 09:09:41 UTC (rev 40273)
+++ trunk/maven/plugins/org.jboss.tools.maven.jpa/src/org/jboss/tools/maven/jpa/configurators/MavenResourceLocator.java 2012-04-18 10:10:43 UTC (rev 40274)
@@ -11,6 +11,7 @@
package org.jboss.tools.maven.jpa.configurators;
import java.io.File;
+import java.lang.reflect.Method;
import java.util.List;
import org.apache.maven.model.Resource;
@@ -56,7 +57,7 @@
* Accepts all resources not under the build output and test build output
* folders
*/
- public boolean acceptResourceLocation(IProject project, IContainer container) {
+ public boolean resourceLocationIsValid(IProject project, IContainer container) {
IMavenProjectFacade mavenProjectFacade = getMavenProjectFacade(project);
boolean accept = true;
if (mavenProjectFacade != null
@@ -72,7 +73,7 @@
} else {
// Maven project not loaded yet, fallback to default behaviour.
//System.err.println(project + " not loaded");
- accept = getDelegate(project).acceptResourceLocation(project, container);
+ accept = isResourceLocationValid(getDelegate(project), project, container);
}
// Sometimes src/main/resources/META-INF is not even sent immediately to
// this method, resulting in persistence.xml not being added to the jpaFiles
@@ -208,4 +209,34 @@
IPath runtimePath = getDelegate(project).getRuntimePath(project, resourcePath);
return runtimePath;
}
+
+ /**
+ * @deprecated use {@link #acceptResourceLocation(IProject, IContainer)} instead
+ */
+ @Deprecated
+ public boolean acceptResourceLocation(IProject project, IContainer container) {
+ return resourceLocationIsValid(project, container);
+ }
+
+
+ //Ugly workaround to deal with Dali API changes in Juno and keep backward compatibility with Indigo
+ private static boolean isResourceLocationValid(ResourceLocator resourceLocator, IProject project, IContainer container) {
+ Method isResourceLocationIsValid = null;
+ for (Method m : resourceLocator.getClass().getMethods()) {
+ if ("isResourceLocationIsValid".equals(m.getName()) || "acceptResourceLocation".equals(m.getName())) {
+ isResourceLocationIsValid = m;
+ break;
+ }
+ }
+ boolean result = false;
+ if (isResourceLocationIsValid != null) {
+ try {
+ result = (Boolean)isResourceLocationIsValid.invoke(resourceLocator, project, container);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ return result;
+ }
+
}
\ No newline at end of file
13 years, 11 months
JBoss Tools SVN: r40273 - in trunk/ws/tests/org.jboss.tools.ws.ui.bot.test: properties and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-18 05:09:41 -0400 (Wed, 18 Apr 2012)
New Revision: 40273
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/properties/swtbot.properties
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/requirements.properties
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/Activator.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java
Log:
small modification
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/properties/swtbot.properties
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/properties/swtbot.properties 2012-04-18 08:56:04 UTC (rev 40272)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/properties/swtbot.properties 2012-04-18 09:09:41 UTC (rev 40273)
@@ -1 +1,3 @@
-SERVER=AS,6.0,default,../../../requirements/target/jboss-6.0.0.Final
+#SERVER=AS,6.0,default,../../../requirements/target/jboss-6.0.0.Final
+SERVER=AS,7.0,default,../../../requirements/target/jboss-as-web-7.0.2.Final
+#SERVER=AS,6.0,default,/home/jjankovi/jboss-6.0.0.Final-WS
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/requirements.properties
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/requirements.properties 2012-04-18 08:56:04 UTC (rev 40272)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/requirements.properties 2012-04-18 09:09:41 UTC (rev 40273)
@@ -1,2 +1,2 @@
-requirements=jbossas-6.0.0.Final
+requirements=jbossas-7.0.2.Final
#best runtime would AS 7 + WS / EAP 5.1 <=
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/Activator.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/Activator.java 2012-04-18 08:56:04 UTC (rev 40272)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/Activator.java 2012-04-18 09:09:41 UTC (rev 40273)
@@ -1,66 +1,43 @@
- /*******************************************************************************
- * Copyright (c) 2007-2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+/*******************************************************************************
+ * 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;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
+public class Activator implements BundleActivator {
+ private static BundleContext context;
+
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.tools.ws.ui.bot.test";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
+
+ static BundleContext getContext() {
+ return context;
}
/*
* (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
- * )
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
}
/*
* (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
- * )
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
}
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
}
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-04-18 08:56:04 UTC (rev 40272)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java 2012-04-18 09:09:41 UTC (rev 40273)
@@ -59,7 +59,7 @@
if (!projectExists(getWsProjectName())) {
//importing project without targeted runtime set
- importWSTestProject("/resources/projects/" +
+ importWSTestProject("resources/projects/" +
getWsProjectName(), getWsProjectName());
//set target runtime - TO DO
projectHelper.addDefaultRuntimeIntoProject(getWsProjectName());
13 years, 11 months
JBoss Tools SVN: r40272 - in trunk/esb/plugins: org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-04-18 04:56:04 -0400 (Wed, 18 Apr 2012)
New Revision: 40272
Added:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_411.java
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeManager.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
Log:
JBDS-2094 - JBDS Beta3 supports JBoss ESB runtime versions up to version 4.10, but 4.11 shipped last week
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml 2012-04-18 08:09:48 UTC (rev 40271)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml 2012-04-18 08:56:04 UTC (rev 40272)
@@ -157,6 +157,24 @@
</and>
</constraint>
</project-facet-version>
+ <project-facet-version
+ facet="jst.jboss.esb"
+ version="4.11">
+ <group-member
+ id="modules">
+ </group-member>
+ <constraint>
+ <and>
+ <conflicts
+ group="modules">
+ </conflicts>
+ <requires
+ facet="jst.java"
+ version="[5.0">
+ </requires>
+ </and>
+ </constraint>
+ </project-facet-version>
<action
facet="jst.jboss.esb"
id="jst.jboss.esb.install"
@@ -186,7 +204,7 @@
<supported>
<facet
id="jst.jboss.esb"
- version="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10">
+ version="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10,4.11">
</facet>
<runtime-component
id="org.jboss.ide.eclipse.as.runtime.component"
@@ -196,7 +214,7 @@
<supported>
<facet
id="jst.jboss.esb"
- version="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10">
+ version="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10,4.11">
</facet>
<runtime-component
id="org.jboss.ide.eclipse.eap.runtime.component"
@@ -239,7 +257,7 @@
projects="true">
<moduleType
types="jst.jboss.esb"
- versions="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10">
+ versions="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10,4.11">
</moduleType>
</moduleFactory>
</extension>
@@ -355,6 +373,23 @@
id="org.jboss.ide.eclipse.as.runtime.60">
</supportedRuntimeType>
</Resolver>
+ <Resolver
+ class="org.jboss.tools.esb.core.runtime.ESBRuntimeResolver_411"
+ esbVersion="4.11"
+ name="ESB runtime resolver">
+ <supportedRuntimeType
+ id="org.jboss.ide.eclipse.as.runtime.eap.51">
+ </supportedRuntimeType>
+ <supportedRuntimeType
+ id="org.jboss.ide.eclipse.as.runtime.50">
+ </supportedRuntimeType>
+ <supportedRuntimeType
+ id="org.jboss.ide.eclipse.as.runtime.51">
+ </supportedRuntimeType>
+ <supportedRuntimeType
+ id="org.jboss.ide.eclipse.as.runtime.60">
+ </supportedRuntimeType>
+ </Resolver>
</extension>
</plugin>
Added: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_411.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_411.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_411.java 2012-04-18 08:56:04 UTC (rev 40272)
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 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.esb.core.runtime;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
+
+public class ESBRuntimeResolver_411 extends AbstractESBRuntimeResolver implements
+ IESBRuntimeResolver {
+
+ private final static String JUDDI_CLIENT_JAR_313 = "juddi-client-3.1.3.jar";
+
+ public boolean isValidESBRuntime(String location, String version, String configuration){
+ List<String> jarNames = new ArrayList<String>();
+
+ for(File file : getAllRuntimeJars(location, configuration)){
+ jarNames.add(file.getName());
+ }
+
+ return jarNames.contains(ROSETTA_JAR) &&
+ (jarNames.contains(JUDDI_CLIENT_JAR_313));
+ }
+
+
+ public List<IPath> getJarDirectories(String runtimeLocation, String configuration) {
+ List<IPath> directories = super.getJarDirectories(runtimeLocation, configuration);
+ IPath rtHome = new Path(runtimeLocation);
+ IPath soapDeployPath = rtHome.append(SOAP_AS_LOCATION)
+ .append(IJBossRuntimeResourceConstants.SERVER).append(configuration)
+ .append(IJBossRuntimeResourceConstants.DEPLOYERS)
+ .append("esb.deployer").append("lib");
+
+ IPath deployPath = rtHome
+ .append(IJBossRuntimeResourceConstants.SERVER).append(configuration)
+ .append(IJBossRuntimeResourceConstants.DEPLOYERS)
+ .append("esb.deployer").append("lib");
+ directories.add(soapDeployPath);
+ directories.add(deployPath);
+
+ return directories;
+ }
+
+
+}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeManager.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeManager.java 2012-04-18 08:09:48 UTC (rev 40271)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeManager.java 2012-04-18 08:56:04 UTC (rev 40272)
@@ -497,7 +497,7 @@
else if(version.equals("4.3.0")) {
version = "4.4";
}
- else if(version.length() > 3){
+ else if(version.length() > 3 && ! (version.charAt(version.length()-1) >= '0' && version.charAt(version.length()-1) < '9') ){
version = version.substring(0,3);
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2012-04-18 08:09:48 UTC (rev 40271)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2012-04-18 08:56:04 UTC (rev 40272)
@@ -15,6 +15,7 @@
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -631,9 +632,50 @@
for(IProjectFacetVersion version: esbfacet.getVersions()){
versions.add(version.getVersionString());
}
+ //versions.add("");
+ Comparator<String> comparator = new Comparator<String>() {
+
+ public int compare(String o1, String o2) {
+ if (o1 == null || o2 == null) {
+ return 0;
+ }
+ String[] split1 = o1.split("\\.");
+ String[] split2 = o2.split("\\.");
+ if (split1.length != 2 || split2.length != 2) {
+ return o1.compareTo(o2);
+ }
+ int o11;
+ int o12;
+ int o21;
+ int o22;
+ try {
+ o11 = new Integer(split1[0]);
+ o12 = new Integer(split1[1]);
+ o21 = new Integer(split2[0]);
+ o22 = new Integer(split2[1]);
+ } catch (NumberFormatException e) {
+ return o1.compareTo(o2);
+ }
+
+ if (o11 > o21) {
+ return 1;
+ }
+ if (o11 < o21) {
+ return -1;
+ }
+ if (o12 > o22) {
+ return 1;
+ }
+ if (o12 < o22) {
+ return -1;
+ }
+ return 0;
+ }
+
+ };
+ Collections.sort(versions, comparator);
versions.add("");
- Collections.sort(versions);
- Collections.reverse(versions);
+ //Collections.reverse(versions);
return versions;
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2012-04-18 08:09:48 UTC (rev 40271)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2012-04-18 08:56:04 UTC (rev 40272)
@@ -639,6 +639,9 @@
if(versionNumber >= 4.9 || versionNumber == 4.10){
cmVersions.add("1.3.0"); //$NON-NLS-1$
}
+ if(versionNumber == 4.11){
+ cmVersions.add("1.3.1"); //$NON-NLS-1$
+ }
int index = cmVersions.getItemCount() - 1;
String convigVersionName = cmVersions.getItem(index);
cmVersions.select(index);
13 years, 11 months