From 8bc461175ceded9ec872cff17d84fbce8fc4795d Mon Sep 17 00:00:00 2001 From: Paul Pazderski Date: Sat, 18 May 2019 23:39:58 +0200 Subject: Bug 547304 - [cleanup] Fix wrong space/tab indentation 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 --- .../org/eclipse/jface/text/AbstractDocument.java | 2 +- .../src/org/eclipse/jface/text/Assert.java | 2 +- .../src/org/eclipse/jface/text/GapTextStore.java | 4 +- .../src/org/eclipse/jface/text/IDocument.java | 4 +- .../jface/text/IDocumentPartitionerExtension2.java | 14 +-- .../org/eclipse/jface/text/ISynchronizable.java | 8 +- .../org/eclipse/jface/text/TreeLineTracker.java | 40 +++--- .../eclipse/jface/text/link/LinkedModeManager.java | 78 ++++++------ .../eclipse/jface/text/link/LinkedModeModel.java | 60 ++++----- .../jface/text/link/LinkedPositionGroup.java | 4 +- .../eclipse/jface/text/source/AnnotationMap.java | 138 ++++++++++----------- .../eclipse/jface/text/source/AnnotationModel.java | 52 ++++---- .../jface/text/templates/TemplateBuffer.java | 4 +- .../jface/text/templates/TemplateContextType.java | 32 ++--- .../jface/text/templates/TemplateVariable.java | 10 +- .../src/org/eclipse/text/edits/TextEditGroup.java | 4 +- .../eclipse/text/templates/TemplateStoreCore.java | 20 +-- 17 files changed, 238 insertions(+), 238 deletions(-) (limited to 'org.eclipse.text') 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 00bfb436589..458f0e515de 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> 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 7f3d71b687f..c0ca2e9242f 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 887a67ccde7..2ef08388946 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 fba0c365acd..02d83d0c486 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 null 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 null if line does not have a delimiter + * @return the line's delimiter or null 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 15bda870050..ef30c72baff 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 offset * @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. *

@@ -93,9 +93,9 @@ public interface IDocumentPartitionerExtension2 { * a delimited partition starting at offset * @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. *

@@ -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 46bad0fb8b6..5d0e92e2b54 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 * null 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 null. */ - void setLockObject(Object lockObject); + void setLockObject(Object lockObject); - /** + /** * Returns the lock object or null if there is none. Clients * should use the lock object in order to synchronize concurrent access to * the implementer. * * @return the lock object or null */ - 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 49216db2450..e4cdbee1e5c 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 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 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 1b5aabfc560..0a6b2f5e7d7 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 LinkedModeModel onto the top of - * the stack of environments managed by the receiver. If force - * is true, 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 true if nesting was successful, false otherwise (only possible if force is false - */ - 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 LinkedModeModel onto the top of + * the stack of environments managed by the receiver. If force + * is true, 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 true if nesting was successful, false otherwise (only possible if force is false + */ + 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 LinkedModeModel 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 c2485e65369..dac5e74998a 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 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 parent - * model. If yes, the parent model and its position that the receiver - * fits in are remembered. - * - * @param parent the parent model candidate - * @return true if the receiver can be nested into parent, false otherwise - */ - boolean canNestInto(LinkedModeModel parent) { - for (LinkedPositionGroup group : fGroups) { + * @return the set of documents affected by this model + */ + private IDocument[] getDocuments() { + Set 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 parent + * model. If yes, the parent model and its position that the receiver + * fits in are remembered. + * + * @param parent the parent model candidate + * @return true if the receiver can be nested into parent, false 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 3e416fab838..d16a3576e4d 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 17105ace2f3..97312b0a2b3 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 - * IAnnotationMap - */ - private Object fLockObject; - /** - * The internal lock object used if fLockObject is null. + /** + * The lock object used to synchronize the operations explicitly defined by + * IAnnotationMap + */ + private Object fLockObject; + /** + * The internal lock object used if fLockObject is null. * @since 3.2 */ - private final Object fInternalLockObject= new Object(); + private final Object fInternalLockObject= new Object(); - /** The map holding the annotations */ - private Map fInternalMap; + /** The map holding the annotations */ + private Map 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 valuesIterator() { - synchronized (getLockObject()) { - return new ArrayList<>(fInternalMap.values()).iterator(); - } - } + synchronized (getLockObject()) { + return new ArrayList<>(fInternalMap.values()).iterator(); + } + } - @Override + @Override public Iterator 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 39517429356..602545e49dc 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 fireModelChanged. - * - * @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 fireModelChanged. + * + * @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 5fa9ef3ed05..97aa7a65726 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 84711b37d8a..6a795f7129c 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 positions= variablesToPositions(variables); List 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 variablesToPositions(TemplateVariable[] variables) { - List positions= new ArrayList<>(5); + List 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 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 ddbd31f5470..d95a9a5a81d 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 53781afc606..b320a32528b 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 d32d2f9d078..08e80498154 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); -- cgit v1.2.3