JBoss Tools SVN: r2252 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-03 07:26:22 -0400 (Tue, 03 Jul 2007)
New Revision: 2252
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmShapeEditPart.java
Log:
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmShapeEditPart.java 2007-07-03 11:25:42 UTC (rev 2251)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/OrmShapeEditPart.java 2007-07-03 11:26:22 UTC (rev 2252)
@@ -31,6 +31,7 @@
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Property;
import org.hibernate.mapping.RootClass;
+import org.hibernate.mapping.SingleTableSubclass;
import org.hibernate.mapping.Table;
import org.jboss.tools.hibernate.veditor.editors.figures.RoundLineBorder;
import org.jboss.tools.hibernate.veditor.editors.figures.TitleFigure;
@@ -53,7 +54,7 @@
TitleLabel label = new TitleLabel();
String text = "";
Object element = getCastedModel().getOrmElement();
- if (element instanceof PersistentClass) {
+ if (element instanceof RootClass) {
text = ormLabelProvider.getText((PersistentClass)element);
} else if (element instanceof Table) {
Table table = (Table)element;
16 years, 10 months
JBoss Tools SVN: r2251 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-03 07:25:42 -0400 (Tue, 03 Jul 2007)
New Revision: 2251
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ConnectionEditPart.java
Log:
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ConnectionEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ConnectionEditPart.java 2007-07-03 11:24:05 UTC (rev 2250)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ConnectionEditPart.java 2007-07-03 11:25:42 UTC (rev 2251)
@@ -26,6 +26,7 @@
import org.hibernate.mapping.Component;
import org.hibernate.mapping.Property;
import org.hibernate.mapping.RootClass;
+import org.hibernate.mapping.SingleTableSubclass;
import org.hibernate.mapping.Table;
import org.jboss.tools.hibernate.veditor.editors.figures.RoundPolylineConnection;
import org.jboss.tools.hibernate.veditor.editors.model.Connection;
@@ -83,7 +84,7 @@
private Color getColor() {
Object element = getCastedModel().getTarget().getOrmElement();
//R if (getCastedModel().getTarget().getOrmElement() instanceof IPersistentClass)
- if (element instanceof RootClass)
+ if (element instanceof RootClass || element instanceof SingleTableSubclass)
return ResourceManager.getInstance().getColor(new RGB(210,155,100));
//R else if (getCastedModel().getTarget().getOrmElement() instanceof IDatabaseColumn || getCastedModel().getTarget().getOrmElement() instanceof IDatabaseTable)
else if (element instanceof Column || element instanceof Table || element instanceof Property)
16 years, 10 months
JBoss Tools SVN: r2250 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-03 07:24:05 -0400 (Tue, 03 Jul 2007)
New Revision: 2250
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java
Log:
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java 2007-07-03 09:47:44 UTC (rev 2249)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java 2007-07-03 11:24:05 UTC (rev 2250)
@@ -87,7 +87,23 @@
}
}
} else if (ormElement instanceof SingleTableSubclass) {
- Iterator iterator = ((SingleTableSubclass)ormElement).getRootClass().getPropertyIterator();
+ RootClass rootClass = ((SingleTableSubclass)ormElement).getRootClass();
+
+ Property identifierProperty = rootClass.getIdentifierProperty();
+ if (identifierProperty != null) {
+ shapes.add(new Shape(identifierProperty));
+ }
+
+ KeyValue identifier = rootClass.getIdentifier();
+ if (identifier instanceof Component) {
+ Iterator iterator = ((Component)identifier).getPropertyIterator();
+ while (iterator.hasNext()) {
+ Property property = (Property) iterator.next();
+ shapes.add(new Shape(property));
+ }
+ }
+
+ Iterator iterator = rootClass.getPropertyIterator();
while (iterator.hasNext()) {
Property field = (Property)iterator.next();
if (!field.isComposite()) {
@@ -115,6 +131,18 @@
}
}
}
+ Iterator iter = ((SingleTableSubclass)ormElement).getPropertyIterator();
+ while (iter.hasNext()) {
+ Property property = (Property)iter.next();
+ if (property.getValue().getType().isEntityType()) {
+ bodyOrmShape = new ExpandeableShape(property);
+ } else if (property.getValue().getType().isCollectionType()) {
+ bodyOrmShape = new ComponentShape(property);
+ } else {
+ bodyOrmShape = new Shape(property);
+ }
+ shapes.add(bodyOrmShape);
+ }
} else if (ormElement instanceof Table) {
Iterator iterator = ((Table)getOrmElement()).getColumnIterator();
while (iterator.hasNext()) {
16 years, 10 months
JBoss Tools SVN: r2249 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam: internal/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-03 05:47:44 -0400 (Tue, 03 Jul 2007)
New Revision: 2249
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponent.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProperty.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProperty.java
Log:
EXIN-217
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponent.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponent.java 2007-07-03 09:42:36 UTC (rev 2248)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponent.java 2007-07-03 09:47:44 UTC (rev 2249)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.seam.core;
+import java.util.Collection;
import java.util.List;
import java.util.Set;
@@ -74,7 +75,7 @@
* @param propertyName
* @return
*/
- public Set<ISeamProperty> getProperties();
+ public Collection<ISeamProperty> getProperties();
/**
* Adds property to component.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProperty.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProperty.java 2007-07-03 09:42:36 UTC (rev 2248)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProperty.java 2007-07-03 09:47:44 UTC (rev 2249)
@@ -24,11 +24,11 @@
/**
* @return value of property
*/
- public String getValue();
+ public Object getValue();
/**
* Sets value of property
* @param value
*/
- public void setValue(String value);
+ public void setValue(Object value);
}
\ No newline at end of file
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java 2007-07-03 09:47:44 UTC (rev 2249)
@@ -0,0 +1,55 @@
+ /*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.internal.core;
+
+import org.eclipse.jdt.core.IMember;
+import org.jboss.tools.seam.core.BijectedAttributeType;
+import org.jboss.tools.seam.core.IBijectedAttribute;
+import org.jboss.tools.seam.core.ScopeType;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class BijectedAttribute implements IBijectedAttribute {
+ IMember javaSource = null;
+ BijectedAttributeType type = null;
+ String name = null;
+ ScopeType scopeType = ScopeType.UNSPECIFIED;
+
+ public IMember getJavaSource() {
+ return javaSource;
+ }
+
+ public void setMember(IMember javaSource) {
+ this.javaSource = javaSource;
+ }
+
+ public BijectedAttributeType getType() {
+ return type;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public ScopeType getScope() {
+ return scopeType;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setScope(ScopeType type) {
+ this.scopeType = type;
+ }
+
+}
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java 2007-07-03 09:47:44 UTC (rev 2249)
@@ -0,0 +1,49 @@
+ /*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.internal.core;
+
+import org.eclipse.jdt.core.IMethod;
+import org.jboss.tools.seam.core.ISeamAnnotatedFactory;
+import org.jboss.tools.seam.core.ScopeType;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class SeamAnnotatedFactory implements ISeamAnnotatedFactory {
+ IMethod method = null;
+ String name = null;
+ ScopeType scopeType = ScopeType.UNSPECIFIED;
+
+ public IMethod getSourceMethod() {
+ return method;
+ }
+
+ public void setMethod(IMethod method) {
+ this.method = method;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public ScopeType getScope() {
+ return scopeType;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setScope(ScopeType type) {
+ this.scopeType = type;
+ }
+
+}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java 2007-07-03 09:42:36 UTC (rev 2248)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java 2007-07-03 09:47:44 UTC (rev 2249)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.seam.internal.core;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -28,11 +31,33 @@
import org.jboss.tools.seam.core.SeamComponentMethodType;
public class SeamComponent implements ISeamComponent {
+ protected ISeamComponent base = null;
+
+ protected String name = null;
+ protected String className = null;
+ protected ScopeType scopeType = ScopeType.UNSPECIFIED;
+ protected boolean stateful = false;
+ protected boolean entity = false;
+
protected Map<String,ISeamProperty> properties = new HashMap<String, ISeamProperty>();
protected IPath source;
+ protected ISeamSource sourceDeclaration = null;
+
+ protected Set<IBijectedAttribute> bijectedAttributes = new HashSet<IBijectedAttribute>();
+ protected Set<ISeamAnnotatedFactory> annotatedFactories = new HashSet<ISeamAnnotatedFactory>();
+ protected Set<ISeamComponentMethod> componentMethods = new HashSet<ISeamComponentMethod>();
+ protected Set<IRole> roles = new HashSet<IRole>();
public SeamComponent () {
}
+
+ public void setBaseComponent(ISeamComponent base) {
+ this.base = base;
+ }
+
+ public ISeamComponent getBaseComponent() {
+ return base;
+ }
public Set<String> getPropertyNames() {
return properties.keySet();
@@ -70,257 +95,262 @@
properties.put(propertyName, p);
}
- public void setSource(IPath path) {
+ public void setSourcePath(IPath path) {
source = path;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#addBijectedAttribute(org.jboss.tools.seam.core.IBijectedAttribute)
*/
public void addBijectedAttribute(IBijectedAttribute attribute) {
- // TODO Auto-generated method stub
-
+ bijectedAttributes.add(attribute);
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#addFactory(org.jboss.tools.seam.core.ISeamAnnotatedFactory)
*/
public void addFactory(ISeamAnnotatedFactory factory) {
- // TODO Auto-generated method stub
-
+ annotatedFactories.add(factory);
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#addMethod(org.jboss.tools.seam.core.ISeamComponentMethod)
*/
public void addMethod(ISeamComponentMethod method) {
- // TODO Auto-generated method stub
-
+ componentMethods.add(method);
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#addRole(org.jboss.tools.seam.core.IRole)
*/
public void addRole(IRole role) {
- // TODO Auto-generated method stub
-
+ roles.add(role);
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#addSourceDeclaration(org.jboss.tools.seam.core.ISeamSource)
*/
public void addSourceDeclaration(ISeamSource source) {
- // TODO Auto-generated method stub
-
+ sourceDeclaration = source;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#getBijectedAttributes()
*/
public Set<IBijectedAttribute> getBijectedAttributes() {
- // TODO Auto-generated method stub
- return null;
+ return base != null ? base.getBijectedAttributes() : bijectedAttributes;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#getBijectedAttributesByName(java.lang.String)
*/
public Set<IBijectedAttribute> getBijectedAttributesByName(String name) {
- // TODO Auto-generated method stub
- return null;
+ Set<IBijectedAttribute> result = null;
+ for(IBijectedAttribute a: getBijectedAttributes()) {
+ if(name.equals(a.getName())) {
+ if(result == null) result = new HashSet<IBijectedAttribute>();
+ result.add(a);
+ }
+ }
+ return result;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#getBijectedAttributesByType(org.jboss.tools.seam.core.BijectedAttributeType)
*/
public Set<IBijectedAttribute> getBijectedAttributesByType(
BijectedAttributeType type) {
- // TODO Auto-generated method stub
- return null;
+ Set<IBijectedAttribute> result = null;
+ for(IBijectedAttribute a: getBijectedAttributes()) {
+ if(type.equals(a.getType())) {
+ if(result == null) result = new HashSet<IBijectedAttribute>();
+ result.add(a);
+ }
+ }
+ return result;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#getClassName()
*/
public String getClassName() {
- // TODO Auto-generated method stub
- return null;
+ return className;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#getFactories()
*/
public Set<ISeamAnnotatedFactory> getFactories() {
- // TODO Auto-generated method stub
- return null;
+ return base != null ? base.getFactories() : annotatedFactories;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#getMethods()
*/
public Set<ISeamComponentMethod> getMethods() {
- // TODO Auto-generated method stub
- return null;
+ return base != null ? base.getMethods() : componentMethods;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#getMethodsByType(org.jboss.tools.seam.core.SeamComponentMethodType)
*/
public Set<ISeamComponentMethod> getMethodsByType(
SeamComponentMethodType type) {
- // TODO Auto-generated method stub
- return null;
+ Set<ISeamComponentMethod> result = null;
+ for(ISeamComponentMethod a: getMethods()) {
+ if(type.equals(a.getType())) {
+ if(result == null) result = new HashSet<ISeamComponentMethod>();
+ result.add(a);
+ }
+ }
+ return result;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#getRoles()
*/
public Set<IRole> getRoles() {
- // TODO Auto-generated method stub
- return null;
+ return base != null ? base.getRoles() : roles;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#getSourceDeclarations()
*/
public Set<ISeamSource> getSourceDeclarations() {
- // TODO Auto-generated method stub
- return null;
+ Set<ISeamSource> sources = base == null ? null : base.getSourceDeclarations();
+ if(sources == null) sources = new HashSet<ISeamSource>();
+ sources.add(sourceDeclaration);
+ return sources;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#isEntity()
*/
public boolean isEntity() {
- // TODO Auto-generated method stub
- return false;
+ return entity;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#isStateful()
*/
public boolean isStateful() {
- // TODO Auto-generated method stub
- return false;
+ return stateful;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#removeBijectedAttribute(org.jboss.tools.seam.core.IBijectedAttribute)
*/
public void removeBijectedAttribute(IBijectedAttribute attribute) {
- // TODO Auto-generated method stub
-
+ bijectedAttributes.remove(attribute);
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#removeFactory(org.jboss.tools.seam.core.ISeamAnnotatedFactory)
*/
public void removeFactory(ISeamAnnotatedFactory factory) {
- // TODO Auto-generated method stub
-
+ annotatedFactories.remove(factory);
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#removeMethod(org.jboss.tools.seam.core.ISeamComponentMethod)
*/
public void removeMethod(ISeamComponentMethod method) {
- // TODO Auto-generated method stub
-
+ componentMethods.remove(method);
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#removeRole(org.jboss.tools.seam.core.IRole)
*/
public void removeRole(IRole role) {
- // TODO Auto-generated method stub
-
+ roles.remove(role);
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#removeSourceDeclaration(org.jboss.tools.seam.core.ISeamSource)
*/
public void removeSourceDeclaration(ISeamSource source) {
- // TODO Auto-generated method stub
-
+ if(sourceDeclaration == source) {
+ sourceDeclaration = null;
+ }
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#setClassName(java.lang.String)
*/
public void setClassName(String className) {
- // TODO Auto-generated method stub
-
+ this.className = className;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#setEntity(boolean)
*/
public void setEntity(boolean entity) {
- // TODO Auto-generated method stub
-
+ this.entity = entity;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#setStateful(boolean)
*/
public void setStateful(boolean stateful) {
- // TODO Auto-generated method stub
-
+ this.stateful = stateful;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamContextVariable#getName()
*/
public String getName() {
- // TODO Auto-generated method stub
- return null;
+ if(name == null && base != null) {
+ return base.getName();
+ }
+ return name;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamContextVariable#getScope()
*/
public ScopeType getScope() {
- // TODO Auto-generated method stub
- return null;
+ if(scopeType == ScopeType.UNSPECIFIED && base != null) {
+ return base.getScope();
+ }
+ return scopeType;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamContextVariable#setName(java.lang.String)
*/
public void setName(String name) {
- // TODO Auto-generated method stub
-
+ this.name = name;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamContextVariable#setScope(org.jboss.tools.seam.core.ScopeType)
*/
public void setScope(ScopeType type) {
- // TODO Auto-generated method stub
-
+ this.scopeType = type;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#getProperties(java.lang.String)
*/
public List<ISeamProperty> getProperties(String propertyName) {
- // TODO Auto-generated method stub
- return null;
+ List<ISeamProperty> list = new ArrayList<ISeamProperty>();
+ ISeamProperty p = properties.get(propertyName);
+ if(p != null) list.add(p);
+ return list;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#getProperties()
*/
- public Set<ISeamProperty> getProperties() {
- // TODO Auto-generated method stub
- return null;
+ public Collection<ISeamProperty> getProperties() {
+ return properties.values();
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamComponent#removeProperty(org.jboss.tools.seam.core.ISeamProperty)
*/
public void removeProperty(ISeamProperty property) {
- // TODO Auto-generated method stub
-
+ properties.remove(property.getName());
}
-}
\ No newline at end of file
+
+}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-07-03 09:42:36 UTC (rev 2248)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-07-03 09:47:44 UTC (rev 2249)
@@ -10,10 +10,8 @@
******************************************************************************/
package org.jboss.tools.seam.internal.core;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
-import java.util.Map;
import java.util.Set;
import org.eclipse.core.resources.IProject;
@@ -29,7 +27,8 @@
*/
public class SeamProject implements ISeamProject {
IProject project;
- Map<String,SeamComponent> components = new HashMap<String, SeamComponent>();
+ Set<SeamComponent> allComponents = new HashSet<SeamComponent>();
+ Set<ISeamContextVariable> allVariables = new HashSet<ISeamContextVariable>();
public SeamProject() {}
@@ -67,10 +66,9 @@
// }
public Set<ISeamComponent> getComponents() {
- //TODO store cash
- Set<ISeamComponent> set = new HashSet<ISeamComponent>();
- set.addAll(components.values());
- return set;
+ Set<ISeamComponent> result = new HashSet<ISeamComponent>();
+ result.addAll(allComponents);
+ return result;
}
/**
@@ -82,8 +80,8 @@
pathRemoved(source);
if(list == null) return;
for (int i = 0; i < list.length; i++) {
- list[i].setSource(source);
- components.put(list[i].getName(), list[i]);
+ list[i].setSourcePath(source);
+ allComponents.add(list[i]);
}
}
@@ -92,7 +90,7 @@
* @param source
*/
public void pathRemoved(IPath source) {
- Iterator<SeamComponent> iterator = components.values().iterator();
+ Iterator<SeamComponent> iterator = allComponents.iterator();
while(iterator.hasNext()) {
SeamComponent c = iterator.next();
if(c.source != null && source.isPrefixOf(c.source)) {
@@ -101,15 +99,9 @@
}
}
- public ISeamComponent getComponent(String modelObjectId) {
- return components.get(modelObjectId);
- }
-
public Set<ISeamComponent> getComponentsByName(String name) {
Set<ISeamComponent> result = new HashSet<ISeamComponent>();
- Iterator<SeamComponent> iterator = components.values().iterator();
- while(iterator.hasNext()) {
- SeamComponent component = iterator.next();
+ for(SeamComponent component: allComponents) {
if(name.equals(component.getName())) {
result.add(component);
}
@@ -117,59 +109,77 @@
return result;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamProject#getComponentsByClass(java.lang.String)
*/
public Set<ISeamComponent> getComponentsByClass(String className) {
- // TODO Auto-generated method stub
- return null;
+ Set<ISeamComponent> result = new HashSet<ISeamComponent>();
+ for(SeamComponent component: allComponents) {
+ if(className.equals(component.getClassName())) {
+ result.add(component);
+ }
+ }
+ return result;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamProject#getComponentsByScope(org.jboss.tools.seam.core.ScopeType)
*/
public Set<ISeamComponent> getComponentsByScope(ScopeType type) {
- // TODO Auto-generated method stub
- return null;
+ Set<ISeamComponent> result = new HashSet<ISeamComponent>();
+ for(SeamComponent component: allComponents) {
+ if(type.equals(component.getScope())) {
+ result.add(component);
+ }
+ }
+ return result;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamProject#addComponent(org.jboss.tools.seam.core.ISeamComponent)
*/
public void addComponent(ISeamComponent component) {
- // TODO Auto-generated method stub
-
+ allComponents.add((SeamComponent)component);
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamProject#removeComponent(org.jboss.tools.seam.core.ISeamComponent)
*/
public void removeComponent(ISeamComponent component) {
- // TODO Auto-generated method stub
-
+ allComponents.remove(component);
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamProject#getVariables()
*/
public Set<ISeamContextVariable> getVariables() {
- // TODO Auto-generated method stub
- return null;
+ return allVariables;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamProject#getVariablesByName(java.lang.String)
*/
public Set<ISeamContextVariable> getVariablesByName(String name) {
- // TODO Auto-generated method stub
- return null;
+ Set<ISeamContextVariable> result = new HashSet<ISeamContextVariable>();
+ for (ISeamContextVariable v: allVariables) {
+ if(name.equals(v.getName())) {
+ result.add(v);
+ }
+ }
+ return result;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamProject#getVariablesByScope(org.jboss.tools.seam.core.ScopeType)
*/
public Set<ISeamContextVariable> getVariablesByScope(ScopeType scope) {
- // TODO Auto-generated method stub
- return null;
+ Set<ISeamContextVariable> result = new HashSet<ISeamContextVariable>();
+ for (ISeamContextVariable v: allVariables) {
+ if(scope.equals(v.getScope())) {
+ result.add(v);
+ }
+ }
+ return result;
}
-}
\ No newline at end of file
+
+}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProperty.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProperty.java 2007-07-03 09:42:36 UTC (rev 2248)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProperty.java 2007-07-03 09:47:44 UTC (rev 2249)
@@ -15,7 +15,7 @@
public class SeamProperty implements ISeamProperty {
protected String name;
- protected String value;
+ protected Object value;
protected int startPosition = -1;
protected int length = -1;
@@ -50,15 +50,15 @@
length = v;
}
- public String getValue() {
+ public Object getValue() {
return value;
}
- public void setValue(String value) {
+ public void setValue(Object value) {
this.value = value;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamXmlElement#getResource()
*/
public IResource getResource() {
16 years, 10 months
JBoss Tools SVN: r2248 - in trunk/seam/plugins: org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-07-03 05:42:36 -0400 (Tue, 03 Jul 2007)
New Revision: 2248
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/AntCopyUtils.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/ISeamFacetDataModelProperties.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDataModelProvider.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
Log:
http://jira.jboss.org/jira/browse/EXIN-221
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/AntCopyUtils.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/AntCopyUtils.java 2007-07-02 20:26:23 UTC (rev 2247)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/AntCopyUtils.java 2007-07-03 09:42:36 UTC (rev 2248)
@@ -48,15 +48,17 @@
public static void copyFilesAndFolders(File sourceFolder, File destinationFolder,
FileSetFileFilter fileSetFilter,
FilterSetCollection filterSetCollection, boolean override) {
- if(!destinationFolder.exists()) destinationFolder.mkdirs();
+ if(!destinationFolder.exists())
+ destinationFolder.mkdirs();
File[] files = fileSetFilter==null?sourceFolder.listFiles():sourceFolder.listFiles(fileSetFilter);
for (File file : files) {
if(file.isDirectory()) {
- copyFilesAndFolders(file,new File(destinationFolder,file.getName()),filterSetCollection,override);
+ copyFilesAndFolders(file,new File(destinationFolder,file.getName()),fileSetFilter,filterSetCollection,override);
} else {
try {
FileUtils.getFileUtils().copyFile(file, new File(destinationFolder,file.getName()),filterSetCollection,override);
} catch (IOException e) {
+ e.printStackTrace();
SeamCorePlugin.getPluginLog().logError(e);
}
}
@@ -64,11 +66,21 @@
}
public static void copyFile(File source, File dest, boolean override) {
+ copyFileToFolder(source, new File(dest,source.getName()),new FilterSetCollection(),override);
+ }
+
+ public static void copyFileToFolder(File source, File dest, FilterSetCollection filterSetCollection, boolean override ) {
try {
- FileUtils.getFileUtils().copyFile(source, new File(dest,source.getName()),new FilterSetCollection(),override);
+ FileUtils.getFileUtils().copyFile(source, new File(dest,source.getName()),filterSetCollection,override);
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
}
-
+ public static void copyFileToFile(File source, File dest, FilterSetCollection filterSetCollection, boolean override ) {
+ try {
+ FileUtils.getFileUtils().copyFile(source, dest,filterSetCollection,override);
+ } catch (IOException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
+ }
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/ISeamFacetDataModelProperties.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/ISeamFacetDataModelProperties.java 2007-07-02 20:26:23 UTC (rev 2247)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/ISeamFacetDataModelProperties.java 2007-07-03 09:42:36 UTC (rev 2248)
@@ -20,6 +20,8 @@
public static final String PREFIX = "ISeamFacetDataModelProperties.";
+ public static final String SEAM_PROJECT_NAME = "project.name";
+
public static final String JBOSS_AS_HOME = "jboss.home";
public static final String JBOSS_AS_DEPLOY_AS = "JBOSS_AS_DEPLOY_AS";
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDataModelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDataModelProvider.java 2007-07-02 20:26:23 UTC (rev 2247)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDataModelProvider.java 2007-07-03 09:42:36 UTC (rev 2248)
@@ -62,6 +62,7 @@
names.add(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME);
names.add(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME);
names.add(ISeamFacetDataModelProperties.WEB_CONTENTS_FOLDER);
+ names.add(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME);
return names;
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java 2007-07-02 20:26:23 UTC (rev 2247)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java 2007-07-03 09:42:36 UTC (rev 2248)
@@ -15,9 +15,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.HashMap;
import java.util.List;
-import java.util.Properties;
import java.util.regex.Pattern;
import org.apache.tools.ant.types.FilterSet;
@@ -36,18 +34,23 @@
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IDelegate;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.jboss.tools.seam.core.SeamCorePlugin;
public class SeamFacetInstallDelegete extends Object implements IDelegate {
+ public static String PROFILE = "dev-war";
+
public static FileSet VIEW_FILESET = new FileSet()
.include("home\\.xhtml")
.include("error\\.xhtml")
.include("login\\.xhtml")
.include("login\\.page.xml")
.include("index\\.html")
- .include("layout\\.*")
- .include("stylesheet\\.*")
- .include("img\\.*")
+ .include("layout")
+ .include("layout/.*")
+ .include("stylesheet/.*")
+ .include("img/.*")
+ .include("img")
.exclude(".*/.*\\.ftl");
public static FileSet SEAM_JARS = new FileSet()
@@ -58,16 +61,18 @@
.include(".[^/]*\\.jar")
.include(".[^/]*\\.zip");
- public static FileSet JBOOS_RESOURCES_SET1 = new FileSet()
- .exclude("datasource-ds.xml")
- .exclude("import.sql")
- .exclude("WEB-INF/components.*\\.xml")
- .exclude("META-INF/persistence.*\\.xml")
- .exclude("META-INF/application.xml")
- .exclude("META-INF/jboss-app.xml")
- .exclude("META-INF/ejb-jar.xml")
- .exclude("WEB-INF/jboss-web.xml");
+ public static FileSet JBOOS_WAR_RESOURCE_SET1 = new FileSet()
+ .include("META-INF/jboss-beans\\.xml")
+ .include("WEB-INF/pages\\.xml")
+ .include("WEB-INF/faces-config\\.xml")
+ .include("WEB-INF/web\\.xml");
+ public static FileSet JBOOS_JAR_RESOURCE_SET1 = new FileSet()
+ .include("META-INF/ejb-jar\\.xml")
+ .include("META-INF/persistence-" + PROFILE + "\\.xml" )
+ .include("import-" + PROFILE + "\\.sql");
+
+
public static String DROOLS_LIB_SEAM_RELATED_PATH = "drools/lib";
public static String SEAM_LIB_RELATED_PATH = "lib";
@@ -116,27 +121,30 @@
seamGenViewSource, webContentFolder, new FileSetFileFilter(viewFileSet), viewFilterSetCollection, true);
// *******************************************************************
- // TODO copy manifest and configuration resources the same way as view
+ // Copy manifest and configuration resources the same way as view
// *******************************************************************
- FileSet res1FileSet = new FileSet(JBOOS_RESOURCES_SET1).dir(seamGenResFolder);
+ FileSet res1FileSet = new FileSet(JBOOS_WAR_RESOURCE_SET1).dir(seamGenResFolder);
AntCopyUtils.copyFilesAndFolders(
- seamGenResFolder,webContentFolder,new FileSetFileFilter(viewFileSet),viewFilterSetCollection, true);
+ seamGenResFolder,webContentFolder,new FileSetFileFilter(res1FileSet), viewFilterSetCollection, true);
- AntCopyUtils.copyFile(
+ AntCopyUtils.copyFileToFile(
hibernateConsoleLaunchFile,
- new File(project.getLocation().toFile(),project.getName()),
+ new File(project.getLocation().toFile(),project.getName()+".launch"),
new FilterSetCollection(projectFilterSet), true);
+
FilterSetCollection hibernateDialectFilterSet = new FilterSetCollection();
hibernateDialectFilterSet.addFilterSet(jdbcFilterSet);
hibernateDialectFilterSet.addFilterSet(projectFilterSet);
hibernateDialectFilterSet.addFilterSet(FilterSetFactory.createHibernateDialectFilterSet(model));
- AntCopyUtils.copyFile(
+ AntCopyUtils.copyFileToFolder(
hibernateConsolePropsFile,
- new File(project.getLocation().toFile(),hibernateConsolePropsFile.getName()),
+ project.getLocation().toFile(),
hibernateDialectFilterSet, true);
+ // TODO add copy for /hibernatetools/seam-gen.reveng.xml
+
// *************************************
// TODO modify existing faces-config.xml
// *************************************
@@ -165,59 +173,17 @@
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
- protected void copyViewFolder(File viewSource, File viewDestination,HashMap<String, String> properties) {
-
- FilterSet filterSet = new FilterSet();
- for (Object propertyName : properties.keySet()) {
- filterSet.addFilter(propertyName.toString(), properties.get(propertyName));
- }
-
- FilterSetCollection filters = new FilterSetCollection();
- filters.addFilterSet(filterSet);
- AntCopyUtils.copyFilesAndFolders(viewSource, viewDestination, filters, true);
-
- }
-
- protected void copySeamLibraries(File source, File dest) {
- }
-
public static void copyFiles(File source, File dest, FileFilter filter) {
dest.mkdir();
for (File file:source.listFiles(filter)) {
try {
FileUtils.getFileUtils().copyFile(file, new File(dest,file.getName()),new FilterSetCollection(),true);
} catch (IOException e) {
- // TODO add logging
+ SeamCorePlugin.getPluginLog().logError(e);
}
}
}
-
- static private FileFilter seamLibs = new FileFilter() {
- Pattern includePattern = Pattern.compile("jboss-seam.*\\.jar");
- Pattern excludePattern = Pattern.compile("jboss-seam-gen\\.jar");
-
- public boolean accept(File pathname){
- return
- !excludePattern.matcher(pathname.getName()).matches()
- &&
- includePattern.matcher(pathname.getName()).matches();
- }
- };
-
- static private FileFilter javaLibs = new FileFilter() {
-
- Pattern libs = Pattern.compile(".*\\.jar");
- Pattern zips = Pattern.compile(".*\\.zip");
-
- public boolean accept(File pathname){
- return
- libs.matcher(pathname.getName()).matches()
- ||
- zips.matcher(pathname.getName()).matches();
- }
- };
-
public static class FileSet {
File dir = null;
@@ -267,9 +233,9 @@
public boolean isIncluded(String file) {
int i = dir.getAbsolutePath().length()+1;
String relatedPath = file.substring(i);
- System.out.println(relatedPath);
+ if(new File(file).isDirectory())return true;
for (Pattern pattern : include) {
- if(pattern.matcher(relatedPath).matches() ) {
+ if(pattern.matcher(relatedPath.replace('\\', '/')).matches() ) {
return !isExcluded(relatedPath);
}
}
@@ -278,7 +244,7 @@
public boolean isExcluded(String file){
for (Pattern pattern : exclude) {
- if(pattern.matcher(file).matches()) return true;
+ if(pattern.matcher(file.replace('\\', '/')).matches()) return true;
}
return false;
}
@@ -311,7 +277,7 @@
// props.put("hibernate.connection.username", "rooy");
// FilterSet jdbcFs = FilterSetFactory.createJdbcFilterSet(props);
// System.out.println(jdbcFs);
-// FileSet include = new FileSet()
+ FileSet include = VIEW_FILESET;
// .dir("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view")
// .include("home\\.xhtml")
// .include("error\\.xhtml")
@@ -323,11 +289,15 @@
// .include("img\\.*")
// .exclude(".*\\\\.*\\.ftl");
//
-// FileSetFileFilter fileSetFilter = new FileSetFileFilter(include);
-// File file1 = new File("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view");
+
+ File file1 = new File("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view");
+ FileSetFileFilter fileSetFilter = new FileSetFileFilter(include.dir(file1));
// File[] copy = file1.listFiles(fileSetFilter);
-// copyFiles(file1,new File("c:\\temp\\1"),fileSetFilter);
-// AntCopyUtils.copyFilesAndFolders(file1, new File("c:\\temp\\12"),fileSetFilter, new FilterSetCollection(), true);
+// for (File file : copy) {
+// System.out.println(file.getAbsolutePath());
+// }
+// copyFiles(file1,new File("c:\\temp\\4"),fileSetFilter);
+ AntCopyUtils.copyFilesAndFolders(file1, new File("c:\\temp\\15"),fileSetFilter, new FilterSetCollection(), true);
}
public static class FilterSetFactory {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-07-02 20:26:23 UTC (rev 2247)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-07-03 09:42:36 UTC (rev 2248)
@@ -54,10 +54,10 @@
// General group
IFieldEditor jBossAsHomeEditor = IFieldEditorFactory.INSTANCE.createBrowseFolderEditor(
ISeamFacetDataModelProperties.JBOSS_AS_HOME,
- "JBoss AS Home Folder:","c:\\JBossAS");
+ "JBoss AS Home Folder:","C:\\java\\jboss-4.0.5.GA");
IFieldEditor jBossSeamHomeEditor = IFieldEditorFactory.INSTANCE.createBrowseFolderEditor(
ISeamFacetDataModelProperties.JBOSS_SEAM_HOME,
- "JBoss Seam Home Folder:","c:\\JBossAS");
+ "JBoss Seam Home Folder:","C:\\java\\jboss-seam-1.2.1.GA");
IFieldEditor jBossAsDeployAsEditor = IFieldEditorFactory.INSTANCE.createComboEditor(
ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,
"Deploy as:",Arrays.asList(new String[]{"war","ear"}),"war");
16 years, 10 months
JBoss Tools SVN: r2247 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-07-02 16:26:23 -0400 (Mon, 02 Jul 2007)
New Revision: 2247
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java
Log:
EXIN-221
project.name facet parameter is added
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java 2007-07-02 18:00:44 UTC (rev 2246)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java 2007-07-02 20:26:23 UTC (rev 2247)
@@ -58,56 +58,99 @@
.include(".[^/]*\\.jar")
.include(".[^/]*\\.zip");
+ public static FileSet JBOOS_RESOURCES_SET1 = new FileSet()
+ .exclude("datasource-ds.xml")
+ .exclude("import.sql")
+ .exclude("WEB-INF/components.*\\.xml")
+ .exclude("META-INF/persistence.*\\.xml")
+ .exclude("META-INF/application.xml")
+ .exclude("META-INF/jboss-app.xml")
+ .exclude("META-INF/ejb-jar.xml")
+ .exclude("WEB-INF/jboss-web.xml");
+
public static String DROOLS_LIB_SEAM_RELATED_PATH = "drools/lib";
- public static String SEAM_RELATED_LIB = "lib";
+ public static String SEAM_LIB_RELATED_PATH = "lib";
+ public static String WEB_LIBRARIES_RELATED_PATH = "WEB-INF/lib";
+
public void execute(IProject project, IProjectFacetVersion fv,
Object config, IProgressMonitor monitor) throws CoreException {
IDataModel model = (IDataModel)config;
- Properties propertiew = new Properties();
-
- // get WebContents folder path from model
+ // get WebContents folder path from DWP model
WebArtifactEdit edit =
WebArtifactEdit.getWebArtifactEditForRead(project);
IVirtualComponent com = ComponentCore.createComponent(project);
IVirtualFolder webRootFolder = com.getRootFolder().getFolder(new Path("/"));
IContainer folder = webRootFolder.getUnderlyingFolder();
+
File webContentFolder = folder.getLocation().toFile();
+ model.setProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME, project.getName());
- String seamHomeFolder = model.getProperty(ISeamFacetDataModelProperties.JBOSS_SEAM_HOME).toString();
+ String seamHomePath = model.getProperty(ISeamFacetDataModelProperties.JBOSS_SEAM_HOME).toString();
+ File seamHomeFolder = new File(seamHomePath);
+ File seamLibFolder = new File(seamHomePath,SEAM_LIB_RELATED_PATH);
+ File seamGenResFolder = new File(seamHomePath,"seam-gen/resources");
+ File droolsLibFolder = new File(seamHomePath,DROOLS_LIB_SEAM_RELATED_PATH);
+ File seamGenViewSource = new File(seamHomePath,"seam-gen/view");
+ File jdbcDriverFile = new File(model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH).toString());
+ File hibernateConsoleLaunchFile = new File(seamHomeFolder, "seam-gen/hibernatetools/hibernate-console.launch");
+ File hibernateConsolePropsFile = new File(seamHomeFolder, "seam-gen/hibernatetools/hibernate-console.properties");
- File seamGenViewSource = new File(seamHomeFolder,"seam-gen/view");
- // Copy view folder from seam-gen installation to
-
- FileSet viewFileSet = new FileSet(VIEW_FILESET).dir(seamGenViewSource.getAbsolutePath());
+
+ FilterSet jdbcFilterSet = FilterSetFactory.createJdbcFilterSet(model);
+ FilterSet projectFilterSet = FilterSetFactory.createProjectFilterSet(model);
+
+ // ****************************************************************
+ // Copy view folder from seam-gen installation to WebContent folder
+ // ****************************************************************
+
+ FileSet viewFileSet = new FileSet(VIEW_FILESET).dir(seamGenViewSource);
FilterSetCollection viewFilterSetCollection = new FilterSetCollection();
- viewFilterSetCollection.addFilterSet(FilterSetFactory.createJdbcFilterSet(model));
- viewFilterSetCollection.addFilterSet(FilterSetFactory.createProjectFilterSet(model));
+ viewFilterSetCollection.addFilterSet(jdbcFilterSet);
+ viewFilterSetCollection.addFilterSet(projectFilterSet);
AntCopyUtils.copyFilesAndFolders(
seamGenViewSource, webContentFolder, new FileSetFileFilter(viewFileSet), viewFilterSetCollection, true);
-// File file1 = new File("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view");
-// File[] copy = file1.listFiles(fileSetFilter);
-// copyFiles(file1,new File("c:\\temp\\1"),fileSetFilter);
+ // *******************************************************************
+ // TODO copy manifest and configuration resources the same way as view
+ // *******************************************************************
- // project location with filled out FIlterSet
+ FileSet res1FileSet = new FileSet(JBOOS_RESOURCES_SET1).dir(seamGenResFolder);
+ AntCopyUtils.copyFilesAndFolders(
+ seamGenResFolder,webContentFolder,new FileSetFileFilter(viewFileSet),viewFilterSetCollection, true);
- // TODO copy manifest and configuration resources the same way as view
+ AntCopyUtils.copyFile(
+ hibernateConsoleLaunchFile,
+ new File(project.getLocation().toFile(),project.getName()),
+ new FilterSetCollection(projectFilterSet), true);
+ FilterSetCollection hibernateDialectFilterSet = new FilterSetCollection();
+ hibernateDialectFilterSet.addFilterSet(jdbcFilterSet);
+ hibernateDialectFilterSet.addFilterSet(projectFilterSet);
+ hibernateDialectFilterSet.addFilterSet(FilterSetFactory.createHibernateDialectFilterSet(model));
+
+ AntCopyUtils.copyFile(
+ hibernateConsolePropsFile,
+ new File(project.getLocation().toFile(),hibernateConsolePropsFile.getName()),
+ hibernateDialectFilterSet, true);
+
+ // *************************************
// TODO modify existing faces-config.xml
+ // *************************************
- // TODO copy libraries/link libraries
- File seamHome = new File(seamHomeFolder);
- File webLibFolder = new File(webContentFolder,"WEB-INF/lib");
- copyFiles(seamHome,webLibFolder,seamLibs);
- copyFiles(new File(seamHomeFolder,"lib"),webLibFolder,javaLibs);
- copyFiles(new File(seamHomeFolder,"drools/lib"),webLibFolder,javaLibs);
- String jdbcDriverFileName = model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH).toString();
- File jdbcDriverFile = new File(jdbcDriverFileName);
+ // ********************************************************************************************
+ // TODO copy libraries/link libraries (seam jars, seam dependencies jars, drols jars, jdbc jar)
+ // ********************************************************************************************
+
+ File webLibFolder = new File(webContentFolder,WEB_LIBRARIES_RELATED_PATH);
+ copyFiles(seamHomeFolder,webLibFolder,new FileSetFileFilter(new FileSet(SEAM_JARS).dir(seamHomeFolder)));
+ copyFiles(seamLibFolder,webLibFolder,new FileSetFileFilter(new FileSet(SEAM_JARS).dir(seamLibFolder)));
+ copyFiles(droolsLibFolder,webLibFolder,new FileSetFileFilter(new FileSet(SEAM_JARS).dir(droolsLibFolder)));
+
if(jdbcDriverFile.exists())
AntCopyUtils.copyFile(jdbcDriverFile, webLibFolder, true);
@@ -187,6 +230,10 @@
this.dir = new File(dir);
}
+ public FileSet(File dir) {
+ this.dir = dir;
+ }
+
public FileSet(FileSet template) {
include.addAll(template.getIncluded());
exclude.addAll(template.getExcluded());
@@ -201,6 +248,11 @@
return this;
}
+ public FileSet dir(File dir) {
+ this.dir = dir;
+ return this;
+ }
+
public FileSet include(String pattern) {
include.add(Pattern.compile(pattern));
return this;
@@ -283,6 +335,7 @@
public static FilterSet JDBC_TEMPLATE;
public static FilterSet PROJECT_TEMPLATE;
public static FilterSet FILTERS_TEMPLATE;
+ public static FilterSet HIBERNATE_DIALECT_TEMPLATE;
static {
JDBC_TEMPLATE = new FilterSet();
@@ -313,6 +366,9 @@
FILTERS_TEMPLATE.addFilter("listName","${component.name}List");
FILTERS_TEMPLATE.addFilter("homeName","${component.name}Home");
FILTERS_TEMPLATE.addFilter("query","${query.text}");
+
+ HIBERNATE_DIALECT_TEMPLATE = new FilterSet();
+ HIBERNATE_DIALECT_TEMPLATE.addFilter("hibernate.dialect","$hibernate.dialect");
}
public static FilterSet createJdbcFilterSet(IDataModel values) {
@@ -326,6 +382,10 @@
return aplayProperties(FILTERS_TEMPLATE, values);
}
+ public static FilterSet createHibernateDialectFilterSet(IDataModel values) {
+ return aplayProperties(HIBERNATE_DIALECT_TEMPLATE, values);
+ }
+
private static FilterSet aplayProperties(FilterSet template,IDataModel values) {
FilterSet result = new FilterSet();
for (Object filter : template.getFilterHash().keySet()) {
16 years, 10 months
JBoss Tools SVN: r2246 - in trunk: hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/META-INF and 12 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-07-02 14:00:44 -0400 (Mon, 02 Jul 2007)
New Revision: 2246
Modified:
trunk/common/plugins/org.jboss.tools.common.model/build.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf/build.properties
trunk/jst/plugins/org.jboss.tools.jst.jsp/build.properties
trunk/jst/plugins/org.jboss.tools.jst.web.ui/build.properties
trunk/seam/features/org.jboss.tools.seam.feature/feature.xml
trunk/seam/plugins/org.jboss.tools.seam.core/build.properties
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/ISeamFacetDataModelProperties.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDataModelProvider.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.xml/build.properties
trunk/struts/plugins/org.jboss.tools.struts.debug/build.properties
trunk/struts/plugins/org.jboss.tools.struts.ui/build.properties
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/build.properties
trunk/struts/plugins/org.jboss.tools.struts/build.properties
Log:
Clean up manifest 's warnings
Modified: trunk/common/plugins/org.jboss.tools.common.model/build.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/common/plugins/org.jboss.tools.common.model/build.properties 2007-07-02 18:00:44 UTC (rev 2246)
@@ -6,4 +6,5 @@
plugin.properties,\
plugin.xml,\
schema/,\
- images/
+ images/,\
+ model.jar
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/META-INF/MANIFEST.MF 2007-07-02 18:00:44 UTC (rev 2246)
@@ -14,8 +14,7 @@
org.eclipse.ui.editors,
org.eclipse.core.resources,
org.hibernate.eclipse,
- org.jboss.tools.hibernate.ui.view,
- org.jboss.tools.common
+ org.jboss.tools.hibernate.ui.view
Bundle-Version: 2.0.0
Export-Package: org.jboss.tools.hibernate.veditor,
org.jboss.tools.hibernate.veditor.editors,
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/build.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/build.properties 2007-07-02 18:00:44 UTC (rev 2246)
@@ -4,5 +4,6 @@
META-INF/,\
plugin.properties,\
about.html,\
- dtds/
+ dtds/,\
+ jsf.jar
jars.compile.order = jsf.jar
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/build.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/build.properties 2007-07-02 18:00:44 UTC (rev 2246)
@@ -5,4 +5,5 @@
plugin.properties,\
images/,\
about.html,\
- META-INF/
+ META-INF/,\
+ jspeditor.jar
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/build.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/build.properties 2007-07-02 18:00:44 UTC (rev 2246)
@@ -4,4 +4,5 @@
plugin.properties,\
images/,\
about.html,\
- META-INF/
+ META-INF/,\
+ webui.jar
Modified: trunk/seam/features/org.jboss.tools.seam.feature/feature.xml
===================================================================
--- trunk/seam/features/org.jboss.tools.seam.feature/feature.xml 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/seam/features/org.jboss.tools.seam.feature/feature.xml 2007-07-02 18:00:44 UTC (rev 2246)
@@ -31,4 +31,22 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.jboss.tools.seam.xml"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.jboss.tools.seam.xml.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.jboss.ide.seam.gen"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/build.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/build.properties 2007-07-02 18:00:44 UTC (rev 2246)
@@ -1,4 +1,5 @@
source.seam-core.jar = src/
bin.includes = plugin.xml,\
- META-INF/
+ META-INF/,\
+ seam-core.jar
jars.compile.order = seam-core.jar
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/ISeamFacetDataModelProperties.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/ISeamFacetDataModelProperties.java 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/ISeamFacetDataModelProperties.java 2007-07-02 18:00:44 UTC (rev 2246)
@@ -20,39 +20,39 @@
public static final String PREFIX = "ISeamFacetDataModelProperties.";
- public static final String JBOSS_AS_HOME = PREFIX + "JBOSS_AS_HOME";
+ public static final String JBOSS_AS_HOME = "jboss.home";
- public static final String JBOSS_AS_DEPLOY_AS = PREFIX + "JBOSS_AS_DEPLOY_AS";
+ public static final String JBOSS_AS_DEPLOY_AS = "JBOSS_AS_DEPLOY_AS";
- public static final String DB_TYPE = PREFIX + "DB_TYPE";
+ public static final String DB_TYPE = "database.type";
- public static final String HIBERNATE_DIALECT = PREFIX + "HIBERNATE_DIALECT";
+ public static final String HIBERNATE_DIALECT = "hibernate.dialect";
- public static final String JDBC_DRIVER_CLASS_NAME = PREFIX + "JDBC_DRIVER_CLASS_NAME";
+ public static final String JDBC_DRIVER_CLASS_NAME = "hibernate.connection.driver_class";
- public static final String JDBC_URL_FOR_DB = PREFIX + "JDBC_URL_FOR_DB";
+ public static final String JDBC_URL_FOR_DB = "hibernate.connection.url";
- public static final String DB_USER_NAME = PREFIX + "DB_USER_NAME";
+ public static final String DB_USER_NAME = "hibernate.connection.username";
- public static final String DB_PASSWORD = PREFIX + "DB_PASSWORD";
+ public static final String DB_USERP_PASSWORD = "hibernate.connection.password";
- public static final String DB_SCHEMA_NAME = PREFIX + "DB_SCHEMA_NAME";
+ public static final String DB_SCHEMA_NAME = "schema.property";
- public static final String DB_CATALOG_NAME = PREFIX + "DB_CATALOG_NAME";
+ public static final String DB_CATALOG_NAME = "catalog.property";
- public static final String DB_ALREADY_EXISTS = PREFIX + "DB_ALREADY_EXISTS";
+ public static final String DB_ALREADY_EXISTS = "database.exists";
- public static final String RECREATE_TABLES_AND_DATA_ON_DEPLOY = PREFIX + "RECREATE_TABLES_AND_DATA_ON_DEPLOY";
+ public static final String RECREATE_TABLES_AND_DATA_ON_DEPLOY = "database.drop";
- public static final String JDBC_DRIVER_JAR_PATH = PREFIX + "JDBC_DRIVER_JAR_PATH";
+ public static final String JDBC_DRIVER_JAR_PATH = "driver.file";
- public static final String SESION_BEAN_PACKAGE_NAME = PREFIX + "SESION_BEAN_PACKAGE_NAME";
+ public static final String SESION_BEAN_PACKAGE_NAME = "action.package";
- public static final String ENTITY_BEAN_PACKAGE_NAME = PREFIX + "ENTITY_BEAN_PACKAGE_NAME";
+ public static final String ENTITY_BEAN_PACKAGE_NAME = "model.package";
- public static final String TEST_CASES_PACKAGE_NAME = PREFIX + "TEST_CASES_PACKAGE_NAME";
+ public static final String TEST_CASES_PACKAGE_NAME = "test.package";
- public static final String JBOSS_SEAM_HOME = PREFIX + "JBOSS_SEAM_HOME";
+ public static final String JBOSS_SEAM_HOME = "JBOSS_SEAM_HOME";
public static final String WEB_CONTENTS_FOLDER = PREFIX + "WEB_CONTENTS_FOLDER";
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDataModelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDataModelProvider.java 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDataModelProvider.java 2007-07-02 18:00:44 UTC (rev 2246)
@@ -48,7 +48,7 @@
names.add(ISeamFacetDataModelProperties.JDBC_URL_FOR_DB);
names.add(ISeamFacetDataModelProperties.DB_USER_NAME);
- names.add(ISeamFacetDataModelProperties.DB_PASSWORD);
+ names.add(ISeamFacetDataModelProperties.DB_USERP_PASSWORD);
names.add(ISeamFacetDataModelProperties.DB_SCHEMA_NAME);
names.add(ISeamFacetDataModelProperties.DB_CATALOG_NAME);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java 2007-07-02 18:00:44 UTC (rev 2246)
@@ -14,6 +14,7 @@
import java.io.FileFilter;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Properties;
@@ -39,16 +40,6 @@
public class SeamFacetInstallDelegete extends Object implements IDelegate {
public static FileSet VIEW_FILESET = new FileSet()
- .include("home\\.xhtml")
- .include("error\\.xhtml")
- .include("login\\.xhtml")
- .include("login\\.page.xml")
- .include("index\\.html")
- .include("layout\\.*")
- .include("stylesheet\\.*")
- .include("img\\.*")
- .exclude(".*\\\\.*\\.ftl");
- public static FileSet VIEW_ = new FileSet()
.include("home\\.xhtml")
.include("error\\.xhtml")
.include("login\\.xhtml")
@@ -57,8 +48,20 @@
.include("layout\\.*")
.include("stylesheet\\.*")
.include("img\\.*")
- .exclude(".*\\\\.*\\.ftl");
+ .exclude(".*/.*\\.ftl");
+ public static FileSet SEAM_JARS = new FileSet()
+ .include("jboss-seam.*\\.jar")
+ .exclude("jboss-seam-gen\\.jar");
+
+ public static FileSet JAVA_LIBS = new FileSet()
+ .include(".[^/]*\\.jar")
+ .include(".[^/]*\\.zip");
+
+ public static String DROOLS_LIB_SEAM_RELATED_PATH = "drools/lib";
+
+ public static String SEAM_RELATED_LIB = "lib";
+
public void execute(IProject project, IProjectFacetVersion fv,
Object config, IProgressMonitor monitor) throws CoreException {
IDataModel model = (IDataModel)config;
@@ -73,11 +76,24 @@
IContainer folder = webRootFolder.getUnderlyingFolder();
File webContentFolder = folder.getLocation().toFile();
+
String seamHomeFolder = model.getProperty(ISeamFacetDataModelProperties.JBOSS_SEAM_HOME).toString();
- File source = new File(seamHomeFolder,"seam-gen/view");
- // TODO - copy veiw folder from seam-gen installation to
- copyViewFolder(source, webContentFolder, new HashMap<String, String>());
+ File seamGenViewSource = new File(seamHomeFolder,"seam-gen/view");
+
+ // Copy view folder from seam-gen installation to
+
+ FileSet viewFileSet = new FileSet(VIEW_FILESET).dir(seamGenViewSource.getAbsolutePath());
+ FilterSetCollection viewFilterSetCollection = new FilterSetCollection();
+ viewFilterSetCollection.addFilterSet(FilterSetFactory.createJdbcFilterSet(model));
+ viewFilterSetCollection.addFilterSet(FilterSetFactory.createProjectFilterSet(model));
+ AntCopyUtils.copyFilesAndFolders(
+ seamGenViewSource, webContentFolder, new FileSetFileFilter(viewFileSet), viewFilterSetCollection, true);
+// File file1 = new File("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view");
+// File[] copy = file1.listFiles(fileSetFilter);
+// copyFiles(file1,new File("c:\\temp\\1"),fileSetFilter);
+
+
// project location with filled out FIlterSet
// TODO copy manifest and configuration resources the same way as view
@@ -87,8 +103,8 @@
File seamHome = new File(seamHomeFolder);
File webLibFolder = new File(webContentFolder,"WEB-INF/lib");
copyFiles(seamHome,webLibFolder,seamLibs);
- copyFiles(new File(source.getParentFile(),"lib"),webLibFolder,javaLibs);
- copyFiles(new File(source.getParentFile(),"drools/lib"),webLibFolder,javaLibs);
+ copyFiles(new File(seamHomeFolder,"lib"),webLibFolder,javaLibs);
+ copyFiles(new File(seamHomeFolder,"drools/lib"),webLibFolder,javaLibs);
String jdbcDriverFileName = model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH).toString();
File jdbcDriverFile = new File(jdbcDriverFileName);
@@ -106,7 +122,7 @@
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
- protected void copyViewFolder(File viewSource, File viewDestination, HashMap<String, String> properties) {
+ protected void copyViewFolder(File viewSource, File viewDestination,HashMap<String, String> properties) {
FilterSet filterSet = new FilterSet();
for (Object propertyName : properties.keySet()) {
@@ -159,25 +175,38 @@
}
};
-
public static class FileSet {
+
File dir = null;
+
List<Pattern> include = new ArrayList<Pattern>();
+
List<Pattern> exclude = new ArrayList<Pattern>();
+
public FileSet(String dir) {
this.dir = new File(dir);
}
+
+ public FileSet(FileSet template) {
+ include.addAll(template.getIncluded());
+ exclude.addAll(template.getExcluded());
+ }
+
public FileSet() {
- }
+
+ }
+
public FileSet dir(String dir) {
this.dir = new File(dir);
return this;
}
+
public FileSet include(String pattern) {
include.add(Pattern.compile(pattern));
return this;
}
+
public FileSet exclude(String pattern) {
exclude.add(Pattern.compile(pattern));
return this;
@@ -201,6 +230,14 @@
}
return false;
}
+
+ public List<Pattern> getExcluded() {
+ return Collections.unmodifiableList(exclude);
+ }
+
+ public List<Pattern> getIncluded() {
+ return Collections.unmodifiableList(include);
+ }
}
public static class FileSetFileFilter implements FileFilter {
@@ -211,31 +248,99 @@
}
public boolean accept(File pathname){
- System.out.println(pathname);
- System.out.println(set.isIncluded(pathname.getAbsolutePath()));
return set.isIncluded(pathname.getAbsolutePath());
}
}
public static void main(String[] args) {
+ System.out.println(Pattern.matches(".[^\\\\]*\\.jar", "tt\\test.jar"));
+// Properties props = new Properties();
+// props.put("hibernate.connection.username", "rooy");
+// FilterSet jdbcFs = FilterSetFactory.createJdbcFilterSet(props);
+// System.out.println(jdbcFs);
+// FileSet include = new FileSet()
+// .dir("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view")
+// .include("home\\.xhtml")
+// .include("error\\.xhtml")
+// .include("login\\.xhtml")
+// .include("login\\.page.xml")
+// .include("index\\.html")
+// .include("layout\\.*")
+// .include("stylesheet\\.*")
+// .include("img\\.*")
+// .exclude(".*\\\\.*\\.ftl");
+//
+// FileSetFileFilter fileSetFilter = new FileSetFileFilter(include);
+// File file1 = new File("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view");
+// File[] copy = file1.listFiles(fileSetFilter);
+// copyFiles(file1,new File("c:\\temp\\1"),fileSetFilter);
+// AntCopyUtils.copyFilesAndFolders(file1, new File("c:\\temp\\12"),fileSetFilter, new FilterSetCollection(), true);
+ }
+
+ public static class FilterSetFactory {
- FileSet include = new FileSet()
- .dir("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view")
- .include("home\\.xhtml")
- .include("error\\.xhtml")
- .include("login\\.xhtml")
- .include("login\\.page.xml")
- .include("index\\.html")
- .include("layout\\.*")
- .include("stylesheet\\.*")
- .include("img\\.*")
- .exclude(".*\\\\.*\\.ftl");
+ public static FilterSet JDBC_TEMPLATE;
+ public static FilterSet PROJECT_TEMPLATE;
+ public static FilterSet FILTERS_TEMPLATE;
- FileSetFileFilter fileSetFilter = new FileSetFileFilter(include);
- File file1 = new File("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view");
- File[] copy = file1.listFiles(fileSetFilter);
- copyFiles(file1,new File("c:\\temp\\1"),fileSetFilter);
- AntCopyUtils.copyFilesAndFolders(file1, new File("c:\\temp\\12"),fileSetFilter, new FilterSetCollection(), true);
+ static {
+ JDBC_TEMPLATE = new FilterSet();
+ JDBC_TEMPLATE.addFilter("jdbcUrl","${hibernate.connection.url}");
+ JDBC_TEMPLATE.addFilter("driverClass","${hibernate.connection.driver_class}");
+ JDBC_TEMPLATE.addFilter("username","${hibernate.connection.username}");
+ JDBC_TEMPLATE.addFilter("password","${hibernate.connection.password}");
+ JDBC_TEMPLATE.addFilter("catalogProperty","${catalog.property}");
+ JDBC_TEMPLATE.addFilter("schemaProperty","${schema.property}");
+
+ PROJECT_TEMPLATE = new FilterSet();
+ PROJECT_TEMPLATE.addFilter("projectName","${project.name}");
+ PROJECT_TEMPLATE.addFilter("jbossHome","${jboss.home}");
+ PROJECT_TEMPLATE.addFilter("hbm2ddl","${hibernate.hbm2ddl.auto}");
+ PROJECT_TEMPLATE.addFilter("driverJar","${driver.file}");
+
+ FILTERS_TEMPLATE = new FilterSet();
+ FILTERS_TEMPLATE.addFilter("interfaceName","${interface.name}");
+ FILTERS_TEMPLATE.addFilter("beanName","${bean.name}");
+ FILTERS_TEMPLATE.addFilter("entityName","${entity.name}");
+ FILTERS_TEMPLATE.addFilter("methodName","${method.name}");
+ FILTERS_TEMPLATE.addFilter("componentName","${component.name}");
+ FILTERS_TEMPLATE.addFilter("pageName","${page.name}");
+ FILTERS_TEMPLATE.addFilter("masterPageName","${masterPage.name}");
+ FILTERS_TEMPLATE.addFilter("actionPackage","${action.package}");
+ FILTERS_TEMPLATE.addFilter("modelPackage","${model.package}");
+ FILTERS_TEMPLATE.addFilter("testPackage","${test.package}");
+ FILTERS_TEMPLATE.addFilter("listName","${component.name}List");
+ FILTERS_TEMPLATE.addFilter("homeName","${component.name}Home");
+ FILTERS_TEMPLATE.addFilter("query","${query.text}");
+ }
+
+ public static FilterSet createJdbcFilterSet(IDataModel values) {
+ return aplayProperties(JDBC_TEMPLATE, values);
+ }
+ public static FilterSet createProjectFilterSet(IDataModel values){
+ return aplayProperties(PROJECT_TEMPLATE, values);
+ }
+
+ public static FilterSet createFiltersFilterSet(IDataModel values) {
+ return aplayProperties(FILTERS_TEMPLATE, values);
+ }
+
+ private static FilterSet aplayProperties(FilterSet template,IDataModel values) {
+ FilterSet result = new FilterSet();
+ for (Object filter : template.getFilterHash().keySet()) {
+ System.out.println(filter + "=" +template.getFilterHash().get(filter));
+ String value = template.getFilterHash().get(filter).toString();
+ for (Object property : values.getAllProperties()) {
+ if(value.contains("${"+property.toString()+"}")) {
+ value = value.replace("${"+property.toString()+"}",values.getProperty(property.toString()).toString());
+ }
+ }
+ result.addFilter(filter.toString(), value);
+ }
+ return result;
+ }
}
+
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-07-02 18:00:44 UTC (rev 2246)
@@ -79,7 +79,7 @@
ISeamFacetDataModelProperties.DB_USER_NAME,
"Database User Name:", "username");
IFieldEditor dbUserPassword = IFieldEditorFactory.INSTANCE.createTextEditor(
- ISeamFacetDataModelProperties.DB_PASSWORD,
+ ISeamFacetDataModelProperties.DB_USERP_PASSWORD,
"User Password:", "password");
IFieldEditor dbSchemaName = IFieldEditorFactory.INSTANCE.createTextEditor(
ISeamFacetDataModelProperties.DB_SCHEMA_NAME,
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/build.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/build.properties 2007-07-02 18:00:44 UTC (rev 2246)
@@ -4,5 +4,6 @@
META-INF/,\
plugin.properties,\
about.html,\
- dtds/
+ dtds/,\
+ seam-xml.jar
jars.compile.order = seam-xml.jar
Modified: trunk/struts/plugins/org.jboss.tools.struts/build.properties
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/struts/plugins/org.jboss.tools.struts/build.properties 2007-07-02 18:00:44 UTC (rev 2246)
@@ -4,4 +4,5 @@
plugin.properties,\
dtds/,\
about.html,\
- META-INF/
+ META-INF/,\
+ struts.jar
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/build.properties
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/build.properties 2007-07-02 18:00:44 UTC (rev 2246)
@@ -3,4 +3,5 @@
bin.includes = about.html,\
META-INF/,\
plugin.properties,\
- plugin.xml
+ plugin.xml,\
+ strutsdebug.jar
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/build.properties
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/build.properties 2007-07-02 18:00:44 UTC (rev 2246)
@@ -4,4 +4,5 @@
plugin.properties,\
images/,\
about.html,\
- META-INF/
+ META-INF/,\
+ strutsui.jar
Modified: trunk/struts/plugins/org.jboss.tools.struts.validator.ui/build.properties
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.validator.ui/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
+++ trunk/struts/plugins/org.jboss.tools.struts.validator.ui/build.properties 2007-07-02 18:00:44 UTC (rev 2246)
@@ -4,4 +4,5 @@
images/,\
extensions.xml,\
about.html,\
- META-INF/
+ META-INF/,\
+ strutsvalidatorui.jar
16 years, 10 months
JBoss Tools SVN: r2245 - in trunk: common/tests/org.jboss.tools.common.kb.test/META-INF and 25 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-07-02 13:58:27 -0400 (Mon, 02 Jul 2007)
New Revision: 2245
Removed:
trunk/common/tests/org.jboss.tools.common.kb.test/plugin.xml
trunk/common/tests/org.jboss.tools.common.kb.test/test.xml
trunk/common/tests/org.jboss.tools.common.model.test/plugin.xml
trunk/common/tests/org.jboss.tools.common.model.test/test.xml
trunk/common/tests/org.jboss.tools.common.verification.test/test.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/plugin.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/test.xml
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/test.xml
trunk/jsf/tests/org.jboss.tools.jsf.verification.test/plugin.xml
trunk/jsf/tests/org.jboss.tools.jsf.verification.test/test.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/plugin.properties
trunk/seam/tests/org.jboss.tools.seam.core.test/plugin.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/test.xml
Modified:
trunk/common/tests/org.jboss.tools.common.kb.test/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.kb.test/build.properties
trunk/common/tests/org.jboss.tools.common.model.test/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.test/build.properties
trunk/common/tests/org.jboss.tools.common.verification.test/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.verification.test/build.properties
trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.verification.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.jst.web.ui.test/build.properties
trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.core.test/build.properties
trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.test/build.properties
trunk/tests/tests/org.jboss.ide.eclipse.core.test/META-INF/MANIFEST.MF
trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.mozilla.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/mozilla/tests/MozillaBrowserTest.java
trunk/vpe/tests/org.jboss.tools.vpe.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.test/build.properties
Log:
http://jira.jboss.org/jira/browse/EXIN-13
clean up the warnings in plug-in's manifests
Modified: trunk/common/tests/org.jboss.tools.common.kb.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.kb.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/common/tests/org.jboss.tools.common.kb.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -5,7 +5,6 @@
Bundle-Version: 2.0.0
Bundle-ClassPath: common-kb-tests.jar
Bundle-Vendor: Red Hat, Inc.
-Bundle-Localization: plugin
Export-Package: org.jboss.tools.common.kb.test,
org.jboss.tools.common.kb.test.resources
Require-Bundle: org.jboss.tools.common,
Modified: trunk/common/tests/org.jboss.tools.common.kb.test/build.properties
===================================================================
--- trunk/common/tests/org.jboss.tools.common.kb.test/build.properties 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/common/tests/org.jboss.tools.common.kb.test/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,6 +1,6 @@
bin.includes = plugin.xml,\
META-INF/,\
- kb-tests.jar
+ common-kb-tests.jar
src.includes = META-INF/,\
build.properties,\
plugin.xml,\
Deleted: trunk/common/tests/org.jboss.tools.common.kb.test/plugin.xml
===================================================================
--- trunk/common/tests/org.jboss.tools.common.kb.test/plugin.xml 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/common/tests/org.jboss.tools.common.kb.test/plugin.xml 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-</plugin>
\ No newline at end of file
Deleted: trunk/common/tests/org.jboss.tools.common.kb.test/test.xml
===================================================================
--- trunk/common/tests/org.jboss.tools.common.kb.test/test.xml 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/common/tests/org.jboss.tools.common.kb.test/test.xml 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <property name="eclipse-home" value="${basedir}/../.."/>
- <property name="plugin-name" value="org.jboss.tools.common.kb.test"/>
- <property name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
-
- <target name="suite">
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="data-folder"/>
- <property name="plugin-name" value="org.jboss.ide.prompting.knowledgebase.tests"/>
- <property name="classname" value="org.jboss.ide.prompting.knowledgebase.tests.CommonKbAllTests"/>
- </ant>
- </target>
-
- <target name="run" depends="init,suite">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-</project>
\ No newline at end of file
Modified: trunk/common/tests/org.jboss.tools.common.model.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/common/tests/org.jboss.tools.common.model.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -5,7 +5,6 @@
Bundle-Version: 2.0.0
Bundle-ClassPath: common-model-tests.jar
Bundle-Vendor: Red Hat, Inc.
-Bundle-Localization: plugin
Export-Package: org.jboss.tools.common.model.test
Require-Bundle:
org.junit,
Deleted: trunk/common/tests/org.jboss.tools.common.model.test/plugin.xml
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/plugin.xml 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/common/tests/org.jboss.tools.common.model.test/plugin.xml 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
-</plugin>
Deleted: trunk/common/tests/org.jboss.tools.common.model.test/test.xml
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/test.xml 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/common/tests/org.jboss.tools.common.model.test/test.xml 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <property name="eclipse-home" value="${basedir}/../.."/>
- <property name="plugin-name" value="org.jboss.ide.model.tests"/>
- <property name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
- <!-- -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
- <!-- -->
- <target name="suite">
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="data-folder"/>
- <property name="plugin-name" value="org.jboss.ide.model.tests"/>
- <property name="classname" value="org.jboss.ide.model.tests.CommonModelAllTests"/>
- </ant>
- </target>
- <!-- -->
- <target name="run" depends="init,suite">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-</project>
\ No newline at end of file
Modified: trunk/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -4,7 +4,6 @@
Bundle-SymbolicName: org.jboss.tools.common.test
Bundle-Version: 2.0.0
Bundle-Vendor: Red Hat, Inc.
-Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
@@ -16,5 +15,4 @@
org.jboss.tools.common.test.util,
org.jboss.tools.common.util.test,
org.jboss.tools.common.xml.test
-Bundle-ClassPath: common-tests.jar,
- .
+Bundle-ClassPath: common-tests.jar
Modified: trunk/common/tests/org.jboss.tools.common.test/build.properties
===================================================================
--- trunk/common/tests/org.jboss.tools.common.test/build.properties 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/common/tests/org.jboss.tools.common.test/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
@@ -4,4 +4,3 @@
build.properties,\
META-INF/
source.common-tests.jar = src/
-jars.compile.order =
Modified: trunk/common/tests/org.jboss.tools.common.verification.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.verification.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/common/tests/org.jboss.tools.common.verification.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -3,10 +3,8 @@
Bundle-Name: JSF Tests Plug-in
Bundle-SymbolicName: org.jboss.tools.common.verification.test;singleton:=true
Bundle-Version: 2.0.0
-Bundle-ClassPath: lib/xmlunit1.0.jar,
- common-verification-tests.jar
+Bundle-ClassPath: common-verification-tests.jar
Bundle-Vendor: Red Hat, Inc.
-Bundle-Localization: plugin
Export-Package: org.jboss.tools.common.verification.test
Require-Bundle:
org.junit,
Modified: trunk/common/tests/org.jboss.tools.common.verification.test/build.properties
===================================================================
--- trunk/common/tests/org.jboss.tools.common.verification.test/build.properties 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/common/tests/org.jboss.tools.common.verification.test/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,7 +1,7 @@
-
output.tests.jar = bin/
bin.includes = plugin.xml,\
- META-INF/
+ META-INF/,\
+ common-verification-tests.jar
src.includes = META-INF/,\
build.properties,\
plugin.xml,\
Deleted: trunk/common/tests/org.jboss.tools.common.verification.test/test.xml
===================================================================
--- trunk/common/tests/org.jboss.tools.common.verification.test/test.xml 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/common/tests/org.jboss.tools.common.verification.test/test.xml 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-<project name="testsuite" default="run" basedir=".">
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="E:/eclipse-releng" />
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="plugin-name" value="org.jboss.ide.jsf.tests" />
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset dir="${eclipse-home}" includes="org.jboss.ide.jsf*.xml" />
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="session-folder" value="${eclipse-home}/ui_session_sniff_folder" />
- <delete dir="${session-folder}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${session-folder}" />
- <property name="plugin-name" value="${plugin-name}" />
- <property name="classname" value="org.jboss.ide.jsf.tests.AllTests" />
-
- </ant>
- </target>
-
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
-
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org.jboss.ide*.xml" />
- <property name="output-file" value="result.xml" />
- </ant>
- </target>
-
-</project>
-
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -6,7 +6,6 @@
Bundle-ClassPath: jsf-tests.jar,
lib/xmlunit1.0.jar
Bundle-Vendor: Red Hat, Inc.
-Bundle-Localization: plugin
Export-Package: org.custommonkey.xmlunit,
org.jboss.tools.jsf.test
Require-Bundle:
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.test/plugin.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/plugin.xml 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/plugin.xml 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<?eclipse version="3.0"?>
-<plugin>
-
-
-</plugin>
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.test/test.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/test.xml 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/test.xml 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-<project name="testsuite" default="run" basedir=".">
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="E:/eclipse-releng" />
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="plugin-name" value="org.jboss.ide.jsf.tests" />
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset dir="${eclipse-home}" includes="org.jboss.ide.jsf*.xml" />
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="session-folder" value="${eclipse-home}/ui_session_sniff_folder" />
- <delete dir="${session-folder}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${session-folder}" />
- <property name="plugin-name" value="${plugin-name}" />
- <property name="classname" value="org.jboss.ide.jsf.tests.AllTests" />
-
- </ant>
- </target>
-
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
-
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org.jboss.ide*.xml" />
- <property name="output-file" value="result.xml" />
- </ant>
- </target>
-
-</project>
-
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -3,7 +3,6 @@
Bundle-Name: EL Expressions Parcer Tests Plug-in
Bundle-SymbolicName: org.jboss.tools.jsf.text.ext.test
Bundle-Version: 2.0.0
-Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.junit,
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/test.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/test.xml 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/test.xml 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <property name="eclipse-home" value="${basedir}/../.."/>
- <property name="plugin-name" value="org.jboss.tools.jsf.text.ext.test"/>
- <property name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
-
- <target name="suite">
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="data-folder"/>
- <property name="plugin-name" value="org.jboss.tools.jsf.text.ext.test"/>
- <property name="classname" value="org.jboss.tools.jsf.text.ext.tests.JsfTextExtAllTests"/>
- </ant>
- </target>
-
- <target name="run" depends="init,suite">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-</project>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.verification.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.verification.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/jsf/tests/org.jboss.tools.jsf.verification.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -3,10 +3,8 @@
Bundle-Name: JSF Verification Tests Plug-in
Bundle-SymbolicName: org.jboss.tools.jsf.verification.test;singleton:=true
Bundle-Version: 2.0.0
-Bundle-ClassPath: jsf-verification-tests.jar,
- lib/xmlunit1.0.jar
+Bundle-ClassPath: jsf-verification-tests.jar
Bundle-Vendor: Red Hat, Inc.
-Bundle-Localization: plugin
Export-Package: org.jboss.tools.jsf.verification.test
Require-Bundle:
org.junit,
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.verification.test/plugin.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.verification.test/plugin.xml 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/jsf/tests/org.jboss.tools.jsf.verification.test/plugin.xml 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension point="org.jboss.tools.common.model.classes">
- <xclass id="org.jboss.tools.common.verification.test.BundleLoader"
- class="org.jboss.tools.common.verification.test.BundleLoader"/>
- <xclass id="org.jboss.tools.common.verification.test.Check_Test_1"
- class="org.jboss.tools.common.verification.test.Check_Test_1"/>
- </extension>
-</plugin>
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.verification.test/test.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.verification.test/test.xml 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/jsf/tests/org.jboss.tools.jsf.verification.test/test.xml 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-<project name="testsuite" default="run" basedir=".">
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="E:/eclipse-releng" />
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="plugin-name" value="org.jboss.ide.jsf.tests" />
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset dir="${eclipse-home}" includes="org.jboss.ide.jsf*.xml" />
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="session-folder" value="${eclipse-home}/ui_session_sniff_folder" />
- <delete dir="${session-folder}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${session-folder}" />
- <property name="plugin-name" value="${plugin-name}" />
- <property name="classname" value="org.jboss.ide.jsf.tests.AllTests" />
-
- </ant>
- </target>
-
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
-
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org.jboss.ide*.xml" />
- <property name="output-file" value="result.xml" />
- </ant>
- </target>
-
-</project>
-
Modified: trunk/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -3,7 +3,6 @@
Bundle-Name: Tests Plug-in
Bundle-SymbolicName: org.jboss.tools.jst.web.test
Bundle-Version: 2.0.0
-Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.jst.web,
Modified: trunk/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -10,3 +10,4 @@
org.eclipse.core.runtime,
org.jboss.tools.common.model.ui
Export-Package: org.jboss.tools.jst.web.ui.test
+Bundle-ClassPath: jst-web-ui.jar
Modified: trunk/jst/tests/org.jboss.tools.jst.web.ui.test/build.properties
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.ui.test/build.properties 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/jst/tests/org.jboss.tools.jst.web.ui.test/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,4 +1,4 @@
-source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ jst-web-ui.jar
+source.jst-web-ui.jar = src/
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -5,7 +5,6 @@
Bundle-Version: 2.0.0
Bundle-ClassPath: seam-core-tests.jar
Bundle-Vendor: Red Hat, Inc.
-Bundle-Localization: plugin
Export-Package: org.jboss.tools.seam.core.test,
org.jboss.tools.seam.core.test.project.facet
Require-Bundle:
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/build.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/build.properties 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,12 +1,12 @@
-bin.includes = plugin.xml,\
- META-INF/,\
- seam-core-tests.jar
+bin.includes = META-INF/,\
+ seam-core-tests.jar,\
+ projects/,\
+ info.xml
src.includes = META-INF/,\
ant.properties,\
build.properties,\
info.xml,\
- plugin.xml,\
src/,\
- test.xml
+ projects/
source.seam-core-tests.jar = src/
jars.compile.order = seam-core-tests.jar
Deleted: trunk/seam/tests/org.jboss.tools.seam.core.test/plugin.properties
===================================================================
Deleted: trunk/seam/tests/org.jboss.tools.seam.core.test/plugin.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/plugin.xml 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/plugin.xml 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
-</plugin>
Deleted: trunk/seam/tests/org.jboss.tools.seam.core.test/test.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/test.xml 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/test.xml 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <property name="eclipse-home" value="${basedir}/../.."/>
- <property name="plugin-name" value="org.jboss.ide.model.tests"/>
- <property name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
- <!-- -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
- <!-- -->
- <target name="suite">
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="data-folder"/>
- <property name="plugin-name" value="org.jboss.ide.model.tests"/>
- <property name="classname" value="org.jboss.ide.model.tests.CommonModelAllTests"/>
- </ant>
- </target>
- <!-- -->
- <target name="run" depends="init,suite">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-</project>
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -8,3 +8,4 @@
Export-Package: org.jboss.tools.seam.ui.test,
org.jboss.tools.seam.ui.test.view,
org.jboss.tools.seam.ui.test.wizard
+Bundle-ClassPath: seam-ui.jar
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/build.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/build.properties 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
@@ -1,4 +1,7 @@
-source.. = src/
-output.. = bin/
bin.includes = META-INF/,\
- .
+ seam-ui.jar
+source.seam-ui.jar = src/
+jars.compile.order = seam-ui.jar
+src.includes = src/,\
+ build.properties,\
+ META-INF/
Modified: trunk/tests/tests/org.jboss.ide.eclipse.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/tests/org.jboss.ide.eclipse.core.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/tests/tests/org.jboss.ide.eclipse.core.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -3,7 +3,6 @@
Bundle-Name: JBossIDE Product Test Plugin
Bundle-SymbolicName: org.jboss.ide.eclipse.core.test
Bundle-Version: 1.0.0
-Bundle-Localization: plugin
Bundle-Activator: org.jboss.ide.eclipse.core.test.CoreTestPlugin
Require-Bundle: org.eclipse.core.resources,
org.eclipse.core.runtime,
Modified: trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -4,7 +4,6 @@
Bundle-SymbolicName: org.jboss.tools.tests
Bundle-Version: 2.0.0
Bundle-Vendor: Red Hat, Inc.
-Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
Modified: trunk/vpe/tests/org.jboss.tools.vpe.mozilla.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.mozilla.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/vpe/tests/org.jboss.tools.vpe.mozilla.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -4,7 +4,6 @@
Bundle-SymbolicName: org.jboss.tools.vpe.mozilla.test;singleton:=true
Bundle-Version: 2.0.0
Bundle-Vendor: Red Hat, Inc.
-Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.junit,
Modified: trunk/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/mozilla/tests/MozillaBrowserTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/mozilla/tests/MozillaBrowserTest.java 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/mozilla/tests/MozillaBrowserTest.java 2007-07-02 17:58:27 UTC (rev 2245)
@@ -12,7 +12,7 @@
import junit.framework.TestCase;
-import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
@@ -55,7 +55,7 @@
* Wait until all background tasks are complete.
*/
public void waitForJobs() {
- while (Platform.getJobManager().currentJob() != null)
+ while (Job.getJobManager().currentJob() != null)
delay(1000);
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/META-INF/MANIFEST.MF 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/META-INF/MANIFEST.MF 2007-07-02 17:58:27 UTC (rev 2245)
@@ -5,7 +5,6 @@
Bundle-Version: 2.0.0
Bundle-Activator: org.jboss.tools.vpe.tests.VpeTestPlugin
Bundle-Vendor: RedHat
-Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.junit,
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/build.properties
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/build.properties 2007-07-02 16:53:26 UTC (rev 2244)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/build.properties 2007-07-02 17:58:27 UTC (rev 2245)
@@ -9,5 +9,4 @@
templates/,\
testFailure-plugin.xml,\
testOk-plugin.xml
-jars.compile.order =
source.vpe-tests.jar = src/
16 years, 10 months
JBoss Tools SVN: r2244 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-02 12:53:26 -0400 (Mon, 02 Jul 2007)
New Revision: 2244
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ASTVisitorImpl.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/AnnotatedASTNode.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ResolvedAnnotation.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java
Log:
EXIN-217
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ASTVisitorImpl.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ASTVisitorImpl.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ASTVisitorImpl.java 2007-07-02 16:53:26 UTC (rev 2244)
@@ -0,0 +1,192 @@
+package org.jboss.tools.seam.internal.core.scanner.java;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.dom.ASTVisitor;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.Block;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.MemberValuePair;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.QualifiedName;
+import org.eclipse.jdt.core.dom.SimpleName;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jdt.core.dom.StringLiteral;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.VariableDeclaration;
+
+public class ASTVisitorImpl extends ASTVisitor {
+ static String SEAM_ANNOTATION_TYPE_PREFIX = "org.jboss.seam.annotations.";
+ static String NAME_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + "Name";
+ static String SCOPE_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + "Scope";
+
+ static int UNDEFINED_CONTEXT = -1;
+ static int TYPE_CONTEXT = 0;
+ static int FIELD_CONTEXT = 1;
+ static int METHOD_CONTEXT = 2;
+
+ IType type;
+ String name = null;
+ String scope = null;
+
+ AnnotatedASTNode annotatedType = null;
+ Set<Object> annotatedFields = new HashSet<Object>();
+ Set<Object> annotatedMethods = new HashSet<Object>();
+
+ AnnotatedASTNode currentAnnotatedNode = null;
+ int context = UNDEFINED_CONTEXT;
+
+ public boolean visit(SingleMemberAnnotation node) {
+ String type = resolveType(node);
+ if(isSeamAnnotationType(type) && currentAnnotatedNode != null) {
+ currentAnnotatedNode.addAnnotation(new ResolvedAnnotation(type, node));
+ }
+ return false;
+ }
+
+ public boolean visit(NormalAnnotation node) {
+ String type = resolveType(node);
+ if(isSeamAnnotationType(type) && currentAnnotatedNode != null) {
+ currentAnnotatedNode.addAnnotation(new ResolvedAnnotation(type, node));
+ }
+ return false;
+ }
+
+ public boolean visit(MarkerAnnotation node) {
+ String type = resolveType(node);
+ if(isSeamAnnotationType(type) && currentAnnotatedNode != null) {
+ currentAnnotatedNode.addAnnotation(new ResolvedAnnotation(type, node));
+ }
+ return true;
+ }
+
+ boolean checkAnnotationType(Annotation node, String annotationType) {
+ String n = resolveType(node);
+ return n != null && n.equals(annotationType);
+ }
+
+ String resolveType(Annotation node) {
+ Name nm = node.getTypeName();
+ if(nm instanceof SimpleName) {
+ SimpleName sn = (SimpleName)nm;
+ String n = sn.getIdentifier();
+ if(type != null) {
+ return JavaScanner.getResolvedType(type, n);
+ }
+ } else if(nm instanceof QualifiedName) {
+ QualifiedName qn = (QualifiedName)nm;
+ return qn.getFullyQualifiedName();
+ }
+ return null;
+ }
+
+ boolean isSeamAnnotationType(String n) {
+ return n != null && n.startsWith(SEAM_ANNOTATION_TYPE_PREFIX);
+ }
+
+ String checkExpression(Expression exp) {
+ if(exp instanceof StringLiteral) {
+ return ((StringLiteral)exp).getLiteralValue();
+ } else if(exp instanceof QualifiedName) {
+ return exp.toString();
+ }
+ return null;
+ }
+
+ public boolean visit(Block node) {
+ return false;
+ }
+
+
+ public boolean visit(TypeDeclaration node) {
+ annotatedType = new AnnotatedASTNode(node);
+ currentAnnotatedNode = annotatedType;
+ return true;
+ }
+
+ public void endVisit(TypeDeclaration node) {
+ currentAnnotatedNode = null;
+ process();
+ }
+
+ public boolean visit(FieldDeclaration node) {
+ currentAnnotatedNode = new AnnotatedASTNode(node);
+ return true;
+ }
+
+ public void endVisit(FieldDeclaration node) {
+ List fragments = node.fragments();
+ for (int i = 0; i < fragments.size(); i++) {
+ VariableDeclaration vd = (VariableDeclaration)fragments.get(i);
+ String name = vd.getName().getIdentifier();
+ System.out.println("-->" + name);
+ }
+ if(currentAnnotatedNode != null && currentAnnotatedNode.getAnnotations() != null) {
+ annotatedFields.add(currentAnnotatedNode);
+ }
+ currentAnnotatedNode = null;
+ }
+
+ public boolean visit(MethodDeclaration node) {
+ currentAnnotatedNode = new AnnotatedASTNode(node);
+ return true;
+ }
+
+ public void endVisit(MethodDeclaration node) {
+ if(currentAnnotatedNode != null && currentAnnotatedNode.getAnnotations() != null) {
+ annotatedMethods.add(currentAnnotatedNode);
+ }
+ currentAnnotatedNode = null;
+ }
+
+ void process() {
+ if(annotatedType == null) return;
+ ResolvedAnnotation[] as = annotatedType.getAnnotations();
+ for (int i = 0; i < as.length; i++) {
+ String type = as[i].getType();
+ if(NAME_ANNOTATION_TYPE.equals(type)) {
+ name = getValue(as[i].getAnnotation());
+ } else if(SCOPE_ANNOTATION_TYPE.equals(type)) {
+ scope = getValue(as[i].getAnnotation());
+ if(scope != null) {
+ int q = scope.lastIndexOf('.');
+ if(q >= 0) scope = scope.substring(q + 1).toLowerCase();
+ }
+ }
+ //TODO
+ }
+ //TODO
+ }
+
+ String getValue(Annotation node) {
+ if(node instanceof SingleMemberAnnotation) {
+ return getValue((SingleMemberAnnotation)node);
+ } else if(node instanceof NormalAnnotation) {
+ return getValue((NormalAnnotation)node);
+ } else {
+ return null;
+ }
+ }
+
+ String getValue(SingleMemberAnnotation node) {
+ return checkExpression(node.getValue());
+ }
+
+ String getValue(NormalAnnotation node) {
+ List vs = node.values();
+ if(vs != null) for (int i = 0; i < vs.size(); i++) {
+ MemberValuePair p = (MemberValuePair)vs.get(i);
+ if("value".equals(p.getName().getIdentifier())) {
+ return checkExpression(p.getValue());
+ }
+ }
+ return null;
+ }
+}
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/AnnotatedASTNode.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/AnnotatedASTNode.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/AnnotatedASTNode.java 2007-07-02 16:53:26 UTC (rev 2244)
@@ -0,0 +1,32 @@
+package org.jboss.tools.seam.internal.core.scanner.java;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+
+public class AnnotatedASTNode {
+ ASTNode node;
+ ResolvedAnnotation[] annotations = null;
+
+ public AnnotatedASTNode(ASTNode node) {
+ this.node = node;
+ }
+
+ public void addAnnotation(ResolvedAnnotation annotation) {
+ if(annotations == null) {
+ annotations = new ResolvedAnnotation[]{annotation};
+ } else {
+ ResolvedAnnotation[] a = new ResolvedAnnotation[annotations.length + 1];
+ System.arraycopy(annotations, 0, a, 0, annotations.length);
+ a[annotations.length] = annotation;
+ annotations = a;
+ }
+ }
+
+ public ASTNode getNode() {
+ return node;
+ }
+
+ public ResolvedAnnotation[] getAnnotations() {
+ return annotations;
+ }
+
+}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java 2007-07-02 16:37:30 UTC (rev 2243)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java 2007-07-02 16:53:26 UTC (rev 2244)
@@ -11,7 +11,6 @@
package org.jboss.tools.seam.internal.core.scanner.java;
-import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -24,29 +23,14 @@
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
import org.eclipse.jdt.core.dom.ASTRequestor;
-import org.eclipse.jdt.core.dom.ASTVisitor;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.Block;
import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.Expression;
-import org.eclipse.jdt.core.dom.MemberValuePair;
-import org.eclipse.jdt.core.dom.MethodDeclaration;
-import org.eclipse.jdt.core.dom.Name;
-import org.eclipse.jdt.core.dom.NormalAnnotation;
-import org.eclipse.jdt.core.dom.QualifiedName;
-import org.eclipse.jdt.core.dom.SimpleName;
-import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
-import org.eclipse.jdt.core.dom.StringLiteral;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.seam.internal.core.SeamComponent;
import org.jboss.tools.seam.internal.core.scanner.IFileScanner;
public class JavaScanner implements IFileScanner {
- static String NAME_ANNOTATION_TYPE = "org.jboss.seam.annotations.Name";
- static String SCOPE_ANNOTATION_TYPE = "org.jboss.seam.annotations.Scope";
-
public JavaScanner() {}
/**
@@ -144,84 +128,7 @@
}
}
- class ASTVisitorImpl extends ASTVisitor {
- IType type;
- String name = null;
- String scope = null;
- public boolean visit(SingleMemberAnnotation node) {
- if(checkAnnotationType(node, NAME_ANNOTATION_TYPE)) {
- name = checkExpression(node.getValue());
- return true;
- } else if(checkAnnotationType(node, SCOPE_ANNOTATION_TYPE)) {
- scope = checkExpression(node.getValue());
- if(scope != null) {
- int i = scope.lastIndexOf('.');
- if(i >= 0) scope = scope.substring(i + 1).toLowerCase();
- }
- return true;
- }
- return false;
- }
- public boolean visit(NormalAnnotation node) {
- if(checkAnnotationType(node, NAME_ANNOTATION_TYPE)) {
- name = getValue(node);
- return true;
- } else if(checkAnnotationType(node, SCOPE_ANNOTATION_TYPE)) {
- scope = getValue(node);
- return true;
- }
- return false;
- }
-
- String getValue(NormalAnnotation node) {
- List vs = node.values();
- if(vs != null) for (int i = 0; i < vs.size(); i++) {
- MemberValuePair p = (MemberValuePair)vs.get(i);
- if("value".equals(p.getName().getIdentifier())) {
- return checkExpression(p.getValue());
- }
- }
- return null;
- }
-
-
- boolean checkAnnotationType(Annotation node, String annotationType) {
- Name nm = node.getTypeName();
- if(nm instanceof SimpleName) {
- SimpleName sn = (SimpleName)nm;
- String n = sn.getIdentifier();
- if(type != null) {
- n = getResolvedType(type, n);
- }
- if(!annotationType.equals(n)) return false;
- } else if(nm instanceof QualifiedName) {
- QualifiedName qn = (QualifiedName)nm;
- if(!qn.getFullyQualifiedName().equals(annotationType)) return false;
- //improve
- } else {
- return false;
- }
- return true;
- }
-
- String checkExpression(Expression exp) {
- if(exp instanceof StringLiteral) {
- return ((StringLiteral)exp).getLiteralValue();
- } else if(exp instanceof QualifiedName) {
- return exp.toString();
- }
- return null;
- }
-
- public boolean visit(Block node) {
- return false;
- }
- public boolean visit(MethodDeclaration node) {
- return false;
- }
- }
-
- String getResolvedType(IType type, String n) {
+ static String getResolvedType(IType type, String n) {
try {
String[][] rs = type.resolveType(n);
if(rs != null && rs.length > 0) {
@@ -233,5 +140,4 @@
return n;
}
-
}
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ResolvedAnnotation.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ResolvedAnnotation.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ResolvedAnnotation.java 2007-07-02 16:53:26 UTC (rev 2244)
@@ -0,0 +1,22 @@
+package org.jboss.tools.seam.internal.core.scanner.java;
+
+import org.eclipse.jdt.core.dom.Annotation;
+
+public class ResolvedAnnotation {
+ String type;
+ Annotation annotation;
+
+ public ResolvedAnnotation(String type, Annotation annotation) {
+ this.type = type;
+ this.annotation = annotation;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public Annotation getAnnotation() {
+ return annotation;
+ }
+
+}
16 years, 10 months
JBoss Tools SVN: r2243 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-07-02 12:37:30 -0400 (Mon, 02 Jul 2007)
New Revision: 2243
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java
Log:
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java 2007-07-02 16:37:29 UTC (rev 2242)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java 2007-07-02 16:37:30 UTC (rev 2243)
@@ -146,10 +146,16 @@
public void refreshHiden() {
hiden = !hiden;
- for (int i = 0; i < getChildren().size(); i++)
- ((Shape)getChildren().get(i)).setHiden(hiden);
+ setElementHidden(this, hiden);
firePropertyChange(SET_HIDEN, null, new Boolean(hiden));
}
+
+ private void setElementHidden(ModelElement element, boolean hidden){
+ for (int i = 0; i < element.getChildren().size(); i++){
+ ((Shape)element.getChildren().get(i)).setHiden(hidden);
+ setElementHidden((ModelElement)element.getChildren().get(i), hidden);
+ }
+ }
public Point getLocation() {
return location.getCopy();
16 years, 10 months