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 155900 Details for
Bug 299416
AnnotationModel#isWithinRegion does not work for regions of the same offset as the region with a length of 0
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.
Possible patch that leaves -1 except for 0 length case
AnnotationModel.txt (text/plain), 1.67 KB, created by
Ian Tewksbury
on 2010-01-12 14:33:45 EST
(
hide
)
Description:
Possible patch that leaves -1 except for 0 length case
Filename:
MIME Type:
Creator:
Ian Tewksbury
Created:
2010-01-12 14:33:45 EST
Size:
1.67 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.text >Index: src/org/eclipse/jface/text/source/AnnotationModel.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java,v >retrieving revision 1.22 >diff -u -r1.22 AnnotationModel.java >--- src/org/eclipse/jface/text/source/AnnotationModel.java 12 Sep 2008 13:53:28 -0000 1.22 >+++ src/org/eclipse/jface/text/source/AnnotationModel.java 12 Jan 2010 19:37:00 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * Copyright (c) 2000, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -123,12 +123,20 @@ > private boolean isWithinRegion(int start, int length) { > if (fCanStartBefore && fCanEndAfter) > return fRegion.overlapsWith(start, length); >- else if (fCanStartBefore) >- return fRegion.includes(start + length - 1); >- else if (fCanEndAfter) >+ else if (fCanStartBefore) { >+ int end = start + length; >+ if(length > 0) >+ end =- 1; >+ >+ return fRegion.includes(end); >+ } else if (fCanEndAfter) > return fRegion.includes(start); >- else >- return fRegion.includes(start) && fRegion.includes(start + length - 1); >+ else { >+ int end = start + length; >+ if(length > 0) >+ end =- 1; >+ return fRegion.includes(start) && fRegion.includes(end); >+ } > } > } >
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 Raw
Flags:
daniel_megert
:
review-
Actions:
View
Attachments on
bug 299416
:
155900