JBoss Tools SVN: r22919 - trunk/tests/plugins/org.jboss.tools.tests/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-21 14:00:27 -0400 (Mon, 21 Jun 2010)
New Revision: 22919
Modified:
trunk/tests/plugins/org.jboss.tools.tests/META-INF/MANIFEST.MF
Log:
fix junit version
Modified: trunk/tests/plugins/org.jboss.tools.tests/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/META-INF/MANIFEST.MF 2010-06-21 16:49:11 UTC (rev 22918)
+++ trunk/tests/plugins/org.jboss.tools.tests/META-INF/MANIFEST.MF 2010-06-21 18:00:27 UTC (rev 22919)
@@ -7,7 +7,7 @@
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
- org.junit;bundle-version="[3.8.2,4.0.0)",
+ org.junit,
org.eclipse.ui.ide,
org.apache.xerces;bundle-version="[2.9.0,3.0.0)",
org.eclipse.ltk.core.refactoring;bundle-version="3.5.0",
15 years, 10 months
JBoss Tools SVN: r22918 - in trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test: tck and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-06-21 12:49:11 -0400 (Mon, 21 Jun 2010)
New Revision: 22918
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DynamicLookupTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
Log:
https://jira.jboss.org/browse/JBIDE-6513 Added JUnit tests
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 2010-06-21 16:43:14 UTC (rev 22917)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2010-06-21 16:49:11 UTC (rev 22918)
@@ -18,6 +18,7 @@
import org.jboss.tools.cdi.core.test.tck.BeanDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.BeanSpecializationTest;
import org.jboss.tools.cdi.core.test.tck.DefaultNamedTest;
+import org.jboss.tools.cdi.core.test.tck.DynamicLookupTest;
import org.jboss.tools.cdi.core.test.tck.EnterpriseQualifierDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.EnterpriseResolutionByTypeTest;
import org.jboss.tools.cdi.core.test.tck.EnterpriseScopeDefinitionTest;
@@ -60,6 +61,7 @@
suite.addTestSuite(EnterpriseResolutionByTypeTest.class);
suite.addTestSuite(AssignabilityOfRawAndParameterizedTypesTest.class);
suite.addTestSuite(QualifierWithMembersTest.class);
+ suite.addTestSuite(DynamicLookupTest.class);
suite.addTestSuite(ValidationTest.class);
return new CDICoreTestSetup(suite);
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DynamicLookupTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DynamicLookupTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DynamicLookupTest.java 2010-06-21 16:49:11 UTC (rev 22918)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core.test.tck;
+
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IInjectionPointField;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class DynamicLookupTest extends TCKTest {
+
+ /**
+ * Section 5.6 - Programmatic lookup
+ * @throws CoreException
+ */
+ public void testObtainsInjectsInstance() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInstanceBean.java", "paymentProcessor");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.lookup.dynamic.AdvancedPaymentProcessor");
+ }
+
+ /**
+ * Section 5.6 - Programmatic lookup
+ * @throws CoreException
+ */
+ public void testObtainsAmbiguousInjectsInstance() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInstanceBean.java", "anyPaymentProcessor");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertContainsBeanClasses(beans, "org.jboss.jsr299.tck.tests.lookup.dynamic.AdvancedPaymentProcessor", "org.jboss.jsr299.tck.tests.lookup.dynamic.SimplePaymentProcessor", "org.jboss.jsr299.tck.tests.lookup.dynamic.RemotePaymentProcessor");
+ }
+}
\ 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/DynamicLookupTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 10 months
JBoss Tools SVN: r22917 - trunk.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-21 12:43:14 -0400 (Mon, 21 Jun 2010)
New Revision: 22917
Modified:
trunk/pom.xml
Log:
reorder build based on dgolovin's sequence
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-21 16:32:30 UTC (rev 22916)
+++ trunk/pom.xml 2010-06-21 16:43:14 UTC (rev 22917)
@@ -1,50 +1,67 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
+<parent>
+ <relativePath>parent-pom.xml</relativePath>
<groupId>org.jboss.tools</groupId>
- <artifactId>trunk</artifactId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
- <modules>
- <!-- this order is important! make sure you've run genpom.xml first! -->
- <module>build/target-platform</module>
- <module>tests</module>
- <module>common</module>
- <module>flow</module>
- <module>jbpm</module>
- <module>jmx</module>
- <module>archives</module>
- <module>as</module>
- <module>bpel</module>
- <module>smooks</module>
- <module>freemarker</module>
- <module>profiler</module>
- <module>portlet</module>
- <module>modeshape</module>
- <module>xulrunner</module>
- <module>jst</module>
- <module>vpe</module>
- <module>jsf</module>
- <!-- NOTE: To build drools, must first bootstrap with ant script:
- cd drools; ant -q -->
- <module>drools</module>
- <module>esb</module>
- <module>tptp</module>
- <module>ws</module>
- <module>cdi</module>
- <module>struts</module>
- <module>hibernatetools</module>
- <module>seam</module>
- <module>examples</module>
- <module>birt</module>
- <module>maven</module>
- <module>site</module>
- </modules>
+</parent>
+<groupId>org.jboss.tools</groupId>
+<artifactId>trunk</artifactId>
+<version>0.0.1-SNAPSHOT</version>
+<packaging>pom</packaging>
+<modules>
+ <!-- OLD order: <module>tests</module> <module>common</module> <module>flow</module>
+ <module>jbpm</module> <module>jmx</module> <module>archives</module> <module>as</module>
+ <module>bpel</module> <module>smooks</module> <module>freemarker</module>
+ <module>profiler</module> <module>portlet</module> <module>modeshape</module>
+ <module>xulrunner</module> <module>jst</module> <module>vpe</module> <module>jsf</module>
+ <module>drools</module> <module>esb</module> <module>tptp</module> <module>ws</module>
+ <module>cdi</module> <module>struts</module> <module>hibernatetools</module>
+ <module>seam</module> <module>examples</module> <module>birt</module> <module>maven</module>
+ <module>site</module> -->
+
+ <module>build/target-platform</module>
+
+ <!-- this order is important! make sure you've run genpom.xml first! -->
+ <!-- dgolovin's order -->
+ <module>tests</module>
+ <module>freemarker</module>
+ <module>jmx</module>
+ <module>archives</module>
+ <module>as</module>
+ <module>common</module>
+ <module>jst</module>
+ <module>xulrunner</module>
+ <module>vpe</module>
+ <module>jsf</module>
+
+ <module>hibernatetools</module>
+ <module>portlet</module>
+ <module>workingset</module>
+
+ <module>struts</module>
+
+ <module>profiler</module>
+ <module>smooks</module>
+ <module>cdi</module>
+ <module>birt</module>
+ <module>bpel</module>
+ <module>esb</module>
+ <module>seam</module>
+ <module>examples</module>
+ <module>maven</module>
+ <module>tptp</module>
+ <module>ws</module>
+ <module>modeshape</module>
+ <module>flow</module>
+ <module>jbpm</module>
+ <!-- NOTE: To build drools, must first bootstrap with ant script: cd drools;
+ ant -q -->
+ <module>drools</module>
+
+ <module>site</module>
+</modules>
</project>
15 years, 10 months
JBoss Tools SVN: r22916 - in trunk/cdi/tests/org.jboss.tools.cdi.core.test: src/org/jboss/tools/cdi/core/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-06-21 12:32:30 -0400 (Mon, 21 Jun 2010)
New Revision: 22916
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AdvancedPaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AsynchronousPaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/CashPaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/ObtainsInstanceBean.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/OtherPaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/PayBy.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/PaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/QualifierWithMembersTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
Log:
https://jira.jboss.org/browse/JBIDE-6512 Added JUnit tests
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AdvancedPaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AdvancedPaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AdvancedPaymentProcessor.java 2010-06-21 16:32:30 UTC (rev 22916)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.jboss.jsr299.tck.tests.jbt.resolution.PayBy.PaymentMethod;
+
+(a)PayBy(PaymentMethod.CHEQUE)
+@ApplicationScoped
+class AdvancedPaymentProcessor implements AsynchronousPaymentProcessor {
+ private int value = 0;
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AdvancedPaymentProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AsynchronousPaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AsynchronousPaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AsynchronousPaymentProcessor.java 2010-06-21 16:32:30 UTC (rev 22916)
@@ -0,0 +1,23 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.resolution;
+
+interface AsynchronousPaymentProcessor extends PaymentProcessor
+{
+ int getValue();
+ void setValue(int value);
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/AsynchronousPaymentProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/CashPaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/CashPaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/CashPaymentProcessor.java 2010-06-21 16:32:30 UTC (rev 22916)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution;
+
+import static org.jboss.jsr299.tck.tests.jbt.resolution.PayBy.PaymentMethod.CASH;
+
+import javax.enterprise.context.ApplicationScoped;
+
+@PayBy(CASH)
+@ApplicationScoped
+class CashPaymentProcessor implements AsynchronousPaymentProcessor {
+ private int value = 0;
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/CashPaymentProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/ObtainsInstanceBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/ObtainsInstanceBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/ObtainsInstanceBean.java 2010-06-21 16:32:30 UTC (rev 22916)
@@ -0,0 +1,36 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution;
+
+import static org.jboss.jsr299.tck.tests.jbt.resolution.PayBy.PaymentMethod.CASH;
+import static org.jboss.jsr299.tck.tests.jbt.resolution.PayBy.PaymentMethod.CHEQUE;
+import static org.jboss.jsr299.tck.tests.jbt.resolution.PayBy.PaymentMethod.CREDIT_CARD;
+import static org.jboss.jsr299.tck.tests.jbt.resolution.PayBy.PaymentMethod.OTHER;
+
+import javax.inject.Inject;
+
+import org.jboss.jsr299.tck.tests.jbt.resolution.PayBy.PaymentMethod;
+
+class ObtainsInstanceBean {
+ @Inject @PayBy(CHEQUE) AsynchronousPaymentProcessor chequePaymentProcessor;
+
+ @Inject @PayBy(PaymentMethod.CHEQUE) AsynchronousPaymentProcessor chequePaymentProcessor2;
+
+ @Inject @PayBy(org.jboss.jsr299.tck.tests.jbt.resolution.PayBy.PaymentMethod.CHEQUE) AsynchronousPaymentProcessor chequePaymentProcessor3;
+
+ @Inject @PayBy(CASH) AsynchronousPaymentProcessor cashPaymentProcessor;
+
+ @Inject @PayBy(PaymentMethod.CASH) AsynchronousPaymentProcessor cashPaymentProcessor2;
+
+ @Inject @PayBy(org.jboss.jsr299.tck.tests.jbt.resolution.PayBy.PaymentMethod.CASH) AsynchronousPaymentProcessor cashPaymentProcessor3;
+
+ @Inject @PayBy(OTHER) AsynchronousPaymentProcessor otherPaymentProcessor;
+
+ @Inject @PayBy(PaymentMethod.OTHER) AsynchronousPaymentProcessor otherPaymentProcessor2;
+
+ @Inject @PayBy(org.jboss.jsr299.tck.tests.jbt.resolution.PayBy.PaymentMethod.OTHER) AsynchronousPaymentProcessor otherPaymentProcessor3;
+
+ @Inject @PayBy(PaymentMethod.CREDIT_CARD) AsynchronousPaymentProcessor unresolvedCreditCardPaymentProcessor;
+
+ @Inject @PayBy(CREDIT_CARD) AsynchronousPaymentProcessor unresolvedCreditCardPaymentProcessor2;
+
+ @Inject @PayBy(org.jboss.jsr299.tck.tests.jbt.resolution.PayBy.PaymentMethod.CREDIT_CARD) AsynchronousPaymentProcessor unresolvedCreditCardPaymentProcessor3;
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/ObtainsInstanceBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/OtherPaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/OtherPaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/OtherPaymentProcessor.java 2010-06-21 16:32:30 UTC (rev 22916)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution;
+
+import javax.enterprise.context.ApplicationScoped;
+
+(a)PayBy(org.jboss.jsr299.tck.tests.jbt.resolution.PayBy.PaymentMethod.OTHER)
+@ApplicationScoped
+class OtherPaymentProcessor implements AsynchronousPaymentProcessor {
+ private int value = 0;
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/OtherPaymentProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/PayBy.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/PayBy.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/PayBy.java 2010-06-21 16:32:30 UTC (rev 22916)
@@ -0,0 +1,23 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface PayBy {
+ public static enum PaymentMethod { CASH, CHEQUE, CREDIT_CARD, OTHER };
+
+ PaymentMethod value();
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/PayBy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/PaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/PaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/PaymentProcessor.java 2010-06-21 16:32:30 UTC (rev 22916)
@@ -0,0 +1,21 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.resolution;
+
+interface PaymentProcessor
+{
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/PaymentProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
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 2010-06-21 15:52:18 UTC (rev 22915)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2010-06-21 16:32:30 UTC (rev 22916)
@@ -26,6 +26,7 @@
import org.jboss.tools.cdi.core.test.tck.NameDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.ProducerMethodDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.QualifierDefinitionTest;
+import org.jboss.tools.cdi.core.test.tck.QualifierWithMembersTest;
import org.jboss.tools.cdi.core.test.tck.ResolutionByTypeTest;
import org.jboss.tools.cdi.core.test.tck.ScopeDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.StereotypeDefinitionTest;
@@ -58,6 +59,7 @@
suite.addTestSuite(ResolutionByTypeTest.class);
suite.addTestSuite(EnterpriseResolutionByTypeTest.class);
suite.addTestSuite(AssignabilityOfRawAndParameterizedTypesTest.class);
+ suite.addTestSuite(QualifierWithMembersTest.class);
suite.addTestSuite(ValidationTest.class);
return new CDICoreTestSetup(suite);
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/QualifierWithMembersTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/QualifierWithMembersTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/QualifierWithMembersTest.java 2010-06-21 16:32:30 UTC (rev 22916)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core.test.tck;
+
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IInjectionPointField;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class QualifierWithMembersTest extends TCKTest {
+
+ public void testQualifierWithStaticImportInInjectingBeanAndNonStaticInInjectedBeanResolved() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/ObtainsInstanceBean.java", "chequePaymentProcessor");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertEquals("Wrong number of the beans", 1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.jbt.resolution.AdvancedPaymentProcessor");
+ }
+
+ public void testQualifierWithNonStaticImportInInjectingBeanAndNonStaticInInjectedBeanResolved() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/ObtainsInstanceBean.java", "chequePaymentProcessor2");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertEquals("Wrong number of the beans", 1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.jbt.resolution.AdvancedPaymentProcessor");
+ }
+
+ public void testQualifierWithoutImportInInjectingBeanAndNonStaticInInjectedBeanResolved() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/ObtainsInstanceBean.java", "chequePaymentProcessor3");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertEquals("Wrong number of the beans", 1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.jbt.resolution.AdvancedPaymentProcessor");
+ }
+
+ public void testQualifierWithStaticImportInInjectingBeanAndStaticInInjectedBeanResolved() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/ObtainsInstanceBean.java", "cashPaymentProcessor");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertEquals("Wrong number of the beans", 1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.jbt.resolution.CashPaymentProcessor");
+ }
+
+ public void testQualifierWithNonStaticImportInInjectingBeanAndStaticInInjectedBeanResolved() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/ObtainsInstanceBean.java", "cashPaymentProcessor2");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertEquals("Wrong number of the beans", 1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.jbt.resolution.CashPaymentProcessor");
+ }
+
+ public void testQualifierWithoutImportInInjectingBeanAndStaticInInjectedBeanResolved() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/ObtainsInstanceBean.java", "cashPaymentProcessor3");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertEquals("Wrong number of the beans", 1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.jbt.resolution.CashPaymentProcessor");
+ }
+
+ public void testQualifierWithStaticImportInInjectingBeanAndWithoutImportInInjectedBeanResolved() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/ObtainsInstanceBean.java", "otherPaymentProcessor");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertEquals("Wrong number of the beans", 1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.jbt.resolution.OtherPaymentProcessor");
+ }
+
+ public void testQualifierWithNonStaticImportInInjectingBeanAndWithoutImportInInjectedBeanResolved() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/ObtainsInstanceBean.java", "otherPaymentProcessor2");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertEquals("Wrong number of the beans", 1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.jbt.resolution.OtherPaymentProcessor");
+ }
+
+ public void testQualifierWithoutImportInInjectingBeanAndWithoutImportInInjectedBeanResolved() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/ObtainsInstanceBean.java", "otherPaymentProcessor3");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertEquals("Wrong number of the beans", 1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.jbt.resolution.OtherPaymentProcessor");
+ }
+
+ public void testQualifierWithNonStaticImportInInjectingBeanUnresolved() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/ObtainsInstanceBean.java", "unresolvedCreditCardPaymentProcessor");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertEquals("Wrong number of the beans", 0, beans.size());
+ }
+
+ public void testQualifierWithStaticImportInInjectingBeanUnresolved() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/ObtainsInstanceBean.java", "unresolvedCreditCardPaymentProcessor2");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertEquals("Wrong number of the beans", 0, beans.size());
+ }
+
+ public void testQualifierWithoutImportInInjectingBeanUnresolved() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/ObtainsInstanceBean.java", "unresolvedCreditCardPaymentProcessor3");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
+ assertEquals("Wrong number of the beans", 0, beans.size());
+ }
+}
\ 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/QualifierWithMembersTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 10 months
JBoss Tools SVN: r22915 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-21 11:52:18 -0400 (Mon, 21 Jun 2010)
New Revision: 22915
Modified:
trunk/build/publish.sh
Log:
use update instead of freshen
Modified: trunk/build/publish.sh
===================================================================
--- trunk/build/publish.sh 2010-06-21 10:58:23 UTC (rev 22914)
+++ trunk/build/publish.sh 2010-06-21 15:52:18 UTC (rev 22915)
@@ -14,7 +14,7 @@
echo "BUILD_ID = ${BUILD_ID}" > ${WORKSPACE}/site/${JOB_NAME}/BUILD_ID.txt
# unzip into workspace for publishing as unpacked site
- unzip -f -o -q -d ${WORKSPACE}/site/${JOB_NAME}/ $z
+ unzip -u -o -q -d ${WORKSPACE}/site/${JOB_NAME}/ $z
# copy into workspace for access by bucky aggregator (same name every time)
rsync -aq $z ${WORKSPACE}/site/${SNAPNAME}
@@ -24,7 +24,7 @@
# if zips exist produced & renamed by ant script, copy them too
for z in $(find ${WORKSPACE} -maxdepth 5 -mindepth 3 -name "*Update*.zip"); do
echo "$z ..."
- unzip -f -o -q -d ${WORKSPACE}/site/${JOB_NAME}/ $z
+ unzip -u -o -q -d ${WORKSPACE}/site/${JOB_NAME}/ $z
rsync -aq $z ${WORKSPACE}/site/${SNAPNAME}
done
15 years, 10 months
JBoss Tools SVN: r22914 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-06-21 06:58:23 -0400 (Mon, 21 Jun 2010)
New Revision: 22914
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
Log:
https://jira.jboss.org/browse/JBIDE-6373
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2010-06-21 10:58:03 UTC (rev 22913)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2010-06-21 10:58:23 UTC (rev 22914)
@@ -643,7 +643,8 @@
public void completed(ProgressEvent event) {
if(MozillaEditor.this.getXulRunnerEditor().getWebBrowser()!=null){
- //process this code only in case when editor hasn't been disposed
+ //process this code only in case when editor hasn't been disposed,
+ //see https://jira.jboss.org/browse/JBIDE-6373
MozillaEditor.this.onLoadWindow();
xulRunnerEditor.getBrowser().removeProgressListener(this);
}
15 years, 10 months
JBoss Tools SVN: r22913 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-06-21 06:58:03 -0400 (Mon, 21 Jun 2010)
New Revision: 22913
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizardPage.java
Log:
https://jira.jboss.org/browse/JBIDE-6287 , combobox initalization was corrected.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizardPage.java 2010-06-21 10:56:33 UTC (rev 22912)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizardPage.java 2010-06-21 10:58:03 UTC (rev 22913)
@@ -226,18 +226,7 @@
rbCombo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- IFile bundleFile = bm.getBundleFile(rbCombo.getText());
- String bundlePath = Constants.EMPTY;
- if (bundleFile != null) {
- bundlePath = bundleFile.getFullPath().toString();
- updateTable(bundleFile);
- } else {
- VpePlugin.getDefault().logError(
- "Could not get Bundle File for resource '" //$NON-NLS-1$
- + rbCombo.getText() + "'"); //$NON-NLS-1$
- }
- propsFile.setText(bundlePath);
-
+ setResourceBundlePath(rbCombo.getText());
updateDuplicateKeyStatus();
updateStatus();
}
@@ -361,6 +350,7 @@
*/
if (rbCombo.getItemCount() > 0) {
rbCombo.select(0);
+ setResourceBundlePath(rbCombo.getText());
}
}
/*
@@ -805,5 +795,25 @@
*/
return result;
}
+
+ /**
+ * Sets the resource bundle path according to the selection
+ * from the bundles list.
+ *
+ * @param bundleName the resource bundle name
+ */
+ private void setResourceBundlePath(String bundleName) {
+ IFile bundleFile = bm.getBundleFile(bundleName);
+ String bundlePath = Constants.EMPTY;
+ if (bundleFile != null) {
+ bundlePath = bundleFile.getFullPath().toString();
+ updateTable(bundleFile);
+ } else {
+ VpePlugin.getDefault().logError(
+ "Could not get Bundle File for resource '" //$NON-NLS-1$
+ + bundleName + "'"); //$NON-NLS-1$
+ }
+ propsFile.setText(bundlePath);
+ }
}
15 years, 10 months
JBoss Tools SVN: r22912 - trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2010-06-21 06:56:33 -0400 (Mon, 21 Jun 2010)
New Revision: 22912
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java
Log:
JBIDE-6465: InvocationTargetException is thrown if any XML is opened.
Issue is fixed
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java 2010-06-21 10:54:33 UTC (rev 22911)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java 2010-06-21 10:56:33 UTC (rev 22912)
@@ -13,6 +13,7 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import org.eclipse.core.runtime.IAdaptable;
@@ -25,8 +26,6 @@
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
import org.eclipse.wst.xml.ui.StructuredTextViewerConfigurationXML;
-import org.jboss.tools.common.text.xml.contentassist.ContentAssistProcessorBuilder;
-import org.jboss.tools.common.text.xml.contentassist.ContentAssistProcessorDefinition;
import org.jboss.tools.common.text.xml.contentassist.SortingCompoundContentAssistProcessor;
/**
@@ -46,48 +45,16 @@
protected IContentAssistProcessor[] getContentAssistProcessors(ISourceViewer sourceViewer, String partitionType) {
- SortingCompoundContentAssistProcessor sortingCompoundProcessor = new SortingCompoundContentAssistProcessor(sourceViewer, partitionType);
+ IContentAssistProcessor[] superProcessors = super.getContentAssistProcessors(
+ sourceViewer, partitionType);
List<IContentAssistProcessor> processors = new ArrayList<IContentAssistProcessor>();
-
-// if (sortingCompoundProcessor.size() > 0) {
+
+ SortingCompoundContentAssistProcessor sortingCompoundProcessor = new SortingCompoundContentAssistProcessor(sourceViewer, partitionType);
if (sortingCompoundProcessor.supportsPartitionType(partitionType)) {
processors.add(sortingCompoundProcessor);
}
-/*
- // if we have our own processors we need
- // to define them in plugin.xml file of their
- // plugins using extention point
- // "org.jboss.tools.common.text.xml.contentAssistProcessor"
-
- ContentAssistProcessorDefinition[] defs = ContentAssistProcessorBuilder.getInstance().getContentAssistProcessorDefinitions(partitionType);
-
- if(defs==null) return null;
-
- for(int i=0; i<defs.length; i++) {
- IContentAssistProcessor processor = defs[i].createContentAssistProcessor();
- if(!processors.contains(processor)) {
- processors.add(processor);
- }
- }
-*/
- IContentAssistProcessor[] in = getInitialProcessors(sourceViewer, partitionType);
- if(in != null && in.length > 0) {
-
- //we do not need super processors - make initial processors responsible for that
- for(int i=0; i<in.length; i++) {
- if(!processors.contains(in[i])) {
- processors.add(in[i]);
- }
- }
- } else {
- IContentAssistProcessor[] ps = super.getContentAssistProcessors(sourceViewer, partitionType);
- for(int i=0; ps != null && i<ps.length; i++) {
- if(!processors.contains(ps[i])) {
- processors.add(ps[i]);
- }
- }
- }
- return (IContentAssistProcessor[])processors.toArray(new IContentAssistProcessor[0]);
+ processors.addAll(Arrays.asList(superProcessors));
+ return processors.toArray(new IContentAssistProcessor[0]);
}
/*
@@ -100,7 +67,7 @@
if (sourceViewer == null || !fPreferenceStore.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINKS_ENABLED))
return null;
- List allDetectors = new ArrayList(0);
+ List<IHyperlinkDetector> allDetectors = new ArrayList<IHyperlinkDetector>(0);
IHyperlinkDetector extHyperlinkDetector = getTextEditorsExtensionsHyperlinkDetector();
@@ -151,6 +118,7 @@
return null;
}
+ @SuppressWarnings("rawtypes")
private Method findDeclaredMethod(Class cls, String name, Class[] paramTypes) {
Method[] ms = cls.getDeclaredMethods();
if (ms != null) for (int i = 0; i < ms.length; i++) {
15 years, 10 months
JBoss Tools SVN: r22911 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-06-21 06:54:33 -0400 (Mon, 21 Jun 2010)
New Revision: 22911
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
Log:
https://jira.jboss.org/browse/JBIDE-6373
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2010-06-21 09:07:37 UTC (rev 22910)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2010-06-21 10:54:33 UTC (rev 22911)
@@ -23,10 +23,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -36,7 +33,6 @@
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -646,8 +642,11 @@
}
public void completed(ProgressEvent event) {
- MozillaEditor.this.onLoadWindow();
- xulRunnerEditor.getBrowser().removeProgressListener(this);
+ if(MozillaEditor.this.getXulRunnerEditor().getWebBrowser()!=null){
+ //process this code only in case when editor hasn't been disposed
+ MozillaEditor.this.onLoadWindow();
+ xulRunnerEditor.getBrowser().removeProgressListener(this);
+ }
}
});
15 years, 10 months
JBoss Tools SVN: r22910 - branches/jbosstools-3.1.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/project.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-06-21 05:07:37 -0400 (Mon, 21 Jun 2010)
New Revision: 22910
Modified:
branches/jbosstools-3.1.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/project/ProjectUtils.java
Log:
JBIDE-6332 maintenance
Modified: branches/jbosstools-3.1.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/project/ProjectUtils.java
===================================================================
--- branches/jbosstools-3.1.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/project/ProjectUtils.java 2010-06-21 09:05:34 UTC (rev 22909)
+++ branches/jbosstools-3.1.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/project/ProjectUtils.java 2010-06-21 09:07:37 UTC (rev 22910)
@@ -20,11 +20,11 @@
public class ProjectUtils {
public static boolean addProjectNature(IPath path) {
- String loc = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
- if( path.toOSString().startsWith(loc)) {
- String proj = path.toOSString().substring(loc.length()+1);
- IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(proj);
- return addProjectNature(p, ArchivesNature.NATURE_ID);
+ IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ for( int i = 0; i < allProjects.length; i++ ) {
+ if( allProjects[i].getLocation().equals(path)) {
+ return addProjectNature(allProjects[i], ArchivesNature.NATURE_ID);
+ }
}
return false;
}
15 years, 10 months