Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-05-18 17:39:58 -0400
committerPaul Pazderski2019-05-19 19:44:04 -0400
commit8bc461175ceded9ec872cff17d84fbce8fc4795d (patch)
tree341effbc5c46d3376180e05cefa509d7d4ec270b /org.eclipse.text
parent9e7f66919496659795478f8cd80804da71498fff (diff)
downloadeclipse.platform.text-8bc461175ceded9ec872cff17d84fbce8fc4795d.tar.gz
eclipse.platform.text-8bc461175ceded9ec872cff17d84fbce8fc4795d.tar.xz
eclipse.platform.text-8bc461175ceded9ec872cff17d84fbce8fc4795d.zip
This change fixes space or mixed tab/space indentations in all Java files. This also includes two or three space indentations and even fix most stray single spaces in indentations. The change includes only whitespace formatting and no code changes. Change-Id: I3e7b6abb69a1894c402f9123417346a44fc0992a
Diffstat (limited to 'org.eclipse.text')
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java2
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/Assert.java2
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/GapTextStore.java4
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/IDocument.java4
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/IDocumentPartitionerExtension2.java14
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/ISynchronizable.java8
-rwxr-xr-xorg.eclipse.text/src/org/eclipse/jface/text/TreeLineTracker.java40
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeManager.java78
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java60
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java4
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java138
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java52
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateBuffer.java4
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContextType.java32
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateVariable.java10
-rw-r--r--org.eclipse.text/src/org/eclipse/text/edits/TextEditGroup.java4
-rw-r--r--org.eclipse.text/src/org/eclipse/text/templates/TemplateStoreCore.java20
17 files changed, 238 insertions, 238 deletions
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java b/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java
index 00bfb4365..458f0e515 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java
@@ -245,7 +245,7 @@ public abstract class AbstractDocument implements IDocument, IDocumentExtension,
* Returns all positions managed by the document grouped by category.
*
* @return the document's positions
- */
+ */
protected Map<String, List<Position>> getDocumentManagedPositions() {
return fPositions;
}
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/Assert.java b/org.eclipse.text/src/org/eclipse/jface/text/Assert.java
index 7f3d71b68..c0ca2e924 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/Assert.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/Assert.java
@@ -69,7 +69,7 @@ public final class Assert {
* @param detail the detailed message
*/
public AssertionFailedException(String detail) {
- super(detail);
+ super(detail);
}
}
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/GapTextStore.java b/org.eclipse.text/src/org/eclipse/jface/text/GapTextStore.java
index 887a67ccd..2ef083889 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/GapTextStore.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/GapTextStore.java
@@ -330,8 +330,8 @@ public class GapTextStore implements ITextStore {
* @since 3.3
*/
private char[] allocate(int size) {
- return new char[size];
- }
+ return new char[size];
+ }
/*
* Executes System.arraycopy if length != 0. A length < 0 cannot happen -> don't hide coding
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/IDocument.java b/org.eclipse.text/src/org/eclipse/jface/text/IDocument.java
index fba0c365a..02d83d0c4 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/IDocument.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/IDocument.java
@@ -628,10 +628,10 @@ public interface IDocument {
/**
* Returns the line delimiter of that line or <code>null</code> if the
- * line is not closed with a line delimiter.
+ * line is not closed with a line delimiter.
*
* @param line the line of interest
- * @return the line's delimiter or <code>null</code> if line does not have a delimiter
+ * @return the line's delimiter or <code>null</code> if line does not have a delimiter
* @exception BadLocationException if the line number is invalid in this document
*/
String getLineDelimiter(int line) throws BadLocationException;
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/IDocumentPartitionerExtension2.java b/org.eclipse.text/src/org/eclipse/jface/text/IDocumentPartitionerExtension2.java
index 15bda8700..ef30c72ba 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/IDocumentPartitionerExtension2.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/IDocumentPartitionerExtension2.java
@@ -48,9 +48,9 @@ public interface IDocumentPartitionerExtension2 {
String[] getManagingPositionCategories();
- /* zero-length partition support */
+ /* zero-length partition support */
- /**
+ /**
* Returns the content type of the partition containing the given offset in
* the connected document. There must be a document connected to this
* partitioner.
@@ -71,9 +71,9 @@ public interface IDocumentPartitionerExtension2 {
* a delimited partition starting at <code>offset</code>
* @return the content type of the offset's partition
*/
- String getContentType(int offset, boolean preferOpenPartitions);
+ String getContentType(int offset, boolean preferOpenPartitions);
- /**
+ /**
* Returns the partition containing the given offset of the connected
* document. There must be a document connected to this partitioner.
* <p>
@@ -93,9 +93,9 @@ public interface IDocumentPartitionerExtension2 {
* a delimited partition starting at <code>offset</code>
* @return the partition containing the offset
*/
- ITypedRegion getPartition(int offset, boolean preferOpenPartitions);
+ ITypedRegion getPartition(int offset, boolean preferOpenPartitions);
- /**
+ /**
* Returns the partitioning of the given range of the connected document.
* There must be a document connected to this partitioner.
* <p>
@@ -118,5 +118,5 @@ public interface IDocumentPartitionerExtension2 {
* partitioning
* @return the partitioning of the range
*/
- ITypedRegion[] computePartitioning(int offset, int length, boolean includeZeroLengthPartitions);
+ ITypedRegion[] computePartitioning(int offset, int length, boolean includeZeroLengthPartitions);
}
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/ISynchronizable.java b/org.eclipse.text/src/org/eclipse/jface/text/ISynchronizable.java
index 46bad0fb8..5d0e92e2b 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/ISynchronizable.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/ISynchronizable.java
@@ -29,7 +29,7 @@ package org.eclipse.jface.text;
*/
public interface ISynchronizable {
- /**
+ /**
* Sets the lock object for this object. If the lock object is not
* <code>null</code> subsequent calls to specified methods of this object
* are synchronized on this lock object. Which methods are synchronized is
@@ -41,14 +41,14 @@ public interface ISynchronizable {
*
* @param lockObject the lock object. May be <code>null</code>.
*/
- void setLockObject(Object lockObject);
+ void setLockObject(Object lockObject);
- /**
+ /**
* Returns the lock object or <code>null</code> if there is none. Clients
* should use the lock object in order to synchronize concurrent access to
* the implementer.
*
* @return the lock object or <code>null</code>
*/
- Object getLockObject();
+ Object getLockObject();
}
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/TreeLineTracker.java b/org.eclipse.text/src/org/eclipse/jface/text/TreeLineTracker.java
index 49216db24..e4cdbee1e 100755
--- a/org.eclipse.text/src/org/eclipse/jface/text/TreeLineTracker.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/TreeLineTracker.java
@@ -172,34 +172,34 @@ abstract class TreeLineTracker implements ILineTracker {
*
* @param tracker the list line tracker
*/
- TreeLineTracker(ListLineTracker tracker) {
- final List<Line> lines= tracker.getLines();
- final int n= lines.size();
- if (n == 0)
- return;
-
- Line line= lines.get(0);
- String delim= line.delimiter;
- if (delim == null)
- delim= NO_DELIM;
- int length= line.length;
- fRoot= new Node(length, delim);
- Node node= fRoot;
+ TreeLineTracker(ListLineTracker tracker) {
+ final List<Line> lines= tracker.getLines();
+ final int n= lines.size();
+ if (n == 0)
+ return;
+
+ Line line= lines.get(0);
+ String delim= line.delimiter;
+ if (delim == null)
+ delim= NO_DELIM;
+ int length= line.length;
+ fRoot= new Node(length, delim);
+ Node node= fRoot;
for (int i= 1; i < n; i++) {
- line= lines.get(i);
- delim= line.delimiter;
- if (delim == null)
- delim= NO_DELIM;
- length= line.length;
+ line= lines.get(i);
+ delim= line.delimiter;
+ if (delim == null)
+ delim= NO_DELIM;
+ length= line.length;
node= insertAfter(node, length, delim);
- }
+ }
if (node.delimiter != NO_DELIM)
insertAfter(node, 0, NO_DELIM);
if (ASSERT) checkTree();
- }
+ }
/**
* Returns the node (line) including a certain offset. If the offset is between two
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeManager.java b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeManager.java
index 1b5aabfc5..0a6b2f5e7 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeManager.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeManager.java
@@ -175,45 +175,45 @@ class LinkedModeManager {
}
}
- /**
- * Tries to nest the given <code>LinkedModeModel</code> onto the top of
- * the stack of environments managed by the receiver. If <code>force</code>
- * is <code>true</code>, any environments on the stack that create a conflict
- * are killed.
- *
- * @param model the model to nest
- * @param force whether to force the addition of the model
- * @return <code>true</code> if nesting was successful, <code>false</code> otherwise (only possible if <code>force</code> is <code>false</code>
- */
- public boolean nestEnvironment(LinkedModeModel model, boolean force) {
- Assert.isNotNull(model);
-
- try {
- while (true) {
- if (fEnvironments.isEmpty()) {
- model.addLinkingListener(fListener);
- fEnvironments.push(model);
- return true;
- }
-
- LinkedModeModel top= fEnvironments.peek();
- if (model.canNestInto(top)) {
- model.addLinkingListener(fListener);
- fEnvironments.push(model);
- return true;
- } else if (!force) {
- return false;
- } else { // force
- fEnvironments.pop();
- top.exit(ILinkedModeListener.NONE);
- // continue;
- }
- }
- } finally {
- // if we remove any, make sure the new one got inserted
- Assert.isTrue(fEnvironments.size() > 0);
- }
- }
+ /**
+ * Tries to nest the given <code>LinkedModeModel</code> onto the top of
+ * the stack of environments managed by the receiver. If <code>force</code>
+ * is <code>true</code>, any environments on the stack that create a conflict
+ * are killed.
+ *
+ * @param model the model to nest
+ * @param force whether to force the addition of the model
+ * @return <code>true</code> if nesting was successful, <code>false</code> otherwise (only possible if <code>force</code> is <code>false</code>
+ */
+ public boolean nestEnvironment(LinkedModeModel model, boolean force) {
+ Assert.isNotNull(model);
+
+ try {
+ while (true) {
+ if (fEnvironments.isEmpty()) {
+ model.addLinkingListener(fListener);
+ fEnvironments.push(model);
+ return true;
+ }
+
+ LinkedModeModel top= fEnvironments.peek();
+ if (model.canNestInto(top)) {
+ model.addLinkingListener(fListener);
+ fEnvironments.push(model);
+ return true;
+ } else if (!force) {
+ return false;
+ } else { // force
+ fEnvironments.pop();
+ top.exit(ILinkedModeListener.NONE);
+ // continue;
+ }
+ }
+ } finally {
+ // if we remove any, make sure the new one got inserted
+ Assert.isTrue(fEnvironments.size() > 0);
+ }
+ }
/**
* Returns the <code>LinkedModeModel</code> that is on top of the stack of
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java
index c2485e653..dac5e7499 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedModeModel.java
@@ -505,8 +505,8 @@ public class LinkedModeModel {
// register positions
try {
for (LinkedPositionGroup group : fGroups) {
- group.register(this);
- }
+ group.register(this);
+ }
return true;
} catch (BadLocationException e){
// if we fail to add, make sure to release all listeners again
@@ -520,7 +520,7 @@ public class LinkedModeModel {
* model, throws an IllegalStateException otherwise.
*/
private void enforceNotEmpty() {
- boolean hasPosition= false;
+ boolean hasPosition= false;
for (LinkedPositionGroup linkedPositionGroup : fGroups)
if (!linkedPositionGroup.isEmpty()) {
hasPosition= true;
@@ -529,42 +529,42 @@ public class LinkedModeModel {
if (!hasPosition)
throw new IllegalStateException("must specify at least one linked position"); //$NON-NLS-1$
- }
+ }
- /**
+ /**
* Collects all the documents that contained positions are set upon.
- * @return the set of documents affected by this model
- */
- private IDocument[] getDocuments() {
- Set<IDocument> docs= new HashSet<>();
- for (LinkedPositionGroup group : fGroups) {
- docs.addAll(Arrays.asList(group.getDocuments()));
- }
- return docs.toArray(new IDocument[docs.size()]);
- }
-
- /**
- * Returns whether the receiver can be nested into the given <code>parent</code>
- * model. If yes, the parent model and its position that the receiver
- * fits in are remembered.
- *
- * @param parent the parent model candidate
- * @return <code>true</code> if the receiver can be nested into <code>parent</code>, <code>false</code> otherwise
- */
- boolean canNestInto(LinkedModeModel parent) {
- for (LinkedPositionGroup group : fGroups) {
+ * @return the set of documents affected by this model
+ */
+ private IDocument[] getDocuments() {
+ Set<IDocument> docs= new HashSet<>();
+ for (LinkedPositionGroup group : fGroups) {
+ docs.addAll(Arrays.asList(group.getDocuments()));
+ }
+ return docs.toArray(new IDocument[docs.size()]);
+ }
+
+ /**
+ * Returns whether the receiver can be nested into the given <code>parent</code>
+ * model. If yes, the parent model and its position that the receiver
+ * fits in are remembered.
+ *
+ * @param parent the parent model candidate
+ * @return <code>true</code> if the receiver can be nested into <code>parent</code>, <code>false</code> otherwise
+ */
+ boolean canNestInto(LinkedModeModel parent) {
+ for (LinkedPositionGroup group : fGroups) {
if (!enforceNestability(group, parent)) {
fParentPosition= null;
return false;
}
}
- Assert.isNotNull(fParentPosition);
- fParentEnvironment= parent;
- return true;
- }
+ Assert.isNotNull(fParentPosition);
+ fParentEnvironment= parent;
+ return true;
+ }
- /**
+ /**
* Called by nested models when a group is added to them. All
* positions in all groups of a nested model have to fit inside a
* single position in the parent model.
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java
index 3e416fab8..d16a3576e 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/link/LinkedPositionGroup.java
@@ -321,8 +321,8 @@ public class LinkedPositionGroup {
void register(LinkedModeModel model) throws BadLocationException {
for (LinkedPosition pos : fPositions) {
- model.register(pos);
- }
+ model.register(pos);
+ }
}
/**
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java b/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java
index 17105ace2..97312b0a2 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java
@@ -31,103 +31,103 @@ import org.eclipse.jface.text.Position;
*/
class AnnotationMap implements IAnnotationMap {
- /**
- * The lock object used to synchronize the operations explicitly defined by
- * <code>IAnnotationMap</code>
- */
- private Object fLockObject;
- /**
- * The internal lock object used if <code>fLockObject</code> is <code>null</code>.
+ /**
+ * The lock object used to synchronize the operations explicitly defined by
+ * <code>IAnnotationMap</code>
+ */
+ private Object fLockObject;
+ /**
+ * The internal lock object used if <code>fLockObject</code> is <code>null</code>.
* @since 3.2
*/
- private final Object fInternalLockObject= new Object();
+ private final Object fInternalLockObject= new Object();
- /** The map holding the annotations */
- private Map<Annotation, Position> fInternalMap;
+ /** The map holding the annotations */
+ private Map<Annotation, Position> fInternalMap;
- /**
- * Creates a new annotation map with the given capacity.
- *
- * @param capacity the capacity
- */
- public AnnotationMap(int capacity) {
- fInternalMap= new HashMap<>(capacity);
- }
+ /**
+ * Creates a new annotation map with the given capacity.
+ *
+ * @param capacity the capacity
+ */
+ public AnnotationMap(int capacity) {
+ fInternalMap= new HashMap<>(capacity);
+ }
- @Override
+ @Override
public synchronized void setLockObject(Object lockObject) {
- fLockObject= lockObject;
- }
+ fLockObject= lockObject;
+ }
- @Override
+ @Override
public synchronized Object getLockObject() {
- if (fLockObject == null)
- return fInternalLockObject;
- return fLockObject;
- }
+ if (fLockObject == null)
+ return fInternalLockObject;
+ return fLockObject;
+ }
- @Override
+ @Override
public Iterator<Position> valuesIterator() {
- synchronized (getLockObject()) {
- return new ArrayList<>(fInternalMap.values()).iterator();
- }
- }
+ synchronized (getLockObject()) {
+ return new ArrayList<>(fInternalMap.values()).iterator();
+ }
+ }
- @Override
+ @Override
public Iterator<Annotation> keySetIterator() {
- synchronized (getLockObject()) {
- return new ArrayList<>(fInternalMap.keySet()).iterator();
- }
- }
+ synchronized (getLockObject()) {
+ return new ArrayList<>(fInternalMap.keySet()).iterator();
+ }
+ }
- @Override
+ @Override
public boolean containsKey(Object annotation) {
- synchronized (getLockObject()) {
- return fInternalMap.containsKey(annotation);
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.containsKey(annotation);
+ }
+ }
- @Override
+ @Override
public Position put(Annotation annotation, Position position) {
- synchronized (getLockObject()) {
- return fInternalMap.put(annotation, position);
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.put(annotation, position);
+ }
+ }
- @Override
+ @Override
public Position get(Object annotation) {
- synchronized (getLockObject()) {
- return fInternalMap.get(annotation);
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.get(annotation);
+ }
+ }
- @Override
+ @Override
public void clear() {
- synchronized (getLockObject()) {
- fInternalMap.clear();
- }
- }
+ synchronized (getLockObject()) {
+ fInternalMap.clear();
+ }
+ }
- @Override
+ @Override
public Position remove(Object annotation) {
- synchronized (getLockObject()) {
- return fInternalMap.remove(annotation);
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.remove(annotation);
+ }
+ }
- @Override
+ @Override
public int size() {
- synchronized (getLockObject()) {
- return fInternalMap.size();
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.size();
+ }
+ }
- @Override
+ @Override
public boolean isEmpty() {
- synchronized (getLockObject()) {
+ synchronized (getLockObject()) {
return fInternalMap.isEmpty();
}
- }
+ }
@Override
public boolean containsValue(Object value) {
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java b/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java
index 395174293..602545e49 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java
@@ -330,33 +330,33 @@ public class AnnotationModel implements IAnnotationModel, IAnnotationModelExtens
return (IAnnotationMap) fAnnotations;
}
- @Override
+ @Override
public Object getLockObject() {
- return getAnnotationMap().getLockObject();
- }
+ return getAnnotationMap().getLockObject();
+ }
- @Override
+ @Override
public void setLockObject(Object lockObject) {
- getAnnotationMap().setLockObject(lockObject);
- }
-
- /**
- * Returns the current annotation model event. This is the event that will be sent out
- * when calling <code>fireModelChanged</code>.
- *
- * @return the current annotation model event
- * @since 3.0
- */
- protected final AnnotationModelEvent getAnnotationModelEvent() {
- synchronized (getLockObject()) {
- if (fModelEvent == null) {
- fModelEvent= createAnnotationModelEvent();
- fModelEvent.markWorldChange(false);
- fModificationStamp= new Object();
- }
- return fModelEvent;
- }
- }
+ getAnnotationMap().setLockObject(lockObject);
+ }
+
+ /**
+ * Returns the current annotation model event. This is the event that will be sent out
+ * when calling <code>fireModelChanged</code>.
+ *
+ * @return the current annotation model event
+ * @since 3.0
+ */
+ protected final AnnotationModelEvent getAnnotationModelEvent() {
+ synchronized (getLockObject()) {
+ if (fModelEvent == null) {
+ fModelEvent= createAnnotationModelEvent();
+ fModelEvent.markWorldChange(false);
+ fModificationStamp= new Object();
+ }
+ return fModelEvent;
+ }
+ }
@Override
public void addAnnotation(Annotation annotation, Position position) {
@@ -442,9 +442,9 @@ public class AnnotationModel implements IAnnotationModel, IAnnotationModelExtens
IAnnotationModelListenerExtension extension= (IAnnotationModelListenerExtension) listener;
AnnotationModelEvent event= createAnnotationModelEvent();
event.markSealed();
- extension.modelChanged(event);
+ extension.modelChanged(event);
} else
- listener.modelChanged(this);
+ listener.modelChanged(this);
}
}
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateBuffer.java b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateBuffer.java
index 5fa9ef3ed..97aa7a657 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateBuffer.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateBuffer.java
@@ -36,9 +36,9 @@ public final class TemplateBuffer {
* @param string the string
* @param variables the variable positions
*/
- public TemplateBuffer(String string, TemplateVariable[] variables) {
+ public TemplateBuffer(String string, TemplateVariable[] variables) {
setContent(string, variables);
- }
+ }
/**
* Sets the content of the template buffer.
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContextType.java b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContextType.java
index 84711b37d..6a795f712 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContextType.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContextType.java
@@ -85,7 +85,7 @@ public class TemplateContextType {
* @return the id of the receiver
*/
public String getId() {
- return fId;
+ return fId;
}
@@ -235,9 +235,9 @@ public class TemplateContextType {
List<RangeMarker> positions= variablesToPositions(variables);
List<ReplaceEdit> edits= new ArrayList<>(5);
- // iterate over all variables and try to resolve them
- for (int i= 0; i != variables.length; i++) {
- TemplateVariable variable= variables[i];
+ // iterate over all variables and try to resolve them
+ for (int i= 0; i != variables.length; i++) {
+ TemplateVariable variable= variables[i];
if (!variable.isResolved())
resolve(variable, context);
@@ -248,18 +248,18 @@ public class TemplateContextType {
for (int k= 0; k != offsets.length; k++)
edits.add(new ReplaceEdit(offsets[k], variable.getInitialLength(), value));
- }
+ }
- IDocument document= new Document(buffer.getString());
- MultiTextEdit edit= new MultiTextEdit(0, document.getLength());
- edit.addChildren(positions.toArray(new TextEdit[positions.size()]));
- edit.addChildren(edits.toArray(new TextEdit[edits.size()]));
- edit.apply(document, TextEdit.UPDATE_REGIONS);
+ IDocument document= new Document(buffer.getString());
+ MultiTextEdit edit= new MultiTextEdit(0, document.getLength());
+ edit.addChildren(positions.toArray(new TextEdit[positions.size()]));
+ edit.addChildren(edits.toArray(new TextEdit[edits.size()]));
+ edit.apply(document, TextEdit.UPDATE_REGIONS);
positionsToVariables(positions, variables);
- buffer.setContent(document.get(), variables);
- }
+ buffer.setContent(document.get(), variables);
+ }
/**
* Resolves a single variable in a context. Resolving is delegated to the registered resolver.
@@ -277,10 +277,10 @@ public class TemplateContextType {
}
private static List<RangeMarker> variablesToPositions(TemplateVariable[] variables) {
- List<RangeMarker> positions= new ArrayList<>(5);
+ List<RangeMarker> positions= new ArrayList<>(5);
for (int i= 0; i != variables.length; i++) {
- int[] offsets= variables[i].getOffsets();
- for (int j= 0; j != offsets.length; j++)
+ int[] offsets= variables[i].getOffsets();
+ for (int j= 0; j != offsets.length; j++)
positions.add(new RangeMarker(offsets[j], 0));
}
@@ -291,7 +291,7 @@ public class TemplateContextType {
Iterator<RangeMarker> iterator= positions.iterator();
for (int i= 0; i != variables.length; i++) {
- TemplateVariable variable= variables[i];
+ TemplateVariable variable= variables[i];
int[] offsets= new int[variable.getOffsets().length];
for (int j= 0; j != offsets.length; j++)
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateVariable.java b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateVariable.java
index ddbd31f54..d95a9a5a8 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateVariable.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateVariable.java
@@ -141,7 +141,7 @@ public class TemplateVariable {
* @return the type name of the variable
*/
public String getType() {
- return fType.getName();
+ return fType.getName();
}
/**
@@ -160,7 +160,7 @@ public class TemplateVariable {
* @return the name of the variable
*/
public String getName() {
- return fName;
+ return fName;
}
/**
@@ -251,9 +251,9 @@ public class TemplateVariable {
* @param unambiguous the new unambiguous state of the variable
*/
public void setUnambiguous(boolean unambiguous) {
- fIsUnambiguous= unambiguous;
- if (unambiguous)
- setResolved(true);
+ fIsUnambiguous= unambiguous;
+ if (unambiguous)
+ setResolved(true);
}
/**
diff --git a/org.eclipse.text/src/org/eclipse/text/edits/TextEditGroup.java b/org.eclipse.text/src/org/eclipse/text/edits/TextEditGroup.java
index 53781afc6..b320a3252 100644
--- a/org.eclipse.text/src/org/eclipse/text/edits/TextEditGroup.java
+++ b/org.eclipse.text/src/org/eclipse/text/edits/TextEditGroup.java
@@ -110,7 +110,7 @@ public class TextEditGroup {
* @since 3.3
*/
public boolean removeTextEdit(TextEdit edit) {
- return fEdits.remove(edit);
+ return fEdits.remove(edit);
}
/**
@@ -119,7 +119,7 @@ public class TextEditGroup {
* @since 3.3
*/
public void clearTextEdits() {
- fEdits.clear();
+ fEdits.clear();
}
diff --git a/org.eclipse.text/src/org/eclipse/text/templates/TemplateStoreCore.java b/org.eclipse.text/src/org/eclipse/text/templates/TemplateStoreCore.java
index d32d2f9d0..08e804981 100644
--- a/org.eclipse.text/src/org/eclipse/text/templates/TemplateStoreCore.java
+++ b/org.eclipse.text/src/org/eclipse/text/templates/TemplateStoreCore.java
@@ -127,16 +127,16 @@ public class TemplateStoreCore {
@Override
public void preferenceChange(PreferenceChangeEvent event) {
/*
- * Don't load if we are in the process of saving ourselves. We are in sync anyway after the
- * save operation, and clients may trigger reloading by listening to preference store
- * updates.
- */
- if (!fIgnorePreferenceStoreChanges && fKey.equals(event.getKey()))
- try {
- load();
- } catch (IOException x) {
- handleException(x);
- }
+ * Don't load if we are in the process of saving ourselves. We are in sync anyway after the
+ * save operation, and clients may trigger reloading by listening to preference store
+ * updates.
+ */
+ if (!fIgnorePreferenceStoreChanges && fKey.equals(event.getKey()))
+ try {
+ load();
+ } catch (IOException x) {
+ handleException(x);
+ }
}
};
fPreferenceStore.addPreferenceChangeListener(fPropertyListener);

Back to the top