Skip to content

Commit 06ed675

Browse files
author
jossonsmith
committed
Merge with /trunk
1 parent 1b12af0 commit 06ed675

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,22 @@ public boolean visit(MethodDeclaration node) {
13971397
}
13981398
}
13991399
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+
}
14011416
}
14021417
}
14031418
}

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,19 @@ protected String[] getFilterMethods() {
354354
*/
355355
public boolean visit(MethodInvocation node) {
356356
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+
}
357370
String[] filterMethods = getFilterMethods();
358371
for (int i = 0; i < filterMethods.length; i += 2) {
359372
if (isMethodInvoking(methodBinding, filterMethods[i], filterMethods[i + 1])) {

0 commit comments

Comments
 (0)