Author: scabanovich
Date: 2007-08-24 04:09:32 -0400 (Fri, 24 Aug 2007)
New Revision: 3314
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IBijectedAttribute.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IRole.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamAnnotatedFactory.java
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/ISeamComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentMethod.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamContextVariable.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamElement.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamFactory.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPropertiesDeclaration.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/core/ISeamXmlComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlFactory.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValue.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueList.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueMap.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueMapEntry.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueString.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/Role.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
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamObject.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/SeamPropertiesDeclaration.java
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/SeamValueList.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueMap.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/LoadedDeclarations.java
Log:
JBIDE-820
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IBijectedAttribute.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IBijectedAttribute.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IBijectedAttribute.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -34,5 +34,7 @@
* @return
*/
public boolean isContextVariable();
+
+ public IBijectedAttribute clone() throws CloneNotSupportedException;
-}
\ No newline at end of file
+}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IRole.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IRole.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/IRole.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -16,4 +16,6 @@
*/
public interface IRole extends ISeamJavaSourceReference, ISeamContextVariable {
+ public IRole clone() throws CloneNotSupportedException;
+
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamAnnotatedFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamAnnotatedFactory.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamAnnotatedFactory.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -18,4 +18,5 @@
boolean isAutoCreate();
+ public ISeamAnnotatedFactory clone() throws CloneNotSupportedException;
}
\ No newline at end of file
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-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponent.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -14,6 +14,8 @@
import java.util.List;
import java.util.Set;
+import org.jboss.tools.seam.core.event.ISeamValue;
+
/**
* Represents component in seam tools model.
* @author Alexey Kazakov
@@ -114,4 +116,7 @@
* @return
*/
public List<ISeamProperty> getProperties(String propertyName);
+
+ public ISeamComponent clone() throws CloneNotSupportedException;
+
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentDeclaration.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentDeclaration.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentDeclaration.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -20,4 +20,7 @@
* @return name of component.
*/
public String getName();
+
+ public ISeamComponentDeclaration clone() throws CloneNotSupportedException;
+
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentMethod.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentMethod.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentMethod.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -31,4 +31,6 @@
*/
public boolean isOfType(SeamComponentMethodType type);
+ public ISeamComponentMethod clone() throws CloneNotSupportedException;
+
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamContextVariable.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamContextVariable.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamContextVariable.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -37,4 +37,7 @@
* @param type
*/
public void setScope(ScopeType type);
+
+ public ISeamContextVariable clone() throws CloneNotSupportedException;
+
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamElement.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamElement.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamElement.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -12,7 +12,6 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
-import org.jboss.tools.seam.internal.core.SeamObject;
/**
* Common interface for objects of seam model.
@@ -45,6 +44,6 @@
*/
public IResource getResource();
-// public ISeamElement copy();
+ public ISeamElement clone() throws CloneNotSupportedException;
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamFactory.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamFactory.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -15,5 +15,5 @@
* @author Alexey Kazakov
*/
public interface ISeamFactory extends ISeamContextVariable {
-
+ public ISeamFactory clone() throws CloneNotSupportedException;
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaComponentDeclaration.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaComponentDeclaration.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaComponentDeclaration.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -127,4 +127,7 @@
* @param precedence
*/
public void setPrecedence(int precedence);
+
+ public ISeamJavaComponentDeclaration clone() throws CloneNotSupportedException;
+
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPropertiesDeclaration.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPropertiesDeclaration.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPropertiesDeclaration.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -54,4 +54,7 @@
* @param property
*/
public void removeProperty(ISeamProperty property);
+
+ public ISeamPropertiesDeclaration clone() throws CloneNotSupportedException;
+
}
\ No newline at end of file
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-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProperty.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -32,4 +32,6 @@
* @param value
*/
public void setValue(ISeamValue value);
+
+ public ISeamProperty clone() throws CloneNotSupportedException;
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlComponentDeclaration.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlComponentDeclaration.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlComponentDeclaration.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -71,4 +71,7 @@
* @return string value of 'auto-create' attribute
*/
public String getAutoCreateAsString();
+
+ public ISeamXmlComponentDeclaration clone() throws CloneNotSupportedException;
+
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlFactory.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamXmlFactory.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -37,4 +37,7 @@
* @param method
*/
public void setMethod(String method);
-}
\ No newline at end of file
+
+ public ISeamXmlFactory clone() throws CloneNotSupportedException;
+
+}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValue.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValue.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValue.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -17,4 +17,6 @@
*/
public interface ISeamValue extends ISeamElement {
+ public ISeamValue clone() throws CloneNotSupportedException;
+
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueList.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueList.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueList.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -22,4 +22,6 @@
*/
public List<ISeamValueString> getValues();
+ public ISeamValueList clone() throws CloneNotSupportedException;
+
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueMap.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueMap.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueMap.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -23,4 +23,6 @@
*/
public List<ISeamValueMapEntry> getEntries();
+ public ISeamValueMap clone() throws CloneNotSupportedException;
+
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueMapEntry.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueMapEntry.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueMapEntry.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -29,4 +29,6 @@
*/
public ISeamValueString getValue();
+ public ISeamValueMapEntry clone() throws CloneNotSupportedException;
+
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueString.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueString.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/event/ISeamValueString.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -24,4 +24,6 @@
*/
public IValueInfo getValue();
+ public ISeamValueString clone() throws CloneNotSupportedException;
+
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/Role.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/Role.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/Role.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -15,4 +15,8 @@
public class Role extends SeamJavaContextVariable implements IRole {
+ public Role clone() throws CloneNotSupportedException {
+ return (Role)super.clone();
+ }
+
}
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-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -76,7 +76,7 @@
public SeamAnnotatedFactory clone() throws CloneNotSupportedException {
SeamAnnotatedFactory c = (SeamAnnotatedFactory)super.clone();
//we need not new copy here but reference!
- c.parentDeclaration = parentDeclaration == null ? null :
(SeamJavaComponentDeclaration)doClone(parentDeclaration);
+ c.parentDeclaration = parentDeclaration == null ? null : parentDeclaration.clone();
return c;
}
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-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -260,4 +260,9 @@
public String toString() {
return "SeamComponent: " + getName();
}
+
+ public SeamComponent clone() throws CloneNotSupportedException {
+ return this;
+ }
+
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -403,15 +403,15 @@
}
c.bijectedAttributes = new HashSet<IBijectedAttribute>();
for (IBijectedAttribute a : bijectedAttributes) {
- c.addBijectedAttribute((IBijectedAttribute)doClone(a));
+ c.addBijectedAttribute(a.clone());
}
c.componentMethods = new HashSet<ISeamComponentMethod>();
for (ISeamComponentMethod m : componentMethods) {
- c.addMethod((ISeamComponentMethod)doClone(m));
+ c.addMethod(m.clone());
}
c.roles = new HashSet<IRole>();
for (IRole r : roles) {
- c.addRole((IRole)doClone(r));
+ c.addRole(r.clone());
}
return c;
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamObject.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamObject.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamObject.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -133,11 +133,4 @@
return c;
}
- protected static ISeamElement doClone(ISeamElement object) throws
CloneNotSupportedException {
- if(!(object instanceof SeamObject)) {
- throw new CloneNotSupportedException("Only instance of SeamObject can be cloned:
" + object);
- }
- return ((SeamObject)object).clone();
- }
-
}
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-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -350,7 +350,7 @@
*/
public void registerComponents(LoadedDeclarations ds, IPath source) {
- SeamComponentDeclaration[] components = ds.getComponents().toArray(new
SeamComponentDeclaration[0]);
+ ISeamComponentDeclaration[] components = ds.getComponents().toArray(new
ISeamComponentDeclaration[0]);
ISeamFactory[] factories = ds.getFactories().toArray(new ISeamFactory[0]);
if(components.length == 0 && factories.length == 0) {
@@ -476,12 +476,11 @@
for (SeamProject p : usedBy) {
p.resolve();
LoadedDeclarations ds1 = new LoadedDeclarations();
- for (SeamComponentDeclaration d: ds.getComponents()) {
+ for (ISeamComponentDeclaration d: ds.getComponents()) {
ds1.getComponents().add(d.clone());
}
for (ISeamFactory f : ds.getFactories()) {
- SeamObject copy = ((SeamObject)f).clone();
- ds1.getFactories().add((ISeamFactory)copy);
+ ds1.getFactories().add(f.clone());
}
p.registerComponents(ds1, source);
}
@@ -501,7 +500,7 @@
String className = xml.getClassName();
List<Change> changes = null;
if(isClassNameChanged(oldClassName, className)) {
- SeamComponentDeclaration[] ds1 = c.getAllDeclarations().toArray(new
SeamComponentDeclaration[0]);
+ ISeamComponentDeclaration[] ds1 = c.getAllDeclarations().toArray(new
ISeamComponentDeclaration[0]);
for (int i1 = 0; i1 < ds1.length; i1++) {
if(!(ds1[i1] instanceof ISeamJavaComponentDeclaration)) continue;
ISeamJavaComponentDeclaration jcd = (ISeamJavaComponentDeclaration)ds1[i1];
@@ -530,9 +529,9 @@
while(iterator.hasNext()) {
List<Change> changes = null;
SeamComponent c = iterator.next();
- SeamComponentDeclaration[] ds = c.getAllDeclarations().toArray(new
SeamComponentDeclaration[0]);
+ ISeamComponentDeclaration[] ds = c.getAllDeclarations().toArray(new
ISeamComponentDeclaration[0]);
for (int i = 0; i < ds.length; i++) {
- if(ds[i].source.equals(source)) {
+ if(ds[i].getSourcePath().equals(source)) {
c.removeDeclaration(ds[i]);
if(ds[i] instanceof ISeamJavaComponentDeclaration) {
SeamJavaComponentDeclaration jd = (SeamJavaComponentDeclaration)ds[i];
@@ -592,9 +591,9 @@
while(iterator.hasNext()) {
List<Change> changes = null;
SeamComponent c = iterator.next();
- SeamComponentDeclaration[] ds = c.getAllDeclarations().toArray(new
SeamComponentDeclaration[0]);
+ ISeamComponentDeclaration[] ds = c.getAllDeclarations().toArray(new
ISeamComponentDeclaration[0]);
for (int i = 0; i < ds.length; i++) {
- if(removed.containsKey(ds[i].getId())) {
+ if(removed.containsKey(((SeamObject)ds[i]).getId())) {
c.removeDeclaration(ds[i]);
changes = Change.addChange(changes, new Change(c, null, ds[i], null));
}
@@ -945,7 +944,7 @@
ds = new LoadedDeclarations();
map.put(p, ds);
}
- ds.getComponents().add(((SeamComponentDeclaration)d).clone());
+ ds.getComponents().add(d.clone());
}
}
for (ISeamFactory f : allFactories) {
@@ -956,7 +955,7 @@
ds = new LoadedDeclarations();
map.put(p, ds);
}
- ds.getFactories().add((ISeamFactory)((SeamObject)f).clone());
+ ds.getFactories().add(f.clone());
}
return map;
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -127,7 +127,7 @@
SeamPropertiesDeclaration c = (SeamPropertiesDeclaration)super.clone();
c.properties = new HashMap<String, ISeamProperty>();
for (String name : properties.keySet()) {
- ISeamProperty p = (ISeamProperty)doClone(properties.get(name));
+ ISeamProperty p = properties.get(name).clone();
c.addProperty(p);
}
return c;
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-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProperty.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -82,7 +82,7 @@
public SeamProperty clone() throws CloneNotSupportedException {
SeamProperty c = (SeamProperty)super.clone();
- c.value = value == null ? null : (ISeamValue)doClone(value);
+ c.value = value == null ? null : value.clone();
return c;
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueList.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueList.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueList.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -29,7 +29,7 @@
return values;
}
- public void addValue(SeamValueString value) {
+ public void addValue(ISeamValueString value) {
values.add(value);
adopt(value);
}
@@ -54,7 +54,7 @@
SeamValueList c = (SeamValueList)super.clone();
c.values = new ArrayList<ISeamValueString>();
for (ISeamValueString v : values) {
- c.addValue((SeamValueString)doClone(v));
+ c.addValue(v.clone());
}
return c;
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueMap.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueMap.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueMap.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -29,7 +29,7 @@
return entries;
}
- public void addEntry(SeamValueMapEntry entry) {
+ public void addEntry(ISeamValueMapEntry entry) {
entries.add(entry);
adopt(entry);
}
@@ -54,7 +54,7 @@
SeamValueMap c = (SeamValueMap)super.clone();
c.entries = new ArrayList<ISeamValueMapEntry>();
for (ISeamValueMapEntry v : entries) {
- c.addEntry((SeamValueMapEntry)doClone(v));
+ c.addEntry(v.clone());
}
return c;
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/LoadedDeclarations.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/LoadedDeclarations.java 2007-08-24
05:49:44 UTC (rev 3313)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/LoadedDeclarations.java 2007-08-24
08:09:32 UTC (rev 3314)
@@ -13,8 +13,8 @@
import java.util.ArrayList;
import java.util.List;
+import org.jboss.tools.seam.core.ISeamComponentDeclaration;
import org.jboss.tools.seam.core.ISeamFactory;
-import org.jboss.tools.seam.internal.core.SeamComponentDeclaration;
/**
* This object keeps all declarations loaded from one source.
@@ -22,10 +22,10 @@
* @author Viacheslav Kabanovich
*/
public class LoadedDeclarations {
- List<SeamComponentDeclaration> components = new
ArrayList<SeamComponentDeclaration>();
+ List<ISeamComponentDeclaration> components = new
ArrayList<ISeamComponentDeclaration>();
List<ISeamFactory> factories = new ArrayList<ISeamFactory>();
- public List<SeamComponentDeclaration> getComponents() {
+ public List<ISeamComponentDeclaration> getComponents() {
return components;
}