### Eclipse Workspace Patch 1.0
#P org.eclipse.jdt.core
Index: model/org/eclipse/jdt/internal/core/JavadocContents.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocContents.java,v
retrieving revision 1.2.4.1
diff -u -r1.2.4.1 JavadocContents.java
--- model/org/eclipse/jdt/internal/core/JavadocContents.java 9 Aug 2010 09:44:39 -0000 1.2.4.1
+++ model/org/eclipse/jdt/internal/core/JavadocContents.java 17 Jan 2011 10:02:30 -0000
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2011 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
@@ -145,7 +145,7 @@
for (int i = 0; i < this.tempAnchorIndexesCount; i++) {
int anchorEndStart = this.tempAnchorIndexes[i];
- if (anchorEndStart != -1 && CharOperation.indexOf(anchor, this.content, false, anchorEndStart) == anchorEndStart) {
+ if (anchorEndStart != -1 && Util.prefixEquals(anchor, this.content, false, anchorEndStart)) {
this.tempAnchorIndexes[i] = -1;
@@ -165,7 +165,7 @@
this.tempLastAnchorFoundIndex = anchorEndStart;
- if (CharOperation.indexOf(anchor, this.content, false, anchorEndStart) == anchorEndStart) {
+ if (Util.prefixEquals(anchor, this.content, false, anchorEndStart)) {
return computeChildRange(anchorEndStart, anchor, indexOfSectionBottom);
} else {
if (this.tempAnchorIndexes.length == this.tempAnchorIndexesCount) {
Index: model/org/eclipse/jdt/internal/core/util/Util.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Util.java,v
retrieving revision 1.143
diff -u -r1.143 Util.java
--- model/org/eclipse/jdt/internal/core/util/Util.java 9 Apr 2010 13:38:05 -0000 1.143
+++ model/org/eclipse/jdt/internal/core/util/Util.java 17 Jan 2011 10:02:31 -0000
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 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
@@ -3621,4 +3621,60 @@
}
}
}
+
+ /**
+ * Answers true if the given name, starting from the given index, starts with the given prefix,
+ * false otherwise. isCaseSensitive is used to find out whether or not the comparison should be
+ * case sensitive.
+ *
+ *
+ * For example:
+ *
+ * prefix = { 'a' , 'B' } + * name = { 'c', 'd', 'a' , 'b', 'b', 'a', 'b', 'a' } + * startIndex = 2 + * isCaseSensitive = false + * result => true + *+ *
+ * prefix = { 'a' , 'B' } + * name = { 'c', 'd', 'a' , 'b', 'b', 'a', 'b', 'a' } + * startIndex = 2 + * isCaseSensitive = true + * result => false + *+ *