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() {