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 58366 Details for
Bug 171124
Find function doesn't work properly in AGR macro editor
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]
Patch that fixes Find problem
171124_patch.txt (text/plain), 3.69 KB, created by
Liz Dancy
on 2007-02-06 13:22:51 EST
(
hide
)
Description:
Patch that fixes Find problem
Filename:
MIME Type:
Creator:
Liz Dancy
Created:
2007-02-06 13:22:51 EST
Size:
3.69 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.test.auto.gui >Index: src/org/eclipse/tptp/test/auto/gui/internal/editor/AutoGUITestCasesForm.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.tptp.test.auto.gui/src/org/eclipse/tptp/test/auto/gui/internal/editor/AutoGUITestCasesForm.java,v >retrieving revision 1.15 >diff -u -r1.15 AutoGUITestCasesForm.java >--- src/org/eclipse/tptp/test/auto/gui/internal/editor/AutoGUITestCasesForm.java 30 Jan 2007 16:15:52 -0000 1.15 >+++ src/org/eclipse/tptp/test/auto/gui/internal/editor/AutoGUITestCasesForm.java 6 Feb 2007 17:19:19 -0000 >@@ -1599,15 +1599,18 @@ > int firstCharacterInx = -1; > char currentCharacter; > >- for (int i = 0, macroLength = macro.length(); i < macroLength; i++) >+ if(searchForward) > { >- currentCharacter = macro.charAt(i); >- if ((currentCharacter == findStringChar[0] || >- (!caseSensitive && (currentCharacter <= 90 ? currentCharacter + 32 == findStringChar[0] : currentCharacter - 32 == findStringChar[0]))) && >- (wholeWord ? macro.charAt(i - 1) == 32 && macro.charAt(i + findStringChar.length) == 32 : true)) >+ >+ for (int i = 0, macroLength = macro.length(); i < macroLength; i++) > { >- firstCharacterInx = i; >- } >+ currentCharacter = macro.charAt(i); >+ if ((currentCharacter == findStringChar[0] || >+ (!caseSensitive && (currentCharacter <= 90 ? currentCharacter + 32 == findStringChar[0] : currentCharacter - 32 == findStringChar[0]))) && >+ (wholeWord ? macro.charAt(i - 1) == 32 && macro.charAt(i + findStringChar.length) == 32 : true)) >+ { >+ firstCharacterInx = i; >+ } > > for (int j = 1; firstCharacterInx != -1 && j < findStringChar.length; j++) > { >@@ -1628,10 +1631,52 @@ > if (firstCharacterInx != -1) > { > widgetOffset = widgetOffset < 0 ? 0 : widgetOffset; >- input.setSelection(searchForward ? i + widgetOffset: i - widgetOffset, searchForward ? i + findStringChar.length + widgetOffset : i + findStringChar.length - widgetOffset); >+ input.setSelection( i + widgetOffset, i + findStringChar.length + widgetOffset ); > return i; > } >- } >+ }} >+ >+ else{ >+ // searching ackward requires a different search (need to go match last character first and traversal is already based on widgetOffset >+ // added for defect 171124 Liz D. >+ >+ for (int k = macro.length()-1, macroLength = macro.length(); k > 0; k--) >+ { >+ currentCharacter = macro.charAt(k); >+ >+ int lastChar = findStringChar.length-1; >+ if ((currentCharacter == findStringChar[lastChar] || >+ (!caseSensitive && (currentCharacter <= 90 ? currentCharacter + 32 == findStringChar[0] : currentCharacter - 32 == findStringChar[0]))) && >+ (wholeWord ? macro.charAt(k - 1) == 32 && macro.charAt(k + findStringChar.length) == 32 : true)) >+ { >+ firstCharacterInx = k; >+ } >+ >+ for (int j = 1; firstCharacterInx != -1 && j < findStringChar.length; j++) >+ { >+ if (k - j >= macroLength) >+ { >+ firstCharacterInx = -1; >+ break; >+ } >+ currentCharacter = macro.charAt(k - j); >+ if (currentCharacter != findStringChar[lastChar -j] && >+ (caseSensitive ? true : (currentCharacter <= 90 ? currentCharacter + 32 != findStringChar[lastChar-j] : currentCharacter - 32 != findStringChar[lastChar -j]))) >+ { >+ firstCharacterInx = -1; >+ break; >+ } >+ } >+ >+ if (firstCharacterInx != -1) >+ { >+ k++; >+ input.setSelection(k , k - findStringChar.length ); >+ return k; >+ } >+ } >+ } >+ > > return -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 171124
: 58366 |
59799