Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2012-03-12 14:46:23 +0000
committerDani Megert2012-03-12 14:46:23 +0000
commit71d390104fa841ee4ef08b068f78a060ecabb019 (patch)
tree8c0d62244f87789717df13696ec222903a01ef08
parentab31f1a2507f1497a0f78a48fe2faaed037040c4 (diff)
downloadeclipse.platform.text-71d390104fa841ee4ef08b068f78a060ecabb019.tar.gz
eclipse.platform.text-71d390104fa841ee4ef08b068f78a060ecabb019.tar.xz
eclipse.platform.text-71d390104fa841ee4ef08b068f78a060ecabb019.zip
Revert "fTextStore doesn't need to be protected"v20120312-1446
-rw-r--r--org.eclipse.text.tests/src/org/eclipse/text/tests/CopyOnWriteTextStoreTest.java8
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java4
2 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.text.tests/src/org/eclipse/text/tests/CopyOnWriteTextStoreTest.java b/org.eclipse.text.tests/src/org/eclipse/text/tests/CopyOnWriteTextStoreTest.java
index 2fc930e2eb6..589aa7b3367 100644
--- a/org.eclipse.text.tests/src/org/eclipse/text/tests/CopyOnWriteTextStoreTest.java
+++ b/org.eclipse.text.tests/src/org/eclipse/text/tests/CopyOnWriteTextStoreTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
+ * Copyright (c) 2005, 2008 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
@@ -31,7 +31,7 @@ public class CopyOnWriteTextStoreTest extends TestCase {
super(new GapTextStore());
}
ITextStore getStore() {
- return (ITextStore)new Accessor(this, CopyOnWriteTextStore.class).get("fTextStore");
+ return fTextStore;
}
String get() {
return get(0, getLength());
@@ -68,7 +68,7 @@ public class CopyOnWriteTextStoreTest extends TestCase {
// check that underlying text store is not modifiable
boolean failed= false;
try {
- fText.getStore().replace(0, 0, null);
+ fText.getStore().replace(0,0,null);
} catch (UnsupportedOperationException uoe) {
failed= true;
}
@@ -91,7 +91,7 @@ public class CopyOnWriteTextStoreTest extends TestCase {
// check that underlying text store is not modifiable
boolean failed= false;
try {
- fText.getStore().replace(0, 0, null);
+ fText.getStore().replace(0,0,null);
} catch (UnsupportedOperationException uoe) {
failed= true;
}
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java b/org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java
index acbe1e266af..7bb46eed83e 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -107,7 +107,7 @@ public class CopyOnWriteTextStore implements ITextStore {
}
/** The underlying "real" text store */
- private ITextStore fTextStore;
+ protected ITextStore fTextStore= new StringTextStore();
/** A modifiable <code>ITextStore</code> instance */
private final ITextStore fModifiableTextStore;

Back to the top