Author: scabanovich
Date: 2007-12-14 07:44:20 -0500 (Fri, 14 Dec 2007)
New Revision: 5307
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/SeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java
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/ComponentBuilder.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java
Log:
JBIDE-1374
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-12-14
12:41:48 UTC (rev 5306)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-12-14
12:44:20 UTC (rev 5307)
@@ -19,7 +19,9 @@
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.JavaUI;
+import org.jboss.tools.common.model.util.EclipseJavaUtil;
import org.jboss.tools.seam.core.BeanType;
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
@@ -138,14 +140,57 @@
public Set<ISeamComponentMethod> getMethodsByType(
SeamComponentMethodType type) {
Set<ISeamComponentMethod> result = null;
+ Set<String> names = null;
for(ISeamComponentMethod a: getMethods()) {
if(a.isOfType(type)) {
- if(result == null) result = new HashSet<ISeamComponentMethod>();
+ if(result == null) {
+ result = new HashSet<ISeamComponentMethod>();
+ names = new HashSet<String>();
+ }
result.add(a);
+ if(a.getSourceMember() != null) {
+ names.add(a.getSourceMember().getElementName());
+ }
}
}
+
+ ISeamJavaComponentDeclaration superDeclaration = getSuperDeclaration();
+ if(superDeclaration != null) {
+ Set<ISeamComponentMethod> s = superDeclaration.getMethodsByType(type);
+ if(s != null) for(ISeamComponentMethod a: s) {
+ if(a.getSourceMember() == null) continue;
+ String n = a.getSourceMember().getElementName();
+ if(names != null && names.contains(n)) continue;
+ if(result == null) {
+ result = new HashSet<ISeamComponentMethod>();
+ names = new HashSet<String>();
+ }
+ result.add(a);
+ if(a.getSourceMember() != null) {
+ names.add(a.getSourceMember().getElementName());
+ }
+ }
+ }
return result;
}
+
+ public ISeamJavaComponentDeclaration getSuperDeclaration() {
+ if(type == null) return null;
+ String superclass = null;
+ try {
+ superclass = type.getSuperclassName();
+ } catch (JavaModelException e) {
+ return null;
+ }
+ if(superclass == null || "java.lang.Object".equals(superclass)) {
+ return null;
+ }
+ if(superclass.indexOf('.') < 0) {
+ superclass = EclipseJavaUtil.resolveType(type, superclass);
+ }
+ SeamProject p = (SeamProject)getSeamProject();
+ return p == null ? null : p.getAllJavaComponentDeclarations().get(superclass);
+ }
public Set<IRole> getRoles() {
return roles;
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-12-14
12:41:48 UTC (rev 5306)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-12-14
12:44:20 UTC (rev 5307)
@@ -789,6 +789,14 @@
}
fireChanges(changes);
}
+ Iterator<String> it = javaDeclarations.keySet().iterator();
+ while(it.hasNext()) {
+ String cn = it.next();
+ SeamJavaComponentDeclaration d = javaDeclarations.get(cn);
+ if(source.equals(d.getSourcePath())) {
+ it.remove();
+ }
+ }
revalidateLock--;
revalidate();
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java 2007-12-14
12:41:48 UTC (rev 5306)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java 2007-12-14
12:44:20 UTC (rev 5307)
@@ -11,27 +11,22 @@
package org.jboss.tools.seam.internal.core.project.facet;
-import java.net.URI;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.resources.ICommand;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.AssertionFailedException;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaModelStatus;
import org.eclipse.jdt.core.IJavaProject;
@@ -44,7 +39,6 @@
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager;
import org.jboss.tools.seam.core.SeamCorePlugin;
/**
@@ -120,8 +114,8 @@
try {
IFacetedProject facetedProject = ProjectFacetsManager.create(project);
IRuntime rt = facetedProject.getPrimaryRuntime();
- if(facetedProject.getPrimaryRuntime()!=null) {
- return facetedProject.getPrimaryRuntime().getName();
+ if(rt != null) {
+ return rt.getName();
}
} catch (CoreException e) {
SeamCorePlugin.getPluginLog().logError(e);
@@ -133,7 +127,6 @@
IJavaProject javaProject;
IClasspathEntry[] javaProjectEntries;
IPath outputLocation;
- IWorkspaceRoot workspaceRoot;
if (project == null || !project.exists()) {
return null;
@@ -148,34 +141,41 @@
javaProject= JavaCore.create(project);
javaProjectEntries= javaProject.getRawClasspath();
outputLocation= javaProject.getOutputLocation();
- workspaceRoot= ResourcesPlugin.getWorkspace().getRoot();
IPath projPath= javaProject.getProject().getFullPath();
IPath newSourceFolderPath = projPath.append(path);
IPath excludeSourceFolderPath = projPath.append(exclude);
- ArrayList newEntries= new ArrayList(javaProjectEntries.length + 1);
+ ArrayList<IClasspathEntry> newEntries = new
ArrayList<IClasspathEntry>(javaProjectEntries.length + 1);
int projectEntryIndex= -1;
for (int i= 0; i < javaProjectEntries.length; i++) {
IClasspathEntry curr= javaProjectEntries[i];
- if (curr.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
- if (newSourceFolderPath.equals(curr.getPath())) {
+ IClasspathEntry resolved = curr;
+ if(resolved.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
+ try {
+ resolved = JavaCore.getResolvedClasspathEntry(resolved);
+ } catch (AssertionFailedException e) {
+ continue;
+ }
+ }
+ if (resolved.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
+ if (newSourceFolderPath.equals(resolved.getPath())) {
return null;
}
- if (projPath.equals(curr.getPath())) {
+ if (projPath.equals(resolved.getPath())) {
projectEntryIndex= i;
}
- if (excludeSourceFolderPath.equals(curr.getPath())) {
+ if (excludeSourceFolderPath.equals(resolved.getPath())) {
continue;
}
}
newEntries.add(curr);
}
- if(outputFolder!=null) {
+ if(outputFolder != null) {
CoreUtility.createDerivedFolder(project.getFolder(outputFolder), true, true, new
NullProgressMonitor());
}
- IClasspathEntry newEntry= JavaCore.newSourceEntry(newSourceFolderPath,new Path[]{},new
Path[]{},outputFolder!=null?project.getFullPath().append(outputFolder):null);
+ IClasspathEntry newEntry = JavaCore.newSourceEntry(newSourceFolderPath,new
Path[]{},new
Path[]{},outputFolder!=null?project.getFullPath().append(outputFolder):null);
if (projectEntryIndex != -1) {
newEntries.set(projectEntryIndex, newEntry);
@@ -183,10 +183,10 @@
insertClasspathEntry(newEntry, newEntries);
}
- IClasspathEntry[] newClasspathEntries= (IClasspathEntry[]) newEntries.toArray(new
IClasspathEntry[newEntries.size()]);
- IPath newOutputLocation= outputLocation;
+ IClasspathEntry[] newClasspathEntries = newEntries.toArray(new
IClasspathEntry[newEntries.size()]);
+ IPath newOutputLocation = outputLocation;
- IJavaModelStatus result= JavaConventions.validateClasspath(javaProject,
newClasspathEntries, newOutputLocation);
+ IJavaModelStatus result = JavaConventions.validateClasspath(javaProject,
newClasspathEntries, newOutputLocation);
if (!result.isOK()) {
if (outputLocation.equals(projPath)) {
newOutputLocation=
projPath.append(PreferenceConstants.getPreferenceStore().getString(PreferenceConstants.SRCBIN_BINNAME));
@@ -212,9 +212,9 @@
return null;
}
- static private void insertClasspathEntry(IClasspathEntry entry, List entries) {
+ static private void insertClasspathEntry(IClasspathEntry entry,
List<IClasspathEntry> entries) {
int length= entries.size();
- IClasspathEntry[] elements= (IClasspathEntry[])entries.toArray(new
IClasspathEntry[length]);
+ IClasspathEntry[] elements = entries.toArray(new IClasspathEntry[length]);
int i= 0;
while (i < length && elements[i].getEntryKind() != entry.getEntryKind()) {
i++;
Modified:
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 2007-12-14
12:41:48 UTC (rev 5306)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ASTVisitorImpl.java 2007-12-14
12:44:20 UTC (rev 5307)
@@ -10,10 +10,14 @@
******************************************************************************/
package org.jboss.tools.seam.internal.core.scanner.java;
+import java.util.ArrayList;
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
+import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.ASTVisitor;
import org.eclipse.jdt.core.dom.Annotation;
import org.eclipse.jdt.core.dom.Block;
@@ -26,6 +30,7 @@
import org.eclipse.jdt.core.dom.SimpleName;
import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.jboss.tools.common.model.util.EclipseJavaUtil;
import org.jboss.tools.seam.internal.core.scanner.Util;
/**
@@ -35,42 +40,75 @@
*/
public class ASTVisitorImpl extends ASTVisitor implements SeamAnnotations {
- IType type;
-
- AnnotatedASTNode<TypeDeclaration> annotatedType = null;
- Set<AnnotatedASTNode<FieldDeclaration>> annotatedFields = new
HashSet<AnnotatedASTNode<FieldDeclaration>>();
- Set<AnnotatedASTNode<MethodDeclaration>> annotatedMethods = new
HashSet<AnnotatedASTNode<MethodDeclaration>>();
+ static class TypeData {
+ TypeData parent = null;
+ List<TypeData> children = new ArrayList<TypeData>();
- AnnotatedASTNode<?> currentAnnotatedNode = null;
- AnnotatedASTNode<FieldDeclaration> currentAnnotatedField = null;
- AnnotatedASTNode<MethodDeclaration> currentAnnotatedMethod = null;
+ IType type;
+ int innerLock = 0;
+
+ AnnotatedASTNode<TypeDeclaration> annotatedType = null;
+ Set<AnnotatedASTNode<FieldDeclaration>> annotatedFields = new
HashSet<AnnotatedASTNode<FieldDeclaration>>();
+ Set<AnnotatedASTNode<MethodDeclaration>> annotatedMethods = new
HashSet<AnnotatedASTNode<MethodDeclaration>>();
+
+ AnnotatedASTNode<?> currentAnnotatedNode = null;
+ AnnotatedASTNode<FieldDeclaration> currentAnnotatedField = null;
+ AnnotatedASTNode<MethodDeclaration> currentAnnotatedMethod = null;
+
+ public boolean hasSeamComponentItself() {
+ if(annotatedFields.size() > 0 || annotatedMethods.size() > 0) return true;
+ if(annotatedType != null && annotatedType.getAnnotations() != null) return
true;
+ return false;
+ }
+
+ public boolean hasSeamComponent() {
+ if(hasSeamComponentItself()) return true;
+ for (TypeData c: children) {
+ if(c.hasSeamComponent()) return true;
+ }
+ return false;
+ }
+
+ }
+ TypeData root = null;
+ TypeData current = null;
+
+ ASTVisitorImpl() {}
+
+ public void setType(IType type) {
+ root = new TypeData();
+ root.type = type;
+ }
+
+
public boolean hasSeamComponent() {
- if(annotatedFields.size() > 0 || annotatedMethods.size() > 0) return true;
- if(annotatedType != null && annotatedType.getAnnotations() != null) return
true;
- return false;
+ return root.hasSeamComponent();
}
public boolean visit(SingleMemberAnnotation node) {
+ if(current.innerLock > 0) return false;
String type = resolveType(node);
- if(Util.isSeamAnnotationType(type) && currentAnnotatedNode != null) {
- currentAnnotatedNode.addAnnotation(new ResolvedAnnotation(type, node));
+ if(Util.isSeamAnnotationType(type) && current.currentAnnotatedNode != null) {
+ current.currentAnnotatedNode.addAnnotation(new ResolvedAnnotation(type, node));
}
return false;
}
public boolean visit(NormalAnnotation node) {
+ if(current.innerLock > 0) return false;
String type = resolveType(node);
- if(Util.isSeamAnnotationType(type) && currentAnnotatedNode != null) {
- currentAnnotatedNode.addAnnotation(new ResolvedAnnotation(type, node));
+ if(Util.isSeamAnnotationType(type) && current.currentAnnotatedNode != null) {
+ current.currentAnnotatedNode.addAnnotation(new ResolvedAnnotation(type, node));
}
return false;
}
public boolean visit(MarkerAnnotation node) {
+ if(current.innerLock > 0) return false;
String type = resolveType(node);
- if(Util.isSeamAnnotationType(type) && currentAnnotatedNode != null) {
- currentAnnotatedNode.addAnnotation(new ResolvedAnnotation(type, node));
+ if(Util.isSeamAnnotationType(type) && current.currentAnnotatedNode != null) {
+ current.currentAnnotatedNode.addAnnotation(new ResolvedAnnotation(type, node));
}
return true;
}
@@ -81,7 +119,7 @@
}
String resolveType(Annotation node) {
- return resolveType(type, node);
+ return resolveType(current.type, node);
}
static String resolveType(IType type, Annotation node) {
@@ -104,45 +142,93 @@
}
public boolean visit(TypeDeclaration node) {
- if(annotatedType == null) {
- annotatedType = new AnnotatedASTNode<TypeDeclaration>(node);
- currentAnnotatedNode = annotatedType;
+ if(current == null) {
+ String n = node.getName().getFullyQualifiedName();
+ if(n != null && n.indexOf('.') < 0) n =
EclipseJavaUtil.resolveType(root.type, n);
+ String nr = root.type.getFullyQualifiedName();
+ if(n == null || !n.equals(nr)) return false;
+ current = root;
}
+ if(current.annotatedType == null) {
+ current.annotatedType = new AnnotatedASTNode<TypeDeclaration>(node);
+ current.currentAnnotatedNode = current.annotatedType;
+ } else {
+ String n = node.getName().getFullyQualifiedName();
+ if(n != null && n.indexOf('.') < 0) n =
EclipseJavaUtil.resolveType(current.type, n);
+ IType[] ts = null;
+ try {
+ ts = current.type.getTypes();
+ } catch (JavaModelException e) {
+ //ignore
+ }
+ IType t = null;
+ if(ts != null) for (int i = 0; t == null && i < ts.length; i++) {
+ try {
+ if(!Flags.isStatic(ts[i].getFlags())) continue;
+ } catch (JavaModelException e) {
+ continue;
+ }
+ String ni = ts[i].getFullyQualifiedName();
+ if(ni != null) ni = ni.replace('$', '.');
+ if(n == null || !n.equals(ni)) continue;
+ t = ts[i];
+ }
+ if(t == null) {
+ current.innerLock++;
+ return false;
+ } else {
+ TypeData d = new TypeData();
+ d.type = t;
+ d.parent = current;
+ current.children.add(d);
+ current = d;
+ current.annotatedType = new AnnotatedASTNode<TypeDeclaration>(node);
+ current.currentAnnotatedNode = current.annotatedType;
+ }
+ }
return true;
}
public void endVisit(TypeDeclaration node) {
- if(currentAnnotatedNode != null && currentAnnotatedNode.node == node) {
- currentAnnotatedNode = null;
+ if(current == null) return;
+ if(current.currentAnnotatedNode != null && current.currentAnnotatedNode.node ==
node) {
+ current.currentAnnotatedNode = null;
+ current = current.parent;
+ } else {
+ current.innerLock--;
}
}
public boolean visit(FieldDeclaration node) {
- currentAnnotatedField = new AnnotatedASTNode<FieldDeclaration>(node);
- currentAnnotatedNode = currentAnnotatedField;
+ if(current == null || current.innerLock > 0) return false;
+ current.currentAnnotatedField = new AnnotatedASTNode<FieldDeclaration>(node);
+ current.currentAnnotatedNode = current.currentAnnotatedField;
return true;
}
public void endVisit(FieldDeclaration node) {
- if(currentAnnotatedField != null && currentAnnotatedField.getAnnotations() !=
null) {
- annotatedFields.add(currentAnnotatedField);
+ if(current == null || current.innerLock > 0) return;
+ if(current.currentAnnotatedField != null &&
current.currentAnnotatedField.getAnnotations() != null) {
+ current.annotatedFields.add(current.currentAnnotatedField);
}
- currentAnnotatedField = null;
- currentAnnotatedNode = annotatedType;
+ current.currentAnnotatedField = null;
+ current.currentAnnotatedNode = current.annotatedType;
}
public boolean visit(MethodDeclaration node) {
- currentAnnotatedMethod = new AnnotatedASTNode<MethodDeclaration>(node);
- currentAnnotatedNode = currentAnnotatedMethod;
+ if(current == null || current.innerLock > 0) return false;
+ current.currentAnnotatedMethod = new AnnotatedASTNode<MethodDeclaration>(node);
+ current.currentAnnotatedNode = current.currentAnnotatedMethod;
return true;
}
public void endVisit(MethodDeclaration node) {
- if(currentAnnotatedMethod != null && currentAnnotatedMethod.getAnnotations() !=
null) {
- annotatedMethods.add(currentAnnotatedMethod);
+ if(current == null || current.innerLock > 0) return;
+ if(current.currentAnnotatedMethod != null &&
current.currentAnnotatedMethod.getAnnotations() != null) {
+ current.annotatedMethods.add(current.currentAnnotatedMethod);
}
- currentAnnotatedMethod = null;
- currentAnnotatedNode = annotatedType;
+ current.currentAnnotatedMethod = null;
+ current.currentAnnotatedNode = current.annotatedType;
}
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2007-12-14
12:41:48 UTC (rev 5306)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2007-12-14
12:44:20 UTC (rev 5307)
@@ -57,7 +57,7 @@
SeamJavaComponentDeclaration component = new SeamJavaComponentDeclaration();
- public ComponentBuilder(LoadedDeclarations ds, ASTVisitorImpl visitor) {
+ public ComponentBuilder(LoadedDeclarations ds, ASTVisitorImpl.TypeData visitor) {
this.ds = ds;
annotatedType = visitor.annotatedType;
annotatedFields = visitor.annotatedFields;
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-12-14
12:41:48 UTC (rev 5306)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java 2007-12-14
12:44:20 UTC (rev 5307)
@@ -15,6 +15,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
@@ -127,26 +128,44 @@
}
public void acceptAST(ICompilationUnit source, CompilationUnit ast) {
-
+ IType[] ts = null;
try {
- IType[] ts = source.getTypes();
- if(ts != null && ts.length > 0) {
- visitor.type = ts[0];
- }
+ ts = source.getTypes();
} catch (JavaModelException e) {
//ignore
}
- ast.accept(visitor);
-
- if(!visitor.hasSeamComponent()) return;
-
- ComponentBuilder b = new ComponentBuilder(ds, visitor);
-
- b.component.setSourcePath(sourcePath);
- b.component.setResource(resource);
-
- b.process();
+ if(ts == null || ts.length == 0) return;
+ for (int i = 0; i < ts.length; i++) {
+ visitor.setType(null);
+ int f = 0;
+ try {
+ f = ts[i].getFlags();
+ } catch (JavaModelException e) {
+ //ignore
+ continue;
+ }
+ if(Flags.isPublic(f)) {
+ visitor.setType(ts[i]);
+ ast.accept(visitor);
+ if(!visitor.hasSeamComponent()) continue;
+ processTypeData(visitor.root);
+ }
+ }
}
+
+ private void processTypeData(ASTVisitorImpl.TypeData data) {
+ if(data.hasSeamComponentItself()) {
+ ComponentBuilder b = new ComponentBuilder(ds, data);
+
+ b.component.setSourcePath(sourcePath);
+ b.component.setResource(resource);
+
+ b.process();
+ }
+ for (ASTVisitorImpl.TypeData c: data.children) {
+ processTypeData(c);
+ }
+ }
}
static String getResolvedType(IType type, String n) {