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 24361 Details for
Bug 102778
Scrapbook page doesn't work with enhanced for statement
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_102778.txt (text/plain), 2.27 KB, created by
Olivier Thomann
on 2005-07-05 15:45:26 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-07-05 15:45:26 EDT
Size:
2.27 KB
patch
obsolete
>Index: eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java,v >retrieving revision 1.57 >diff -u -r1.57 CodeSnippetParser.java >--- eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java 23 May 2005 15:11:35 -0000 1.57 >+++ eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java 5 Jul 2005 19:45:00 -0000 >@@ -23,12 +23,12 @@ > */ > public class CodeSnippetParser extends Parser implements EvaluationConstants { > int codeSnippetStart, codeSnippetEnd; >+ EvaluationContext evaluationContext; > boolean hasRecoveredOnExpression; >- int problemCountBeforeRecovery = 0; > int lastStatement = -1; // end of last top level statement > int lineSeparatorLength; > >- EvaluationContext evaluationContext; >+ int problemCountBeforeRecovery = 0; > /** > * Creates a new code snippet parser. > */ >@@ -145,6 +145,11 @@ > /* recovery */ > recordLastStatementIfNeeded(); > } >+protected void consumeEnhancedForStatement() { >+ super.consumeEnhancedForStatement(); >+ /* recovery */ >+ recordLastStatementIfNeeded(); >+} > protected void consumeExpressionStatement() { > super.consumeExpressionStatement(); > /* recovery */ >@@ -245,6 +250,7 @@ > /* recovery */ > recordLastStatementIfNeeded(); > } >+ > /** > * In case emulating local variables, wrap the (recovered) statements inside a > * try statement so as to achieve local state commiting (copy local vars back to fields). >@@ -374,7 +380,6 @@ > m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition, this.evaluationContext); > pushOnExpressionStack(m); > } >- > protected void consumePrimaryNoNewArrayThis() { > // PrimaryNoNewArray ::= 'this' > >@@ -679,6 +684,7 @@ > this.lastStatement = this.scanner.startPosition; > } > } >+ > protected void reportSyntaxErrors(boolean isDietParse, int oldFirstToken) { > if (!isDietParse) { > this.scanner.initialPosition = this.lastStatement; >@@ -687,7 +693,6 @@ > } > super.reportSyntaxErrors(isDietParse, oldFirstToken); > } >- > /* > * A syntax error was detected. If a method is being parsed, records the number of errors and > * attempts to restart from the last statement by going for an expression.
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 102778
: 24361 |
24363