JBoss Tools SVN: r19990 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi: internal/core/impl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-01-28 10:36:07 -0500 (Thu, 28 Jan 2010)
New Revision: 19990
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreBuilder.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3125
Improved getLegalTypes and building super types for types with parameters
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreBuilder.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreBuilder.java 2010-01-28 14:42:51 UTC (rev 19989)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreBuilder.java 2010-01-28 15:36:07 UTC (rev 19990)
@@ -37,8 +37,11 @@
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeParameter;
import org.jboss.tools.cdi.internal.core.impl.CDIAnnotationElement;
+import org.jboss.tools.cdi.internal.core.impl.ParametedType;
import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationHelper;
+import org.jboss.tools.cdi.internal.core.impl.definition.ParametedTypeFactory;
import org.jboss.tools.cdi.internal.core.scanner.CDIBuilderDelegate;
import org.jboss.tools.cdi.internal.core.scanner.FileSet;
import org.jboss.tools.common.EclipseUtil;
@@ -99,6 +102,22 @@
protected IProject[] build(int kind, Map args, IProgressMonitor monitor)
throws CoreException {
+
+
+ IType t = EclipseJavaUtil.findType(EclipseResourceUtil.getJavaProject(getProject()), "pack.model.A2");
+ ParametedType p = new ParametedType();
+ p.setType(t);
+ p.setSignature("Q" + t.getFullyQualifiedName() + ";");
+
+ for (IParametedType c: p.getInheritedTypes()) {
+ Set<IParametedType> s = ((ParametedType)c).getInheritedTypes();
+ for (IParametedType d: s) {
+ ((ParametedType)d).getInheritedTypes();
+ };
+ };
+
+
+
resourceVisitor = null;
findDelegate();
if(getDelegate() == null) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java 2010-01-28 14:42:51 UTC (rev 19989)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java 2010-01-28 15:36:07 UTC (rev 19990)
@@ -123,6 +123,7 @@
Object[] os = (Object[])value;
for (int i = 0; i < os.length; i++) {
String typeName = os[i].toString();
+ if(!typeName.endsWith(";")) typeName = "Q" + typeName + ";";
ParametedType p = ParametedTypeFactory.getParametedType(((IMember)definition.getMember()).getDeclaringType(), typeName);
if(p != null) {
result.add(new TypeDeclaration(p, -1, 0));
@@ -130,6 +131,7 @@
}
} else if(value != null) {
String typeName = value.toString();
+ if(!typeName.endsWith(";")) typeName = "Q" + typeName + ";";
ParametedType p = ParametedTypeFactory.getParametedType(((IMember)definition.getMember()).getDeclaringType(), typeName);
if(p != null) {
result.add(new TypeDeclaration(p, -1, 0));
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-01-28 14:42:51 UTC (rev 19989)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-01-28 15:36:07 UTC (rev 19990)
@@ -229,6 +229,11 @@
public Set<IParametedType> getLegalTypes() {
Set<IParametedType> result = new HashSet<IParametedType>();
AnnotationDeclaration d = getDefinition().getTypedAnnotation();
+ if(d != null) {
+ Set<ITypeDeclaration> ts = getRestrictedTypeDeclaratios();
+ result.addAll(ts);
+ return result;
+ }
IType type = getDefinition().getType();
if(type != null) {
ParametedType p = new ParametedType();
@@ -236,7 +241,7 @@
String[] ps = null;
try {
ps = type.getTypeParameterSignatures();
- p.setSignature(type.getFullyQualifiedName());
+ p.setSignature("Q" + type.getFullyQualifiedName() + ',');
} catch (CoreException e) {
//TODO
}
@@ -247,29 +252,6 @@
}
Set<IParametedType> inh = getDefinition().getAllInheritedTypes();
if(inh != null) result.addAll(inh);
- if(d != null) {
- try {
- Set<IParametedType> reducedResult = new HashSet<IParametedType>();
- IMemberValuePair[] ps = d.getDeclaration().getMemberValuePairs();
- if(ps != null) for (IMemberValuePair p: ps) {
- Object o = p.getValue();
- if(o instanceof Object[]) {
- Object[] os = (Object[])o;
- for (int i = 0; i < os.length; i++) {
- String s = os[i].toString();
- if(!s.endsWith(";")) s = "Q" + s + ";";
- IParametedType t = ParametedTypeFactory.getParametedType(getDefinition().getType(), s);
- if(CDIProject.containsType(result, t)) {
- reducedResult.add(t);
- }
- }
- }
- }
- result = reducedResult;
- } catch (CoreException e) {
- //TODO
- }
- }
return result;
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java 2010-01-28 14:42:51 UTC (rev 19989)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java 2010-01-28 15:36:07 UTC (rev 19990)
@@ -11,10 +11,17 @@
package org.jboss.tools.cdi.internal.core.impl;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
+import java.util.StringTokenizer;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeParameter;
+import org.eclipse.jdt.core.JavaModelException;
+import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IParametedType;
+import org.jboss.tools.cdi.internal.core.impl.definition.ParametedTypeFactory;
/**
*
@@ -26,6 +33,10 @@
protected String signature;
protected List<ParametedType> parameterTypes = new ArrayList<ParametedType>();
+ boolean inheritanceIsBuilt = false;
+ protected ParametedType superType = null;
+ protected Set<IParametedType> inheritedTypes = new HashSet<IParametedType>();
+
public ParametedType() {}
public IType getType() {
@@ -58,4 +69,100 @@
return false;
}
+ void buildInheritance() {
+ inheritanceIsBuilt = true;
+ if(type == null) return;
+ try {
+ if(!type.isInterface() && !type.isAnnotation()) {
+ String sc = type.getSuperclassTypeSignature();
+ if(sc != null) {
+ sc = resolveParameters(sc);
+ }
+ superType = ParametedTypeFactory.getParametedType(type, sc);
+ if(superType != null) {
+ inheritedTypes.add(superType);
+ }
+ }
+ String[] is = type.getSuperInterfaceTypeSignatures();
+ if(is != null) for (int i = 0; i < is.length; i++) {
+ String p = resolveParameters(is[i]);
+ ParametedType t = ParametedTypeFactory.getParametedType(type, p);
+ if(t != null) {
+ inheritedTypes.add(t);
+ }
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ }
+
+ public ParametedType getSuperType() {
+ if(!inheritanceIsBuilt) {
+ buildInheritance();
+ }
+ return superType;
+ }
+
+ public Set<IParametedType> getInheritedTypes() {
+ if(!inheritanceIsBuilt) {
+ buildInheritance();
+ }
+ return inheritedTypes;
+ }
+
+ public String resolveParameters(String typeSignature) {
+ if(typeSignature == null) {
+ return typeSignature;
+ }
+ int i = typeSignature.indexOf('<');
+ if(i < 0) {
+ if(( typeSignature.startsWith("T") || typeSignature.startsWith("Q")) && typeSignature.endsWith(";")) {
+ String param = typeSignature.substring(1, typeSignature.length() - 1);
+ String s = findParameterSignature(param);
+ return s == null ? typeSignature : s;
+ }
+ return typeSignature;
+ }
+ int j = typeSignature.lastIndexOf('>');
+ if(j < i) {
+ return typeSignature;
+ }
+ String params = typeSignature.substring(i + 1, j);
+ boolean replaced = false;
+ StringBuffer newParams = new StringBuffer();
+ StringTokenizer st = new StringTokenizer(params);
+ while(st.hasMoreTokens()) {
+ String param = st.nextToken();
+ String newParam = resolveParameters( param);
+ if(!param.equals(newParam)) replaced = true;
+ if(newParam.length() == 0) newParams.append(',');
+ newParams.append(newParam);
+ }
+ if(replaced) {
+ typeSignature = typeSignature.substring(0, i) + '<' + newParams.toString() + '>' + ';';
+ }
+ return typeSignature;
+ }
+
+ public String findParameterSignature(String paramName) {
+ if(type == null) {
+ return null;
+ }
+ ITypeParameter[] ps = null;
+ try {
+ ps = type.getTypeParameters();
+ } catch (JavaModelException e) {
+ return null;
+ }
+ if(ps != null) for (int i = 0; i < ps.length; i++) {
+ if(ps[i].getElementName().equals(paramName)) {
+ if(parameterTypes.size() > i) {
+ ParametedType p = parameterTypes.get(i);
+ return p.getSignature();
+ }
+ }
+ }
+ return null;
+ }
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java 2010-01-28 14:42:51 UTC (rev 19989)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java 2010-01-28 15:36:07 UTC (rev 19990)
@@ -66,7 +66,16 @@
public Set<IParametedType> getLegalTypes() {
Set<IParametedType> result = new HashSet<IParametedType>();
- if(typeDeclaration != null) result.add(typeDeclaration);
+ AnnotationDeclaration d = getDefinition().getTypedAnnotation();
+ if(d != null) {
+ Set<ITypeDeclaration> ts = getRestrictedTypeDeclaratios();
+ result.addAll(ts);
+ return result;
+ }
+ if(typeDeclaration != null) {
+ result.add(typeDeclaration);
+ //TODO add all inherited types
+ }
return result;
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java 2010-01-28 14:42:51 UTC (rev 19989)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java 2010-01-28 15:36:07 UTC (rev 19990)
@@ -76,7 +76,16 @@
public Set<IParametedType> getLegalTypes() {
Set<IParametedType> result = new HashSet<IParametedType>();
- if(typeDeclaration != null) result.add(typeDeclaration);
+ AnnotationDeclaration d = getDefinition().getTypedAnnotation();
+ if(d != null) {
+ Set<ITypeDeclaration> ts = getRestrictedTypeDeclaratios();
+ result.addAll(ts);
+ return result;
+ }
+ if(typeDeclaration != null) {
+ result.add(typeDeclaration);
+ //TODO add all inherited types
+ }
return result;
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2010-01-28 14:42:51 UTC (rev 19989)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2010-01-28 15:36:07 UTC (rev 19990)
@@ -17,8 +17,6 @@
import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.IParametedType;
import org.jboss.tools.cdi.internal.core.impl.ParametedType;
-import org.jboss.tools.common.el.core.resolver.TypeInfoCollector;
-import org.jboss.tools.common.model.util.EclipseJavaUtil;
/**
*
@@ -28,10 +26,10 @@
public class AbstractTypeDefinition extends AbstractMemberDefinition {
protected String qualifiedName;
protected IType type;
- protected ParametedType superType = null;
- protected Set<IParametedType> inheritedTypes = new HashSet<IParametedType>();
- protected Set<IParametedType> allInheritedTypes = new HashSet<IParametedType>();
+ protected ParametedType parametedType = null;
+ Set<IParametedType> allInheritedTypes = null;
+
public AbstractTypeDefinition() {}
public String getQualifiedName() {
@@ -51,45 +49,32 @@
this.type = contextType;
super.init(contextType, context);
qualifiedName = getType().getFullyQualifiedName();
- if(!type.isInterface() && !type.isAnnotation()) {
- String sc = type.getSuperclassTypeSignature();
- superType = ParametedTypeFactory.getParametedType(type, sc);
- if(superType != null) inheritedTypes.add(superType);
- }
- String[] is = type.getSuperInterfaceTypeSignatures();
- if(is != null) for (int i = 0; i < is.length; i++) {
- ParametedType t = ParametedTypeFactory.getParametedType(type, is[i]);
- if(t != null) inheritedTypes.add(t);
- }
- buildAllInheritedTypes(new HashSet<String>(), inheritedTypes);
+ parametedType = new ParametedType();
+ parametedType.setType(this.type);
+ parametedType.setSignature("Q" + qualifiedName + ";");
}
- void buildAllInheritedTypes(Set<String> processed, Set<IParametedType> addition) throws CoreException {
- for (IParametedType p: addition) {
- IType t = p.getType();
- if(t == null) continue;
- if(processed.contains(t.getFullyQualifiedName())) continue;
- allInheritedTypes.add(p);
- Set<IParametedType> add = new HashSet<IParametedType>();
- if(!t.isInterface() && !t.isAnnotation()) {
- String sc = t.getSuperclassTypeSignature();
- IParametedType st = ParametedTypeFactory.getParametedType(t, sc);
- if(st != null) add.add(st);
- }
- String[] is = t.getSuperInterfaceTypeSignatures();
- if(is != null) for (int i = 0; i < is.length; i++) {
- ParametedType t1 = ParametedTypeFactory.getParametedType(t, is[i]);
- if(t1 != null) add.add(t1);
- }
- buildAllInheritedTypes(processed, add);
+ void buildAllInheritedTypes(Set<String> processed, ParametedType p) {
+ IType t = p.getType();
+ if(t == null) return;
+ if(processed.contains(t.getFullyQualifiedName())) return;
+ processed.add(t.getFullyQualifiedName());
+ allInheritedTypes.add(p);
+ Set<IParametedType> ts = p.getInheritedTypes();
+ if(ts != null) for (IParametedType pp: ts) {
+ buildAllInheritedTypes(processed, (ParametedType)pp);
}
}
public Set<IParametedType> getInheritedTypes() {
- return inheritedTypes;
+ return parametedType == null ? new HashSet<IParametedType>() : parametedType.getInheritedTypes();
}
public Set<IParametedType> getAllInheritedTypes() {
+ if(allInheritedTypes == null) {
+ Set<String> processed = new HashSet<String>();
+ buildAllInheritedTypes(processed, parametedType);
+ }
return allInheritedTypes;
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java 2010-01-28 14:42:51 UTC (rev 19989)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java 2010-01-28 15:36:07 UTC (rev 19990)
@@ -17,7 +17,7 @@
if(startToken < 0) {
String resovedTypeName = EclipseJavaUtil.resolveTypeAsString(context, typeSignature);
if(resovedTypeName == null) return null;
- result.setSignature(resovedTypeName);
+ result.setSignature("Q" + resovedTypeName + ";");
IType type = EclipseJavaUtil.findType(context.getJavaProject(), resovedTypeName);
if(type != null) {
result.setType(type);
@@ -33,7 +33,7 @@
IType type = EclipseJavaUtil.findType(context.getJavaProject(), resovedTypeName);
if(type != null) {
result.setType(type);
- result.setSignature(resovedTypeName + '<' + params + '>');
+ StringBuffer newParams = new StringBuffer();
StringTokenizer st = new StringTokenizer(params, ",");
while(st.hasMoreTokens()) {
String paramSignature = st.nextToken();
@@ -43,10 +43,14 @@
param.setSignature(paramSignature);
}
result.addParameter(param);
+ if(newParams.length() > 0) newParams.append(',');
+ newParams.append(param.getSignature());
}
+ result.setSignature("Q" + resovedTypeName + '<' + newParams + '>' + ';');
return result;
}
}
return null;
}
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java 2010-01-28 14:42:51 UTC (rev 19989)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java 2010-01-28 15:36:07 UTC (rev 19990)
@@ -62,7 +62,7 @@
}
public ParametedType getSuperType() {
- return superType;
+ return parametedType == null ? null : parametedType.getSuperType();
}
public List<FieldDefinition> getFields() {
13 years, 2 months
JBoss Tools SVN: r19989 - in trunk/seam/plugins/org.jboss.tools.seam.xml: schemas and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-01-28 09:42:51 -0500 (Thu, 28 Jan 2010)
New Revision: 19989
Added:
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-2.2.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-seam-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-seam-2.2.xsd
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-5751
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml 2010-01-28 14:38:22 UTC (rev 19988)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml 2010-01-28 14:42:51 UTC (rev 19989)
@@ -273,6 +273,14 @@
uri="platform:/plugin/org.jboss.tools.seam.xml/schemas/pages-2.0.xsd"/>
<uri
+ name="http://jboss.com/products/seam/pages-2.1.xsd"
+ uri="platform:/plugin/org.jboss.tools.seam.xml/schemas/pages-2.1.xsd"/>
+
+ <uri
+ name="http://jboss.com/products/seam/pages-2.2.xsd"
+ uri="platform:/plugin/org.jboss.tools.seam.xml/schemas/pages-2.2.xsd"/>
+
+ <uri
name="http://jboss.com/products/seam/pdf-2.0.xsd"
uri="platform:/plugin/org.jboss.tools.seam.xml/schemas/pdf-2.0.xsd"/>
@@ -325,10 +333,26 @@
uri="platform:/plugin/org.jboss.tools.seam.xml/schemas/spring-2.0.xsd"/>
<uri
+ name="http://jboss.com/products/seam/spring-2.1.xsd"
+ uri="platform:/plugin/org.jboss.tools.seam.xml/schemas/spring-2.1.xsd"/>
+
+ <uri
+ name="http://jboss.com/products/seam/spring-2.2.xsd"
+ uri="platform:/plugin/org.jboss.tools.seam.xml/schemas/spring-2.2.xsd"/>
+
+ <uri
name="http://jboss.com/products/seam/spring-seam-2.0.xsd"
uri="platform:/plugin/org.jboss.tools.seam.xml/schemas/spring-seam-2.0.xsd"/>
<uri
+ name="http://jboss.com/products/seam/spring-seam-2.1.xsd"
+ uri="platform:/plugin/org.jboss.tools.seam.xml/schemas/spring-seam-2.1.xsd"/>
+
+ <uri
+ name="http://jboss.com/products/seam/spring-seam-2.2.xsd"
+ uri="platform:/plugin/org.jboss.tools.seam.xml/schemas/spring-seam-2.2.xsd"/>
+
+ <uri
name="http://jboss.com/products/seam/theme-2.0.xsd"
uri="platform:/plugin/org.jboss.tools.seam.xml/schemas/theme-2.0.xsd"/>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-2.1.xsd 2010-01-28 14:42:51 UTC (rev 19989)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/spring" xmlns:spring="http://jboss.com/products/seam/spring"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+
+ <xs:import namespace="http://jboss.com/products/seam/components"
+ schemaLocation="http://jboss.com/products/seam/components-2.1.xsd" />
+
+ <xs:element name="context-loader">
+ <xs:annotation>
+ <xs:documentation>Loads a spring context file</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="config-locations"
+ type="components:multiValuedProperty"
+ minOccurs="0" maxOccurs="1" >
+ <xs:annotation>
+ <xs:documentation>Allows you to specify many config-locations in nested value elements.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:choice>
+
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attribute name="config-locations" type="components:string" use="optional"
+ default="/WEB-INF/applicationContext.xml">
+ <xs:annotation>
+ <xs:documentation>A single application context config location.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="task-executor-dispatcher">
+ <xs:annotation>
+ <xs:documentation>Configures the Spring TaskExecuritor for asynchronous calls</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attributeGroup ref="spring:attlist.taskExecutorDispatcher" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.taskExecutorDispatcher">
+ <xs:attribute name="task-executor" use="required" type="components:string"/>
+ <xs:attribute name="schedule-dispatcher" type="components:string" />
+ </xs:attributeGroup>
+
+ <xs:element name="spring-transaction">
+ <xs:annotation>
+ <xs:documentation>Configure the use of Spring transactions</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attribute name="platform-transaction-manager" type="components:string">
+ <xs:annotation>
+ <xs:documentation>
+ An expression evalutating to the spring platform transaction manager
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="platform-transaction-manager-name" type="components:string">
+ <xs:annotation>
+ <xs:documentation>
+ A spring bean name of a PlatformTransactionManager obtained from a BeanFactory instead of EL.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="conversation-context-required" type="components:boolean" use="optional" default="true">
+ <xs:annotation>
+ <xs:documentation>
+ Specify if this transaction manager requires a conversation context to be available or not.
+ Set to true if you're using a JpaTransactionManager with a conversation scoped persistence
+ context.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="join-transaction" type="components:boolean" use="optional">
+ <xs:annotation>
+ <xs:documentation>
+ Should this transaction manager participate in request to join a transaction. For JTA
+ transactions set to true.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-2.1.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-2.2.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-2.2.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-2.2.xsd 2010-01-28 14:42:51 UTC (rev 19989)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/spring" xmlns:spring="http://jboss.com/products/seam/spring"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+
+ <xs:import namespace="http://jboss.com/products/seam/components"
+ schemaLocation="http://jboss.com/products/seam/components-2.2.xsd" />
+
+ <xs:element name="context-loader">
+ <xs:annotation>
+ <xs:documentation>Loads a spring context file</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="config-locations"
+ type="components:multiValuedProperty"
+ minOccurs="0" maxOccurs="1" >
+ <xs:annotation>
+ <xs:documentation>Allows you to specify many config-locations in nested value elements.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:choice>
+
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attribute name="config-locations" type="components:string" use="optional"
+ default="/WEB-INF/applicationContext.xml">
+ <xs:annotation>
+ <xs:documentation>A single application context config location.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="task-executor-dispatcher">
+ <xs:annotation>
+ <xs:documentation>Configures the Spring TaskExecuritor for asynchronous calls</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attributeGroup ref="spring:attlist.taskExecutorDispatcher" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.taskExecutorDispatcher">
+ <xs:attribute name="task-executor" use="required" type="components:string"/>
+ <xs:attribute name="schedule-dispatcher" type="components:string" />
+ </xs:attributeGroup>
+
+ <xs:element name="spring-transaction">
+ <xs:annotation>
+ <xs:documentation>Configure the use of Spring transactions</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attribute name="platform-transaction-manager" type="components:string">
+ <xs:annotation>
+ <xs:documentation>
+ An expression evalutating to the spring platform transaction manager
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="platform-transaction-manager-name" type="components:string">
+ <xs:annotation>
+ <xs:documentation>
+ A spring bean name of a PlatformTransactionManager obtained from a BeanFactory instead of EL.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="conversation-context-required" type="components:boolean" use="optional" default="true">
+ <xs:annotation>
+ <xs:documentation>
+ Specify if this transaction manager requires a conversation context to be available or not.
+ Set to true if you're using a JpaTransactionManager with a conversation scoped persistence
+ context.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="join-transaction" type="components:boolean" use="optional">
+ <xs:annotation>
+ <xs:documentation>
+ Should this transaction manager participate in request to join a transaction. For JTA
+ transactions set to true.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-2.2.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-seam-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-seam-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-seam-2.1.xsd 2010-01-28 14:42:51 UTC (rev 19989)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<xsd:schema xmlns="http://jboss.com/products/seam/spring-seam" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:tool="http://www.springframework.org/schema/tool" targetNamespace="http://jboss.com/products/seam/spring-seam"
+ elementFormDefault="qualified" attributeFormDefault="unqualified">
+
+ <xsd:import namespace="http://www.springframework.org/schema/tool"
+ schemaLocation="http://www.springframework.org/schema/tool/spring-tool-2.0.xsd" />
+
+ <xsd:element name="configure-scopes">
+ <xsd:annotation>
+ <xsd:documentation>Makes all the seam scopes available in spring.</xsd:documentation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:exports />
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:attribute name="prefix" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The prefix to use for the seam scopes. Default: "seam."
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="default-auto-create" type="xsd:boolean" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Should instances of this component be auto-created. Defaults to false since custom Seam
+ scopes are typically used to create stateful components that go on to be created multiple times.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="instance">
+ <xsd:annotation>
+ <xsd:documentation>
+ Make an instance of a seam component available to spring beans for spring injection.
+ </xsd:documentation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:exports />
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:attribute name="id" type="xsd:ID">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The id to use when making this seam component instance available in spring. The default will be the seam component name.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="name" type="xsd:string" use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The seam component name to get an instance of.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="scope" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The optional scope to look for this seam component instance in.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="STATELESS" />
+ <xsd:enumeration value="METHOD" />
+ <xsd:enumeration value="EVENT" />
+ <xsd:enumeration value="PAGE" />
+ <xsd:enumeration value="CONVERSATION" />
+ <xsd:enumeration value="SESSION" />
+ <xsd:enumeration value="APPLICATION" />
+ <xsd:enumeration value="BUSINESS_PROCESS" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="type" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The class type to use when creating a proxy of this instance. Useful when using
+ EL for the name because the type of the EL expression may not be available when the
+ proxy is created.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="create" type="xsd:boolean" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Whether seam should create a new instance if one does not already exist.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="proxy" type="xsd:boolean" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Whether to wrap this definition in a proxy for safe injection into a spring singleton.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="component">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Makes the surrounding spring bean a seam component with the scope managed by spring. Also helps to resolve cases where
+ the spring bean name must be different from the seam component name or where the seam beanClass cannot be correctly
+ detected.
+ ]]>
+ </xsd:documentation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:exports />
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:attribute name="name" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The seam component name to give this spring bean. Optional unless the seam component name must be different from the
+ spring bean name.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="spring-name" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ What spring bean name should seam use to obtain an instance of this bean. Only necessary when seam-spring cannot
+ property detect the name of the spring bean which some spring NamespaceHandlers can do (eg. <aop:scoped-proxy/>, etc.).
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="class" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The component class seam will use to get annotations from and to wrap it's interceptors around. Optional unless the
+ correct class is not being detected by seam-spring.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="intercept" type="xsd:boolean" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Determines whether Seam interceptors should be wrapped around a bean, overriding
+ Seam's default which is currently "true".
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="auto-create" type="xsd:boolean" use="optional" default="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Should instances of this component be auto-created. Defaults to true since the STATELESS
+ scope is going to be used most of the time when using this namespace handler.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="scope" use="optional" default="STATELESS">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+The optional scope this component should have. STATELESS will allow spring to manage the scope. ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="STATELESS" />
+ <xsd:enumeration value="EVENT" />
+ <xsd:enumeration value="PAGE" />
+ <xsd:enumeration value="CONVERSATION" />
+ <xsd:enumeration value="SESSION" />
+ <xsd:enumeration value="APPLICATION" />
+ <xsd:enumeration value="BUSINESS_PROCESS" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-seam-2.1.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-seam-2.2.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-seam-2.2.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-seam-2.2.xsd 2010-01-28 14:42:51 UTC (rev 19989)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<xsd:schema xmlns="http://jboss.com/products/seam/spring-seam" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:tool="http://www.springframework.org/schema/tool" targetNamespace="http://jboss.com/products/seam/spring-seam"
+ elementFormDefault="qualified" attributeFormDefault="unqualified">
+
+ <xsd:import namespace="http://www.springframework.org/schema/tool"
+ schemaLocation="http://www.springframework.org/schema/tool/spring-tool-2.0.xsd" />
+
+ <xsd:element name="configure-scopes">
+ <xsd:annotation>
+ <xsd:documentation>Makes all the seam scopes available in spring.</xsd:documentation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:exports />
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:attribute name="prefix" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The prefix to use for the seam scopes. Default: "seam."
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="default-auto-create" type="xsd:boolean" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Should instances of this component be auto-created. Defaults to false since custom Seam
+ scopes are typically used to create stateful components that go on to be created multiple times.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="instance">
+ <xsd:annotation>
+ <xsd:documentation>
+ Make an instance of a seam component available to spring beans for spring injection.
+ </xsd:documentation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:exports />
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:attribute name="id" type="xsd:ID">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The id to use when making this seam component instance available in spring. The default will be the seam component name.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="name" type="xsd:string" use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The seam component name to get an instance of.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="scope" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The optional scope to look for this seam component instance in.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="STATELESS" />
+ <xsd:enumeration value="METHOD" />
+ <xsd:enumeration value="EVENT" />
+ <xsd:enumeration value="PAGE" />
+ <xsd:enumeration value="CONVERSATION" />
+ <xsd:enumeration value="SESSION" />
+ <xsd:enumeration value="APPLICATION" />
+ <xsd:enumeration value="BUSINESS_PROCESS" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="type" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The class type to use when creating a proxy of this instance. Useful when using
+ EL for the name because the type of the EL expression may not be available when the
+ proxy is created.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="create" type="xsd:boolean" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Whether seam should create a new instance if one does not already exist.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="proxy" type="xsd:boolean" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Whether to wrap this definition in a proxy for safe injection into a spring singleton.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="component">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Makes the surrounding spring bean a seam component with the scope managed by spring. Also helps to resolve cases where
+ the spring bean name must be different from the seam component name or where the seam beanClass cannot be correctly
+ detected.
+ ]]>
+ </xsd:documentation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:exports />
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:attribute name="name" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The seam component name to give this spring bean. Optional unless the seam component name must be different from the
+ spring bean name.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="spring-name" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ What spring bean name should seam use to obtain an instance of this bean. Only necessary when seam-spring cannot
+ property detect the name of the spring bean which some spring NamespaceHandlers can do (eg. <aop:scoped-proxy/>, etc.).
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="class" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The component class seam will use to get annotations from and to wrap it's interceptors around. Optional unless the
+ correct class is not being detected by seam-spring.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="intercept" type="xsd:boolean" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Determines whether Seam interceptors should be wrapped around a bean, overriding
+ Seam's default which is currently "true".
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="auto-create" type="xsd:boolean" use="optional" default="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Should instances of this component be auto-created. Defaults to true since the STATELESS
+ scope is going to be used most of the time when using this namespace handler.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="scope" use="optional" default="STATELESS">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+The optional scope this component should have. STATELESS will allow spring to manage the scope. ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="STATELESS" />
+ <xsd:enumeration value="EVENT" />
+ <xsd:enumeration value="PAGE" />
+ <xsd:enumeration value="CONVERSATION" />
+ <xsd:enumeration value="SESSION" />
+ <xsd:enumeration value="APPLICATION" />
+ <xsd:enumeration value="BUSINESS_PROCESS" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/spring-seam-2.2.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
13 years, 2 months
JBoss Tools SVN: r19988 - in trunk/jsf/tests: org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/WebContent/WEB-INF/lib and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-01-28 09:38:22 -0500 (Thu, 28 Jan 2010)
New Revision: 19988
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/WEB-INF/lib/jsf-api.jar
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/WEB-INF/lib/jsf-impl.jar
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/WebContent/WEB-INF/lib/jsf-api.jar
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/WebContent/WEB-INF/lib/jsf-impl.jar
trunk/jsf/tests/org.jboss.tools.jsf.vpe.myfaces.test/resources/myFacesTest/WebContent/WEB-INF/lib/myfaces-api-1.1.4.jar
trunk/jsf/tests/org.jboss.tools.jsf.vpe.myfaces.test/resources/myFacesTest/WebContent/WEB-INF/lib/myfaces-impl-1.1.4.jar
Log:
https://jira.jboss.org/jira/browse/JBIDE-5701 junits' correction
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/WEB-INF/lib/jsf-api.jar
===================================================================
(Binary files differ)
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/WEB-INF/lib/jsf-impl.jar
===================================================================
(Binary files differ)
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/WebContent/WEB-INF/lib/jsf-api.jar
===================================================================
(Binary files differ)
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/WebContent/WEB-INF/lib/jsf-impl.jar
===================================================================
(Binary files differ)
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.myfaces.test/resources/myFacesTest/WebContent/WEB-INF/lib/myfaces-api-1.1.4.jar
===================================================================
(Binary files differ)
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.myfaces.test/resources/myFacesTest/WebContent/WEB-INF/lib/myfaces-impl-1.1.4.jar
===================================================================
(Binary files differ)
13 years, 2 months
JBoss Tools SVN: r19987 - trunk/hibernatetools/docs/reference/en/images/plugins.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-01-28 09:22:15 -0500 (Thu, 28 Jan 2010)
New Revision: 19987
Modified:
trunk/hibernatetools/docs/reference/en/images/plugins/plugins_17_a.png
trunk/hibernatetools/docs/reference/en/images/plugins/plugins_19.png
trunk/hibernatetools/docs/reference/en/images/plugins/plugins_4_c.png
trunk/hibernatetools/docs/reference/en/images/plugins/prototypingQueries.png
Log:
https://jira.jboss.org/jira/browse/JBDS-1010 Ability to explicitly close the database connection is added - screens are updated
Modified: trunk/hibernatetools/docs/reference/en/images/plugins/plugins_17_a.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en/images/plugins/plugins_19.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en/images/plugins/plugins_4_c.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en/images/plugins/prototypingQueries.png
===================================================================
(Binary files differ)
13 years, 2 months
JBoss Tools SVN: r19986 - in trunk: jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest and 15 other directories.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-01-28 09:19:10 -0500 (Thu, 28 Jan 2010)
New Revision: 19986
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.classpath
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.project
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/.jsdtscope
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.jdt.core.prefs
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.common.component
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/JavaSource/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/JavaSource/demo/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/JavaSource/demo/Messages.properties
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/JavaSource/demo/User.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/META-INF/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/classes/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/classes/demo/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/classes/demo/Messages.properties
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/classes/demo/User.class
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/lib/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/lib/jsf-api.jar
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/lib/jsf-impl.jar
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/web.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/index.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/pages/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/pages/hello.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/pages/inputUserName.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/NaturesChecker_JBIDE5701.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesChecker.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesInfoDialog.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5701 - fixed
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.classpath
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.classpath (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.classpath 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="JavaSource"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.web"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.5.0_16">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
+</classpath>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.project
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.project (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.project 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>naturesCheckTest</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.common.verification.verifybuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/.jsdtscope
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/.jsdtscope (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/.jsdtscope 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.jdt.core.prefs 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,7 @@
+#Wed Jan 27 20:01:47 EET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.common.component 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="naturesCheckProject">
+<wb-resource deploy-path="/" source-path="/WebContent"/>
+<wb-resource deploy-path="/WEB-INF/classes" source-path="/JavaSource"/>
+<property name="context-root" value="naturesCheckProject"/>
+<property name="java-output-path"/>
+</wb-module>
+</project-modules>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.common.project.facet.core.xml 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="Apache Tomcat v6.0"/>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.web" version="2.5"/>
+</faceted-project>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.jsdt.ui.superType.container 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/.settings/org.eclipse.wst.jsdt.ui.superType.name 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/JavaSource/demo/Messages.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/JavaSource/demo/Messages.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/JavaSource/demo/Messages.properties 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,3 @@
+header=Hello Demo Application
+prompt_message=Name:
+hello_message=Hello
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/JavaSource/demo/User.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/JavaSource/demo/User.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/JavaSource/demo/User.java 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package demo;
+
+/**
+ * Created by JBoss Developer Studio
+ */
+public class User {
+
+ private String name;
+
+ /**
+ * @return User Name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param User Name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+}
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/META-INF/MANIFEST.MF 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/classes/demo/Messages.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/classes/demo/Messages.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/classes/demo/Messages.properties 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,3 @@
+header=Hello Demo Application
+prompt_message=Name:
+hello_message=Hello
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/classes/demo/User.class
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/classes/demo/User.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/faces-config.xml 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+ <managed-bean>
+ <description>User Name Bean</description>
+ <managed-bean-name>user</managed-bean-name>
+ <managed-bean-class>demo.User</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>name</property-name>
+ <property-class>java.lang.String</property-class>
+ <value/>
+ </managed-property>
+ </managed-bean>
+ <navigation-rule>
+ <from-view-id>/pages/inputUserName.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>hello</from-outcome>
+ <to-view-id>/pages/hello.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <application>
+ <locale-config/>
+ </application>
+ <factory/>
+ <lifecycle/>
+</faces-config>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/lib/jsf-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/lib/jsf-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/lib/jsf-impl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/lib/jsf-impl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/WEB-INF/web.xml 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <display-name>naturesCheckProject</display-name>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <listener>
+ <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>
+ <!-- Faces Servlet -->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <!-- Faces Servlet Mapping -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/index.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/index.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/index.jsp 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,7 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+ <body>
+ <jsp:forward page="/pages/inputUserName.jsf" />
+ </body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/pages/hello.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/pages/hello.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/pages/hello.jsp 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,20 @@
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+
+<f:loadBundle var="Message" basename="demo.Messages" />
+
+<html>
+ <head>
+ <title>Hello!</title>
+ </head>
+
+ <body>
+ <f:view>
+ <h3>
+ <h:outputText value="#{Message.hello_message}" />,
+ <h:outputText value="#{user.name}" />!
+ </h3>
+ </f:view>
+ </body>
+
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/pages/inputUserName.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/pages/inputUserName.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/naturesCheckTest/WebContent/pages/inputUserName.jsp 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,28 @@
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+
+<f:loadBundle var="Message" basename="demo.Messages"/>
+
+<html>
+ <head>
+ <title>Input User Name Page</title>
+ </head>
+ <body>
+
+ <f:view>
+ <h1><h:outputText value="#{Message.header}"/></h1>
+
+ <h:messages style="color: red"/>
+
+ <h:form id="greetingForm">
+ <h:outputText value="#{Message.prompt_message}"/>
+ <h:inputText value="#{user.name}" required="true">
+ <f:validateLength maximum="30" minimum="3"/>
+ </h:inputText>
+
+ <h:commandButton action="hello" value="Say Hello!" />
+
+ </h:form>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2010-01-28 13:59:24 UTC (rev 19985)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2010-01-28 14:19:10 UTC (rev 19986)
@@ -68,6 +68,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4510Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4534Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.MessageResolutionInPreviewTabTest;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.NaturesChecker_JBIDE5701;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.OpenOnInJarPackageFragment_JBIDE5682;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.OpenOnJsf20Test_JBIDE5382;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.OpenOnTLDPackedInJar_JBIDE5693;
@@ -110,6 +111,7 @@
public static final String IMPORT_CUSTOM_FACELETS_PROJECT = "customFaceletsTestProject";//$NON-NLS-1$
public static final String IMPORT_JBIDE3247_PROJECT_NAME = "JBIDE3247"; //$NON-NLS-1$
public static final String IMPORT_I18N_PROJECT_NAME = "i18nTest"; //$NON-NLS-1$
+ public static final String IMPORT_NATURES_CHECKER_PROJECT = "naturesCheckTest"; //$NON-NLS-1$
public static Test suite() {
@@ -196,6 +198,7 @@
suite.addTestSuite(MessageResolutionInPreviewTabTest.class);
suite.addTestSuite(OpenOnTLDPackedInJar_JBIDE5693.class);
suite.addTestSuite(PreferencesForEditors_JBIDE5692.class);
+ suite.addTestSuite(NaturesChecker_JBIDE5701.class);
// $JUnit-END$
// added by Max Areshkau
@@ -226,6 +229,11 @@
i18nTestProject.setImportProjectPath(JsfTestPlugin.getPluginResourcePath());
projectToImport.add(i18nTestProject);
+ ImportBean naturesCheckTestProject = new ImportBean();
+ naturesCheckTestProject.setImportProjectName(JsfAllTests.IMPORT_NATURES_CHECKER_PROJECT);
+ naturesCheckTestProject.setImportProjectPath(JsfTestPlugin.getPluginResourcePath());
+ projectToImport.add(naturesCheckTestProject);
+
return new VpeTestSetup(suite, projectToImport);
}
}
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/NaturesChecker_JBIDE5701.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/NaturesChecker_JBIDE5701.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/NaturesChecker_JBIDE5701.java 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,124 @@
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+public class NaturesChecker_JBIDE5701 extends VpeTest {
+
+ private static final String FIRST_TEST_PAGE_NAME = "inputUserName.jsp"; //$NON-NLS-1$
+ private static final String TEST_SHELL_NAME = "Missing Natures"; //$NON-NLS-1$
+ private static final String TEST_STRING = "The project \"naturesCheckTest\" doesn't contain following natures:\norg.jboss.tools.jst.web.kb.kbnature\norg.jboss.tools.jsf.jsfnature\n\nVisual Editor may not work properly."; //$NON-NLS-1$
+ private static final String SECOND_TEST_PAGE_NAME = "components/commandButton.jsp"; //$NON-NLS-1$
+
+ public NaturesChecker_JBIDE5701(String name) {
+ super(name);
+ }
+
+ public void testNaturesChecker() throws Throwable {
+
+ ResultObject resultObject = startCheckerThread();
+
+ openPage(JsfAllTests.IMPORT_NATURES_CHECKER_PROJECT, FIRST_TEST_PAGE_NAME);
+
+ assertEquals(TEST_SHELL_NAME, resultObject.getShellName());
+ assertEquals(TEST_STRING, resultObject.getTextLabel());
+
+ resultObject = startCheckerThread();
+
+ openPage(JsfAllTests.IMPORT_PROJECT_NAME, SECOND_TEST_PAGE_NAME);
+
+ assertEquals("", resultObject.getShellName()); //$NON-NLS-1$
+ assertEquals("", resultObject.getTextLabel()); //$NON-NLS-1$
+
+ }
+
+ private class ResultObject {
+ private String shellName = ""; //$NON-NLS-1$
+ private String textLabel = ""; //$NON-NLS-1$
+
+ public String getShellName() {
+ return shellName;
+ }
+
+ public void setShellName(String shellName) {
+ this.shellName = shellName;
+ }
+
+ public String getTextLabel() {
+ return textLabel;
+ }
+
+ public void setTextLabel(String textLabel) {
+ this.textLabel = textLabel;
+ }
+
+ }
+
+ private ResultObject startCheckerThread() {
+ final ResultObject resultObject = new ResultObject();
+ Thread thread = new Thread(new Runnable() {
+ public void run() {
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ Shell[] shells = null;
+ while (shells == null) {
+ shells = Display.getCurrent().getShells();
+ }
+ Shell shell = findShellWithText(shells, TEST_SHELL_NAME);
+ if (shell == null) {
+ TestUtil.delay(5000);
+ shells = Display.getCurrent().getShells();
+ shell = findShellWithText(shells, TEST_SHELL_NAME);
+ }
+ if (shell != null) {
+ resultObject.setShellName(TEST_SHELL_NAME);
+ Label label = (Label)shell.getChildren()[1];
+ resultObject.setTextLabel(label.getText());
+ shell.close();
+ }
+ }
+ });
+ }
+ });
+ thread.start();
+ return resultObject;
+ }
+
+ private static Shell findShellWithText (Shell[] shells, String text){
+ for (int i = 0; i < shells.length; i++) {
+ if (text.equals(shells[i].getText())) {
+ return shells[i];
+ }
+ }
+ return null;
+ }
+
+ private void openPage(String projectName, String pagePath) throws Throwable{
+ IFile file = (IFile) TestUtil.getComponentPath(pagePath, projectName);
+
+ assertNotNull("Could not open specified file. componentPage = " //$NON-NLS-1$
+ + pagePath
+ + ";projectName = " + projectName, file);//$NON-NLS-1$
+
+ IEditorInput input = new FileEditorInput(file);
+
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
+ // open and get editor
+
+ JSPMultiPageEditor part = openEditor(input);
+
+ assertNotNull("Editor is not opened", part); //$NON-NLS-1$
+
+ TestUtil.delay(3000);
+
+ }
+
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2010-01-28 13:59:24 UTC (rev 19985)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2010-01-28 14:19:10 UTC (rev 19986)
@@ -19,6 +19,7 @@
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
import org.jboss.tools.common.reporting.ProblemReportingHelper;
+import org.jboss.tools.vpe.editor.util.ProjectNaturesChecker;
import org.jboss.tools.vpe.xulrunner.browser.XulRunnerBrowser;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -34,7 +35,7 @@
//The shared instance.
private static VpePlugin plugin;
-
+ private ProjectNaturesChecker projectNaturesChecker;
/**
* The constructor.
@@ -55,6 +56,10 @@
* This method is called when the plug-in is stopped
*/
public void stop(BundleContext context) throws Exception {
+ if (projectNaturesChecker != null) {
+ projectNaturesChecker.dispose();
+ projectNaturesChecker = null;
+ }
super.stop(context);
}
@@ -116,4 +121,12 @@
}
return (url == null) ? null : url.getPath();
}
+
+ public ProjectNaturesChecker getProjectNaturesChecker() {
+ return projectNaturesChecker;
+ }
+
+ public void setProjectNaturesChecker(ProjectNaturesChecker naturesChecker) {
+ this.projectNaturesChecker = naturesChecker;
+ }
}
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2010-01-28 13:59:24 UTC (rev 19985)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2010-01-28 14:19:10 UTC (rev 19986)
@@ -15,10 +15,8 @@
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.text.IRegion;
@@ -29,8 +27,6 @@
import org.eclipse.swt.events.ControlListener;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.ShellAdapter;
import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.graphics.Point;
@@ -40,7 +36,6 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.ui.IEditorInput;
@@ -84,15 +79,14 @@
import org.jboss.tools.vpe.editor.mozilla.EditorLoadWindowListener;
import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
import org.jboss.tools.vpe.editor.mozilla.MozillaPreview;
+import org.jboss.tools.vpe.editor.util.ProjectNaturesChecker;
import org.jboss.tools.vpe.editor.xpl.CustomSashForm;
import org.jboss.tools.vpe.editor.xpl.EditorSettings;
import org.jboss.tools.vpe.editor.xpl.SashSetting;
import org.jboss.tools.vpe.editor.xpl.CustomSashForm.ICustomSashFormListener;
-import org.jboss.tools.vpe.messages.VpeUIMessages;
import org.jboss.tools.vpe.selbar.SelectionBar;
-import org.jboss.tools.vpe.selbar.VisibilityEvent;
-import org.jboss.tools.vpe.selbar.VisibilityListener;
+@SuppressWarnings("restriction")
public class VpeEditorPart extends EditorPart implements ITextEditor,
ITextEditorExtension, IReusableEditor, IVisualEditor {
private IContextActivation fContextActivation;
@@ -112,12 +106,6 @@
private ActivationListener activationListener = new ActivationListener();
private int visualMode = 0;
private EditorPart multiPageEditor;
- private static final QualifiedName SPLITTER_POSITION_KEY1 = new QualifiedName(
- "", "splitter_position1"); //$NON-NLS-1$ //$NON-NLS-2$
- private static final QualifiedName SPLITTER_POSITION_KEY2 = new QualifiedName(
- "", "splitter_position2"); //$NON-NLS-1$ //$NON-NLS-2$
- private static final QualifiedName SPLITTER_POSITION_KEY3 = new QualifiedName(
- "", "splitter_position3"); //$NON-NLS-1$ //$NON-NLS-2$
private int controlCount = 0;
@@ -133,6 +121,7 @@
private Splitter verticalToolbarSplitter = null;
private Composite verticalToolbarEmpty = null;
private ToolBar toolBar = null;
+ private ProjectNaturesChecker naturesChecker;
public StructuredTextEditor getSourceEditor() {
return sourceEditor;
@@ -264,6 +253,14 @@
sourceEditor = textEditor;
// this.visualMode = visualMode;
this.multiPageEditor = multiPageEditor;
+ naturesChecker = VpePlugin.getDefault().getProjectNaturesChecker();
+ if (naturesChecker == null) {
+ naturesChecker = new ProjectNaturesChecker();
+ VpePlugin.getDefault().setProjectNaturesChecker(naturesChecker);
+ }
+ naturesChecker.addProject(
+ (((IFileEditorInput) multiPageEditor.getEditorInput())
+ .getFile().getProject()));
}
public IAction getAction(String actionID) {
@@ -1020,6 +1017,14 @@
}
public void partOpened(IWorkbenchPart part) {
+ if (part == multiPageEditor) {
+ try {
+ naturesChecker.checkNatures(((IFileEditorInput)multiPageEditor.
+ getEditorInput()).getFile().getProject());
+ } catch (CoreException e) {
+ VpePlugin.getPluginLog().logError(e);
+ }
+ }
}
@Override
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2010-01-28 13:59:24 UTC (rev 19985)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2010-01-28 14:19:10 UTC (rev 19986)
@@ -16,6 +16,9 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
import java.util.zip.ZipEntry;
import org.eclipse.core.resources.IContainer;
@@ -25,11 +28,21 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.core.search.SearchMatch;
+import org.eclipse.jdt.core.search.SearchParticipant;
+import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.core.search.SearchRequestor;
import org.eclipse.jdt.internal.core.JarPackageFragmentRoot;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
@@ -312,5 +325,43 @@
}
return inputPath;
}
+
+ public static IJavaElement searchForClass(IJavaProject javaProject, String className) throws JavaModelException {
+// Get the search pattern
+ SearchPattern pattern = SearchPattern.createPattern(className, IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
+ // Get the search scope
+ IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] { javaProject });
+ final List<SearchMatch> matches = new ArrayList<SearchMatch>();
+ // Get the search requestor
+ SearchRequestor requestor = new SearchRequestor() {
+ public void acceptSearchMatch(SearchMatch match) throws CoreException {
+ matches.add(match);
+ }
+ };
+
+ // Search
+ SearchEngine searchEngine = new SearchEngine();
+ try {
+ searchEngine.search(pattern, new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()}, scope, requestor, null);
+ } catch (CoreException ex) {
+ // Ignore
+// ExtensionsPlugin.log(ex);
+ }
+ for (Iterator i = matches.iterator(); i != null && i.hasNext();) {
+ IJavaElement element = (IJavaElement)((SearchMatch)i.next()).getElement();
+ String classQualifiedName = getQualifiedClassName(element);
+ if (className.equals(classQualifiedName))
+ return element;
+ }
+ return javaProject.findType(className, new NullProgressMonitor());
+ }
+
+ private static String getQualifiedClassName(IJavaElement element) {
+ if(element instanceof IType) {
+ return ((IType)element).getFullyQualifiedName('.');
+ }
+ return null;
+ }
+
}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesChecker.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesChecker.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesChecker.java 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.util;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.jst.web.kb.IKbProject;
+import org.jboss.tools.jst.web.kb.internal.KbProject;
+import org.jboss.tools.jst.web.project.WebProject;
+import org.jboss.tools.vpe.VpePlugin;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class ProjectNaturesChecker implements IResourceChangeListener {
+
+ private static final String SEARCH_CLASS = "javax.faces.context.FacesContext"; //$NON-NLS-1$
+ public static final QualifiedName IS_NATURES_CHECK_NEED = new QualifiedName(
+ "", "Is natures check"); //$NON-NLS-1$ //$NON-NLS-2$
+ public static final QualifiedName IS_JSF_CHECK_NEED = new QualifiedName(
+ "", "Is JSF check"); //$NON-NLS-1$ //$NON-NLS-2$
+ private Set<IProject> projectsCollection;
+
+ public ProjectNaturesChecker() {
+ projectsCollection = new HashSet<IProject>(0);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this,
+ IResourceChangeEvent.POST_CHANGE);
+ }
+
+ public void resourceChanged(final IResourceChangeEvent event) {
+ Display display = Display.getDefault();
+ if (display != null) {
+ display.asyncExec(new Runnable() {
+ public void run() {
+ handleResourceChangeEvent(event);
+ }
+ });
+ }
+ }
+
+ public void checkNatures(IProject project) throws CoreException {
+ addProject(project);
+ KbProject.checkKBBuilderInstalled(project);
+ boolean isJSFCheck = true;
+ boolean isNaturesCheck = true;
+ updateProjectPersistentProperties(project);
+ isJSFCheck = Boolean.parseBoolean(project
+ .getPersistentProperty(IS_JSF_CHECK_NEED));
+ isNaturesCheck = Boolean.parseBoolean(project
+ .getPersistentProperty(IS_NATURES_CHECK_NEED));
+ if (isJSFCheck) {
+ if (isNaturesCheck) {
+ String[] missingNatures = getMissingNatures(project);
+ if (missingNatures != null) {
+ ProjectNaturesInfoDialog dialog = new ProjectNaturesInfoDialog(
+ missingNatures, project);
+ dialog.open();
+ }
+ }
+ }
+ }
+
+ private String[] getMissingNatures(IProject project) throws CoreException {
+ List<String> missimgNatures = new ArrayList<String>(0);
+ if (project.getNature(IKbProject.NATURE_ID) == null) {
+ missimgNatures.add(IKbProject.NATURE_ID);
+ }
+ if (project.getNature(WebProject.JSF_NATURE_ID) == null) {
+ missimgNatures.add(WebProject.JSF_NATURE_ID);
+ }
+ if (missimgNatures.size() == 0) {
+ return null;
+ }
+ return missimgNatures.toArray(new String[0]);
+ }
+
+ private void handleResourceChangeEvent(IResourceChangeEvent changeEvent) {
+ IResourceDelta[] affectedChildren = changeEvent.getDelta()
+ .getAffectedChildren();
+ if (affectedChildren == null) {
+ return;
+ }
+ for (int i = 0; i < affectedChildren.length; i++) {
+ IResourceDelta resourceDelta = affectedChildren[i];
+ if (resourceDelta.getResource() instanceof IProject) {
+ IProject project = (IProject) resourceDelta.getResource();
+ if (resourceDelta.getKind() == IResourceDelta.ADDED) {
+ processAddProject(project);
+ continue;
+ }
+ if (resourceDelta.getKind() == IResourceDelta.REMOVED) {
+ processRemoveProject(project);
+ continue;
+ }
+ try {
+ updateProjectJSFPersistents(project);
+ } catch (CoreException e) {
+ VpePlugin.getPluginLog().logError(e);
+ }
+ }
+ }
+ }
+
+ private void updateProjectPersistentProperties(IProject project)
+ throws CoreException {
+ if (project.isAccessible()) {
+ String jsfCheckString = project
+ .getPersistentProperty(IS_JSF_CHECK_NEED);
+ if (jsfCheckString == null) {
+ updateProjectJSFPersistents(project);
+ }
+ if (project.getPersistentProperty(IS_NATURES_CHECK_NEED) == null) {
+ project.setPersistentProperty(IS_NATURES_CHECK_NEED, "true"); //$NON-NLS-1$
+ }
+ }
+ }
+
+ public IProject getProject(IProject project) {
+ return projectsCollection.contains(project) ? project : null;
+ }
+
+ public void addProject(IProject project) {
+ if (getProject(project) == null) {
+ projectsCollection.add(project);
+ }
+ }
+
+ public void dispose() {
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
+ projectsCollection.clear();
+ }
+
+ private void processAddProject(IProject project) {
+ addProject(project);
+ try {
+ updateProjectJSFPersistents(project);
+ } catch (CoreException e) {
+ VpePlugin.getPluginLog().logError(e);
+ }
+ }
+
+ private void processRemoveProject(IProject project) {
+ projectsCollection.remove(project);
+ }
+
+ private void updateProjectJSFPersistents(IProject project)
+ throws CoreException {
+ if (project.isAccessible()) {
+ try {
+ IJavaElement javaElement = FileUtil.searchForClass(JavaCore
+ .create(project), SEARCH_CLASS);
+ if (javaElement == null) {
+ project.setPersistentProperty(IS_JSF_CHECK_NEED, "false"); //$NON-NLS-1$
+ } else {
+ project.setPersistentProperty(IS_JSF_CHECK_NEED, "true"); //$NON-NLS-1$
+ }
+ } catch (CoreException e) {
+ project.setPersistentProperty(IS_JSF_CHECK_NEED, "false"); //$NON-NLS-1$
+ }
+ }
+ }
+
+}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesInfoDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesInfoDialog.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesInfoDialog.java 2010-01-28 14:19:10 UTC (rev 19986)
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.util;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class ProjectNaturesInfoDialog extends MessageDialog {
+
+ private Button button;
+ private Link link;
+ private boolean isRemember = false;
+ private static final String QUESTION = "Don't show this dialog again!"; //$NON-NLS-1$
+ private static final String TITLE = "Missing Natures"; //$NON-NLS-1$
+ private IProject project;
+
+ public ProjectNaturesInfoDialog(String[] missingNatures, IProject project) {
+ super(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ TITLE, null, "", INFORMATION, //$NON-NLS-1$
+ new String[] { IDialogConstants.OK_LABEL }, 0);
+ this.project = project;
+ message = getMessageInfo(missingNatures, project);
+ }
+
+ @Override
+ protected Control createCustomArea(Composite parent) {
+
+ GridLayout gridLayout = (GridLayout) parent.getLayout();
+ gridLayout.numColumns = 2;
+ gridLayout.makeColumnsEqualWidth = true;
+ parent.setLayout(gridLayout);
+ button = new Button(parent, SWT.CHECK);
+ GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+ button.setLayoutData(gridData);
+ button.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ isRemember = !isRemember;
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ isRemember = !isRemember;
+ }
+ });
+ button.setText(QUESTION);
+ link = new Link(parent, SWT.NONE);
+ gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
+ gridData.grabExcessHorizontalSpace = true;
+ link.setLayoutData(gridData);
+ link.setText("<A>" + VpeUIMessages.MOZILLA_LOADING_ERROR_LINK_TEXT + "</A>"); //$NON-NLS-1$ //$NON-NLS-2$
+ link.setToolTipText(VpeUIMessages.MOZILLA_LOADING_ERROR_LINK);
+ link.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ processLink(link);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ processLink(link);
+ }
+
+ });
+ return parent;
+ }
+
+ @Override
+ protected void buttonPressed(int buttonId) {
+ if (buttonId == 0) {
+ try {
+ project.setPersistentProperty(ProjectNaturesChecker.IS_NATURES_CHECK_NEED, Boolean.toString(!isRemember));
+ } catch (CoreException e) {
+ }
+ }
+ super.buttonPressed(buttonId);
+ }
+
+ private void processLink(Link link) {
+ BusyIndicator.showWhile(link.getDisplay(), new Runnable() {
+ public void run() {
+ URL theURL = null;
+ ;
+ try {
+ theURL = new URL(VpeUIMessages.MOZILLA_LOADING_ERROR_LINK);
+ } catch (MalformedURLException e) {
+ VpePlugin.reportProblem(e);
+ }
+ IWorkbenchBrowserSupport support = PlatformUI.getWorkbench()
+ .getBrowserSupport();
+ try {
+ support.getExternalBrowser().openURL(theURL);
+ } catch (PartInitException e) {
+ VpePlugin.reportProblem(e);
+ }
+ }
+ });
+ }
+
+ private String arrayToString(String[] strings){
+ StringBuilder builder = new StringBuilder(""); //$NON-NLS-1$
+ for (int i = 0; i < strings.length; i++) {
+ builder.append(strings[i]+"\n"); //$NON-NLS-1$
+ }
+ return builder.toString();
+ }
+
+ private String getMessageInfo(String[] missingNatures, IProject project){
+ String dialogMessage = "The project \"" + project.getName() + //$NON-NLS-1$
+ "\" doesn't contain following natures:\n" + //$NON-NLS-1$
+ arrayToString(missingNatures)+"\n"+"Visual Editor may not work properly."; //$NON-NLS-1$ //$NON-NLS-2$
+ return dialogMessage;
+ }
+
+}
13 years, 2 months
JBoss Tools SVN: r19985 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2010-01-28 08:59:24 -0500 (Thu, 28 Jan 2010)
New Revision: 19985
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchShortcut.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5748
SmooksLaunchShortcut running the wrong Run Configuration when run through the shortcut keys
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchShortcut.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchShortcut.java 2010-01-28 13:47:19 UTC (rev 19984)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchShortcut.java 2010-01-28 13:59:24 UTC (rev 19985)
@@ -5,6 +5,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.core.DebugPlugin;
@@ -21,11 +22,14 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+import org.eclipse.ui.part.FileEditorInput;
import org.jboss.tools.smooks.configuration.RuntimeMetadata;
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.editor.AbstractSmooksFormEditor;
public class SmooksLaunchShortcut extends JUnitLaunchShortcut {
@@ -188,4 +192,50 @@
return null;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.junit.launcher.JUnitLaunchShortcut#getLaunchableResource(org.eclipse.ui.IEditorPart)
+ */
+ @Override
+ public IResource getLaunchableResource(IEditorPart editor) {
+ if (editor instanceof AbstractSmooksFormEditor) {
+ IEditorInput editorInput = editor.getEditorInput();
+ if (editorInput instanceof FileEditorInput) {
+ return ((FileEditorInput)editorInput).getFile();
+ }
+ }
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.junit.launcher.JUnitLaunchShortcut#getLaunchConfigurations(org.eclipse.ui.IEditorPart)
+ */
+ @Override
+ public ILaunchConfiguration[] getLaunchConfigurations(IEditorPart editor) {
+ if (editor instanceof AbstractSmooksFormEditor) {
+ IEditorInput editorInput = editor.getEditorInput();
+ if (editorInput instanceof FileEditorInput) {
+ ILaunchConfigurationWorkingCopy temparary;
+ try {
+ temparary = createLaunchConfiguration(((FileEditorInput)editorInput).getFile());
+
+ ILaunchConfiguration existingConfig = findExistingLaunchConfiguration(temparary, ILaunchManager.RUN_MODE);
+ if(existingConfig == null) {
+ existingConfig = temparary.doSave();
+ }
+
+ return new ILaunchConfiguration[] {existingConfig};
+ } catch (CoreException e) {
+ ExceptionHandler.handle(e, getShell(),
+ Messages.SmooksLaunchShortcut_Title_Launch_Failed,
+ Messages.SmooksLaunchShortcut_Exception_Occurred);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ return null;
+ }
}
13 years, 2 months
JBoss Tools SVN: r19984 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-01-28 08:47:19 -0500 (Thu, 28 Jan 2010)
New Revision: 19984
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeHtmlTemplate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5382
add openOn action for name param for h:outputStylesheet, h:outputScript, h:graphicImage jsf 2.0 tags
- OpenOn for visual instances of h:graphicImage
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeHtmlTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeHtmlTemplate.java 2010-01-28 11:26:33 UTC (rev 19983)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeHtmlTemplate.java 2010-01-28 13:47:19 UTC (rev 19984)
@@ -565,8 +565,9 @@
file = sourceElement.getAttributeNode("page"); //$NON-NLS-1$
} else if (HTML.TAG_A.equalsIgnoreCase(templateName)) {
file = sourceElement.getAttributeNode(HTML.ATTR_HREF);
- } else if ("h:outputStylesheet".equals(templateName)) { //$NON-NLS-1$
- file = sourceElement.getAttributeNode("name"); //$NON-NLS-1$
+ } else if ("h:outputStylesheet".equals(templateName)//$NON-NLS-1$
+ || "h:graphicImage".equals(templateName)) { //$NON-NLS-1$
+ file = sourceElement.getAttributeNode("name"); //$NON-NLS-1$
}
if(file != null) {
13 years, 2 months
JBoss Tools SVN: r19983 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-01-28 06:26:33 -0500 (Thu, 28 Jan 2010)
New Revision: 19983
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbProjectFactory.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5752
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbProjectFactory.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbProjectFactory.java 2010-01-28 11:02:35 UTC (rev 19982)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbProjectFactory.java 2010-01-28 11:26:33 UTC (rev 19983)
@@ -80,6 +80,7 @@
}
underConstruction.add(project);
final KbProject mock = new KbProject();
+ mock.setProject(project);
class KbBuilderEx extends KbBuilder {
protected KbProject getKbProject() {
return mock;
@@ -96,7 +97,6 @@
public void run() {
// System.out.println("build begin");
long t0 = System.currentTimeMillis();
- mock.setProject(project);
KbBuilderEx builder = new KbBuilderEx();
setProjectToBuilder(builder, project);
builder.build();
13 years, 2 months
JBoss Tools SVN: r19982 - trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-01-28 06:02:35 -0500 (Thu, 28 Jan 2010)
New Revision: 19982
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/messages.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-3125
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/messages.properties 2010-01-28 10:58:44 UTC (rev 19981)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/messages.properties 2010-01-28 11:02:35 UTC (rev 19982)
@@ -1,2 +1,2 @@
CDI_EXT_PLUGIN_NO_MESSAGE=No message
-CDI_INJECTED_POINT_HYPERLINK_OPEN_BEAN=Open Bean
+CDI_INJECTED_POINT_HYPERLINK_OPEN_BEAN=Open CDI Bean
13 years, 2 months
JBoss Tools SVN: r19981 - in trunk/cdi/plugins: org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-01-28 05:58:44 -0500 (Thu, 28 Jan 2010)
New Revision: 19981
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/InjectionPointQueryParticipant.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3125
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-01-28 10:56:25 UTC (rev 19980)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-01-28 10:58:44 UTC (rev 19981)
@@ -29,11 +29,6 @@
*/
public class CDIUtil {
/**
- * CDI Inject annotation's name
- */
- public final static String INJECT_ANNOTATION_NAME = "Inject"; //$NON-NLS-1$
-
- /**
* Adds CDI and KB builders to the project.
*
* @param project
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java 2010-01-28 10:56:25 UTC (rev 19980)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java 2010-01-28 10:58:44 UTC (rev 19981)
@@ -32,6 +32,7 @@
import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
import org.eclipse.jface.text.hyperlink.IHyperlink;
import org.eclipse.ui.texteditor.ITextEditor;
+import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.CDIUtil;
@@ -98,7 +99,7 @@
for (IJavaElement element : elements) {
if(element instanceof IType){
- if(CDIUtil.INJECT_ANNOTATION_NAME.equals(element.getElementName())){
+ if(CDIConstants.INJECT_ANNOTATION_TYPE_NAME.equals(((IType) element).getFullyQualifiedName())){
ICompilationUnit cUnit = (ICompilationUnit)input;
element = cUnit.getElementAt(wordRegion.getOffset());
if(element == null)
@@ -109,7 +110,7 @@
if (element instanceof IAnnotatable) {
IAnnotatable annotatable = (IAnnotatable)element;
- IAnnotation annotation = annotatable.getAnnotation(CDIUtil.INJECT_ANNOTATION_NAME);
+ IAnnotation annotation = annotatable.getAnnotation(CDIConstants.INJECT_ANNOTATION_TYPE_NAME);
if (annotation == null)
continue;
IInjectionPoint injectionPoint = CDIUtil.findInjectionPoint(beans, element);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/InjectionPointQueryParticipant.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/InjectionPointQueryParticipant.java 2010-01-28 10:56:25 UTC (rev 19980)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/InjectionPointQueryParticipant.java 2010-01-28 10:58:44 UTC (rev 19981)
@@ -31,6 +31,7 @@
import org.eclipse.jdt.ui.search.ISearchRequestor;
import org.eclipse.jdt.ui.search.QuerySpecification;
import org.eclipse.search.ui.text.Match;
+import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.CDIUtil;
@@ -76,7 +77,7 @@
if (element instanceof IAnnotatable) {
IAnnotatable annotatable = (IAnnotatable)element;
- IAnnotation annotation = annotatable.getAnnotation(CDIUtil.INJECT_ANNOTATION_NAME);
+ IAnnotation annotation = annotatable.getAnnotation(CDIConstants.INJECT_ANNOTATION_TYPE_NAME);
if (annotation == null)
return;
IInjectionPoint injectionPoint = CDIUtil.findInjectionPoint(beans, element);
13 years, 2 months