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 72945 Details for
Bug 192497
Cannot always find method definition, depending on cursor position
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch for 3.3.1
bug192497_331_001.txt (text/plain), 2.18 KB, created by
David Audel
on 2007-07-03 09:30:23 EDT
(
hide
)
Description:
Proposed patch for 3.3.1
Filename:
MIME Type:
Creator:
David Audel
Created:
2007-07-03 09:30:23 EDT
Size:
2.18 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ResolveTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests.java,v >retrieving revision 1.74 >diff -u -r1.74 ResolveTests.java >--- src/org/eclipse/jdt/core/tests/model/ResolveTests.java 6 Apr 2007 11:07:11 -0000 1.74 >+++ src/org/eclipse/jdt/core/tests/model/ResolveTests.java 3 Jul 2007 13:08:56 -0000 >@@ -2115,4 +2115,26 @@ > elements > ); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=192497 >+public void testSelectOnCursor1() throws JavaModelException { >+ ICompilationUnit cu = getWorkingCopy( >+ "/Resolve/src/AType.java", >+ "public class AType {\n" + >+ " public void doLoad(){}\n" + >+ " public void foo() {\n" + >+ " doLoad();\n" + >+ " }\n" + >+ "}\n"); >+ >+ String str = cu.getSource(); >+ // perform code select between 'd' and 'o' >+ int start = str.indexOf("oLoad();"); >+ int length = 0; >+ IJavaElement[] elements = cu.codeSelect(start, length); >+ assertElementsEqual( >+ "Unexpected elements", >+ "doLoad() [in AType [in [Working copy] AType.java [in <default> [in src [in Resolve]]]]]", >+ elements >+ ); >+} > } >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java,v >retrieving revision 1.137 >diff -u -r1.137 SelectionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java 27 Apr 2007 15:51:39 -0000 1.137 >+++ codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java 3 Jul 2007 13:08:58 -0000 >@@ -341,8 +341,7 @@ > int token; > > if(selectionStart > selectionEnd){ >- // compute end position of the selection >- int end = selectionEnd + 1 == source.length ? selectionEnd : selectionEnd + 1; >+ int end = source.length - 1; > > // compute start position of current line > int currentPosition = selectionStart - 1;
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 192497
:
71305
|
72945
|
72946