Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CPartitionerTest.java19
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/FastCPartitionScanner.java4
2 files changed, 20 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CPartitionerTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CPartitionerTest.java
index 33a4fc9e47..656a833102 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CPartitionerTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CPartitionerTest.java
@@ -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
@@ -1296,6 +1296,23 @@ public class CPartitionerTest extends TestCase {
}
}
+ public void testRawString_Bug352544() {
+ try {
+
+ fDocument.replace(0, fDocument.getLength(), "BAR\"(\";");
+ ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+ TypedRegion[] expectation= {
+ new TypedRegion(0, 3, IDocument.DEFAULT_CONTENT_TYPE),
+ new TypedRegion(3, 3, ICPartitions.C_STRING),
+ new TypedRegion(6, 1, IDocument.DEFAULT_CONTENT_TYPE),
+ };
+ checkPartitioning(expectation, result);
+
+ } catch (BadLocationException x) {
+ assertTrue(false);
+ }
+ }
+
public void testEditingRawString1() {
try {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/FastCPartitionScanner.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/FastCPartitionScanner.java
index 57b18b608b..ea24247447 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/FastCPartitionScanner.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/FastCPartitionScanner.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
@@ -388,7 +388,7 @@ public final class FastCPartitionScanner implements IPartitionTokenScanner, ICPa
consume();
break;
default:
- if ('a' <= ch && ch <= 'z' || 'A' <= ch && 'Z' <= ch || ch =='_') {
+ if ('a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch =='_') {
fLast = IDENT;
fTokenOffset++;
} else if ('0' <= ch && ch <= '9' && fLast == IDENT) {

Back to the top