JBoss Tools SVN: r19577 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test: WebContent and 12 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-12-24 11:41:41 -0500 (Thu, 24 Dec 2009)
New Revision: 19577
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/JavaSource/messages_en.properties
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/JavaSource/messages_en_US.properties
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/JavaSource/messages_ru.properties
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/localization_versioning/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/localization_versioning/resource-handling-1.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/en/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/en_US/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/en_US/image.png
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/en_US/library3/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/en_US/library3/image.png
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/image.png
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/image.xcf
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library0/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library0/image.png
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_0/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_0/image.png
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_1/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_1/image.png
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_2/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_2/image.png/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_2/image.png/1_0.png
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_2/image.png/1_1.png
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/image.png
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/title.png
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html
Log:
https://jira.jboss.org/jira/browse/JBIDE-5015, test cases about localization and versioning has been added
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/JavaSource/messages_en.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/JavaSource/messages_en.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/JavaSource/messages_en.properties 2009-12-24 16:41:41 UTC (rev 19577)
@@ -0,0 +1 @@
+javax.faces.resource.localePrefix=en
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/JavaSource/messages_en_US.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/JavaSource/messages_en_US.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/JavaSource/messages_en_US.properties 2009-12-24 16:41:41 UTC (rev 19577)
@@ -0,0 +1 @@
+javax.faces.resource.localePrefix=en_US
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/JavaSource/messages_ru.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/JavaSource/messages_ru.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/JavaSource/messages_ru.properties 2009-12-24 16:41:41 UTC (rev 19577)
@@ -0,0 +1 @@
+javax.faces.resource.localePrefix=ru
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/faces-config.xml 2009-12-24 16:41:41 UTC (rev 19577)
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
+ version="2.0">
+ <application>
+ <locale-config>
+ <default-locale>en_US</default-locale>
+ <supported-locale>en_US</supported-locale>
+ </locale-config>
+ <message-bundle>messages_ru</message-bundle>
+ <message-bundle>messages_en</message-bundle>
+ <message-bundle>messages_en_US</message-bundle>
+ </application>
+</faces-config>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html 2009-12-24 16:23:28 UTC (rev 19576)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html 2009-12-24 16:41:41 UTC (rev 19577)
@@ -11,5 +11,6 @@
<a href="pages/components/outputStylesheet.jsf">h:outputStylesheet</a><br>
<a href="pages/JBIDE/2550/jbide2550.jsf">Resource Test Page</a><br>
<a href="pages/JBIDE/5352/jbide5352.jsf">Test Page with template name resolving for default tags</a><br>
+ <a href="pages/JBIDE/localization_versioning/resource-handling-1.jsf">Resource localization and versioning</a><br>
</body>
</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/localization_versioning/resource-handling-1.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/localization_versioning/resource-handling-1.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/localization_versioning/resource-handling-1.xhtml 2009-12-24 16:41:41 UTC (rev 19577)
@@ -0,0 +1,91 @@
+<!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">
+ <h:head>
+ <title>Resource Handling Case 1</title>
+ </h:head>
+ <h:body>
+ <h:outputText value="#{facesContext.viewRoot.locale}" />
+ <h:panelGrid border="1" columns="6">
+ <h:outputText value="Locale"/>
+ <h:outputText value="Library"/>
+ <h:outputText value="Version"/>
+ <h:outputText value="Resource"/>
+ <h:outputText value="Version"/>
+ <h:graphicImage value="#{resource['title.png']}" />
+
+ <h:outputText value="#{facesContext.viewRoot.locale}"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="image.png"/>
+ <h:outputText value="n/a"/>
+ <h:graphicImage value="#{resource['image.png']}" />
+
+ <h:outputText value="#{facesContext.viewRoot.locale}"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="image.png"/>
+ <h:outputText value="n/a"/>
+ <h:graphicImage value="#{resource['library3:image.png']}" />
+
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="image.png"/>
+ <h:outputText value="n/a"/>
+ <h:graphicImage value="#{resource['library1:image.png']}" />
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="image.png"/>
+ <h:outputText value="n/a"/>
+ <h:graphicImage value="#{resource['library1/1_0:image.png']}" />
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="image.png"/>
+ <h:outputText value="n/a"/>
+ <h:graphicImage value="#{resource['library1/1_1:image.png']}" />
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="image.png"/>
+ <h:outputText value="n/a"/>
+ <h:graphicImage value="#{resource['library1/1_2:duke.png/1_0.png']}" />
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="image.png"/>
+ <h:outputText value="n/a"/>
+ <h:graphicImage value="#{resource['library1/1_2:duke.png/1_1.png']}" />
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="image.png"/>
+ <h:outputText value="n/a"/>
+ <h:graphicImage name="image.png" />
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="image.png"/>
+ <h:outputText value="n/a"/>
+ <h:graphicImage name="image.png" library="library1" />
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="image.png"/>
+ <h:outputText value="n/a"/>
+ <h:graphicImage name="duke1.jpeg"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="n/a"/>
+ <h:outputText value="image.png"/>
+ <h:outputText value="n/a"/>
+ <h:graphicImage name="duke3.jpeg"/>
+ </h:panelGrid>
+
+ <img src="/jsf-basics/javax.faces.resource/image.png?loc=en_US" />
+
+ </h:body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/en_US/image.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/en_US/image.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/en_US/library3/image.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/en_US/library3/image.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/image.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/image.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/image.xcf
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/image.xcf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library0/image.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library0/image.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_0/image.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_0/image.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_1/image.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_1/image.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_2/image.png/1_0.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_2/image.png/1_0.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_2/image.png/1_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/1_2/image.png/1_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/image.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/library1/image.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/title.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/title.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years
JBoss Tools SVN: r19575 - in trunk/cdi/tests: org.jboss.tools.cdi.core.test/projects/tck and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-12-24 11:16:10 -0500 (Thu, 24 Dec 2009)
New Revision: 19575
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DefinitionTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test/CATest.java
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/normal/scope/NormalScopedBeanWithInjectionPoint.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/ambiguous/AmbiguousInjectionPoint.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/unresolved/UnsatisfiedInjectionPoint.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
Log:
https://jira.jboss.org/jira/browse/JBIDE-5383
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF 2009-12-24 16:04:23 UTC (rev 19574)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF 2009-12-24 16:16:10 UTC (rev 19575)
@@ -11,3 +11,5 @@
org.junit,
org.jboss.tools.cdi.core,
org.jboss.tools.common
+Export-Package: org.jboss.tools.cdi.core.test,
+ org.jboss.tools.cdi.core.test.tck
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath 2009-12-24 16:04:23 UTC (rev 19574)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath 2009-12-24 16:16:10 UTC (rev 19575)
@@ -8,7 +8,7 @@
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.5.0_11">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="jst.java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/normal/scope/NormalScopedBeanWithInjectionPoint.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/normal/scope/NormalScopedBeanWithInjectionPoint.java 2009-12-24 16:04:23 UTC (rev 19574)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/normal/scope/NormalScopedBeanWithInjectionPoint.java 2009-12-24 16:16:10 UTC (rev 19575)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, 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.lookup.injectionpoint.broken.normal.scope;
-
-import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.DeploymentFailure;
-import org.jboss.test.audit.annotations.SpecAssertion;
-import org.jboss.test.audit.annotations.SpecVersion;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
-import org.testng.annotations.Test;
-
-@Artifact
-(a)ExpectedDeploymentException(DeploymentFailure.class)
-@SpecVersion(spec="cdi", version="20091101")
-public class NormalScopedBeanWithInjectionPoint extends AbstractJSR299Test
-{
-
- @Test(groups = { "injectionPoint"})
- @SpecAssertion(section = "5.5.7", id = "f")
- public void testSessionScopedBeanWithInjectionPoint()
- {
- assert false;
- }
-
-}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/ambiguous/AmbiguousInjectionPoint.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/ambiguous/AmbiguousInjectionPoint.java 2009-12-24 16:04:23 UTC (rev 19574)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/ambiguous/AmbiguousInjectionPoint.java 2009-12-24 16:16:10 UTC (rev 19575)
@@ -1,65 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.reference.ambiguous;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Member;
-import java.lang.reflect.Type;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.Annotated;
-import javax.enterprise.inject.spi.AnnotatedField;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.jsr299.tck.literals.AnyLiteral;
-import org.jboss.jsr299.tck.literals.DefaultLiteral;
-
-public class AmbiguousInjectionPoint implements InjectionPoint
-{
- private final Bean<SimpleBean> bean;
- private final Set<Annotation> bindings = new HashSet<Annotation>();
-
- public AmbiguousInjectionPoint(Bean<SimpleBean> bean)
- {
- this.bean = bean;
- bindings.add(new DefaultLiteral());
- bindings.add(new AnyLiteral());
- }
-
- public Annotated getAnnotated()
- {
- return new AnnotatedInjectionField(this);
- }
-
- public Bean<?> getBean()
- {
- return bean;
- }
-
- public Set<Annotation> getQualifiers()
- {
- return bindings;
- }
-
- @SuppressWarnings("unchecked")
- public Member getMember()
- {
- return ((AnnotatedField<SimpleBean>)getAnnotated()).getJavaMember();
- }
-
- public Type getType()
- {
- return InjectedBean.class;
- }
-
- public boolean isDelegate()
- {
- return false;
- }
-
- public boolean isTransient()
- {
- return false;
- }
-
-}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/unresolved/UnsatisfiedInjectionPoint.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/unresolved/UnsatisfiedInjectionPoint.java 2009-12-24 16:04:23 UTC (rev 19574)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/unresolved/UnsatisfiedInjectionPoint.java 2009-12-24 16:16:10 UTC (rev 19575)
@@ -1,66 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.reference.unresolved;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Member;
-import java.lang.reflect.Type;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.Annotated;
-import javax.enterprise.inject.spi.AnnotatedField;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.jsr299.tck.literals.AnyLiteral;
-import org.jboss.jsr299.tck.literals.DefaultLiteral;
-
-public class UnsatisfiedInjectionPoint implements InjectionPoint
-{
-
- private final Bean<SimpleBean> bean;
- private final Set<Annotation> bindings = new HashSet<Annotation>();
-
- public UnsatisfiedInjectionPoint(Bean<SimpleBean> beanWithInjectionPoint)
- {
- this.bean = beanWithInjectionPoint;
- bindings.add(new DefaultLiteral());
- bindings.add(new AnyLiteral());
- }
-
- public Annotated getAnnotated()
- {
- return new AnnotatedInjectionField(this);
- }
-
- public Bean<?> getBean()
- {
- return bean;
- }
-
- public Set<Annotation> getQualifiers()
- {
- return bindings;
- }
-
- @SuppressWarnings("unchecked")
- public Member getMember()
- {
- return ((AnnotatedField<SimpleBean>)getAnnotated()).getJavaMember();
- }
-
- public Type getType()
- {
- return InjectedBean.class;
- }
-
- public boolean isDelegate()
- {
- return false;
- }
-
- public boolean isTransient()
- {
- return false;
- }
-
-}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2009-12-24 16:04:23 UTC (rev 19574)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2009-12-24 16:16:10 UTC (rev 19575)
@@ -13,7 +13,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jboss.tools.cdi.core.test.tck.TCKTest;
+import org.jboss.tools.cdi.core.test.tck.DefinitionTest;
import org.jboss.tools.tests.AbstractPluginsLoadTest;
/**
@@ -23,7 +23,7 @@
public static Test suite() {
TestSuite suite = new TestSuite("CDI Core Tests");
- suite.addTestSuite(TCKTest.class);
+ suite.addTestSuite(DefinitionTest.class);
return suite;
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DefinitionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DefinitionTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DefinitionTest.java 2009-12-24 16:16:10 UTC (rev 19575)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core.test.tck;
+
+import org.eclipse.core.resources.IProject;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class DefinitionTest extends TCKTest {
+
+ protected void setUp() throws Exception {
+ IProject p = importPreparedProject("/definition/qualifier");
+ }
+
+ public void test1() {
+
+ }
+
+ protected void tearDown() throws Exception {
+ cleanProject("/definition/qualifier");
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DefinitionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2009-12-24 16:04:23 UTC (rev 19574)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2009-12-24 16:16:10 UTC (rev 19575)
@@ -3,6 +3,8 @@
import java.io.File;
import java.io.FileFilter;
+import junit.framework.TestCase;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
@@ -10,8 +12,6 @@
import org.jboss.tools.test.util.ResourcesUtils;
import org.osgi.framework.Bundle;
-import junit.framework.TestCase;
-
public class TCKTest extends TestCase {
protected static String PLUGIN_ID = "org.jboss.tools.cdi.core.test";
protected static String PROJECT_PATH = "/projects/tck";
@@ -27,8 +27,6 @@
protected static String TCK_RESOURCES_PREFIX = "/resources/tck";
- public TCKTest() {}
-
public IProject importPreparedProject(String packPath) throws Exception {
Bundle b = Platform.getBundle(PLUGIN_ID);
String projectPath = FileLocator.resolve(b.getEntry(PROJECT_PATH)).getFile();
@@ -100,16 +98,4 @@
FileUtil.remove(fs[i]);
}
}
-
- protected void setUp() throws Exception {
- IProject p = importPreparedProject("/definition/qualifier");
- }
-
- public void test1() {
-
- }
-
- protected void tearDown() throws Exception {
- cleanProject("/definition/qualifier");
- }
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2009-12-24 16:04:23 UTC (rev 19574)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2009-12-24 16:16:10 UTC (rev 19575)
@@ -7,4 +7,6 @@
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.junit,
org.jboss.tools.cdi.ui,
- org.jboss.tools.tests
+ org.jboss.tools.tests,
+ org.jboss.tools.cdi.core.test,
+ org.eclipse.core.resources
Added: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test/CATest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test/CATest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test/CATest.java 2009-12-24 16:16:10 UTC (rev 19575)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core.test;
+
+import org.eclipse.core.resources.IProject;
+import org.jboss.tools.cdi.core.test.tck.TCKTest;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CATest extends TCKTest {
+
+ protected void setUp() throws Exception {
+ IProject p = importPreparedProject("/definition/qualifier");
+ }
+
+ public void test1() {
+
+ }
+
+ protected void tearDown() throws Exception {
+ cleanProject("/definition/qualifier");
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test/CATest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years
JBoss Tools SVN: r19574 - in trunk/seam/docs/reference/en: images/create_new_seam and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-12-24 11:04:23 -0500 (Thu, 24 Dec 2009)
New Revision: 19574
Modified:
trunk/seam/docs/reference/en/images/create_mavenized_seam/seamFacetPage.png
trunk/seam/docs/reference/en/images/create_new_seam/create_seam_11.png
trunk/seam/docs/reference/en/images/create_new_seam/create_seam_14.png
trunk/seam/docs/reference/en/images/create_new_seam/create_seam_16.png
trunk/seam/docs/reference/en/images/create_new_seam/create_seam_20.png
trunk/seam/docs/reference/en/images/create_new_seam/create_seam_21.png
trunk/seam/docs/reference/en/images/crud_database_application/crud_database_application_03.png
trunk/seam/docs/reference/en/modules/creating_new_seam.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-978 Option to avoid test project creation is added in "Seam web project" wizard - screens updated
Modified: trunk/seam/docs/reference/en/images/create_mavenized_seam/seamFacetPage.png
===================================================================
(Binary files differ)
Modified: trunk/seam/docs/reference/en/images/create_new_seam/create_seam_11.png
===================================================================
(Binary files differ)
Modified: trunk/seam/docs/reference/en/images/create_new_seam/create_seam_14.png
===================================================================
(Binary files differ)
Modified: trunk/seam/docs/reference/en/images/create_new_seam/create_seam_16.png
===================================================================
(Binary files differ)
Modified: trunk/seam/docs/reference/en/images/create_new_seam/create_seam_20.png
===================================================================
(Binary files differ)
Modified: trunk/seam/docs/reference/en/images/create_new_seam/create_seam_21.png
===================================================================
(Binary files differ)
Modified: trunk/seam/docs/reference/en/images/crud_database_application/crud_database_application_03.png
===================================================================
(Binary files differ)
Modified: trunk/seam/docs/reference/en/modules/creating_new_seam.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/creating_new_seam.xml 2009-12-24 15:13:12 UTC (rev 19573)
+++ trunk/seam/docs/reference/en/modules/creating_new_seam.xml 2009-12-24 16:04:23 UTC (rev 19574)
@@ -417,7 +417,7 @@
connection to it.</para>
<para>In the <property>Code Generation</property> section the wizard has already provided the
names for your <property>Session Bean</property>, <property>Entity Bean</property> and
- <property>Test</property> packages. Of course, you can change them on others
+ <property>Test</property> packages generation (optional). Of course, you can change them on others
of your choice.</para>
<figure>
<title>Code Generation Section</title>
15 years
JBoss Tools SVN: r19573 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent: WEB-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-12-24 10:13:12 -0500 (Thu, 24 Dec 2009)
New Revision: 19573
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/web.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html
Log:
JSF Test Project has been adjusted
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/web.xml 2009-12-24 14:54:26 UTC (rev 19572)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/web.xml 2009-12-24 15:13:12 UTC (rev 19573)
@@ -21,7 +21,7 @@
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
- <url-pattern>/jsf2test/*</url-pattern>
+ <url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<welcome-file-list>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html 2009-12-24 14:54:26 UTC (rev 19572)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html 2009-12-24 15:13:12 UTC (rev 19573)
@@ -3,13 +3,13 @@
<title>JavaServer Faces 2.0 Test Pages</title>
</head>
<body>
- <a href="jsf2test/pages/components/head1.xhtml">h:head (1st)</a><br>
- <a href="jsf2test/pages/components/head2.xhtml">h:head (2nd)</a><br>
- <a href="jsf2test/pages/components/body1.xhtml">h:body (1st)</a><br>
- <a href="jsf2test/pages/components/body2.xhtml">h:body (2st)</a><br>
- <a href="jsf2test/pages/components/outputScript.xhtml">h:outputScript</a><br>
- <a href="jsf2test/pages/components/outputStylesheet.xhtml">h:outputStylesheet</a><br>
- <a href="jsf2test/pages/JBIDE/5135/jbide5135.xhtml">Resource Test Page</a><br>
- <a href="jsf2test/pages/JBIDE/5352/jbide5352.xhtml">Test Page with template name resolving for default tags</a><br>
+ <a href="pages/components/head1.jsf">h:head (1st)</a><br>
+ <a href="pages/components/head2.jsf">h:head (2nd)</a><br>
+ <a href="pages/components/body1.jsf">h:body (1st)</a><br>
+ <a href="pages/components/body2.jsf">h:body (2st)</a><br>
+ <a href="pages/components/outputScript.jsf">h:outputScript</a><br>
+ <a href="pages/components/outputStylesheet.jsf">h:outputStylesheet</a><br>
+ <a href="pages/JBIDE/2550/jbide2550.jsf">Resource Test Page</a><br>
+ <a href="pages/JBIDE/5352/jbide5352.jsf">Test Page with template name resolving for default tags</a><br>
</body>
</html>
15 years
JBoss Tools SVN: r19572 - in trunk: jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-12-24 09:54:26 -0500 (Thu, 24 Dec 2009)
New Revision: 19572
Removed:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/BeanHyperlink.java
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSPBeanHyperlinkPartitioner.java
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlink.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/ExpressionHyperlink.java
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSPExprHyperlinkPartitioner.java
trunk/seam/plugins/org.jboss.tools.seam.text.ext/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4758
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2009-12-24 14:23:54 UTC (rev 19571)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2009-12-24 14:54:26 UTC (rev 19572)
@@ -591,17 +591,6 @@
</hyperlinkPartitioner>
<hyperlinkPartitioner
- id="org.jboss.tools.common.text.ext.jsf.hyperlink.JSPBeanHyperlinkPartitioner"
- class="org.jboss.tools.jsf.text.ext.hyperlink.JSPBeanHyperlinkPartitioner">
- <contentType id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType id="org.jboss.tools.common.text.ext.jsp.JSP_EXPRESSION" />
- </contentType>
- <contentType id="org.eclipse.wst.html.core.htmlsource">
- <partitionType id="org.jboss.tools.common.text.ext.jsp.JSP_EXPRESSION" />
- </contentType>
- </hyperlinkPartitioner>
-
- <hyperlinkPartitioner
id="org.jboss.tools.common.text.ext.jsf.hyperlink.JSPLoadBundleHyperlinkPartitioner"
class="org.jboss.tools.jsf.text.ext.hyperlink.JSPLoadBundleHyperlinkPartitioner">
<contentType id="org.eclipse.jst.jsp.core.jspsource">
@@ -814,17 +803,6 @@
</hyperlink>
<hyperlink
- class="org.jboss.tools.jsf.text.ext.hyperlink.BeanHyperlink"
- id="org.jboss.tools.common.text.ext.jsf.hyperlink.BeanHyperlink">
- <contenttypeidentifier id="org.eclipse.jst.jsp.core.jspsource">
- <partitiontype id="org.jboss.tools.common.text.ext.jsp.JSP_BEAN" />
- </contenttypeidentifier>
- <contenttypeidentifier id="org.eclipse.wst.html.core.htmlsource">
- <partitiontype id="org.jboss.tools.common.text.ext.jsp.JSP_BEAN" />
- </contenttypeidentifier>
- </hyperlink>
-
- <hyperlink
class="org.jboss.tools.jsf.text.ext.hyperlink.LoadBundleHyperlink"
id="org.jboss.tools.common.text.ext.jsf.hyperlink.LoadBundleHyperlink">
<contenttypeidentifier id="org.eclipse.jst.jsp.core.jspsource">
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/BeanHyperlink.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/BeanHyperlink.java 2009-12-24 14:23:54 UTC (rev 19571)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/BeanHyperlink.java 2009-12-24 14:54:26 UTC (rev 19572)
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jsf.text.ext.hyperlink;
-
-import java.text.MessageFormat;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IRegion;
-import org.jboss.tools.common.model.XModel;
-import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
-import org.jboss.tools.common.text.ext.hyperlink.xpl.Messages;
-import org.jboss.tools.jsf.text.ext.JSFExtensionsPlugin;
-import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
-
-/**
- * @author Jeremy
- */
-public class BeanHyperlink extends AbstractHyperlink {
-
- /**
- * @see com.ibm.sse.editor.AbstractHyperlink#doHyperlink(org.eclipse.jface.text.IRegion)
- */
- protected void doHyperlink(IRegion region) {
- XModel xModel = getXModel();
- if (xModel == null || region == null) {
- openFileFailed();
- return;
- }
- WebPromptingProvider provider = WebPromptingProvider.getInstance();
- region = JSPBeanHyperlinkPartitioner.getRegionPart(getDocument(), region.getOffset());
- if(region == null) {
- openFileFailed();
- return;
- }
- try {
- String beanName = getDocument().get(region.getOffset(), region.getLength());
- if(beanName == null) {
- openFileFailed();
- return;
- }
- provider.getList(xModel, WebPromptingProvider.JSF_BEAN_OPEN, beanName, null);
- } catch (BadLocationException x) {
- JSFExtensionsPlugin.log("", x); //$NON-NLS-1$
- openFileFailed();
- }
- }
-
- private String getBeanName(IRegion region) {
- if (region == null)
- return null;
- IRegion regionPart = JSPBeanHyperlinkPartitioner.getRegionPart(getDocument(), region.getOffset());
- if(regionPart == null)
- return null;
- try {
- String beanName = getDocument().get(region.getOffset(), region.getLength());
- return beanName;
- } catch (BadLocationException x) {
- JSFExtensionsPlugin.log("", x); //$NON-NLS-1$
- return null;
- }
- }
-
- IRegion fLastRegion = null;
- /**
- * @see com.ibm.sse.editor.AbstractHyperlink#doGetHyperlinkRegion(int)
- */
- protected IRegion doGetHyperlinkRegion(int offset) {
- fLastRegion = JSPBeanHyperlinkPartitioner.getWordRegion(getDocument(), offset);
- return fLastRegion;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see IHyperlink#getHyperlinkText()
- */
- public String getHyperlinkText() {
- String beanName = getBeanName(fLastRegion);
- if (beanName == null)
- return MessageFormat.format(Messages.OpenA, Messages.Bean);
-
- return MessageFormat.format(Messages.OpenBean, beanName);
- }
-
-}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/ExpressionHyperlink.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/ExpressionHyperlink.java 2009-12-24 14:23:54 UTC (rev 19571)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/ExpressionHyperlink.java 2009-12-24 14:54:26 UTC (rev 19572)
@@ -10,12 +10,12 @@
******************************************************************************/
package org.jboss.tools.jsf.text.ext.hyperlink;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELResolution;
@@ -23,6 +23,7 @@
import org.jboss.tools.common.el.core.resolver.ELSegment;
import org.jboss.tools.common.el.core.resolver.JavaMemberELSegment;
import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
+import org.jboss.tools.jsf.text.ext.JSFExtensionsPlugin;
import org.jboss.tools.jsf.text.ext.JSFTextExtMessages;
import org.jboss.tools.jsf.text.ext.hyperlink.JSPExprHyperlinkPartitioner.ExpressionStructure;
@@ -60,13 +61,18 @@
IEditorPart part = null;
if(javaSegment != null){
- IResource resource = javaSegment.getJavaElement().getResource();
- if(resource != null && resource instanceof IFile)
- part = openFileInEditor((IFile)javaSegment.getJavaElement().getResource());
- if (part != null) {
- if (javaSegment.getJavaElement() != null)
+ if (javaSegment.getJavaElement() != null){
+ try{
+ part = JavaUI.openInEditor(javaSegment.getJavaElement());
+ }catch(JavaModelException ex){
+ JSFExtensionsPlugin.log(ex);
+ }catch(PartInitException ex){
+ JSFExtensionsPlugin.log(ex);
+ }
+ if (part != null) {
JavaUI.revealInEditor(part, javaSegment.getJavaElement());
- }
+ }
+ }
}
if (part == null)
openFileFailed();
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSPBeanHyperlinkPartitioner.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSPBeanHyperlinkPartitioner.java 2009-12-24 14:23:54 UTC (rev 19571)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSPBeanHyperlinkPartitioner.java 2009-12-24 14:54:26 UTC (rev 19572)
@@ -1,283 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jsf.text.ext.hyperlink;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-
-import org.jboss.tools.common.model.XModel;
-import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
-import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlinkPartitioner;
-import org.jboss.tools.common.text.ext.hyperlink.HyperlinkRegion;
-import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkPartitionRecognizer;
-import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
-import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
-import org.jboss.tools.common.text.ext.util.Utils;
-import org.jboss.tools.jst.text.ext.hyperlink.jsp.JSPRootHyperlinkPartitioner;
-import org.jboss.tools.jsf.text.ext.JSFExtensionsPlugin;
-import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
-
-/**
- * @author Jeremy
- */
-public class JSPBeanHyperlinkPartitioner extends AbstractHyperlinkPartitioner implements IHyperlinkPartitionRecognizer {
- public static final String JSP_BEAN_PARTITION = "org.jboss.tools.common.text.ext.jsp.JSP_BEAN"; //$NON-NLS-1$
-
- /**
- * @see com.ibm.sse.editor.hyperlink.AbstractHyperlinkPartitioner#parse(org.eclipse.jface.text.IDocument, com.ibm.sse.editor.extensions.hyperlink.IHyperlinkRegion)
- */
- protected IHyperlinkRegion parse(IDocument document, IHyperlinkRegion superRegion) {
- StructuredModelWrapper smw = new StructuredModelWrapper();
- smw.init(document);
- try {
- Document xmlDocument = smw.getDocument();
- if (xmlDocument == null) return null;
-
- Utils.findNodeForOffset(xmlDocument, superRegion.getOffset());
- if (!recognize(document, superRegion)) return null;
- IHyperlinkRegion r = getRegion(document, superRegion.getOffset());
- if (r == null) return null;
- r = getWordRegion(document, superRegion.getOffset());
- if (r == null) return null;
-
- String axis = getAxis(document, superRegion);
- String contentType = superRegion.getContentType();
- String type = JSP_BEAN_PARTITION;
- int length = r.getLength() - (superRegion.getOffset() - r.getOffset());
- int offset = superRegion.getOffset();
-
- IHyperlinkRegion region = new HyperlinkRegion(offset, length, axis, contentType, type);
- return region;
- } finally {
- smw.dispose();
- }
- }
-
- protected String getAxis(IDocument document, IHyperlinkRegion superRegion) {
- if (superRegion.getAxis() == null || superRegion.getAxis().length() == 0) {
- return JSPRootHyperlinkPartitioner.computeAxis(document, superRegion.getOffset()) + "/"; //$NON-NLS-1$
- }
- return superRegion.getAxis();
- }
-
- public static IHyperlinkRegion getWordRegion (IDocument document, final int offset) {
- StructuredModelWrapper smw = new StructuredModelWrapper();
- try {
- smw.init(document);
- Document xmlDocument = smw.getDocument();
- if (xmlDocument == null) return null;
-
- Node n = Utils.findNodeForOffset(xmlDocument, offset);
-
- if (n == null || !(n instanceof Attr || n instanceof Text)) return null;
-
- int start = Utils.getValueStart(n);
- int end = Utils.getValueEnd(n);
- if(start < 0 || start > end || start > offset) return null;
- String attrText = document.get(start, end - start);
-
- StringBuffer sb = new StringBuffer(attrText);
- //find start of bean property
- int bStart = offset - start;
- while (bStart >= 0) {
- if (!Character.isJavaIdentifierPart(sb.charAt(bStart))) {
- bStart++;
- break;
- }
-
- if (bStart == 0) break;
- bStart--;
- }
- // find end of bean property
- int bEnd = offset - start;
- while (bEnd < sb.length()) {
- if (!Character.isJavaIdentifierPart(sb.charAt(bEnd)))
- break;
- bEnd++;
- }
-
- int propStart = bStart + start;
- int propLength = bEnd - bStart;
-
- if (propStart > offset || propStart + propLength < offset) return null;
-
- IHyperlinkRegion region = new HyperlinkRegion(propStart, propLength, null, null, null);
- return region;
- } catch (BadLocationException x) {
- JSFExtensionsPlugin.log("", x); //$NON-NLS-1$
- return null;
- } finally {
- smw.dispose();
- }
- }
-
- public static IHyperlinkRegion getRegionPart(IDocument document, final int offset) {
- if(document == null) return null;
- StructuredModelWrapper smw = new StructuredModelWrapper();
- smw.init(document);
- try {
-
- Document xmlDocument = smw.getDocument();
- if (xmlDocument == null) return null;
-
- Node n = Utils.findNodeForOffset(xmlDocument, offset);
-
- if (n == null || !(n instanceof Attr || n instanceof Text)) return null;
-
- int start = Utils.getValueStart(n);
- int end = Utils.getValueEnd(n);
- if(start < 0 || start > end || start > offset) return null;
-
- String attrText = document.get(start, end - start);
-
- StringBuffer sb = new StringBuffer(attrText);
- //find start of bean property
- int bStart = offset - start;
- while (bStart >= 0) {
- if (!Character.isJavaIdentifierPart(sb.charAt(bStart)) &&
- sb.charAt(bStart) != '.' && sb.charAt(bStart) != '[' && sb.charAt(bStart) != ']') {
- bStart++;
- break;
- }
-
- if (bStart == 0) break;
- bStart--;
- }
- // find end of bean property
- int bEnd = offset - start;
- while (bEnd < sb.length()) {
- if (!Character.isJavaIdentifierPart(sb.charAt(bEnd)))
- break;
- bEnd++;
- }
-
- int propStart = bStart + start;
- int propLength = bEnd - bStart;
-
- if (propStart > offset || propStart + propLength < offset) return null;
-
- IHyperlinkRegion region = new HyperlinkRegion(propStart, propLength, null, null, null);
- return region;
- } catch (BadLocationException x) {
- JSFExtensionsPlugin.log("", x); //$NON-NLS-1$
- return null;
- } finally {
- smw.dispose();
- }
- }
- public static IHyperlinkRegion getRegion(IDocument document, final int offset) {
- StructuredModelWrapper smw = new StructuredModelWrapper();
- try {
- smw.init(document);
- Document xmlDocument = smw.getDocument();
- if (xmlDocument == null) return null;
-
- Node n = Utils.findNodeForOffset(xmlDocument, offset);
-
- if (n == null || !(n instanceof Attr || n instanceof Text)) return null;
-
- int start = Utils.getValueStart(n);
- int end = Utils.getValueEnd(n);
- if(start < 0 || end < start || start > offset) return null;
-
- String attrText = document.get(start, end - start);
-
- StringBuffer sb = new StringBuffer(attrText);
- //find start of bean property
- int bStart = offset - start;
- while (bStart >= 0) {
- if (!Character.isJavaIdentifierPart(sb.charAt(bStart)) &&
- sb.charAt(bStart) != '.' && sb.charAt(bStart) != '[' && sb.charAt(bStart) != ']') {
- bStart++;
- break;
- }
-
- if (bStart == 0) break;
- bStart--;
- }
- // find end of bean property
- int bEnd = offset - start;
- while (bEnd < sb.length()) {
- if (!Character.isJavaIdentifierPart(sb.charAt(bEnd)) &&
- sb.charAt(bEnd) != '.' && sb.charAt(bEnd) != '[' && sb.charAt(bEnd) != ']')
- break;
- bEnd++;
- }
-
- int propStart = bStart + start;
- int propLength = bEnd - bStart;
-
- if (propStart > offset || propStart + propLength < offset) return null;
-
- IHyperlinkRegion region = new HyperlinkRegion(propStart, propLength);
- return region;
- } catch (BadLocationException x) {
- JSFExtensionsPlugin.log("", x); //$NON-NLS-1$
- return null;
- } finally {
- smw.dispose();
- }
- }
-
- /**
- * @see com.ibm.sse.editor.extensions.hyperlink.IHyperlinkPartitionRecognizer#recognize(org.eclipse.jface.text.IDocument, com.ibm.sse.editor.extensions.hyperlink.IHyperlinkRegion)
- */
- public boolean recognize(IDocument document, IHyperlinkRegion region) {
- StructuredModelWrapper smw = new StructuredModelWrapper();
- smw.init(document);
- try {
- Document xmlDocument = smw.getDocument();
- if (xmlDocument == null) return false;
-
- Utils.findNodeForOffset(xmlDocument, region.getOffset());
-
- IHyperlinkRegion r = getRegion(document, region.getOffset());
- if (r == null) return false;
-
-
- String propText = document.get(r.getOffset(), r.getLength());
-
- WebPromptingProvider provider = WebPromptingProvider.getInstance();
-
- IFile file = smw.getFile();
- XModel xModel = AbstractHyperlink.getXModel(file);
- if (xModel == null) return false;
-
- List beanList = provider.getList(xModel, WebPromptingProvider.JSF_MANAGED_BEANS, "", null); //$NON-NLS-1$
- String beanName = null;
- for (int i = 0; beanList != null && i < beanList.size(); i++) {
- String bn = (String)beanList.get(i);
- if (propText.trim().equals(bn) ||
- propText.trim().startsWith(bn + ".")) { //$NON-NLS-1$
- beanName = bn;
- break;
- }
- }
-
- if (beanName == null) return false;
-
- return true;
- } catch (BadLocationException x) {
- JSFExtensionsPlugin.log("", x); //$NON-NLS-1$
- return false;
- } finally {
- smw.dispose();
- }
- }
-
-}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSPExprHyperlinkPartitioner.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSPExprHyperlinkPartitioner.java 2009-12-24 14:23:54 UTC (rev 19571)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSPExprHyperlinkPartitioner.java 2009-12-24 14:54:26 UTC (rev 19572)
@@ -11,8 +11,6 @@
package org.jboss.tools.jsf.text.ext.hyperlink;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.text.IDocument;
import org.jboss.tools.common.el.core.ELReference;
import org.jboss.tools.common.el.core.model.ELExpression;
@@ -28,7 +26,6 @@
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkPartitionRecognizer;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
-import org.jboss.tools.jsf.text.ext.JSFExtensionsPlugin;
import org.jboss.tools.jst.text.ext.hyperlink.jsp.JSPRootHyperlinkPartitioner;
import org.jboss.tools.jst.web.kb.PageContextFactory;
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/plugin.xml 2009-12-24 14:23:54 UTC (rev 19571)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/plugin.xml 2009-12-24 14:54:26 UTC (rev 19572)
@@ -282,41 +282,6 @@
name="org.jboss.tools.seam.text.ext.hyperlink">
<hyperlink
- class="org.jboss.tools.seam.text.ext.hyperlink.SeamBeanHyperlink"
- id="org.jboss.tools.seam.text.ext.hyperlink.SeamBeanHyperlink">
- <contenttypeidentifier id="org.eclipse.jst.jsp.core.jspsource">
- <partitiontype id="org.jboss.tools.seam.text.ext.SEAM_BEAN" />
- </contenttypeidentifier>
- <contenttypeidentifier id="org.eclipse.wst.html.core.htmlsource">
- <partitiontype id="org.jboss.tools.seam.text.ext.SEAM_BEAN" />
- </contenttypeidentifier>
- <contenttypeidentifier id="org.eclipse.core.runtime.xml">
- <partitiontype id="org.jboss.tools.seam.text.ext.SEAM_BEAN" />
- </contenttypeidentifier>
- <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
- <partitiontype id="org.jboss.tools.seam.text.ext.SEAM_BEAN" />
- </contenttypeidentifier>
- <contenttypeidentifier id="org.jboss.tools.seam.xml.ui.pages12xmlsource">
- <partitiontype id="org.jboss.tools.seam.text.ext.SEAM_BEAN" />
- </contenttypeidentifier>
- <contenttypeidentifier id="org.jboss.tools.seam.xml.ui.page12xmlsource">
- <partitiontype id="org.jboss.tools.seam.text.ext.SEAM_BEAN" />
- </contenttypeidentifier>
- <contenttypeidentifier id="org.jboss.tools.seam.xml.ui.pages20xmlsource">
- <partitiontype id="org.jboss.tools.seam.text.ext.SEAM_BEAN" />
- </contenttypeidentifier>
- <contenttypeidentifier id="org.jboss.tools.seam.xml.ui.page20xmlsource">
- <partitiontype id="org.jboss.tools.seam.text.ext.SEAM_BEAN" />
- </contenttypeidentifier>
- <contenttypeidentifier id="org.jboss.tools.seam.xml.ui.pages21xmlsource">
- <partitiontype id="org.jboss.tools.seam.text.ext.SEAM_BEAN" />
- </contenttypeidentifier>
- <contenttypeidentifier id="org.jboss.tools.seam.xml.ui.page21xmlsource">
- <partitiontype id="org.jboss.tools.seam.text.ext.SEAM_BEAN" />
- </contenttypeidentifier>
- </hyperlink>
-
- <hyperlink
class="org.jboss.tools.seam.text.ext.hyperlink.SeamMessagesBeanHyperlink"
id="org.jboss.tools.seam.text.ext.hyperlink.SeamBeanHyperlink">
<contenttypeidentifier id="org.eclipse.jst.jsp.core.jspsource">
Deleted: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlink.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlink.java 2009-12-24 14:23:54 UTC (rev 19571)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlink.java 2009-12-24 14:54:26 UTC (rev 19572)
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.text.ext.hyperlink;
-
-import java.text.MessageFormat;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.ui.JavaUI;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.ui.IEditorPart;
-import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
-import org.jboss.tools.common.text.ext.hyperlink.xpl.Messages;
-
-/**
- * @author Jeremy
- */
-public class SeamBeanHyperlink extends AbstractHyperlink {
-
- /**
- * @see com.ibm.sse.editor.AbstractHyperlink#doHyperlink(org.eclipse.jface.text.IRegion)
- */
- protected void doHyperlink(IRegion region) {
- try {
- List<IJavaElement> elements = SeamBeanHyperlinkPartitioner.findJavaElements(getDocument(), region);
-
- IEditorPart part = null;
- if (elements != null) {
- for (IJavaElement element : elements) {
- part = JavaUI.openInEditor(element);
- if (part != null) {
- if (element != null)
- JavaUI.revealInEditor(part, element);
- break;
- }
- }
- }
-
- if (part == null) {
- // could not open editor
- openFileFailed();
- }
- } catch (CoreException x) {
- // could not open editor
- openFileFailed();
- }
- }
-
- IRegion fLastRegion = null;
- /**
- * @see com.ibm.sse.editor.AbstractHyperlink#doGetHyperlinkRegion(int)
- */
- protected IRegion doGetHyperlinkRegion(int offset) {
- fLastRegion = SeamBeanHyperlinkPartitioner.getWordRegion(getDocument(), offset);
- return fLastRegion;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see IHyperlink#getHyperlinkText()
- */
- public String getHyperlinkText() {
-
- String beanName;
- try {
- beanName = getDocument().get(fLastRegion.getOffset(), fLastRegion.getLength());
- } catch (BadLocationException e) {
- beanName = null;
- }
-
- if (beanName == null)
- return MessageFormat.format(Messages.NotFound, Messages.Bean);
-
- return MessageFormat.format(Messages.OpenBean, beanName);
- }
-}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java 2009-12-24 14:23:54 UTC (rev 19571)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java 2009-12-24 14:54:26 UTC (rev 19572)
@@ -35,9 +35,9 @@
import org.jboss.tools.common.text.ext.hyperlink.IHyperLinkPartitionPriority;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkPartitionRecognizer;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
-import org.jboss.tools.jst.text.ext.hyperlink.jsp.JSPRootHyperlinkPartitioner;
import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
import org.jboss.tools.common.text.ext.util.Utils;
+import org.jboss.tools.jst.text.ext.hyperlink.jsp.JSPRootHyperlinkPartitioner;
import org.jboss.tools.seam.core.ISeamContextVariable;
import org.jboss.tools.seam.core.ISeamMessages;
import org.jboss.tools.seam.core.ISeamProject;
@@ -54,7 +54,6 @@
* @author Jeremy
*/
public class SeamBeanHyperlinkPartitioner extends AbstractHyperlinkPartitioner implements IHyperlinkPartitionRecognizer, IHyperLinkPartitionPriority {
- public static final String SEAM_BEAN_PARTITION = "org.jboss.tools.seam.text.ext.SEAM_BEAN";
public static final String SEAM_MESSAGES_BEAN_PARTITION = "org.jboss.tools.seam.text.ext.SEAM_MESSAGES_BEAN";
private ELParserFactory factory = ELParserUtil.getJbossFactory();
@@ -90,18 +89,6 @@
return region;
}
- List<IJavaElement> javaElements = findJavaElements(document, superRegion);
- if (javaElements != null && !javaElements.isEmpty()) {///
- String axis = getAxis(document, superRegion);
- String contentType = superRegion.getContentType();
- String type = SEAM_BEAN_PARTITION;
- int length = r.getLength() - (superRegion.getOffset() - r.getOffset());
- int offset = superRegion.getOffset();
-
- IHyperlinkRegion region = new HyperlinkRegion(offset, length, axis, contentType, type);
- return region;
- }
-
return null;
} finally {
smw.dispose();
15 years
JBoss Tools SVN: r19571 - trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/dialog.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-12-24 09:23:54 -0500 (Thu, 24 Dec 2009)
New Revision: 19571
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/dialog/VpeEditAnyDialogTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/dialog/VpeResourcesDialogTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5470, JUnit was updated.
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/dialog/VpeEditAnyDialogTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/dialog/VpeEditAnyDialogTest.java 2009-12-24 13:55:51 UTC (rev 19570)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/dialog/VpeEditAnyDialogTest.java 2009-12-24 14:23:54 UTC (rev 19571)
@@ -9,6 +9,7 @@
******************************************************************************/
package org.jboss.tools.vpe.ui.test.dialog;
+import org.eclipse.jface.window.Window;
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.vpe.editor.template.VpeAnyData;
import org.jboss.tools.vpe.editor.template.VpeEditAnyDialog;
@@ -23,7 +24,7 @@
public void testVpeEditAnyDialogOpen() throws Throwable {
/*
- * Create empty data
+ * Create empty data.
*/
VpeAnyData data = new VpeAnyData(Constants.EMPTY, Constants.EMPTY, Constants.EMPTY);
VpeEditAnyDialog dialog = new VpeEditAnyDialog(PlatformUI
@@ -33,25 +34,36 @@
/*
* Assert that window has been created.
*/
- assertEquals(0, code);
-
+ assertEquals(Window.OK, code);
dialog.close();
/*
* Check that the dialog's fields are empty.
+ * Now it's impossible to get dialog fields directly.
*/
/*
* Check the dialog with filled in data.
* Dialog should display all the fields correctly.
*/
+ data = new VpeAnyData("a", "value", "color:red;"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ data.setName("my:tag"); //$NON-NLS-1$
+ data.setUri("http://my.uri.com/tags"); //$NON-NLS-1$
+ dialog = new VpeEditAnyDialog(PlatformUI
+ .getWorkbench().getDisplay().getActiveShell(), data);
+ dialog.setBlockOnOpen(false);
+ code = dialog.open();
+ assertEquals(Window.OK, code);
+ dialog.close();
/*
* Test the editing in the dialog if possible.
+ * Now it's impossible to get dialog fields directly.
*/
/*
* Test dialog validation.
+ * Now it's impossible to get dialog fields directly.
*/
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/dialog/VpeResourcesDialogTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/dialog/VpeResourcesDialogTest.java 2009-12-24 13:55:51 UTC (rev 19570)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/dialog/VpeResourcesDialogTest.java 2009-12-24 14:23:54 UTC (rev 19571)
@@ -10,6 +10,7 @@
package org.jboss.tools.vpe.ui.test.dialog;
import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.window.Window;
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.vpe.resref.core.VpeResourcesDialog;
import org.jboss.tools.vpe.ui.test.TestUtil;
@@ -40,7 +41,7 @@
/*
* Assert that window has been created.
*/
- assertEquals(0, code);
+ assertEquals(Window.OK, code);
dialog.close();
}
15 years
JBoss Tools SVN: r19570 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi: internal/core/impl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-12-24 08:55:51 -0500 (Thu, 24 Dec 2009)
New Revision: 19570
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreBuilder.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/ICDIAnnotation.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IScoped.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IStereotype.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/TypeDeclaration.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4943
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreBuilder.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreBuilder.java 2009-12-24 08:46:20 UTC (rev 19569)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreBuilder.java 2009-12-24 13:55:51 UTC (rev 19570)
@@ -37,12 +37,15 @@
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IType;
+import org.jboss.tools.cdi.internal.core.impl.CDIAnnotationElement;
+import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationHelper;
import org.jboss.tools.cdi.internal.core.scanner.CDIBuilderDelegate;
import org.jboss.tools.cdi.internal.core.scanner.FileSet;
import org.jboss.tools.common.EclipseUtil;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.project.ProjectHome;
+import org.jboss.tools.common.model.util.EclipseJavaUtil;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
public class CDICoreBuilder extends IncrementalProjectBuilder {
@@ -217,9 +220,27 @@
XModelObject beansXML = newJars.get(jar);
fileSet.setBeanXML(path, beansXML);
}
+ addBasicTypes(fileSet);
builderDelegate.build(fileSet, getCDICoreNature());
}
+ void addBasicTypes(FileSet fs) throws CoreException {
+ IJavaProject jp = EclipseResourceUtil.getJavaProject(getProject());
+ if(jp == null) return;
+ for (String s: AnnotationHelper.SCOPE_ANNOTATION_TYPES) {
+ IType type = EclipseJavaUtil.findType(jp, s);
+ if(type != null) fs.add(type.getPath(), type);
+ }
+ for (String s: AnnotationHelper.QUALIFIER_ANNOTATION_TYPES) {
+ IType type = EclipseJavaUtil.findType(jp, s);
+ if(type != null) fs.add(type.getPath(), type);
+ }
+ for (String s: AnnotationHelper.STEREOTYPE_ANNOTATION_TYPES) {
+ IType type = EclipseJavaUtil.findType(jp, s);
+ if(type != null) fs.add(type.getPath(), type);
+ }
+ }
+
protected void clean(IProgressMonitor monitor) throws CoreException {
CDICoreNature n = getCDICoreNature();
if(n != null) n.clean();
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/ICDIAnnotation.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/ICDIAnnotation.java 2009-12-24 08:46:20 UTC (rev 19569)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/ICDIAnnotation.java 2009-12-24 13:55:51 UTC (rev 19570)
@@ -10,8 +10,19 @@
*/
public interface ICDIAnnotation extends ICDIElement {
+ /**
+ * Returns the corresponding IType of the annotation type.
+ *
+ * @return the corresponding IType
+ */
public IType getSourceType();
+ /**
+ * Returns the location of @Inherited declaration of this annotation type. If the bean
+ * doesn't have the @Inherited declaration then null will be returned.
+ *
+ * @return the location of @Name declaration of this bean.
+ */
public IAnnotationDeclaration getInheritedDeclaration();
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IScoped.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IScoped.java 2009-12-24 08:46:20 UTC (rev 19569)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IScoped.java 2009-12-24 13:55:51 UTC (rev 19570)
@@ -29,7 +29,7 @@
*
* @return the scope type
*/
- IType getScope();
+ IScope getScope();
/**
* Obtains all the scope declarations of the bean class or producer method
@@ -38,5 +38,5 @@
*
* @return the scope
*/
- Set<IAnnotationDeclaration> getScopeDeclarations();
+ Set<IScopeDeclaration> getScopeDeclarations();
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IStereotype.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IStereotype.java 2009-12-24 08:46:20 UTC (rev 19569)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IStereotype.java 2009-12-24 13:55:51 UTC (rev 19570)
@@ -20,16 +20,9 @@
*
* @author Alexey Kazakov
*/
-public interface IStereotype extends IScoped, ICDIElement {
+public interface IStereotype extends IScoped, ICDIAnnotation {
/**
- * Returns the corresponding IType of the stereotype.
- *
- * @return the corresponding IType
- */
- IType getSourceType();
-
- /**
* Returns the location of @Name declaration of this stereotype. If the bean
* doesn't have the @Name declaration then null will be returned.
*
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java 2009-12-24 08:46:20 UTC (rev 19569)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java 2009-12-24 13:55:51 UTC (rev 19570)
@@ -15,15 +15,20 @@
import java.util.Set;
import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMemberValuePair;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
+import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
+import org.jboss.tools.cdi.core.IScopeDeclaration;
import org.jboss.tools.cdi.core.IStereotypeDeclaration;
import org.jboss.tools.cdi.core.ITypeDeclaration;
import org.jboss.tools.cdi.internal.core.impl.definition.AbstractMemberDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
+import org.jboss.tools.cdi.internal.core.impl.definition.ParametedTypeFactory;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
/**
@@ -79,6 +84,21 @@
return result;
}
+ public Set<IScopeDeclaration> getScopeDeclarations() {
+ return getScopeDeclarations(getCDIProject().getNature(), definition.getAnnotations());
+ }
+
+ public static Set<IScopeDeclaration> getScopeDeclarations(CDICoreNature n, List<? extends IAnnotationDeclaration> ds) {
+ Set<IScopeDeclaration> result = new HashSet<IScopeDeclaration>();
+ for (IAnnotationDeclaration d: ds) {
+ int k = n.getDefinitions().getAnnotationKind(d.getType());
+ if(k == AnnotationDefinition.SCOPE) {
+ result.add((IScopeDeclaration)d);
+ }
+ }
+ return result;
+ }
+
public Set<ITypeDeclaration> getRestrictedTypeDeclaratios() {
Set<ITypeDeclaration> result = new HashSet<ITypeDeclaration>();
AnnotationDeclaration typed = getDefinition().getTypedAnnotation();
@@ -92,16 +112,16 @@
Object[] os = (Object[])value;
for (int i = 0; i < os.length; i++) {
String typeName = os[i].toString();
- IType type = EclipseJavaUtil.findType(getCDIProject().getNature().getDefinitions().getJavaProject(), typeName);
- if(type != null) {
- result.add(new TypeDeclaration(type, -1, 0));
+ ParametedType p = ParametedTypeFactory.getParametedType(((IMember)definition.getMember()).getDeclaringType(), typeName);
+ if(p != null) {
+ result.add(new TypeDeclaration(p, -1, 0));
}
}
} else if(value != null) {
String typeName = value.toString();
- IType type = EclipseJavaUtil.findType(getCDIProject().getNature().getDefinitions().getJavaProject(), typeName);
- if(type != null) {
- result.add(new TypeDeclaration(type, -1, 0));
+ ParametedType p = ParametedTypeFactory.getParametedType(((IMember)definition.getMember()).getDeclaringType(), typeName);
+ if(p != null) {
+ result.add(new TypeDeclaration(p, -1, 0));
}
}
} catch (JavaModelException e) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java 2009-12-24 08:46:20 UTC (rev 19569)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java 2009-12-24 13:55:51 UTC (rev 19570)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.tools.cdi.internal.core.impl;
+import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
@@ -19,6 +21,7 @@
import org.jboss.tools.cdi.core.IClassBean;
import org.jboss.tools.cdi.core.ITypeDeclaration;
import org.jboss.tools.cdi.internal.core.impl.definition.BeanMemberDefinition;
+import org.jboss.tools.cdi.internal.core.impl.definition.ParametedTypeFactory;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
/**
@@ -38,11 +41,12 @@
protected void setMember(IMember member) {
try {
- String returnType = EclipseJavaUtil.getMemberTypeAsString(member);
+ String returnType = member instanceof IField ? ((IField)member).getTypeSignature()
+ : member instanceof IMethod ? ((IMethod)member).getReturnType() : null;
if(returnType != null) {
- IType t = EclipseJavaUtil.findType(member.getJavaProject(), returnType);
- if(t != null) {
- typeDeclaration = new TypeDeclaration(t, -1, 0);
+ ParametedType p = ParametedTypeFactory.getParametedType(member.getDeclaringType(), returnType);
+ if(p != null) {
+ typeDeclaration = new TypeDeclaration(p, -1, 0);
}
}
} catch (JavaModelException e) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2009-12-24 08:46:20 UTC (rev 19569)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2009-12-24 13:55:51 UTC (rev 19570)
@@ -27,6 +27,7 @@
import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDICoreNature;
+import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
@@ -57,7 +58,7 @@
private Map<String, Set<IBean>> beansByName = new HashMap<String, Set<IBean>>();
private Set<IBean> namedBeans = new HashSet<IBean>();
private Map<IType, ClassBean> classBeans = new HashMap<IType, ClassBean>();
-
+
BeansXMLData beansXMLData = new BeansXMLData();
public CDIProject() {}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2009-12-24 08:46:20 UTC (rev 19569)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2009-12-24 13:55:51 UTC (rev 19570)
@@ -22,7 +22,6 @@
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
-import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IBeanMethod;
import org.jboss.tools.cdi.core.IClassBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
@@ -30,6 +29,8 @@
import org.jboss.tools.cdi.core.IObserverMethod;
import org.jboss.tools.cdi.core.IParametedType;
import org.jboss.tools.cdi.core.IProducer;
+import org.jboss.tools.cdi.core.IScope;
+import org.jboss.tools.cdi.core.IScopeDeclaration;
import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.core.IStereotypeDeclaration;
import org.jboss.tools.cdi.core.ITypeDeclaration;
@@ -51,6 +52,8 @@
protected List<BeanField> fields = new ArrayList<BeanField>();
protected List<BeanMethod> methods = new ArrayList<BeanMethod>();
+ protected IScope scope = null;
+
public ClassBean() {}
public void setDefinition(TypeDefinition definition) {
@@ -155,8 +158,12 @@
}
public Set<ITypeDeclaration> getAllTypeDeclarations() {
- // TODO Auto-generated method stub
- return null;
+ Set<IParametedType> ps = getDefinition().getInheritedTypes();
+ Set<ITypeDeclaration> result = new HashSet<ITypeDeclaration>();
+ for (IParametedType p: ps) {
+ result.add(new TypeDeclaration((ParametedType)p, -1, 0));
+ }
+ return result;
}
public IAnnotationDeclaration getAlternativeDeclaration() {
@@ -249,8 +256,8 @@
}
public boolean isDependent() {
- IType scope = getScope();
- return scope != null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(scope.getFullyQualifiedName());
+ IScope scope = getScope();
+ return scope != null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(scope.getSourceType().getFullyQualifiedName());
}
public boolean isEnabled() {
@@ -270,14 +277,67 @@
return getDefinition().getSpecializesAnnotation() != null;
}
- public IType getScope() {
- // TODO Auto-generated method stub
- return null;
+ public IScope getScope() {
+ if(scope == null) {
+ computeScope();
+ }
+ return scope;
}
- public Set<IAnnotationDeclaration> getScopeDeclarations() {
- // TODO Auto-generated method stub
- return null;
+ protected void computeScope() {
+ //1. Declaration of scope in the class.
+ Set<IScopeDeclaration> scopes = getScopeDeclarations();
+ if(!scopes.isEmpty()) {
+ scope = scopes.iterator().next().getScope();
+ return;
+ }
+ //2. Declaration of inheritable scope in a superclass.
+ ClassBean scb = getSuperClassBean();
+ while(scb != null) {
+ scopes = getScopeDeclarations();
+ if(!scopes.isEmpty()) {
+ scope = scopes.iterator().next().getScope();
+ if(scope.getInheritedDeclaration() == null) {
+ scope = null;
+ } else {
+ return;
+ }
+ }
+ scb = scb.getSuperClassBean();
+ }
+ //3. Get default scope from stereotype.
+ Set<IScope> defaults = new HashSet<IScope>();
+ Set<IStereotypeDeclaration> ss = getStereotypeDeclarations();
+ for (IStereotypeDeclaration d: ss) {
+ IStereotype s = d.getStereotype();
+ IScope sc = s.getScope();
+ if(sc != null) {
+ defaults.add(sc);
+ }
+ }
+ scb = getSuperClassBean();
+ while(scb != null) {
+ ss = getStereotypeDeclarations();
+ for (IStereotypeDeclaration d: ss) {
+ IStereotype s = d.getStereotype();
+ if(s.getInheritedDeclaration() == null) {
+ continue;
+ }
+ IScope sc = s.getScope();
+ if(sc != null) {
+ defaults.add(sc);
+ }
+ }
+ scb = scb.getSuperClassBean();
+ }
+ if(defaults.size() == 1) {
+ scope = defaults.iterator().next();
+ } else if(defaults.size() > 1) {
+ scope = getCDIProject().getScope(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME);
+ } else {
+ //4. Scope is @Dependent
+ scope = getCDIProject().getScope(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME);
+ }
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java 2009-12-24 08:46:20 UTC (rev 19569)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java 2009-12-24 13:55:51 UTC (rev 19570)
@@ -19,13 +19,14 @@
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.cdi.core.CDIConstants;
-import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IParametedType;
import org.jboss.tools.cdi.core.IProducerField;
+import org.jboss.tools.cdi.core.IScope;
+import org.jboss.tools.cdi.core.IScopeDeclaration;
import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.core.IStereotypeDeclaration;
import org.jboss.tools.cdi.core.ITypeDeclaration;
@@ -117,8 +118,8 @@
}
public boolean isDependent() {
- IType scope = getScope();
- return scope != null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(scope.getFullyQualifiedName());
+ IScope scope = getScope();
+ return scope != null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(scope.getSourceType().getFullyQualifiedName());
}
public boolean isEnabled() {
@@ -129,43 +130,26 @@
return false;
}
- public IType getScope() {
- Set<IAnnotationDeclaration> ds = getScopeDeclarations();
+ public IScope getScope() {
+ Set<IScopeDeclaration> ds = getScopeDeclarations();
if(!ds.isEmpty()) {
- return ds.iterator().next().getType();
+ return ds.iterator().next().getScope();
}
- List<AnnotationDeclaration> ds2 = definition.getAnnotations();
- for (AnnotationDeclaration d: ds2) {
- int k = getCDIProject().getNature().getDefinitions().getAnnotationKind(d.getType());
- if(k == AnnotationDefinition.STEREOTYPE) {
- AnnotationDefinition a = getCDIProject().getNature().getDefinitions().getAnnotation(d.getType());
- ds = getScopeDeclarations(getCDIProject().getNature(), a.getAnnotations());
- if(!ds.isEmpty()) {
- return ds.iterator().next().getType();
- }
+ Set<IStereotypeDeclaration> ss = getStereotypeDeclarations();
+ Set<IScope> defaults = new HashSet<IScope>();
+ for (IStereotypeDeclaration d: ss) {
+ IStereotype s = d.getStereotype();
+ IScope sc = s.getScope();
+ if(sc != null) {
+ defaults.add(sc);
}
}
- try {
- return EclipseJavaUtil.findType(getField().getJavaProject(), CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME);
- } catch (JavaModelException e) {
- CDICorePlugin.getDefault().logError(e);
+ if(defaults.size() == 1) {
+ return defaults.iterator().next();
+ } else if(defaults.size() > 1) {
+ return null;
}
- return null;
+ return getCDIProject().getScope(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME);
}
- public Set<IAnnotationDeclaration> getScopeDeclarations() {
- return getScopeDeclarations(getCDIProject().getNature(), definition.getAnnotations());
- }
-
- public static Set<IAnnotationDeclaration> getScopeDeclarations(CDICoreNature n, List<? extends IAnnotationDeclaration> ds) {
- Set<IAnnotationDeclaration> result = new HashSet<IAnnotationDeclaration>();
- for (IAnnotationDeclaration d: ds) {
- int k = n.getDefinitions().getAnnotationKind(d.getType());
- if(k == AnnotationDefinition.SCOPE) {
- result.add(d);
- }
- }
- return result;
- }
-
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java 2009-12-24 08:46:20 UTC (rev 19569)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java 2009-12-24 13:55:51 UTC (rev 19570)
@@ -25,6 +25,8 @@
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IParametedType;
import org.jboss.tools.cdi.core.IProducerMethod;
+import org.jboss.tools.cdi.core.IScope;
+import org.jboss.tools.cdi.core.IScopeDeclaration;
import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.core.IStereotypeDeclaration;
import org.jboss.tools.cdi.core.ITypeDeclaration;
@@ -133,8 +135,8 @@
}
public boolean isDependent() {
- IType scope = getScope();
- return scope != null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(scope.getFullyQualifiedName());
+ IScope scope = getScope();
+ return scope != null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(scope.getSourceType().getFullyQualifiedName());
}
public boolean isEnabled() {
@@ -147,32 +149,26 @@
}
//same as ProducerField.getScope
- public IType getScope() {
- Set<IAnnotationDeclaration> ds = getScopeDeclarations();
+ public IScope getScope() {
+ Set<IScopeDeclaration> ds = getScopeDeclarations();
if(!ds.isEmpty()) {
- return ds.iterator().next().getType();
+ return ds.iterator().next().getScope();
}
- List<AnnotationDeclaration> ds2 = definition.getAnnotations();
- for (AnnotationDeclaration d: ds2) {
- int k = getCDIProject().getNature().getDefinitions().getAnnotationKind(d.getType());
- if(k == AnnotationDefinition.STEREOTYPE) {
- AnnotationDefinition a = getCDIProject().getNature().getDefinitions().getAnnotation(d.getType());
- ds = ProducerField.getScopeDeclarations(getCDIProject().getNature(), a.getAnnotations());
- if(!ds.isEmpty()) {
- return ds.iterator().next().getType();
- }
+ Set<IStereotypeDeclaration> ss = getStereotypeDeclarations();
+ Set<IScope> defaults = new HashSet<IScope>();
+ for (IStereotypeDeclaration d: ss) {
+ IStereotype s = d.getStereotype();
+ IScope sc = s.getScope();
+ if(sc != null) {
+ defaults.add(sc);
}
}
- try {
- return EclipseJavaUtil.findType(getMethod().getJavaProject(), CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME);
- } catch (JavaModelException e) {
- CDICorePlugin.getDefault().logError(e);
+ if(defaults.size() == 1) {
+ return defaults.iterator().next();
+ } else if(defaults.size() > 1) {
+ return null;
}
- return null;
+ return getCDIProject().getScope(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME);
}
- public Set<IAnnotationDeclaration> getScopeDeclarations() {
- return ProducerField.getScopeDeclarations(getCDIProject().getNature(), definition.getAnnotations());
- }
-
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java 2009-12-24 08:46:20 UTC (rev 19569)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java 2009-12-24 13:55:51 UTC (rev 19570)
@@ -18,6 +18,8 @@
import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.IInterceptorBindingDeclaration;
+import org.jboss.tools.cdi.core.IScope;
+import org.jboss.tools.cdi.core.IScopeDeclaration;
import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.core.IStereotypeDeclaration;
@@ -73,19 +75,23 @@
return false;
}
- public IType getScope() {
- Set<IAnnotationDeclaration> ss = getScopeDeclarations();
+ public IScope getScope() {
+ Set<IScopeDeclaration> ss = getScopeDeclarations();
if(!ss.isEmpty()) {
- return ss.iterator().next().getType();
+ return ss.iterator().next().getScope();
}
Set<IStereotypeDeclaration> ds = getStereotypeDeclarations();
for (IStereotypeDeclaration d: ds) {
- //TODO
+ IStereotype s = d.getStereotype();
+ IScope result = s.getScope();
+ if(result != null) {
+ return result;
+ }
}
return null;
}
- public Set<IAnnotationDeclaration> getScopeDeclarations() {
+ public Set<IScopeDeclaration> getScopeDeclarations() {
return ProducerField.getScopeDeclarations(getCDIProject().getNature(), definition.getAnnotations());
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/TypeDeclaration.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/TypeDeclaration.java 2009-12-24 08:46:20 UTC (rev 19569)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/TypeDeclaration.java 2009-12-24 13:55:51 UTC (rev 19570)
@@ -24,10 +24,12 @@
public TypeDeclaration() {}
- TypeDeclaration(IType type, int startPosition, int length) {
- this.type = type;
+ TypeDeclaration(ParametedType type, int startPosition, int length) {
+ this.type = type.getType();
this.length = length;
this.startPosition = startPosition;
+ this.signature = type.signature;
+ this.parameterTypes = type.parameterTypes;
}
public int getLength() {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java 2009-12-24 08:46:20 UTC (rev 19569)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java 2009-12-24 13:55:51 UTC (rev 19570)
@@ -48,6 +48,10 @@
}
}
+ public IAnnotatable getMember() {
+ return member;
+ }
+
protected void init(IType contextType, DefinitionContext context) throws CoreException {
IAnnotation[] ts = member.getAnnotations();
for (int i = 0; i < ts.length; i++) {
15 years
JBoss Tools SVN: r19569 - trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2009-12-24 03:46:20 -0500 (Thu, 24 Dec 2009)
New Revision: 19569
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/VariablePartAssignCategory.java
Log:
JBIDE-5394: a offical fix from wtp team for this issue
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/VariablePartAssignCategory.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/VariablePartAssignCategory.java 2009-12-24 08:38:28 UTC (rev 19568)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/VariablePartAssignCategory.java 2009-12-24 08:46:20 UTC (rev 19569)
@@ -722,7 +722,7 @@
MyDOMContentBuilderImpl contentBuilder = new MyDOMContentBuilderImpl(
xmlDocument);
- contentBuilder.setBuildPolicy(buildPolicy);
+ contentBuilder.setBuildPolicy(contentBuilder.BUILD_OPTIONAL_ELEMENTS);
contentBuilder.createDefaultRootContent(cmDocument,
cmElementDeclaration, namespaceInfoList);
15 years
JBoss Tools SVN: r19568 - trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2009-12-24 03:38:28 -0500 (Thu, 24 Dec 2009)
New Revision: 19568
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/VariablePartAssignCategory.java
Log:
JBIDE-5394: rollback to yesterday version for commiting a better patch
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/VariablePartAssignCategory.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/VariablePartAssignCategory.java 2009-12-24 07:37:22 UTC (rev 19567)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/VariablePartAssignCategory.java 2009-12-24 08:38:28 UTC (rev 19568)
@@ -57,11 +57,8 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.wsdl.Message;
import org.eclipse.wst.wsdl.Part;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager;
import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMContentBuilderImpl;
@@ -74,8 +71,6 @@
import org.eclipse.xsd.XSDNamedComponent;
import org.eclipse.xsd.XSDTypeDefinition;
import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
/**
* An AssignCategory presenting a tree from which the user can select any of: -
@@ -778,102 +773,5 @@
}
createDefaultContent(document, rootCMElementDeclaration);
}
-
-
- public void visitCMElementDeclaration(CMElementDeclaration ed) {
- int min = ed.getMinOccur() > 0 ? ed.getMinOccur() : 1;
-
- // Correct the min value if the element is contained in
- // a group.
- if (!cmGroupStack.isEmpty()) {
- CMGroup group = (CMGroup) cmGroupStack.peek();
- int gmin = group.getMinOccur();
- if (gmin == 0)
- if (buildOptionalElements(buildPolicy)) {
- /* do nothing: min = min */
- }
- else {
- min = min * gmin; // min = 0
- }
- else {
- min = min * gmin;
- }
- }
-
- int max = Math.min(ed.getMaxOccur(), getNumOfRepeatableElements());
- if (max < min)
- max = min;
-
- alwaysVisit = false;
-
- // Note - ed may not be abstract but has substitutionGroups
- // involved.
- if (buildFirstSubstitution(buildPolicy) || isAbstract(ed)) // leave
- // this
- // for
- // backward
- // compatibility
- // for now
- {
- // Note - To change so that if ed is optional, we do not
- // generate anything here.
- ed = getSubstitution(ed);
-
- // Note - the returned ed may be an abstract element in
- // which case the xml will be invalid.
- }
-
- if (min > 0 && !visitedCMElementDeclarationList.contains(ed)) {
- visitedCMElementDeclarationList.add(ed);
- for (int i = 1; i <= max; i++) {
- // create an Element for each
- Element element = null;
- if (rootElement != null) {
- element = rootElement;
- rootElement = null;
- }
- else {
- element = createElement(ed, computeName(ed, currentParent), currentParent);
- }
-
- // visit the children of the GrammarElement
- Node oldParent = currentParent;
- currentParent = element;
- handlePushParent(element, ed);
-
- namespaceTable.addElement(element);
-
- boolean oldAttachNodesToParent = attachNodesToParent;
- attachNodesToParent = true;
-
- // instead of calling super.visitCMElementDeclaration()
- // we duplicate the code with some minor modifications
- CMNamedNodeMap nodeMap = ed.getAttributes();
- int size = nodeMap.getLength();
- for (int j = 0; j < size; j++) {
- visitCMNode(nodeMap.item(j));
- }
-
- CMContent content = ed.getContent();
- if (content != null) {
- visitCMNode(content);
- }
-
- if (ed.getContentType() == CMElementDeclaration.PCDATA) {
- CMDataType dataType = ed.getDataType();
- if (dataType != null) {
- visitCMDataType(dataType);
- }
- }
- // end duplication
- attachNodesToParent = oldAttachNodesToParent;
- handlePopParent(element, ed);
- currentParent = oldParent;
- linkNode(element);
- }
- int size = visitedCMElementDeclarationList.size();
- visitedCMElementDeclarationList.remove(size - 1);
- }
- }
}
}
15 years