File tree Expand file tree Collapse file tree 2 files changed +28
-13
lines changed
src/net/sf/j2s/core/astvisitors Expand file tree Collapse file tree 2 files changed +28
-13
lines changed Original file line number Diff line number Diff line change @@ -1098,19 +1098,16 @@ public boolean visit(Initializer node) {
1098
1098
}
1099
1099
1100
1100
public void endVisit (MethodDeclaration node ) {
1101
- Javadoc javadoc = node .getJavadoc ();
1102
- if (javadoc != null ) {
1103
- List tags = javadoc .tags ();
1104
- if (tags .size () != 0 ) {
1105
- for (Iterator iter = tags .iterator (); iter .hasNext ();) {
1106
- TagElement tagEl = (TagElement ) iter .next ();
1107
- if ("@j2sIgnore" .equals (tagEl .getTagName ())) {
1108
- return ;
1109
- }
1110
- }
1111
- }
1101
+ if (getJ2SDocTag (node , "@j2sIgnore" ) != null ) {
1102
+ return ;
1112
1103
}
1104
+
1113
1105
IMethodBinding mBinding = node .resolveBinding ();
1106
+ if (Bindings .isMethodInvoking (mBinding , "net.sf.j2s.ajax.SimpleRPCRunnable" , "ajaxRun" )) {
1107
+ if (getJ2SDocTag (node , "@j2sKeep" ) == null ) {
1108
+ return ;
1109
+ }
1110
+ }
1114
1111
if (mBinding != null ) {
1115
1112
methodDeclareStack .pop ();
1116
1113
}
@@ -1124,7 +1121,9 @@ public boolean visit(MethodDeclaration node) {
1124
1121
1125
1122
IMethodBinding mBinding = node .resolveBinding ();
1126
1123
if (Bindings .isMethodInvoking (mBinding , "net.sf.j2s.ajax.SimpleRPCRunnable" , "ajaxRun" )) {
1127
- return false ;
1124
+ if (getJ2SDocTag (node , "@j2sKeep" ) == null ) {
1125
+ return false ;
1126
+ }
1128
1127
}
1129
1128
if (mBinding != null ) {
1130
1129
methodDeclareStack .push (mBinding .getKey ());
Original file line number Diff line number Diff line change @@ -797,7 +797,23 @@ public void setToCompileVariableName(boolean toCompileVariableName) {
797
797
public boolean visit (MethodDeclaration node ) {
798
798
IMethodBinding mBinding = node .resolveBinding ();
799
799
if (Bindings .isMethodInvoking (mBinding , "net.sf.j2s.ajax.SimpleRPCRunnable" , "ajaxRun" )) {
800
- return false ;
800
+ boolean toKeep = false ;
801
+ Javadoc javadoc = node .getJavadoc ();
802
+ if (javadoc != null ) {
803
+ List tags = javadoc .tags ();
804
+ if (tags .size () != 0 ) {
805
+ for (Iterator iter = tags .iterator (); iter .hasNext ();) {
806
+ TagElement tagEl = (TagElement ) iter .next ();
807
+ if ("@j2sKeep" .equals (tagEl .getTagName ())) {
808
+ toKeep = true ;
809
+ break ;
810
+ }
811
+ }
812
+ }
813
+ }
814
+ if (!toKeep ) {
815
+ return false ;
816
+ }
801
817
}
802
818
803
819
Javadoc javadoc = node .getJavadoc ();
You can’t perform that action at this time.
0 commit comments