Author: scabanovich
Date: 2007-07-03 09:32:12 -0400 (Tue, 03 Jul 2007)
New Revision: 2255
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/internal/core/BijectedAttribute.java
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/SeamComponent.java
Log:
EXIN-217 implementations are changed according to the last changes in interfaces
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
13:18:36 UTC (rev 2254)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponent.java 2007-07-03
13:32:12 UTC (rev 2255)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.seam.core;
+import java.util.Collection;
import java.util.List;
import java.util.Set;
@@ -87,7 +88,7 @@
* @param propertyName
* @return
*/
- public Set<ISeamProperty> getProperties();
+ public Collection<ISeamProperty> getProperties();
/**
* Returns all properties from component.xml for that component.
Modified:
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 2007-07-03
13:18:36 UTC (rev 2254)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java 2007-07-03
13:32:12 UTC (rev 2255)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.tools.seam.internal.core;
+import org.eclipse.core.resources.IResource;
import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
import org.jboss.tools.seam.core.ScopeType;
@@ -24,10 +26,6 @@
String name = null;
ScopeType scopeType = ScopeType.UNSPECIFIED;
- public IMember getJavaSource() {
- return javaSource;
- }
-
public void setMember(IMember javaSource) {
this.javaSource = javaSource;
}
@@ -52,4 +50,34 @@
this.scopeType = type;
}
+ public IMember getSourceMember() {
+ return javaSource;
+ }
+
+ public int getLength() {
+ if(javaSource == null) return 0;
+ try {
+ if(javaSource.getSourceRange() == null) return 0;
+ return javaSource.getSourceRange().getLength();
+ } catch (JavaModelException e) {
+ //ignore
+ return 0;
+ }
+ }
+
+ public IResource getResource() {
+ return javaSource == null ? null : javaSource.getTypeRoot().getResource();
+ }
+
+ public int getStartPosition() {
+ if(javaSource == null) return 0;
+ try {
+ if(javaSource.getSourceRange() == null) return 0;
+ return javaSource.getSourceRange().getOffset();
+ } catch (JavaModelException e) {
+ //ignore
+ return 0;
+ }
+ }
+
}
Modified:
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 2007-07-03
13:18:36 UTC (rev 2254)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java 2007-07-03
13:32:12 UTC (rev 2255)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.seam.internal.core;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.seam.core.ISeamAnnotatedFactory;
import org.jboss.tools.seam.core.ScopeType;
@@ -18,16 +21,16 @@
* @author Viacheslav Kabanovich
*/
public class SeamAnnotatedFactory implements ISeamAnnotatedFactory {
- IMethod method = null;
+ IMethod javaSource = null;
String name = null;
ScopeType scopeType = ScopeType.UNSPECIFIED;
public IMethod getSourceMethod() {
- return method;
+ return javaSource;
}
public void setMethod(IMethod method) {
- this.method = method;
+ this.javaSource = method;
}
public String getName() {
@@ -46,4 +49,34 @@
this.scopeType = type;
}
+ public IMember getSourceMember() {
+ return javaSource;
+ }
+
+ public int getLength() {
+ if(javaSource == null) return 0;
+ try {
+ if(javaSource.getSourceRange() == null) return 0;
+ return javaSource.getSourceRange().getLength();
+ } catch (JavaModelException e) {
+ //ignore
+ return 0;
+ }
+ }
+
+ public IResource getResource() {
+ return javaSource == null ? null : javaSource.getTypeRoot().getResource();
+ }
+
+ public int getStartPosition() {
+ if(javaSource == null) return 0;
+ try {
+ if(javaSource.getSourceRange() == null) return 0;
+ return javaSource.getSourceRange().getOffset();
+ } catch (JavaModelException e) {
+ //ignore
+ return 0;
+ }
+ }
+
}
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
13:18:36 UTC (rev 2254)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java 2007-07-03
13:32:12 UTC (rev 2255)
@@ -24,9 +24,13 @@
import org.jboss.tools.seam.core.IRole;
import org.jboss.tools.seam.core.ISeamAnnotatedFactory;
import org.jboss.tools.seam.core.ISeamComponent;
+import org.jboss.tools.seam.core.ISeamComponentDeclaration;
import org.jboss.tools.seam.core.ISeamComponentMethod;
+import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
+import org.jboss.tools.seam.core.ISeamPropertiesDeclaration;
import org.jboss.tools.seam.core.ISeamProperty;
-import org.jboss.tools.seam.core.ISeamSource;
+import org.jboss.tools.seam.core.ISeamTextSourceReference;
+import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
import org.jboss.tools.seam.core.ScopeType;
import org.jboss.tools.seam.core.SeamComponentMethodType;
@@ -41,7 +45,6 @@
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>();
@@ -128,13 +131,6 @@
}
/**
- * @see
org.jboss.tools.seam.core.ISeamComponent#addSourceDeclaration(org.jboss.tools.seam.core.ISeamSource)
- */
- public void addSourceDeclaration(ISeamSource source) {
- sourceDeclaration = source;
- }
-
- /**
* @see org.jboss.tools.seam.core.ISeamComponent#getBijectedAttributes()
*/
public Set<IBijectedAttribute> getBijectedAttributes() {
@@ -214,16 +210,6 @@
}
/**
- * @see org.jboss.tools.seam.core.ISeamComponent#getSourceDeclarations()
- */
- public Set<ISeamSource> getSourceDeclarations() {
- Set<ISeamSource> sources = base == null ? null : base.getSourceDeclarations();
- if(sources == null) sources = new HashSet<ISeamSource>();
- sources.add(sourceDeclaration);
- return sources;
- }
-
- /**
* @see org.jboss.tools.seam.core.ISeamComponent#isEntity()
*/
public boolean isEntity() {
@@ -266,15 +252,6 @@
}
/**
- * @see
org.jboss.tools.seam.core.ISeamComponent#removeSourceDeclaration(org.jboss.tools.seam.core.ISeamSource)
- */
- public void removeSourceDeclaration(ISeamSource source) {
- if(sourceDeclaration == source) {
- sourceDeclaration = null;
- }
- }
-
- /**
* @see org.jboss.tools.seam.core.ISeamComponent#setClassName(java.lang.String)
*/
public void setClassName(String className) {
@@ -353,4 +330,24 @@
properties.remove(property.getName());
}
+ public Set<ISeamComponentDeclaration> getAllDeclarations() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ISeamJavaComponentDeclaration getJavaDeclaration() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<ISeamPropertiesDeclaration> getPropertiesDeclarations() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<ISeamXmlComponentDeclaration> getXmlDeclarations() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
Show replies by date