Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 150730 Details for
Bug 210429
[1.5][formatter] Formatter unable to format due to AbortFormatting
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
First draft
patch_210429.txt (text/plain), 3.16 KB, created by
Olivier Thomann
on 2009-10-28 10:24:51 EDT
(
hide
)
Description:
First draft
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2009-10-28 10:24:51 EDT
Size:
3.16 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java,v >retrieving revision 1.161 >diff -u -r1.161 TypeDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java 1 Oct 2009 18:26:29 -0000 1.161 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java 28 Oct 2009 14:26:24 -0000 >@@ -819,6 +819,10 @@ > TypeDeclaration typeDeclaration = this.memberTypes[i]; > typeDeclaration.parseMethods(parser, unit); > this.bits |= (typeDeclaration.bits & ASTNode.HasSyntaxErrors); >+ Annotation[] annotations2 = typeDeclaration.annotations; >+ if (annotations2 != null) { >+ parseMethodsInsideAnnotations(parser, unit, annotations2); >+ } > } > } > >@@ -829,6 +833,10 @@ > AbstractMethodDeclaration abstractMethodDeclaration = this.methods[i]; > abstractMethodDeclaration.parseStatements(parser, unit); > this.bits |= (abstractMethodDeclaration.bits & ASTNode.HasSyntaxErrors); >+ Annotation[] annotations2 = abstractMethodDeclaration.annotations; >+ if (annotations2 != null) { >+ parseMethodsInsideAnnotations(parser, unit, annotations2); >+ } > } > } > >@@ -843,6 +851,39 @@ > this.bits |= (fieldDeclaration.bits & ASTNode.HasSyntaxErrors); > break; > } >+ Annotation[] annotations2 = fieldDeclaration.annotations; >+ if (annotations2 != null) { >+ parseMethodsInsideAnnotations(parser, unit, annotations2); >+ } >+ } >+ } >+} >+ >+private void parseMethodsInsideAnnotations(Parser parser, CompilationUnitDeclaration unit, Annotation[] annotations2) { >+ for (int j = 0, max = annotations2.length; j < max; j++) { >+ Annotation annotation = annotations2[j]; >+ if (annotation instanceof NormalAnnotation) { >+ NormalAnnotation normalAnnotation = (NormalAnnotation) annotation; >+ MemberValuePair[] memberValuePairs = normalAnnotation.memberValuePairs; >+ for (int k = 0, max2 = memberValuePairs.length; k < max2; k++) { >+ MemberValuePair memberValuePair = memberValuePairs[k]; >+ Expression value2 = memberValuePair.value; >+ if (value2 instanceof QualifiedAllocationExpression) { >+ QualifiedAllocationExpression expression = (QualifiedAllocationExpression) value2; >+ TypeDeclaration typeDeclaration = expression.anonymousType; >+ typeDeclaration.parseMethods(parser, unit); >+ this.bits |= (typeDeclaration.bits & ASTNode.HasSyntaxErrors); >+ } >+ } >+ } else if (annotation instanceof SingleMemberAnnotation) { >+ SingleMemberAnnotation singleMemberAnnotation = (SingleMemberAnnotation) annotation; >+ Expression value2 = singleMemberAnnotation.memberValue; >+ if (value2 instanceof QualifiedAllocationExpression) { >+ QualifiedAllocationExpression expression = (QualifiedAllocationExpression) value2; >+ TypeDeclaration typeDeclaration = expression.anonymousType; >+ typeDeclaration.parseMethods(parser, unit); >+ this.bits |= (typeDeclaration.bits & ASTNode.HasSyntaxErrors); >+ } > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 210429
: 150730