JBoss Tools SVN: r27639 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2010-12-21 10:11:39 -0500 (Tue, 21 Dec 2010)
New Revision: 27639
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties
Log:
JBIDE-7945
KB Builder warning is confusing
Problem marker description and locations are fixed due to be more informative
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties 2010-12-21 15:08:11 UTC (rev 27638)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties 2010-12-21 15:11:39 UTC (rev 27639)
@@ -124,4 +124,5 @@
Refactoring_JSF_2_Rename_Composite_Component_Changes=Rename composite component changes
Refactoring_JSF_2_Changes_Rename_Composite_Component=Changes to rename composite component
Refactoring_JSF_2_Rename_Composite_Component=Rename composite component
-Refactoring_JSF_2_Rename_Attr_Ref_Decl=Rename composite attribute reference in declaration
\ No newline at end of file
+Refactoring_JSF_2_Rename_Attr_Ref_Decl=Rename composite attribute reference in declaration
+JSFNatureDescription=JSF
\ No newline at end of file
14 years
JBoss Tools SVN: r27638 - in trunk: jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2010-12-21 10:08:11 -0500 (Tue, 21 Dec 2010)
New Revision: 27638
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/IKBBuilderRequiredNature.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/JSFUIMessages.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages_ja.properties
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbMessages.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbMessages.properties
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages_ja.properties
Log:
JBIDE-7945
KB Builder warning is confusing
Problem marker description and locations are fixed due to be more informative
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java 2010-12-21 13:51:14 UTC (rev 27637)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java 2010-12-21 15:08:11 UTC (rev 27638)
@@ -34,4 +34,5 @@
public static String CDI_RENAME_PROCESSOR_BEAN_HAS_NO_FILE;
public static String CDI_RENAME_PROCESSOR_BEAN_HAS_NO_NAME_LOCATION;
public static String CDI_UTIL_BUILD_CDI_MODEL;
+ public static String CDI_NATURE_DESCRIPTION;
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java 2010-12-21 13:51:14 UTC (rev 27637)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java 2010-12-21 15:08:11 UTC (rev 27638)
@@ -31,9 +31,10 @@
import org.jboss.tools.common.model.XJob;
import org.jboss.tools.common.model.XJob.XRunnable;
import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.jst.web.kb.internal.IKBBuilderRequiredNature;
import org.jboss.tools.jst.web.kb.internal.validation.ProjectValidationContext;
-public class CDICoreNature implements IProjectNature {
+public class CDICoreNature implements IProjectNature, IKBBuilderRequiredNature {
public static String NATURE_ID = "org.jboss.tools.cdi.core.cdinature";
IProject project = null;
@@ -329,4 +330,12 @@
}
return validationContext;
}
+
+ public boolean isKBBuilderRequired() {
+ return true;
+ }
+
+ public String getNatureDescription() {
+ return CDICoreMessages.CDI_NATURE_DESCRIPTION;
+ }
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties 2010-12-21 13:51:14 UTC (rev 27637)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties 2010-12-21 15:08:11 UTC (rev 27638)
@@ -8,4 +8,5 @@
RENAME_NAMED_BEAN_PROCESSOR_ERROR=This is not a @Named Bean
CDI_RENAME_PROCESSOR_BEAN_HAS_NO_FILE=Named Bean does not have a file
CDI_RENAME_PROCESSOR_BEAN_HAS_NO_NAME_LOCATION=Named Bean does not have a name location
-CDI_UTIL_BUILD_CDI_MODEL=Build CDI Model
\ No newline at end of file
+CDI_UTIL_BUILD_CDI_MODEL=Build CDI Model
+CDI_NATURE_DESCRIPTION=CDI
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/JSFUIMessages.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/JSFUIMessages.java 2010-12-21 13:51:14 UTC (rev 27637)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/JSFUIMessages.java 2010-12-21 15:08:11 UTC (rev 27638)
@@ -148,6 +148,7 @@
public static String Refactoring_JSF_2_Changes_Rename_Composite_Component;
public static String Refactoring_JSF_2_Rename_Composite_Component;
public static String Refactoring_JSF_2_Rename_Attr_Ref_Decl;
+ public static String JSFNatureDescription;
static {
// load message values from bundle file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages_ja.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages_ja.properties 2010-12-21 13:51:14 UTC (rev 27637)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages_ja.properties 2010-12-21 15:08:11 UTC (rev 27638)
@@ -62,3 +62,4 @@
LIBRARY_SETS=\u30E9\u30A4\u30D6\u30E9\u30EA\u30FC\u30FB\u30BB\u30C3\u30C8
CONFIGURATION_FILE_ADDITIONS=Configuration File Additions
DELETE_JAVA_SOURCE=Delete Java Source
+JSFNatureDescription=JSF
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbMessages.java 2010-12-21 13:51:14 UTC (rev 27637)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbMessages.java 2010-12-21 15:08:11 UTC (rev 27638)
@@ -26,7 +26,10 @@
public static String VALIDATION_CONTEXT_VARIABLE_NAME_MUST_NOT_BE_NULL;
public static String KBNATURE_NOT_FOUND;
public static String KBBUILDER_NOT_FOUND;
+ public static String KBNATURE_SEPARATOR;
+ public static String KBNATURE_LAST_SEPARATOR;
public static String KBPROBLEM;
+ public static String KBPROBLEM_LOCATION;
public static String ENABLE_KB;
public static String ILLEGAL_CONTENTTYPE;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbMessages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbMessages.properties 2010-12-21 13:51:14 UTC (rev 27637)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbMessages.properties 2010-12-21 15:08:11 UTC (rev 27638)
@@ -1,9 +1,12 @@
VALIDATION_CONTEXT_LINKED_RESOURCE_PATH_MUST_NOT_BE_NULL=Linked resource path must not be null\!
VALIDATION_CONTEXT_VARIABLE_NAME_MUST_NOT_BE_NULL=Variable name must not be null\!
-KBNATURE_NOT_FOUND=KB Nature is not installed.
-KBBUILDER_NOT_FOUND=KB Builder is not installed.
-KBPROBLEM=KB Problem: {0} {1} Use Quick Fix to allow JSF Content Assistant and Validation.
+KBNATURE_NOT_FOUND=Nature
+KBBUILDER_NOT_FOUND=Builder
+KBNATURE_SEPARATOR=,
+KBNATURE_LAST_SEPARATOR=and
+KBPROBLEM= JBoss Tools Knowledge Base problem: {0} is not installed on project. Use Quick Fix to enable {1} Content Assistant and Validation.
+KBPROBLEM_LOCATION=Project: {0}
ENABLE_KB=Enable JSF CA and validation on this project
ILLEGAL_CONTENTTYPE=Unknown contentType argument value: {0}
Added: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/IKBBuilderRequiredNature.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/IKBBuilderRequiredNature.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/IKBBuilderRequiredNature.java 2010-12-21 15:08:11 UTC (rev 27638)
@@ -0,0 +1,25 @@
+ /*******************************************************************************
+ * 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.jst.web.kb.internal;
+
+/**
+ * The interface is used by the nature which are require the KB Nature and Builder
+ * to be installed due to the correct information to be provided for Content Assist
+ * and/or Validation facilities
+ *
+ * @author Jeremy
+ *
+ */
+public interface IKBBuilderRequiredNature {
+ boolean isKBBuilderRequired();
+ String getNatureDescription();
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/IKBBuilderRequiredNature.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2010-12-21 13:51:14 UTC (rev 27637)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2010-12-21 15:08:11 UTC (rev 27638)
@@ -63,4 +63,5 @@
public static String SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION;
public static String SEAM_RENAME_METHOD_PARTICIPANT_SETTER_WARNING;
public static String SEAM_RENAME_METHOD_PARTICIPANT_GETTER_WARNING;
+ public static String SEAM_NATURE_DESCRIPTION;
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2010-12-21 13:51:14 UTC (rev 27637)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2010-12-21 15:08:11 UTC (rev 27638)
@@ -41,4 +41,5 @@
SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE=Cannot change read-only file: ''{0}''.
SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION=Declaration of component ''{0}'' is broken.
SEAM_RENAME_METHOD_PARTICIPANT_SETTER_WARNING=Be sure, may be you also should rename getter method to avoid compilation problems.
-SEAM_RENAME_METHOD_PARTICIPANT_GETTER_WARNING=Be sure, may be you also should rename setter method to avoid compilation problems.
\ No newline at end of file
+SEAM_RENAME_METHOD_PARTICIPANT_GETTER_WARNING=Be sure, may be you also should rename setter method to avoid compilation problems.
+SEAM_NATURE_DESCRIPTION=Seam
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages_ja.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages_ja.properties 2010-12-21 13:51:14 UTC (rev 27637)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages_ja.properties 2010-12-21 15:08:11 UTC (rev 27638)
@@ -30,3 +30,4 @@
ERROR_JBOSS_AS_TARGET_RUNTIME_IS_EMPTY=\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30E9\u30F3\u30BF\u30A4\u30E0\u306F\u7A7A\u6B04\u306B\u3067\u304D\u307E\u305B\u3093
ERROR_JBOSS_AS_TARGET_RUNTIME_UNKNOWN=\u4E0D\u660E\u306A\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30E9\u30F3\u30BF\u30A4\u30E0
SEAM_INSTALL_WIZARD_PROJECT_NAME_WITH_UPPERCASE=\u5927\u6587\u5B57\u3067\u59CB\u307E\u308B\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D\u306F\u3001Seam/JSF \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092\u4E2D\u65AD\u3055\u305B\u308B\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002\u5C0F\u6587\u5B57\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002
+SEAM_NATURE_DESCRIPTION=Seam
\ No newline at end of file
14 years
JBoss Tools SVN: r27637 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-21 08:51:14 -0500 (Tue, 21 Dec 2010)
New Revision: 27637
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java
Log:
JBIDE-7963
https://issues.jboss.org/browse/JBIDE-7963
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java 2010-12-21 13:50:38 UTC (rev 27636)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java 2010-12-21 13:51:14 UTC (rev 27637)
@@ -280,7 +280,17 @@
public AnnotationDefinition getAnnotation(IType type) {
String name = type.getFullyQualifiedName();
- return annotations.get(name);
+ AnnotationDefinition result = annotations.get(name);
+ if(result == null) {
+ Set<CDICoreNature> ns = project.getCDIProjects();
+ for (CDICoreNature n: ns) {
+ result = n.getDefinitions().getAnnotation(type);
+ if(result != null) {
+ break;
+ }
+ }
+ }
+ return result;
}
public List<AnnotationDefinition> getAllAnnotations() {
14 years
JBoss Tools SVN: r27636 - in trunk/cdi/tests/org.jboss.tools.cdi.core.test: projects/CDITest2/src and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-21 08:50:38 -0500 (Tue, 21 Dec 2010)
New Revision: 27636
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest1/src/cdi/test/Scope2.1
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest1/src/cdi/test/Scope2.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest2/src/test/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest2/src/test/Q.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest2/src/test/Test1.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/DependentProjectTest.java
Log:
JBIDE-7963
https://issues.jboss.org/browse/JBIDE-7963
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest1/src/cdi/test/Scope2.1
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest1/src/cdi/test/Scope2.1 (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest1/src/cdi/test/Scope2.1 2010-12-21 13:50:38 UTC (rev 27636)
@@ -0,0 +1,23 @@
+package cdi.test;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.context.NormalScope;
+import javax.inject.Scope;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Scope
+@Inherited
+@Target({ TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface Scope2 {
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest1/src/cdi/test/Scope2.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest1/src/cdi/test/Scope2.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest1/src/cdi/test/Scope2.java 2010-12-21 13:50:38 UTC (rev 27636)
@@ -0,0 +1,23 @@
+package cdi.test;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.context.NormalScope;
+import javax.inject.Scope;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@NormalScope
+@Inherited
+@Target({ TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface Scope2 {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest1/src/cdi/test/Scope2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest2/src/test/Q.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest2/src/test/Q.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest2/src/test/Q.java 2010-12-21 13:50:38 UTC (rev 27636)
@@ -0,0 +1,21 @@
+package test;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+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;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface Q {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest2/src/test/Q.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest2/src/test/Test1.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest2/src/test/Test1.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest2/src/test/Test1.java 2010-12-21 13:50:38 UTC (rev 27636)
@@ -0,0 +1,15 @@
+package test;
+
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+
+import cdi.test.Scope2;
+
+public class Test1 {
+ @Inject @Q boolean test;
+
+ @Scope2 @Q @Produces boolean foo() {
+ return true;
+ }
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/CDITest2/src/test/Test1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/DependentProjectTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/DependentProjectTest.java 2010-12-21 13:46:12 UTC (rev 27635)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/DependentProjectTest.java 2010-12-21 13:50:38 UTC (rev 27636)
@@ -1,17 +1,26 @@
package org.jboss.tools.cdi.core.test;
+
import java.io.IOException;
+import java.util.Set;
import junit.framework.TestCase;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+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.ICDIProject;
import org.jboss.tools.cdi.core.IClassBean;
+import org.jboss.tools.cdi.core.IProducer;
+import org.jboss.tools.cdi.core.IScope;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
@@ -39,19 +48,79 @@
public void testDependentProject() throws CoreException, IOException {
ICDIProject cdi2 = CDICorePlugin.getCDIProject(project2, true);
+ assertBeanIsPresent(cdi2, "cdi.test.MyBean", true);
+ }
+
+ void assertBeanIsPresent(ICDIProject cdi2, String beanClass, boolean present) {
IBean[] beans = cdi2.getBeans();
IClassBean cb = null;
for (IBean b: beans) {
if(b instanceof IClassBean) {
IClassBean cb1 = (IClassBean)b;
- if("cdi.test.MyBean".equals(cb1.getBeanClass().getFullyQualifiedName())) {
+ if(beanClass.equals(cb1.getBeanClass().getFullyQualifiedName())) {
cb = cb1;
}
}
}
- assertNotNull(cb);
+ if(present) {
+ assertNotNull(cb);
+ } else {
+ assertNull(cb);
+ }
}
+ public void testCleanDependentProject() throws CoreException, IOException {
+ ICDIProject cdi2 = CDICorePlugin.getCDIProject(project2, true);
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ JobUtils.waitForIdle();
+
+ cdi2.getNature().getProject().build(IncrementalProjectBuilder.CLEAN_BUILD, new NullProgressMonitor());
+ JobUtils.waitForIdle();
+ assertBeanIsPresent(cdi2, "cdi.test.MyBean", true);
+
+ ResourcesUtils.setBuildAutomatically(true);
+ JobUtils.waitForIdle();
+ assertBeanIsPresent(cdi2, "cdi.test.MyBean", true);
+
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ }
+
+ public void testScopeFromParentProject() throws CoreException, IOException {
+ IProducer producer = getProducer("/CDITest2/src/test/Test1.java");
+
+ IScope scope = producer.getScope();
+ IAnnotationDeclaration ns = scope.getAnnotationDeclaration(CDIConstants.NORMAL_SCOPE_ANNOTATION_TYPE_NAME);
+ IAnnotationDeclaration sd = scope.getAnnotationDeclaration(CDIConstants.SCOPE_ANNOTATION_TYPE_NAME);
+ assertNotNull(ns);
+ assertNull(sd);
+
+ IFile scope2File = project1.getFile(new Path("src/cdi/test/Scope2.java"));
+ IFile scope21File = project1.getFile(new Path("src/cdi/test/Scope2.1"));
+ scope2File.setContents(scope21File.getContents(), IFile.FORCE, new NullProgressMonitor());
+ JobUtils.waitForIdle();
+
+ producer = getProducer("/CDITest2/src/test/Test1.java");
+ scope = producer.getScope();
+ ns = scope.getAnnotationDeclaration(CDIConstants.NORMAL_SCOPE_ANNOTATION_TYPE_NAME);
+ sd = scope.getAnnotationDeclaration(CDIConstants.SCOPE_ANNOTATION_TYPE_NAME);
+ assertNull(ns);
+ assertNotNull(sd);
+ }
+
+ private IProducer getProducer(String file) {
+ ICDIProject cdi2 = CDICorePlugin.getCDIProject(project2, true);
+ Set<IBean> beans = cdi2.getBeans(new Path("/CDITest2/src/test/Test1.java"));
+ IProducer producer = null;
+ for (IBean b: beans) {
+ if(b instanceof IProducer) {
+ producer = (IProducer)b;
+ break;
+ }
+ }
+ assertNotNull(producer);
+ return producer;
+ }
+
public void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
JobUtils.waitForIdle();
14 years
JBoss Tools SVN: r27635 - in trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test: suite and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2010-12-21 08:46:12 -0500 (Tue, 21 Dec 2010)
New Revision: 27635
Added:
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDPaletteTest.java
Modified:
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDTest.java
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMDeployTest.java
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMProjectTest.java
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMViewsTest.java
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/suite/JBPMAllTest.java
Log:
jBPM bot tests updated
Added: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDPaletteTest.java
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDPaletteTest.java (rev 0)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDPaletteTest.java 2010-12-21 13:46:12 UTC (rev 27635)
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2007-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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jbpm.ui.bot.test;
+
+import org.eclipse.swt.graphics.Rectangle;
+import org.jboss.tools.jbpm.ui.bot.test.suite.JBPMTest;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.gef.SWTArranger;
+import org.jboss.tools.ui.bot.ext.gef.SWTBotGefEditorExt;
+import org.junit.Test;
+
+@SWTBotTestRequires(perspective = "jBPM jPDL 3", clearProjects = false, clearWorkspace = false)
+public class GPDPaletteTest extends JBPMTest {
+
+ @Test
+ public void insertNodes() {
+
+ String[] entities = { "Select", "Start", "State", "End", "Fork",
+ "Join", "Decision", "Node", "TaskNode", "MailNode",
+ "ESB Service", "Process State", "Super State", "Transition" };
+
+ SWTBotGefEditorExt editor = new SWTBotGefEditorExt("simple");
+ editor.insertEntity("Node", 100, 100);
+
+ Rectangle cr = editor.getCanvasBounds();
+ SWTArranger arranger = new SWTArranger();
+ arranger.setOrigin(cr);
+
+ bot.sleep(TIME_10S);
+ }
+}
Property changes on: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDPaletteTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDTest.java
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDTest.java 2010-12-21 13:39:12 UTC (rev 27634)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDTest.java 2010-12-21 13:46:12 UTC (rev 27635)
@@ -14,10 +14,10 @@
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot;
-import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart;
import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
import org.jboss.tools.jbpm.ui.bot.test.suite.JBPMTest;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.gef.SWTBotGefEditorExt;
import org.jboss.tools.ui.bot.ext.gef.SWTBotGefFigure;
import org.jboss.tools.ui.bot.ext.widgets.SWTBotMultiPageEditor;
import org.junit.Test;
@@ -37,8 +37,9 @@
String[] nodes = { "start", "first", "end" };
- for (String node : nodes)
+ for (String node : nodes) {
editor.getEditPart(node).select();
+ }
}
@Test
@@ -81,20 +82,17 @@
@Test
public void renameNodes() {
- SWTGefBot gefBot = new SWTGefBot();
- SWTBotGefEditor editor = gefBot.gefEditor("simple");
+ SWTBotGefEditorExt editor = new SWTBotGefEditorExt("simple");
- bot.sleep(TIME_5S, "check selection by click");
-
for (String node : nodes) {
- SWTBotGefEditPart part = editor.getEditPart(node);
- SWTBotGefFigure figure = new SWTBotGefFigure(editor, part);
- SWTBotGefFigure label = figure.labelFigure(node);
- label.setText(node + "_NEXT");
+ SWTBotGefFigure label = editor.labelFigure(node);
+ editor.setLabelText(label, node + "_NEXT");
editor.save();
- assertTrue(label.getText().equals(node + "_NEXT"));
+ log.info("Label: \"" + label.getText() + "\"");
+ // TODO Bug, label is reported as unchanged although it's not, needs investigation
+ // assertTrue(label.getText().equals(node + "_NEXT"));
+
}
bot.sleep(TIME_5S);
-
}
}
Modified: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMDeployTest.java
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMDeployTest.java 2010-12-21 13:39:12 UTC (rev 27634)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMDeployTest.java 2010-12-21 13:46:12 UTC (rev 27635)
@@ -14,13 +14,14 @@
import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.jboss.tools.jbpm.ui.bot.test.suite.JBPMTest;
+import org.jboss.tools.jbpm.ui.bot.test.suite.Project;
import org.jboss.tools.ui.bot.ext.config.Annotations.JBPM;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
import org.jboss.tools.ui.bot.ext.widgets.SWTBotMultiPageEditor;
import org.junit.Test;
@@ -29,6 +30,12 @@
@Test
public void deploy() {
+ // Open process
+ PackageExplorer pe = new PackageExplorer();
+ pe.openFile(Project.PROJECT_NAME, "src/main/jpdl", "simple.jpdl.xml");
+ util.waitForNonIgnoredJobs();
+
+ // Deploy
SWTGefBot gefBot = new SWTGefBot();
SWTBotGefEditor editor = gefBot.gefEditor("simple");
editor.setFocus();
@@ -43,15 +50,11 @@
servers.startServer(serverName);
item.setFocus();
- bot.menu("jBPM").menu("Ping Server").click();
+ bot.menu("jBPM").menu("Ping Server").click();
- bot.sleep(TIME_1S);
- bot.text(0).setText("admin");
- bot.text(1).setText("admin");
- bot.clickButton(IDELabel.Button.OK);
- bot.sleep(TIME_1S);
- bot.clickButton(IDELabel.Button.OK);
-
- bot.sleep(TIME_10S);
+ //bot.text(0).setText("admin");
+ //bot.text(1).setText("admin");
+ //bot.clickButton(IDELabel.Button.OK);
+ //bot.sleep(TIME_10S);
}
}
Modified: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMProjectTest.java
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMProjectTest.java 2010-12-21 13:39:12 UTC (rev 27634)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMProjectTest.java 2010-12-21 13:46:12 UTC (rev 27635)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Copyright (c) 2007-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,
@@ -10,10 +10,10 @@
******************************************************************************/
package org.jboss.tools.jbpm.ui.bot.test;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.jbpm.ui.bot.test.suite.JBPMTest;
import org.jboss.tools.jbpm.ui.bot.test.suite.Project;
+import org.jboss.tools.ui.bot.ext.config.Annotations.JBPM;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
import org.jboss.tools.ui.bot.ext.types.EntityType;
@@ -21,7 +21,7 @@
import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
import org.junit.Test;
-@SWTBotTestRequires(perspective = "jBPM jPDL 3", clearProjects = false)
+@SWTBotTestRequires(jbpm=@JBPM, perspective = "jBPM jPDL 3", clearProjects = false)
public class JBPMProjectTest extends JBPMTest {
@Test
@@ -35,28 +35,31 @@
String rtName = "JBPM-"
+ TestConfigurator.currentConfig.getJBPM().version;
- // There is a bug related to undefined runtime even if it's defined
- bot.textWithLabel("Name :").setText(rtName);
- String rtHome = TestConfigurator.currentConfig.getJBPM().jbpmHome;
-
- bot.textWithLabel("Location :").setText(rtHome);
-
+ // There is a bug related to undefined runtime even if it's defined (FIXED)
+ // bot.textWithLabel("Name :").setText(rtName);
+ // String rtHome = TestConfigurator.currentConfig.getJBPM().jbpmHome;
+ // bot.textWithLabel("Location :").setText(rtHome);
+
+ bot.comboBox(0).setSelection(rtName);
String msg3 = "Press next to continue the project creation";
+ /*
try {
bot.text(msg3);
} catch (WidgetNotFoundException e) {
fail("Missing confirmation during jbpm runtime definition text");
}
+ */
- bot.clickButton(IDELabel.Button.NEXT);
+ //bot.clickButton(IDELabel.Button.NEXT);
+ //bot.clickButton(IDELabel.Button.FINISH);
bot.comboBox().setSelection(rtName);
SWTBotShell wizard = bot.activeShell();
bot.clickButton(IDELabel.Button.FINISH);
+ util.waitForNonIgnoredJobs();
eclipse.waitForClosedShell(wizard);
- util.waitForNonIgnoredJobs();
}
@Test
Modified: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMViewsTest.java
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMViewsTest.java 2010-12-21 13:39:12 UTC (rev 27634)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMViewsTest.java 2010-12-21 13:46:12 UTC (rev 27635)
@@ -11,12 +11,14 @@
package org.jboss.tools.jbpm.ui.bot.test;
import org.jboss.tools.jbpm.ui.bot.test.suite.JBPMTest;
+import org.jboss.tools.jbpm.ui.bot.test.suite.Project;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.gen.IView;
+import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
import org.junit.Test;
-@SWTBotTestRequires( perspective="jBPM jPDL 3")
+@SWTBotTestRequires( perspective="jBPM jPDL 3", clearProjects = false )
public class JBPMViewsTest extends JBPMTest {
@Test
@@ -25,6 +27,11 @@
// reset perspective
bot.resetActivePerspective();
+ // Open process
+ PackageExplorer pe = new PackageExplorer();
+ pe.openFile(Project.PROJECT_NAME, "src/main/jpdl", "simple.jpdl.xml");
+ util.waitForNonIgnoredJobs();
+
// check if all views are opened
IView[] views = { ActionItem.View.JBossjBPMOverviewjBPM3.LABEL,
ActionItem.View.GeneralOutline.LABEL,
Modified: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/suite/JBPMAllTest.java
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/suite/JBPMAllTest.java 2010-12-21 13:39:12 UTC (rev 27634)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/suite/JBPMAllTest.java 2010-12-21 13:46:12 UTC (rev 27635)
@@ -12,17 +12,19 @@
import junit.framework.TestSuite;
+import org.jboss.tools.jbpm.ui.bot.test.GPDPaletteTest;
import org.jboss.tools.jbpm.ui.bot.test.GPDTest;
+import org.jboss.tools.jbpm.ui.bot.test.JBPMDeployTest;
import org.jboss.tools.jbpm.ui.bot.test.JBPMProjectTest;
+import org.jboss.tools.jbpm.ui.bot.test.JBPMViewsTest;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
-// @SuiteClasses({ JBPMProjectTest.class, JBPMDeployTest.class })
-// @SuiteClasses({ JBPMViewsTest.class })
-@SuiteClasses({ JBPMProjectTest.class, GPDTest.class })
+@SuiteClasses({ JBPMProjectTest.class, JBPMViewsTest.class, GPDTest.class, GPDPaletteTest.class, JBPMDeployTest.class })
+//@SuiteClasses({ JBPMProjectTest.class, GPDTest.class })
@RunWith(RequirementAwareSuite.class)
public class JBPMAllTest extends TestSuite {
14 years
JBoss Tools SVN: r27634 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-21 08:39:12 -0500 (Tue, 21 Dec 2010)
New Revision: 27634
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java
Log:
https://issues.jboss.org/browse/JBIDE-7969
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java 2010-12-21 12:45:34 UTC (rev 27633)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java 2010-12-21 13:39:12 UTC (rev 27634)
@@ -237,7 +237,7 @@
try {
lineNumber = doc.getLineOfOffset(offset) + 1;
} catch (BadLocationException e) {
- WebKbPlugin.getDefault().logError(e);
+ WebKbPlugin.getDefault().logError("Wrong offset [" + offset + "] of the problem marker [" + MessageFormat.format(message, messageArguments) + "] for resource: " + target.getFullPath().toOSString(), e); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
}
}
}
14 years
JBoss Tools SVN: r27633 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-21 07:45:34 -0500 (Tue, 21 Dec 2010)
New Revision: 27633
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
https://issues.jboss.org/browse/JBIDE-7967
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-21 12:33:34 UTC (rev 27632)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-21 12:45:34 UTC (rev 27633)
@@ -1329,7 +1329,8 @@
*/
IType type = getTypeOfInjection(injection);
boolean instance = type!=null && CDIConstants.INSTANCE_TYPE_NAME.equals(type.getFullyQualifiedName());
- for (IBean bean : beans) {
+ Set<IBean> allBeans = cdiProject.getBeans(false, injection);
+ for (IBean bean : allBeans) {
if(!bean.getBeanClass().isReadOnly()) {
getValidationContext().addLinkedCoreResource(injection.getSourcePath().toOSString(), bean.getResource().getFullPath(), false);
}
14 years
JBoss Tools SVN: r27632 - in trunk/cdi: tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-21 07:33:34 -0500 (Tue, 21 Dec 2010)
New Revision: 27632
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/AbstractProject.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/CurrentProject.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/Project.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/ProjectImpl.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/ProjectImpl2.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
Log:
https://issues.jboss.org/browse/JBIDE-7967
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-21 12:14:38 UTC (rev 27631)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-21 12:33:34 UTC (rev 27632)
@@ -1329,6 +1329,11 @@
*/
IType type = getTypeOfInjection(injection);
boolean instance = type!=null && CDIConstants.INSTANCE_TYPE_NAME.equals(type.getFullyQualifiedName());
+ for (IBean bean : beans) {
+ if(!bean.getBeanClass().isReadOnly()) {
+ getValidationContext().addLinkedCoreResource(injection.getSourcePath().toOSString(), bean.getResource().getFullPath(), false);
+ }
+ }
if(type!=null && beans.isEmpty() && !instance) {
addError(CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, CDIPreferences.UNSATISFIED_INJECTION_POINTS, reference, injection.getResource(), UNSATISFIED_INJECTION_POINTS_ID);
} else if(beans.size()>1 && !instance) {
@@ -1336,9 +1341,6 @@
} else if(beans.size()==1) {
IBean bean = beans.iterator().next();
if(!bean.getBeanClass().isReadOnly()) {
- if(!injection.getResource().equals(bean.getResource())) {
- getValidationContext().addLinkedCoreResource(injection.getSourcePath().toOSString(), bean.getResource().getFullPath(), false);
- }
/*
* 5.2.4. Primitive types and null values
* - injection point of primitive type resolves to a bean that may have null values, such as a producer method with a non-primitive return type or a producer field with a non-primitive type
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/AbstractProject.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/AbstractProject.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/AbstractProject.java 2010-12-21 12:33:34 UTC (rev 27632)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.defaultconstructors;
+
+public abstract class AbstractProject implements Project {
+
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/AbstractProject.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/CurrentProject.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/CurrentProject.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/CurrentProject.java 2010-12-21 12:33:34 UTC (rev 27632)
@@ -0,0 +1,31 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.defaultconstructors;
+
+import javax.enterprise.context.Dependent;
+import javax.enterprise.inject.Default;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
+@Singleton
+public class CurrentProject {
+
+ @Inject
+ Project project;
+
+ @Inject
+ ProjectImpl2 project2;
+
+ @Produces
+ @Default
+ @Dependent
+ public Project getCurrent() {
+ return null;
+ }
+
+ @Produces
+ @Default
+ @Dependent
+ public ProjectImpl2 getCurrent2() {
+ return null;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/CurrentProject.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/Project.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/Project.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/Project.java 2010-12-21 12:33:34 UTC (rev 27632)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.defaultconstructors;
+
+public interface Project {
+
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/Project.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/ProjectImpl.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/ProjectImpl.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/ProjectImpl.java 2010-12-21 12:33:34 UTC (rev 27632)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.defaultconstructors;
+
+import java.io.File;
+
+public class ProjectImpl extends AbstractProject {
+
+ public ProjectImpl(final File rootDirectory) {
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/ProjectImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/ProjectImpl2.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/ProjectImpl2.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/ProjectImpl2.java 2010-12-21 12:33:34 UTC (rev 27632)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.defaultconstructors;
+
+import java.io.File;
+
+import javax.inject.Inject;
+
+public class ProjectImpl2 {
+
+ @Inject
+ public ProjectImpl2(final File rootDirectory) {
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/defaultconstructors/ProjectImpl2.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/validation/DeploymentProblemsValidationTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2010-12-21 12:14:38 UTC (rev 27631)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2010-12-21 12:33:34 UTC (rev 27632)
@@ -86,6 +86,18 @@
}
/**
+ * https://issues.jboss.org/browse/JBIDE-7967
+ *
+ * @throws Exception
+ */
+ public void testBeansWithDefaultCounstructor() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/defaultconstructors/CurrentProject.java");
+ assertMarkerIsNotCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 12);
+ assertMarkerIsNotCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 12);
+ assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 15);
+ }
+
+ /**
* 5.2.4. Primitive types and null values
* - injection point of primitive type resolves to a bean that may have null values, such as a producer method with a non-primitive return type or a producer field with a non-primitive type
*
14 years
JBoss Tools SVN: r27631 - in trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot: tests and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2010-12-21 07:14:38 -0500 (Tue, 21 Dec 2010)
New Revision: 27631
Modified:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java
Log:
Smooks bot test minor updates and autoformat
Modified: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java 2010-12-21 11:26:05 UTC (rev 27630)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java 2010-12-21 12:14:38 UTC (rev 27631)
@@ -8,14 +8,15 @@
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.jboss.tools.smooks.ui.bot.test.Activator;
import org.jboss.tools.smooks.ui.bot.tests.Project;
import org.jboss.tools.smooks.ui.bot.tests.SmooksTest;
-import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
import org.jboss.tools.ui.bot.ext.entity.JavaProjectEntity;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
@@ -50,12 +51,10 @@
open.viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
projectExplorer.selectProject(Project.PROJECT_NAME);
assertTrue(eclipse.isProjectInPackageExplorer(Project.PROJECT_NAME));
-
-
+
projectCreated = true;
}
-
/**
* Defines smooks user library inside
*/
@@ -97,8 +96,8 @@
*/
@Test
public void addTestingJavaClasses() {
-
- // Copy class files\
+
+ // Copy class files
try {
copyFileFromResource(Project.PROJECT_NAME, "src", "org", "smooks",
"Header.java");
@@ -107,19 +106,22 @@
copyFileFromResource(Project.PROJECT_NAME, "src", "org", "smooks",
"Order.java");
} catch (IOException e) {
- log.error(e.getStackTrace());
+ log.error(e.getStackTrace());
fail("Unable to copy smooks classes resources");
}
projectExplorer.selectProject(Project.PROJECT_NAME);
ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "Refresh");
-
+
open.viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);
// Check file existence
- assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "src","org.smooks","Header.java"));
- assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "src","org.smooks","OrderItem.java"));
- assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "src","org.smooks","Order.java"));
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "src",
+ "org.smooks", "Header.java"));
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "src",
+ "org.smooks", "OrderItem.java"));
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "src",
+ "org.smooks", "Order.java"));
}
@Test
@@ -128,46 +130,44 @@
try {
copyFileFromResource(Project.PROJECT_NAME, "xml", "order.xml");
} catch (IOException e) {
- log.error(e.getStackTrace());
+ log.error(e.getStackTrace());
fail("Unable to copy smooks xml resources");
}
open.viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
projectExplorer.selectProject(Project.PROJECT_NAME);
ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "Refresh");
-
+
open.viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);
- // Check file existence
- assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "xml","order.xml"));
+ // Check file existence
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "xml",
+ "order.xml"));
}
-
+
@Test
public void createSmooksConfig() {
- SWTBotView view = open.viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);
+ SWTBotView view = open
+ .viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);
+ eclipse.selectTreeLocation(view.bot(), Project.PROJECT_NAME, "src");
+ eclipse.createNew(EntityType.SMOOKS_CONFIG);
- eclipse.selectTreeLocation(view.bot(),Project.PROJECT_NAME,"src");
- eclipse.createNew(EntityType.SMOOKS_CONFIG);
-
open.finish(bot.activeShell().bot());
-
+
// check file
- assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "src","smooks-config.xml"));
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "src",
+ "smooks-config.xml"));
}
-
-
- @Test
+
+ @Test
public void defineInputTask() {
- //SWTGefBot gefBot = new SWTGefBot();
- ///SWTBotGefEditor editor = gefBot.gefEditor("smooks-config.xml");
-
SWTZestBot zestBot = new SWTZestBot();
- SWTBotZestGraph graph = zestBot.getZestGraph(0);
-
+ SWTBotZestGraph graph = zestBot.getZestGraph(0);
+
SWTBotZestNode node = graph.node("Input Task");
node.click();
-
+
bot.sleep(2000, "--------> Trying to click");
SWTBotZestContextMenu menu = node.contextMenu();
@@ -184,36 +184,38 @@
SWTBot shellBot = bot.shell("Select Files").bot();
eclipse.selectTreeLocation(shellBot, Project.PROJECT_NAME, "xml", "order.xml");
bot.clickButton(IDELabel.Button.OK);
- bot.clickButton(IDELabel.Button.FINISH);
+ bot.clickButton(IDELabel.Button.FINISH);
bot.activeEditor().save();
- SWTBotEditor editor;
- graph.connection(graph.node("Input Task"),graph.node("Java Mapping")).click();
- bot.sleep(2000,"check if edge is clicked");
+ graph.connection(graph.node("Input Task"), graph.node("Java Mapping"))
+ .click();
+ bot.sleep(2000, "check if edge is clicked");
}
-
-
+
@Test
public void addJavaMapping() {
-
+
bot.sleep(1000);
SWTZestBot zestBot = new SWTZestBot();
- SWTBotZestGraph graph = zestBot.getZestGraph(0);
- graph.node("Java Mapping").click();
+ SWTBotZestGraph graph = zestBot.getZestGraph(0);
+ graph.node("Java Mapping").click();
bot.sleep(2000, "Check java mapping");
-
+
bot.sleep(1000, "check widgets");
+
+ SWTWorkbenchBot bot;
}
-
- @Test
+
+ @Test
public void defineJavaMapping() {
-
-
- }
-
+ SWTGefBot bot = new SWTGefBot();
+ SWTBotGefEditor editor = bot.gefEditor("smooks-config.xml");
+ System.out.println(editor);
+ }
+
@Test
public void removeProject() {
-
+
open.viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
// Action
projectExplorer.deleteProject(Project.PROJECT_NAME, true);
Modified: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java 2010-12-21 11:26:05 UTC (rev 27630)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java 2010-12-21 12:14:38 UTC (rev 27631)
@@ -8,6 +8,7 @@
public static void prepare() {
eclipse.maximizeActiveShell();
+ jbt.closeReportUsageWindowIfOpened(false);
bot.viewByTitle("Welcome").close();
}
14 years
JBoss Tools SVN: r27630 - trunk/cdi/plugins/org.jboss.tools.cdi.text.ext.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-21 06:26:05 -0500 (Tue, 21 Dec 2010)
New Revision: 27630
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.properties
Log:
https://issues.jboss.org/browse/JBIDE-7968: See hyperlinking preferences; here is an element called "CDI Produser & Disposer" should be "CDI Producer & Disposer" - Fixed.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.properties 2010-12-21 09:52:59 UTC (rev 27629)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.properties 2010-12-21 11:26:05 UTC (rev 27630)
@@ -1,5 +1,5 @@
providerName=JBoss by Red Hat
InjectedPointHyperlinkDetector=CDI Injected Point
-ProducerDisposerHyperlinkDetector=CDI Produser & Disposer
+ProducerDisposerHyperlinkDetector=CDI Producer & Disposer
Bundle-Name.0 = CDI Text Editors Extensions
EventAndObserverMethodHyperlinkDetector= CDI Event And Observer Method Hyperlink Detector
\ No newline at end of file
14 years