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 42377 Details for
Bug 143212
IAE in log
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch003.txt (text/plain), 3.14 KB, created by
David Audel
on 2006-05-24 04:32:50 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
David Audel
Created:
2006-05-24 04:32:50 EDT
Size:
3.14 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: dom/org/eclipse/jdt/core/dom/ASTConverter.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java,v >retrieving revision 1.238 >diff -u -r1.238 ASTConverter.java >--- dom/org/eclipse/jdt/core/dom/ASTConverter.java 29 Mar 2006 02:54:50 -0000 1.238 >+++ dom/org/eclipse/jdt/core/dom/ASTConverter.java 24 May 2006 08:34:18 -0000 >@@ -879,16 +879,23 @@ > > public AssertStatement convert(org.eclipse.jdt.internal.compiler.ast.AssertStatement statement) { > AssertStatement assertStatement = new AssertStatement(this.ast); >- int end = statement.assertExpression.sourceEnd + 1; >- assertStatement.setExpression(convert(statement.assertExpression)); >+ final Expression assertExpression = convert(statement.assertExpression); >+ Expression searchingNode = assertExpression; >+ assertStatement.setExpression(assertExpression); > org.eclipse.jdt.internal.compiler.ast.Expression exceptionArgument = statement.exceptionArgument; > if (exceptionArgument != null) { >- end = exceptionArgument.sourceEnd + 1; >- assertStatement.setMessage(convert(exceptionArgument)); >+ final Expression exceptionMessage = convert(exceptionArgument); >+ assertStatement.setMessage(exceptionMessage); >+ searchingNode = exceptionMessage; > } > int start = statement.sourceStart; >- int sourceEnd = retrieveEndingSemiColonPosition(end, this.compilationUnitSourceLength); >- assertStatement.setSourceRange(start, sourceEnd - start + 1); >+ int sourceEnd = retrieveSemiColonPosition(searchingNode); >+ if (sourceEnd == -1) { >+ sourceEnd = searchingNode.getStartPosition() + searchingNode.getLength() - 1; >+ assertStatement.setSourceRange(start, sourceEnd - start + 1); >+ } else { >+ assertStatement.setSourceRange(start, sourceEnd - start + 1); >+ } > return assertStatement; > } > >@@ -3925,35 +3932,17 @@ > return -1; > } > >- protected int retrieveEndingSemiColonPosition(int start, int end) { >- int count = 0; >- this.scanner.resetTo(start, end); >+ protected int retrieveSemiColonPosition(Expression node) { >+ int start = node.getStartPosition(); >+ int length = node.getLength(); >+ int end = start + length; >+ this.scanner.resetTo(end, this.compilationUnitSourceLength); > try { > int token; > while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { > switch(token) { > case TerminalTokens.TokenNameSEMICOLON: >- if (count == 0) { >- return this.scanner.currentPosition - 1; >- } >- break; >- case TerminalTokens.TokenNameLBRACE : >- count++; >- break; >- case TerminalTokens.TokenNameRBRACE : >- count--; >- break; >- case TerminalTokens.TokenNameLPAREN : >- count++; >- break; >- case TerminalTokens.TokenNameRPAREN : >- count--; >- break; >- case TerminalTokens.TokenNameLBRACKET : >- count++; >- break; >- case TerminalTokens.TokenNameRBRACKET : >- count--; >+ return this.scanner.currentPosition - 1; > } > } > } catch(InvalidInputException e) {
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 143212
: 42377 |
42378