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 75620 Details for
Bug 198731
Wrong underline in hyperlink recognition
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch, fixes bug 198731
198731_patch.diff (text/plain), 1.97 KB, created by
Abner Ballardo
on 2007-08-08 00:23:16 EDT
(
hide
)
Description:
Patch, fixes bug 198731
Filename:
MIME Type:
Creator:
Abner Ballardo
Created:
2007-08-08 00:23:16 EDT
Size:
1.97 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ecf.ui >Index: src/org/eclipse/ecf/ui/hyperlink/AbstractURLHyperlinkDetector.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/hyperlink/AbstractURLHyperlinkDetector.java,v >retrieving revision 1.3 >diff -u -r1.3 AbstractURLHyperlinkDetector.java >--- src/org/eclipse/ecf/ui/hyperlink/AbstractURLHyperlinkDetector.java 1 May 2007 03:33:16 -0000 1.3 >+++ src/org/eclipse/ecf/ui/hyperlink/AbstractURLHyperlinkDetector.java 8 Aug 2007 04:07:39 -0000 >@@ -49,7 +49,8 @@ > return protocols; > } > >- protected String detectSubstring(String fromLine, int offsetInLine) { >+ protected IRegion detectSubRegion(IRegion lineInfo, String fromLine, >+ int offsetInLine) { > boolean startDoubleQuote = false; > int detectableOffsetInLine = 0; > int resultLength = 0; >@@ -101,8 +102,8 @@ > resultLength = endOffset - detectableOffsetInLine; > } > >- return fromLine.substring(detectableOffsetInLine, >- detectableOffsetInLine + resultLength); >+ return new Region(lineInfo.getOffset() + detectableOffsetInLine, >+ resultLength); > } > > protected URI detectProtocol(String uriString) { >@@ -166,16 +167,19 @@ > return null; > } > >- String detectedSubstring = detectSubstring(line, offset >+ IRegion detectedRegion = detectSubRegion(lineInfo, line, offset > - lineInfo.getOffset()); >+ if (detectedRegion == null) >+ return null; >+ > // Set and validate URL string >- URI uri = detectProtocol(detectedSubstring); >+ int detectedOffset = detectedRegion.getOffset() - lineInfo.getOffset(); >+ URI uri = detectProtocol(line.substring(detectedOffset, detectedOffset >+ + detectedRegion.getLength())); > if (uri == null) > return null; > >- return createHyperLinksForURI(new Region(lineInfo.getOffset() >- + line.indexOf(detectedSubstring), detectedSubstring.length()), >- uri); >+ return createHyperLinksForURI(detectedRegion, uri); > } > > }
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 198731
: 75620 |
75673