Skip to content

Commit 2b137fe

Browse files
author
sebastigurin@gmail.com
committed
1 parent 851560b commit 2b137fe

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/net/sf/j2s/core/astvisitors/DependencyASTVisitor.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import java.util.Iterator;
1919
import java.util.List;
2020
import java.util.Set;
21+
2122
import org.eclipse.jdt.core.dom.ASTNode;
2223
import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
2324
import org.eclipse.jdt.core.dom.Annotation;
@@ -346,6 +347,19 @@ public boolean visit(PackageDeclaration node) {
346347
ASTPackageVisitor packageVisitor = ((ASTPackageVisitor) getAdaptable(ASTPackageVisitor.class));
347348
packageVisitor.setPackageName("" + node.getName());
348349
return false;
350+
}
351+
352+
//sgurin - fix for bug http://sourceforge.net/tracker/?func=detail&aid=3037341&group_id=155436&atid=795800 with static imports
353+
public void endVisit(ImportDeclaration node) {
354+
super.endVisit(node);
355+
if(node.isStatic()&&node.isOnDemand()) {
356+
String qnameStr = node.getName().getFullyQualifiedName();
357+
if(qnameStr!=null && !qnameStr.equals("") && isQualifiedNameOK(qnameStr, node)) {
358+
if(!musts.contains(qnameStr)) {
359+
musts.add(qnameStr);
360+
}
361+
}
362+
}
349363
}
350364

351365
protected void readClasses(Annotation annotation, Set set) {

0 commit comments

Comments
 (0)