File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
src/net/sf/j2s/core/astvisitors Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -1397,7 +1397,22 @@ public boolean visit(MethodDeclaration node) {
1397
1397
}
1398
1398
}
1399
1399
if (isOnlySuper ) {
1400
- return false ;
1400
+ boolean isForced2Keep = false ;
1401
+ if (javadoc != null ) {
1402
+ List tags = javadoc .tags ();
1403
+ if (tags .size () != 0 ) {
1404
+ for (Iterator iter = tags .iterator (); iter .hasNext ();) {
1405
+ TagElement tagEl = (TagElement ) iter .next ();
1406
+ if ("@j2sKeep" .equals (tagEl .getTagName ())) {
1407
+ isForced2Keep = true ;
1408
+ break ;
1409
+ }
1410
+ }
1411
+ }
1412
+ }
1413
+ if (!isForced2Keep ) {
1414
+ return false ;
1415
+ }
1401
1416
}
1402
1417
}
1403
1418
}
Original file line number Diff line number Diff line change @@ -354,6 +354,19 @@ protected String[] getFilterMethods() {
354
354
*/
355
355
public boolean visit (MethodInvocation node ) {
356
356
IMethodBinding methodBinding = node .resolveMethodBinding ();
357
+ if ("net.sf.j2s.ajax.junit.AsyncSWT" .equals (methodBinding .getDeclaringClass ().getQualifiedName ())
358
+ && "waitLayout" .equals (methodBinding .getName ())) {
359
+ metSWTBlockWhile = true ;
360
+ node .getExpression ().accept (this );
361
+ buffer .append (".waitLayout (" );
362
+ Expression shellExp = (Expression ) node .arguments ().get (0 );
363
+ shellExp .accept (this );
364
+ buffer .append (", " );
365
+ Expression runnableExp = (Expression ) node .arguments ().get (1 );
366
+ runnableExp .accept (this );
367
+ buffer .append (", this, function () {\r \n //" );
368
+ return false ;
369
+ }
357
370
String [] filterMethods = getFilterMethods ();
358
371
for (int i = 0 ; i < filterMethods .length ; i += 2 ) {
359
372
if (isMethodInvoking (methodBinding , filterMethods [i ], filterMethods [i + 1 ])) {
You can’t perform that action at this time.
0 commit comments