Author: dazarov
Date: 2011-06-27 16:12:34 -0400 (Mon, 27 Jun 2011)
New Revision: 32376
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/BasicLogger.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/Logger.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/LoggerConsumer.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9251
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/BasicLogger.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/BasicLogger.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/BasicLogger.java 2011-06-27
20:12:34 UTC (rev 32376)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.openon;
+
+
+class BasicLogger implements Logger
+{
+
+ private static String message;
+
+ public String getMessage()
+ {
+ return message;
+ }
+
+ public void log(String message)
+ {
+ BasicLogger.message = message;
+ }
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/BasicLogger.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/Logger.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/Logger.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/Logger.java 2011-06-27
20:12:34 UTC (rev 32376)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.openon;
+
+interface Logger
+{
+ public void log(String message);
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/Logger.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/LoggerConsumer.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/LoggerConsumer.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/LoggerConsumer.java 2011-06-27
20:12:34 UTC (rev 32376)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.jbt.openon;
+
+import javax.inject.Inject;
+
+class LoggerConsumer
+{
+ @Inject
+ // Event
+ private Logger logger;
+
+ public Logger getLogger()
+ {
+ return logger;
+ }
+
+ public void doSomething()
+ {
+ logger.log("Test message");
+ }
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/LoggerConsumer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2011-06-27
17:37:32 UTC (rev 32375)
+++
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2011-06-27
20:12:34 UTC (rev 32376)
@@ -48,6 +48,29 @@
CDIHyperlinkTestUtil.checkRegions(tckProject,
"JavaSource/org/jboss/jsr299/tck/tests/lookup/injectionpoint/LoggerConsumer.java",
regionList, new InjectedPointHyperlinkDetector());
}
+ public void testInjectedPointHyperlinkDetectorWithComment() throws Exception {
+ Set<IBean> beans =
cdiProject.getBeans("/tck/JavaSource/org/jboss/jsr299/tck/tests/jbt/openon/BasicLogger.java", true);
+ IBean bean=null;
+ for(IBean b : beans){
+ bean = b;
+ }
+ ArrayList<TestRegion> regionList = new ArrayList<TestRegion>();
+ regionList.add(new TestRegion(104, 6, new TestHyperlink[]{
+ new TestHyperlink(InjectedPointHyperlink.class,
CDIExtensionsMessages.CDI_INJECTED_POINT_HYPERLINK_OPEN_INJECT_BEAN+ "
BasicLogger", bean)
+ })); // Inject
+ regionList.add(new TestRegion(134, 13, new TestHyperlink[]{
+ new TestHyperlink(InjectedPointHyperlink.class,
CDIExtensionsMessages.CDI_INJECTED_POINT_HYPERLINK_OPEN_INJECT_BEAN+ "
BasicLogger", bean)
+ })); // Logger
+ regionList.add(new TestRegion(197, 6, new TestHyperlink[]{
+ new TestHyperlink(InjectedPointHyperlink.class,
CDIExtensionsMessages.CDI_INJECTED_POINT_HYPERLINK_OPEN_INJECT_BEAN+ "
BasicLogger", bean)
+ })); // logger
+ regionList.add(new TestRegion(251, 6, new TestHyperlink[]{
+ new TestHyperlink(InjectedPointHyperlink.class,
CDIExtensionsMessages.CDI_INJECTED_POINT_HYPERLINK_OPEN_INJECT_BEAN+ "
BasicLogger", bean)
+ })); // logger
+
+ CDIHyperlinkTestUtil.checkRegions(tckProject,
"JavaSource/org/jboss/jsr299/tck/tests/jbt/openon/LoggerConsumer.java",
regionList, new InjectedPointHyperlinkDetector());
+ }
+
public void testInjectedProducerMethodParametersHyperlinkDetector() throws Exception {
Set<IBean> beans =
cdiProject.getBeans("/tck/JavaSource/org/jboss/jsr299/tck/tests/jbt/openon/CustomProducerImpl.java", true);
IBean bean=null;