File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/net/sf/j2s/core/astvisitors Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 1818import java .util .Iterator ;
1919import java .util .List ;
2020import java .util .Set ;
21+
2122import org .eclipse .jdt .core .dom .ASTNode ;
2223import org .eclipse .jdt .core .dom .AbstractTypeDeclaration ;
2324import 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 ) {
You can’t perform that action at this time.
0 commit comments