JBoss Tools SVN: r36328 - in workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse: META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-11-14 13:21:44 -0500 (Mon, 14 Nov 2011)
New Revision: 36328
Added:
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse/src/org/jboss/tools/browsersim/eclipse/BrowserSimFactory.java
Modified:
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse/META-INF/MANIFEST.MF
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse/plugin.xml
Log:
https://issues.jboss.org/browse/JBIDE-9539 : Browsersim app for testing mobile/desktop web apps
- added BrowserSim as exsternal Web Browser to Eclipse
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse/META-INF/MANIFEST.MF
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse/META-INF/MANIFEST.MF 2011-11-14 18:18:51 UTC (rev 36327)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse/META-INF/MANIFEST.MF 2011-11-14 18:21:44 UTC (rev 36328)
@@ -10,6 +10,7 @@
org.eclipse.core.resources,
org.eclipse.jface.text,
org.eclipse.ui.editors,
- org.eclipse.ui.ide
+ org.eclipse.ui.ide,
+ org.eclipse.ui.browser
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse/plugin.xml
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse/plugin.xml 2011-11-14 18:18:51 UTC (rev 36327)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse/plugin.xml 2011-11-14 18:21:44 UTC (rev 36328)
@@ -54,4 +54,16 @@
name="BrowserSim">
</editor>
</extension>
+ <extension point="org.eclipse.ui.browser.browsers">
+ <browser
+ executable=""
+ factoryclass="org.jboss.tools.browsersim.eclipse.BrowserSimFactory"
+ id="org.jboss.tools.browsersim.eclipse"
+ name="BrowserSim"
+ os="Win32,linux,MacOSX">
+ <location>
+ .
+ </location>
+ </browser>
+ </extension>
</plugin>
Added: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse/src/org/jboss/tools/browsersim/eclipse/BrowserSimFactory.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse/src/org/jboss/tools/browsersim/eclipse/BrowserSimFactory.java (rev 0)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse/src/org/jboss/tools/browsersim/eclipse/BrowserSimFactory.java 2011-11-14 18:21:44 UTC (rev 36328)
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.browsersim.eclipse;
+
+import java.net.URL;
+
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.browser.BrowserFactory;
+import org.eclipse.ui.browser.IWebBrowser;
+import org.jboss.tools.browsersim.eclipse.util.BrowserSimLauncher;
+
+/**
+ * Contribution to the {@code org.eclipse.ui.editors} extension point
+ *
+ * @author "Yahor Radtsevich (yradtsevich)"
+ */
+public class BrowserSimFactory extends BrowserFactory {
+ @Override
+ public IWebBrowser createBrowser(final String id, String location,
+ String parameters) {
+ return new IWebBrowser() {
+ @Override
+ public void openURL(URL url) throws PartInitException {
+ BrowserSimLauncher.launchBrowserSim(url.toString());
+ }
+ @Override
+ public String getId() {
+ return id;
+ }
+ @Override
+ public boolean close() {
+ return false;
+ }
+ };
+ }
+
+}
13 years, 2 months
JBoss Tools SVN: r36327 - in trunk/jst: tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-11-14 13:18:51 -0500 (Mon, 14 Nov 2011)
New Revision: 36327
Added:
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/indexWithSecondClassInRule.html
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/secondClassName.css
Modified:
trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/CSSClassHyperlink.java
trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/CSSStylesheetOpenOnTest.java
Log:
JBIDE-10104 VPE does not open css file if the style is not on the first place
Issue is fixed. JUnit Test case is added to org.jboss.tools.jst.text.ext.test.CSSStylesheetOpenOnTest Test
Modified: trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/CSSClassHyperlink.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/CSSClassHyperlink.java 2011-11-14 16:32:13 UTC (rev 36326)
+++ trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/CSSClassHyperlink.java 2011-11-14 18:18:51 UTC (rev 36327)
@@ -11,11 +11,7 @@
package org.jboss.tools.jst.text.ext.hyperlink;
import java.text.MessageFormat;
-import java.util.Arrays;
-import java.util.Comparator;
import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
@@ -59,7 +55,6 @@
public static final String[] STYLE_TAGS = new String[] { "style", "link" }; //$NON-NLS-1$//$NON-NLS-2$
public static final String LINK_TAG = "link"; //$NON-NLS-1$
public static final String HREF_ATTRIBUTE = "href"; //$NON-NLS-1$
- public static final String COMPARE_CLASS_REGEX_PREFIX = "([A-Za-z_][A-Za-z_0-9\\-]*)*[\\.]?"; //$NON-NLS-1$
public static final String CONTEXT_PATH_EXPRESSION = "^\\s*(\\#|\\$)\\{facesContext.externalContext.requestContextPath\\}"; //$NON-NLS-1$
@Override
@@ -168,24 +163,15 @@
String selectorText = ((CSSStyleRule) cssRule).getSelectorText();
if (selectorText != null) {
- String styles[] = selectorText.trim().split(","); //$NON-NLS-1$
+ String styleNameToSearch = '.' + styleName.toLowerCase();
+ String styles[] = selectorText.trim().toLowerCase().split(","); //$NON-NLS-1$
for (String styleText : styles) {
String[] styleWords = styleText.trim().split(" "); //$NON-NLS-1$
if (styleWords != null) {
- int searchIndex = Arrays.binarySearch(styleWords, styleName,
- new Comparator<String>() {
-
- public int compare(String o1, String o2) {
- Matcher matcher = Pattern.compile(
- COMPARE_CLASS_REGEX_PREFIX + o2)
- .matcher(o1);
-
- return matcher.matches() ? 0 : 1;
- }
-
- });
- if (searchIndex >= 0)
- return cssRule;
+ for (String word : styleWords) {
+ if (word.trim().toLowerCase().endsWith(styleNameToSearch))
+ return cssRule;
+ }
}
}
}
@@ -243,7 +229,6 @@
}
/**
- * TODO research method
*
* @param offset
* @return
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/indexWithSecondClassInRule.html
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/indexWithSecondClassInRule.html (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/indexWithSecondClassInRule.html 2011-11-14 18:18:51 UTC (rev 36327)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html">
+<head>
+ <link rel="stylesheet" href="secondClassName.css" />
+</head>
+<body>
+ <div class="event">aaa</div>
+ <div class="evt_sub">bbb</div>
+ <div class="style2">ccc</div>
+</body>
+</html>
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/indexWithSecondClassInRule.html
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/secondClassName.css
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/secondClassName.css (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/secondClassName.css 2011-11-14 18:18:51 UTC (rev 36327)
@@ -0,0 +1,3 @@
+.event .evt_sub .style2 {float:left; margin-right:10px}
+.event .evt_sub .style2 strong{display: inline-block; width: 51px;}
+.event .evt_sub .style2 span{border-right:1px solid #ccc;padding-right:7px;margin-right:7px}
\ No newline at end of file
Property changes on: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/projects/OpenOnTest/WebContent/secondClassName.css
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/CSSStylesheetOpenOnTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/CSSStylesheetOpenOnTest.java 2011-11-14 16:32:13 UTC (rev 36326)
+++ trunk/jst/tests/org.jboss.tools.jst.text.ext.test/src/org/jboss/tools/jst/text/ext/test/CSSStylesheetOpenOnTest.java 2011-11-14 18:18:51 UTC (rev 36327)
@@ -36,7 +36,9 @@
private static final String PROJECT_NAME = "OpenOnTest";
private static final String PAGE_NAME = PROJECT_NAME+"/WebContent/index.html";
private static final String MEDIA_PAGE_NAME = PROJECT_NAME+"/WebContent/indexWithMediaRules.html";
+ private static final String SECOND_IN_A_ROW_PAGE_NAME = PROJECT_NAME+"/WebContent/indexWithSecondClassInRule.html";
+
public IProject project = null;
protected void setUp() {
@@ -212,6 +214,77 @@
}
}
+ /*
+ * The test case for JBIDE-10104
+ */
+ public void testCSSClassOpenOnWithASecondRuleNameInARow() throws PartInitException, BadLocationException {
+ HashSet<IEditorPart> openedEditors = new HashSet<IEditorPart>();
+ final String tagName = "<div";
+ final String[] valuesToFind = {
+ "event", "evt_sub", "style2"};
+ final String[] editorNames = {
+ "secondClassName.css", "secondClassName.css", "secondClassName.css"};
+ final int[] editorSelectionOffsets = {
+ 0, 0, 0};
+ final int[] editorSelectionLengths = {
+ 55, 55, 55};
+
+ IEditorPart editor = WorkbenchUtils.openEditor(SECOND_IN_A_ROW_PAGE_NAME);
+ if (editor != null) openedEditors.add(editor);
+ try {
+ assertTrue(editor instanceof JSPMultiPageEditor);
+ JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
+ ISourceViewer viewer = jspMultyPageEditor.getSourceEditor().getTextViewer();
+
+ IDocument document = viewer.getDocument();
+ for (int i = 0; i < valuesToFind.length; i++) {
+ IRegion reg = new FindReplaceDocumentAdapter(document).find(0,
+ tagName, true, true, false, false);
+ assertNotNull("Tag:"+tagName+" not found",reg);
+
+ reg = new FindReplaceDocumentAdapter(document).find(reg.getOffset(),
+ valuesToFind[i], true, true, false, false);
+ assertNotNull("Value to find '"+valuesToFind[i]+"' not found",reg);
+
+ IHyperlink[] links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, true); // new Region(reg.getOffset() + reg.getLength(), 0)
+
+ assertTrue("Hyperlinks for value '"+valuesToFind[i]+"' are not found",(links != null && links.length > 0));
+
+ boolean found = false;
+ for(IHyperlink link : links){
+ assertNotNull(link.toString());
+
+ link.open();
+
+ IEditorPart resultEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (resultEditor != null) openedEditors.add(resultEditor);
+ if(editorNames[i].equals(resultEditor.getTitle())){
+ StructuredTextEditor stEditor = null;
+ if (resultEditor instanceof StructuredTextEditor) {
+ stEditor = (StructuredTextEditor)resultEditor;
+ } else if (resultEditor instanceof JSPMultiPageEditor) {
+ stEditor = ((JSPMultiPageEditor)resultEditor).getSourceEditor();
+ }
+ assertNotNull("Unexpected Editor is openned: " + resultEditor.getTitle() + " [" + resultEditor.getClass().getName() + "]", stEditor);
+ ISelection selection = stEditor.getSelectionProvider().getSelection();
+ assertFalse("Required CSS Rule is not selected", selection.isEmpty());
+ if (selection instanceof TextSelection) {
+ TextSelection textSelection = (TextSelection)selection;
+ assertTrue("Required CSS Rule is not selected",
+ (textSelection.getOffset() == editorSelectionOffsets[i] && textSelection.getLength() == editorSelectionLengths[i]));
+ found = true;
+ break;
+ }
+ }
+ }
+ assertTrue("OpenOn have not opened "+editorNames[i]+" editor",found);
+ }
+ } finally {
+ closeEditors(openedEditors);
+ }
+ }
+
+
protected void closeEditors (HashSet<IEditorPart> editors) {
if (editors == null || editors.isEmpty())
return;
13 years, 2 months
JBoss Tools SVN: r36326 - in workspace/fred/repositories/snapshot/org/jboss: spring and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2011-11-14 11:32:13 -0500 (Mon, 14 Nov 2011)
New Revision: 36326
Added:
workspace/fred/repositories/snapshot/org/jboss/spring/
workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/
workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/
workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/
workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/_maven.repositories
workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/maven-metadata-local.xml
workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/spring-mvc-webapp-1.0.0-SNAPSHOT-sources.jar
workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/spring-mvc-webapp-1.0.0-SNAPSHOT.jar
workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/spring-mvc-webapp-1.0.0-SNAPSHOT.pom
workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/maven-metadata-local.xml
Log:
Add new Spring MVC archetype
Added: workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/_maven.repositories
===================================================================
--- workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/_maven.repositories (rev 0)
+++ workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/_maven.repositories 2011-11-14 16:32:13 UTC (rev 36326)
@@ -0,0 +1,5 @@
+#NOTE: This is an internal implementation file, its format can be changed without prior notice.
+#Mon Nov 14 17:27:13 CET 2011
+spring-mvc-webapp-1.0.0-SNAPSHOT.jar>=
+spring-mvc-webapp-1.0.0-SNAPSHOT-sources.jar>=
+spring-mvc-webapp-1.0.0-SNAPSHOT.pom>=
Added: workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/maven-metadata-local.xml
===================================================================
--- workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/maven-metadata-local.xml (rev 0)
+++ workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/maven-metadata-local.xml 2011-11-14 16:32:13 UTC (rev 36326)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+ <groupId>org.jboss.spring.archetypes</groupId>
+ <artifactId>spring-mvc-webapp</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <localCopy>true</localCopy>
+ </snapshot>
+ <lastUpdated>20111114162713</lastUpdated>
+ <snapshotVersions>
+ <snapshotVersion>
+ <classifier>sources</classifier>
+ <extension>jar</extension>
+ <value>1.0.0-SNAPSHOT</value>
+ <updated>20111114162713</updated>
+ </snapshotVersion>
+ <snapshotVersion>
+ <extension>jar</extension>
+ <value>1.0.0-SNAPSHOT</value>
+ <updated>20111114162713</updated>
+ </snapshotVersion>
+ <snapshotVersion>
+ <extension>pom</extension>
+ <value>1.0.0-SNAPSHOT</value>
+ <updated>20111114162713</updated>
+ </snapshotVersion>
+ </snapshotVersions>
+ </versioning>
+</metadata>
Added: workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/spring-mvc-webapp-1.0.0-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Property changes on: workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/spring-mvc-webapp-1.0.0-SNAPSHOT-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/spring-mvc-webapp-1.0.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/spring-mvc-webapp-1.0.0-SNAPSHOT.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/spring-mvc-webapp-1.0.0-SNAPSHOT.pom
===================================================================
--- workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/spring-mvc-webapp-1.0.0-SNAPSHOT.pom (rev 0)
+++ workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/1.0.0-SNAPSHOT/spring-mvc-webapp-1.0.0-SNAPSHOT.pom 2011-11-14 16:32:13 UTC (rev 36326)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.jboss.spring.archetypes</groupId>
+ <artifactId>spring-mvc-webapp</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>maven-archetype</packaging>
+
+ <name>JBoss AS7 - Spring MVC Application</name>
+ <description>An archetype that generates a starter Spring MVC application with Java EE persistence settings (server bootstrapped JPA, JTA transaction management) for JBoss AS7</description>
+
+ <url>http://jboss.org/jbossas</url>
+
+ <scm>
+ <connection>scm:git:git@github.com:jboss-eap/wfk-archetypes.git</connection>
+ <developerConnection>scm:git:git@github.com:jboss-eap/wfk-archetypes.git</developerConnection>
+ <url>scm:git:git@github.com:jboss-eap/wfk-archetypes.git</url>
+ </scm>
+
+ <developers>
+ <developer>
+ <name>Marius Bogoevici</name>
+ <email>mariusb(a)redhat.com</email>
+ <organization>Red Hat, Inc.</organization>
+ <organizationUrl>http://redhat.com/jboss</organizationUrl>
+ </developer>
+ <developer>
+ <name>Karel Piwko</name>
+ <email>kpiwko(a)redhat.com</email>
+ <organization>Red Hat, Inc.</organization>
+ <organizationUrl>http://redhat.com/jboss</organizationUrl>
+ </developer>
+ </developers>
+
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-packaging</artifactId>
+ <version>2.1</version>
+ </extension>
+ </extensions>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/maven-metadata-local.xml
===================================================================
--- workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/maven-metadata-local.xml (rev 0)
+++ workspace/fred/repositories/snapshot/org/jboss/spring/archetypes/spring-mvc-webapp/maven-metadata-local.xml 2011-11-14 16:32:13 UTC (rev 36326)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.jboss.spring.archetypes</groupId>
+ <artifactId>spring-mvc-webapp</artifactId>
+ <versioning>
+ <versions>
+ <version>1.0.0-SNAPSHOT</version>
+ </versions>
+ <lastUpdated>20111114162713</lastUpdated>
+ </versioning>
+</metadata>
13 years, 2 months
JBoss Tools SVN: r36325 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test: resources/cdi and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2011-11-14 11:25:13 -0500 (Mon, 14 Nov 2011)
New Revision: 36325
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/EventBean.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/ObserverBean.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MainBean.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean2.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean3.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean4.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean5.java.cdi
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/MyBean3.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/MyBean4.java.cdi
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/CDIOpenOnTest.java
Log:
JBDS50_0010 Classes indication for Open Injected Class works - test implemented
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/EventBean.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/EventBean.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/EventBean.java.cdi 2011-11-14 16:25:13 UTC (rev 36325)
@@ -0,0 +1,16 @@
+package cdi;
+
+import javax.enterprise.event.Event;
+import javax.inject.Inject;
+
+public class EventBean {
+
+ public EventBean() {
+
+ }
+
+ @Inject
+ @Q1
+ Event<ObserverBean> event;
+
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/MyBean3.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/MyBean3.java.cdi 2011-11-14 15:29:00 UTC (rev 36324)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/MyBean3.java.cdi 2011-11-14 16:25:13 UTC (rev 36325)
@@ -1,16 +0,0 @@
-package cdi;
-
-import javax.enterprise.event.Event;
-import javax.inject.Inject;
-
-public class MyBean3 {
-
- public MyBean3() {
-
- }
-
- @Inject
- @Q1
- Event<MyBean4> event;
-
-}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/MyBean4.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/MyBean4.java.cdi 2011-11-14 15:29:00 UTC (rev 36324)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/MyBean4.java.cdi 2011-11-14 16:25:13 UTC (rev 36325)
@@ -1,15 +0,0 @@
-package cdi;
-
-import javax.enterprise.event.Observes;
-
-public class MyBean4 {
-
- public MyBean4() {
-
- }
-
- public void observerMethod(@Observes MyBean4 bean) {
-
- }
-
-}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/ObserverBean.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/ObserverBean.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/ObserverBean.java.cdi 2011-11-14 16:25:13 UTC (rev 36325)
@@ -0,0 +1,15 @@
+package cdi;
+
+import javax.enterprise.event.Observes;
+
+public class ObserverBean {
+
+ public ObserverBean() {
+
+ }
+
+ public void observerMethod(@Observes ObserverBean bean) {
+
+ }
+
+}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MainBean.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MainBean.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MainBean.java.cdi 2011-11-14 16:25:13 UTC (rev 36325)
@@ -0,0 +1,29 @@
+package cdi;
+
+import javax.enterprise.inject.Any;
+import javax.inject.Inject;
+
+public class MainBean {
+
+ @Inject private MyBean1 myBean1;
+
+ @Inject private MyBean2 myBean2;
+
+ @Inject @Q1 private MyBean1 myBean3;
+
+ @Inject @Q1 private MyBean2 myBean4;
+
+ @Inject @Q2 private MyBean1 myBean5;
+
+ @Inject @Q2 private MyBean2 myBean6;
+
+ @Inject @Any private MyBean1 myBean7;
+
+ @Inject @Any private MyBean2 myBean8;
+
+ @Inject @Q1 @Q2 private MyBean1 myBean9;
+
+ @Inject @Q1 @Q2 private MyBean2 myBean10;
+
+ @Inject @Q1 @Q2 private MyBean4 myBean11;
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean2.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean2.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean2.java.cdi 2011-11-14 16:25:13 UTC (rev 36325)
@@ -0,0 +1,9 @@
+package cdi;
+
+public class MyBean2 extends MyBean1{
+
+ public MyBean2() {
+
+ }
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean3.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean3.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean3.java.cdi 2011-11-14 16:25:13 UTC (rev 36325)
@@ -0,0 +1,67 @@
+package cdi;
+
+import javax.enterprise.inject.Produces;
+
+public class MyBean3 {
+
+ public MyBean3() {
+
+ }
+
+ @Produces
+ public MyBean1 getMyBean1() {
+ return new MyBean1();
+ }
+
+ @Produces
+ public MyBean2 getMyBean2() {
+ return new MyBean2();
+ }
+
+ @Produces
+ public MyBean1 getMyBean1WithIMB2() {
+ return new MyBean2();
+ }
+
+
+
+ @Produces
+ @Q1
+ public MyBean1 getMyBean1WithQ1() {
+ return new MyBean1();
+ }
+
+ @Produces
+ @Q2
+ public MyBean1 getMyBean1WithQ2() {
+ return new MyBean1();
+ }
+
+
+
+ @Produces
+ @Q1
+ public MyBean2 getMyBean2WithQ1() {
+ return new MyBean2();
+ }
+
+ @Produces
+ @Q2
+ public MyBean2 getMyBean2WithQ2() {
+ return new MyBean2();
+ }
+
+
+ @Produces
+ @Q1
+ public MyBean1 getMyBean1WithIMB2Q1() {
+ return new MyBean2();
+ }
+
+ @Produces
+ @Q2
+ public MyBean1 getMyBean1WithIMB2Q2() {
+ return new MyBean2();
+ }
+
+}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean4.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean4.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean4.java.cdi 2011-11-14 16:25:13 UTC (rev 36325)
@@ -0,0 +1,10 @@
+package cdi;
+@Q1
+@Q2
+public class MyBean4 extends MyBean2{
+
+ public MyBean4() {
+
+ }
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean5.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean5.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/injectedPoints/MyBean5.java.cdi 2011-11-14 16:25:13 UTC (rev 36325)
@@ -0,0 +1,6 @@
+package cdi;
+
+@Q2
+public class MyBean5 extends MyBean2 {
+
+}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/CDIOpenOnTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/CDIOpenOnTest.java 2011-11-14 15:29:00 UTC (rev 36324)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/CDIOpenOnTest.java 2011-11-14 16:25:13 UTC (rev 36325)
@@ -12,11 +12,13 @@
import java.util.logging.Logger;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.jboss.tools.cdi.bot.test.CDIAllBotTests;
import org.jboss.tools.cdi.bot.test.quickfix.CDIQuickFixTest;
import org.jboss.tools.cdi.bot.test.uiutils.actions.CDIBase;
import org.jboss.tools.cdi.bot.test.uiutils.actions.CDIUtil;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+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;
@@ -29,12 +31,6 @@
*
* @author Jaroslav Jankovic
*
- *
- * TO DO
- *
- * - Classes indication for Open Injected Class works
- *
- *
*/
@Require(clearProjects = true, perspective = "Java EE", server = @Server(state = ServerState.NotRunning, version = "6.0", operator = ">="))
@@ -42,7 +38,7 @@
@SuiteClasses({ CDIAllBotTests.class })
public class CDIOpenOnTest extends CDIBase {
- private static final Logger LOGGER = Logger.getLogger(CDIQuickFixTest.class.getName());
+ private static final Logger LOGGER = Logger.getLogger(CDIQuickFixTest.class.getName());
@Override
public String getProjectName() {
@@ -52,22 +48,15 @@
@Test
public void testBeanInjectOpenOn() {
- createComponent(CDICOMPONENT.BEAN, "Animal", getPackageName(), null);
-
- createComponent(CDICOMPONENT.BEAN, "BrokenFarm", getPackageName(), null);
-
- CDIUtil.copyResourceToClass(getEd(), CDIOpenOnTest.class
- .getResourceAsStream("/resources/cdi/BrokenFarm.java.cdi"),
- false);
- LOGGER.info("Content of \"BrokenFarm.java.cdi\" copied to BrokenFarm");
- openOn("@Inject", "BrokenFarm.java", "@Inject");
- assertTrue("ERROR: redirected to " + getEd().getTitle(), getEd()
- .getTitle().equals("Animal.java"));
+ prepareInjectedPointsComponents();
+
+ testInjectedPoints();
+
}
-
+
/*
* https://issues.jboss.org/browse/JBIDE-7025
- */
+ */
@Test
public void testBeansXMLClassesOpenOn() {
@@ -113,8 +102,7 @@
/*
* https://issues.jboss.org/browse/JBIDE-6251
- */
-
+ */
@Test
public void testDisposerProducerOpenOn() {
@@ -132,27 +120,199 @@
}
@Test
- public void testObserverOpenOn() {
- createComponent(CDICOMPONENT.QUALIFIER, "Q1", getPackageName(), null);
- createComponent(CDICOMPONENT.BEAN, "MyBean3", getPackageName(), null);
+ public void testObserverOpenOn() {
+ createComponent(CDICOMPONENT.BEAN, "EventBean", getPackageName(), null);
CDIUtil.copyResourceToClass(getEd(), CDIOpenOnTest.class
- .getResourceAsStream("/resources/cdi/MyBean3.java.cdi"),
+ .getResourceAsStream("/resources/cdi/EventBean.java.cdi"),
false);
- createComponent(CDICOMPONENT.BEAN, "MyBean4", getPackageName(), null);
+ createComponent(CDICOMPONENT.BEAN, "ObserverBean", getPackageName(), null);
CDIUtil.copyResourceToClass(getEd(), CDIOpenOnTest.class
- .getResourceAsStream("/resources/cdi/MyBean4.java.cdi"),
+ .getResourceAsStream("/resources/cdi/ObserverBean.java.cdi"),
false);
- bot.editorByTitle("MyBean3.java").show();
+ bot.editorByTitle("EventBean.java").show();
setEd(bot.activeEditor().toTextEditor());
CDIUtil.replaceInEditor(getEd(), bot, " event", " event");
- openOn("observerMethod", "MyBean4.java", "Open CDI Event");
+ openOn("observerMethod", "ObserverBean.java", "Open CDI Event");
assertTrue(getEd().toTextEditor().getSelection().equals("event"));
- openOn("Event<MyBean4> event", "MyBean3.java", "Open CDI Observer Method");
+ openOn("Event<ObserverBean> event", "EventBean.java", "Open CDI Observer Method");
assertTrue(getEd().toTextEditor().getSelection().equals("observerMethod"));
}
+ private void prepareInjectedPointsComponents() {
+ createComponent(CDICOMPONENT.QUALIFIER, "Q1", getPackageName(), null);
+
+ createComponent(CDICOMPONENT.QUALIFIER, "Q2", getPackageName(), null);
+
+ createComponent(CDICOMPONENT.BEAN, "MyBean1", getPackageName(), null);
+
+ createComponent(CDICOMPONENT.BEAN, "MyBean2", getPackageName(), null);
+ CDIUtil.copyResourceToClass(getEd(), CDIOpenOnTest.class
+ .getResourceAsStream("/resources/injectedPoints/MyBean2.java.cdi"),
+ false);
+
+ createComponent(CDICOMPONENT.BEAN, "MyBean3", getPackageName(), null);
+ CDIUtil.copyResourceToClass(getEd(), CDIOpenOnTest.class
+ .getResourceAsStream("/resources/injectedPoints/MyBean3.java.cdi"),
+ false);
+
+ createComponent(CDICOMPONENT.BEAN, "MyBean4", getPackageName(), null);
+ CDIUtil.copyResourceToClass(getEd(), CDIOpenOnTest.class
+ .getResourceAsStream("/resources/injectedPoints/MyBean4.java.cdi"),
+ false);
+
+ createComponent(CDICOMPONENT.BEAN, "MyBean5", getPackageName(), null);
+ CDIUtil.copyResourceToClass(getEd(), CDIOpenOnTest.class
+ .getResourceAsStream("/resources/injectedPoints/MyBean5.java.cdi"),
+ false);
+
+ createComponent(CDICOMPONENT.BEAN, "MainBean", getPackageName(), null);
+ CDIUtil.copyResourceToClass(getEd(), CDIOpenOnTest.class
+ .getResourceAsStream("/resources/injectedPoints/MainBean.java.cdi"),
+ false);
+ }
+ private void testInjectedPoints() {
+ String injectOption = null;
+ for (int i = 1; i < 12; i++) {
+ injectOption = "Show All Assignable Beans...";
+ String injectPoint = "myBean" + i;
+ if (i > 8) injectOption = "Open @Inject Bean";
+ checkInjectedPoint(injectPoint, injectOption);
+ }
+
+ }
+
+ private void checkInjectedPoint(String injectedPoint, String option) {
+ openOn(injectedPoint, "MainBean.java", option);
+ bot.sleep(Timing.time1S());
+ if (option.equals("Open @Inject Bean")) {
+ LOGGER.info("Testing injected point: \"" + injectedPoint + "\" started");
+ assertTrue(getEd().getTitle().equals("MyBean4.java"));
+ assertTrue(getEd().toTextEditor().getSelection().equals("MyBean4"));
+ LOGGER.info("Testing injected point: \"" + injectedPoint + "\" ended");
+ } else {
+ SWTBotTable assignBeans = bot.table(0);
+ assertTrue(checkAllAssignBeans(injectedPoint, assignBeans));
+ }
+ }
+
+ private boolean checkAllAssignBeans(String injectedPoint,
+ SWTBotTable assignBeans) {
+ String packageProjectPath = getPackageName() + " - /" + getProjectName() + "/src";
+ String paramAssignBean = "XXX - " + packageProjectPath;
+ String prodInjPoint = "@Produces MyBean3.getMyBeanXXX()";
+ boolean allassignBeans = false;
+ String indexOfInjPoint = injectedPoint.split("myBean")[1];
+ int intIndexOfInjPoint = Integer.parseInt(indexOfInjPoint);
+ LOGGER.info("Testing injected point: \"" + injectedPoint + "\" started");
+ switch (intIndexOfInjPoint) {
+ case 1:
+ if (assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean1")) &&
+ assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean2")) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "1")))&&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "1WithIMB2")))&&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "2")))) {
+ allassignBeans = true;
+ }
+ break;
+ case 2:
+ if (assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean2")) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "2")))) {
+ allassignBeans = true;
+ }
+ break;
+ case 3:
+ if (assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean4")) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "1WithQ1")))&&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "1WithIMB2Q1")))&&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "2WithQ1")))) {
+ allassignBeans = true;
+ }
+ break;
+ case 4:
+ if (assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean4")) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "2WithQ1")))) {
+ allassignBeans = true;
+ }
+ break;
+ case 5:
+ if (assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean4")) &&
+ assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean5")) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "1WithQ2"))) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "2WithQ2"))) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "1WithIMB2Q2")))) {
+ allassignBeans = true;
+ }
+ break;
+ case 6:
+ if (assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean4")) &&
+ assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean5")) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "2WithQ2")))) {
+ allassignBeans = true;
+ }
+ break;
+ case 7:
+ if (assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean1")) &&
+ assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean2")) &&
+ assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean4")) &&
+ assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean5")) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "1"))) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "1WithIMB2"))) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "1WithIMB2Q1"))) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "1WithIMB2Q2"))) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "1WithQ1"))) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "1WithQ2"))) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "2"))) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "2WithQ1"))) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "2WithQ2")))) {
+ allassignBeans = true;
+ }
+ break;
+ case 8:
+ if (assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean2")) &&
+ assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean4")) &&
+ assignBeans.containsItem(paramAssignBean.replace("XXX", "MyBean5")) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "2"))) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "2WithQ1"))) &&
+ assignBeans.containsItem(paramAssignBean.replace(
+ "XXX", prodInjPoint.replace("XXX", "2WithQ2")))) {
+ allassignBeans = true;
+ }
+ break;
+ case 9:
+ case 10:
+ case 11:
+ throw new IllegalStateException("Injection Point \"" + injectedPoint + "\" should " +
+ "have been tested earlier!!");
+ }
+ LOGGER.info("Testing injected point: \"" + injectedPoint + "\" ended");
+ return allassignBeans;
+ }
+
}
\ No newline at end of file
13 years, 2 months