Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2008-09-11 12:01:34 +0000
committerDani Megert2008-09-11 12:01:34 +0000
commit632fd1ce2f0a9ab9359727ceae521e223ae22973 (patch)
treeb584161996bfb35f9dd2e5dd5ebf1ca5b15493d3 /org.eclipse.jface.text/projection/org/eclipse
parentecd77176ea6b00c6d7f9f6d751105808d9309158 (diff)
downloadeclipse.platform.text-632fd1ce2f0a9ab9359727ceae521e223ae22973.tar.gz
eclipse.platform.text-632fd1ce2f0a9ab9359727ceae521e223ae22973.tar.xz
eclipse.platform.text-632fd1ce2f0a9ab9359727ceae521e223ae22973.zip
Removed trailing whitespace and organized the importsv20080909-ascu
Diffstat (limited to 'org.eclipse.jface.text/projection/org/eclipse')
-rw-r--r--org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotation.java6
-rw-r--r--org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotationHover.java6
-rw-r--r--org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotationModel.java4
-rw-r--r--org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionSummary.java8
-rw-r--r--org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionSupport.java2
-rw-r--r--org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java46
-rw-r--r--org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/SourceViewerInformationControl.java8
7 files changed, 40 insertions, 40 deletions
diff --git a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotation.java b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotation.java
index d3666b724f2..c7934c3090f 100644
--- a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotation.java
+++ b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotation.java
@@ -98,11 +98,11 @@ public class ProjectionAnnotation extends Annotation implements IAnnotationPrese
private void drawRangeIndication(GC gc, Canvas canvas, Rectangle r) {
final int MARGIN= 3;
-
+
/* cap the height - at least on GTK, large numbers are converted to
* negatives at some point */
int height= Math.min(r.y + r.height - MARGIN, canvas.getSize().y);
-
+
gc.setForeground(canvas.getDisplay().getSystemColor(COLOR));
gc.setLineWidth(0); // NOTE: 0 means width is 1 but with optimized performance
gc.drawLine(r.x + 4, r.y + 12, r.x + 4, height);
@@ -120,7 +120,7 @@ public class ProjectionAnnotation extends Annotation implements IAnnotationPrese
FontMetrics fontMetrics= gc.getFontMetrics();
int delta= (fontMetrics.getHeight() - image.getBounds().height)/2;
rectangle.y += delta;
- rectangle.height -= delta;
+ rectangle.height -= delta;
drawRangeIndication(gc, canvas, rectangle);
}
}
diff --git a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotationHover.java b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotationHover.java
index 4345a5f9859..a65d06a9c40 100644
--- a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotationHover.java
+++ b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotationHover.java
@@ -38,8 +38,8 @@ import org.eclipse.jface.text.source.LineRange;
* @since 3.0
*/
class ProjectionAnnotationHover implements IAnnotationHover, IAnnotationHoverExtension, IInformationProviderExtension2 {
-
-
+
+
private IInformationControlCreator fInformationControlCreator;
private IInformationControlCreator fInformationPresenterControlCreator;
@@ -51,7 +51,7 @@ class ProjectionAnnotationHover implements IAnnotationHover, IAnnotationHoverExt
public void setHoverControlCreator(IInformationControlCreator creator) {
fInformationControlCreator= creator;
}
-
+
/**
* Sets the information presenter control creator for this projection annotation hover.
*
diff --git a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotationModel.java b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotationModel.java
index e335412e4c3..a40bedb601e 100644
--- a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotationModel.java
+++ b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotationModel.java
@@ -102,7 +102,7 @@ public class ProjectionAnnotationModel extends AnnotationModel {
/**
* Collapses all annotations that overlap with the given range and are collapsed.
- *
+ *
* @param offset the range offset
* @param length the range length
* @return <code>true</code> if any annotation has been collapse, <code>false</code>
@@ -131,7 +131,7 @@ public class ProjectionAnnotationModel extends AnnotationModel {
return collapsing;
}
-
+
/**
* Expands all annotations that overlap with the given range and are collapsed. Fires a model change event if
* requested.
diff --git a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionSummary.java b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionSummary.java
index b7fb7ef7457..7dea0cd6d7e 100644
--- a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionSummary.java
+++ b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionSummary.java
@@ -10,15 +10,15 @@
*******************************************************************************/
package org.eclipse.jface.text.source.projection;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ISynchronizable;
@@ -166,7 +166,7 @@ class ProjectionSummary {
removeSummaries(monitor);
-
+
if (isCanceled(monitor))
return;
diff --git a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionSupport.java b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionSupport.java
index 00a40f2a80b..c322099d947 100644
--- a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionSupport.java
+++ b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionSupport.java
@@ -228,7 +228,7 @@ public class ProjectionSupport {
public void setHoverControlCreator(IInformationControlCreator creator) {
fInformationControlCreator= creator;
}
-
+
/**
* Sets the information presenter control creator that is used for the annotation
* hovers that are shown in the projection viewer's projection ruler column.
diff --git a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java
index dbd223f8d93..44cf75420e5 100644
--- a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java
+++ b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java
@@ -76,7 +76,7 @@ import org.eclipse.jface.text.source.SourceViewer;
* @noextend This class is not intended to be subclassed by clients.
*/
public class ProjectionViewer extends SourceViewer implements ITextViewerExtension5 {
-
+
private static final int BASE= INFORMATION; // see ISourceViewer.INFORMATION
@@ -91,7 +91,7 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
public static final int EXPAND_ALL= BASE + 4;
/**
* Operation constant for the collapse all operation.
- *
+ *
* @since 3.2
*/
public static final int COLLAPSE_ALL= BASE + 5;
@@ -305,10 +305,10 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
* @since 3.1
*/
private int fDeletedLines;
-
+
/**
* The listener for document rewrite sessions.
- *
+ *
* @since 3.5
*/
private final IDocumentRewriteSessionListener fSessionListener= new ProjectionDocumentRewriteSessionListener();
@@ -406,10 +406,10 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
IDocumentExtension4 ext= (IDocumentExtension4)document;
ext.addDocumentRewriteSessionListener(fSessionListener);
}
-
+
if (wasProjectionEnabled && document != null)
enableProjection();
-
+
}
@@ -705,11 +705,11 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
}
}
}
-
+
/**
* Returns the first line offset &lt;= <code>offset</code>. If <code>testLastLine</code>
* is <code>true</code> and the offset is on last line then <code>offset</code> is returned.
- *
+ *
* @param document the document
* @param offset the master document offset
* @param testLastLine <code>true</code> if the test for the last line should be performed
@@ -720,10 +720,10 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
private int toLineStart(IDocument document, int offset, boolean testLastLine) throws BadLocationException {
if (document == null)
return offset;
-
+
if (testLastLine && offset >= document.getLineInformationOfOffset(document.getLength() - 1).getOffset())
return offset;
-
+
return document.getLineInformationOfOffset(offset).getOffset();
}
@@ -861,7 +861,7 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
/**
* Makes the given range visible again while not changing the folding state of any contained
* ranges. If requested, a redraw request is issued.
- *
+ *
* @param offset the offset of the range to be expanded
* @param length the length of the range to be expanded
* @param fireRedraw <code>true</code> if a redraw request should be issued,
@@ -963,11 +963,11 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
}
}
}
-
+
/**
* Tests whether the visible document's master document
* is identical to this viewer's document.
- *
+ *
* @return <code>true</code> if the visible document's master is
* identical to this viewer's document
* @since 3.1
@@ -986,7 +986,7 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
* @exception BadLocationException in case the annotation model event is no longer in synchronization with the document
*/
private void catchupWithProjectionAnnotationModel(AnnotationModelEvent event) throws BadLocationException {
-
+
if (event == null || !isVisibleMasterDocumentSameAsDocument()) {
fPendingAnnotationWorldChange= false;
@@ -1006,24 +1006,24 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
reinitializeProjection();
}
} else {
-
+
Annotation[] addedAnnotations= event.getAddedAnnotations();
Annotation[] changedAnnotation= event.getChangedAnnotations();
Annotation[] removedAnnotations= event.getRemovedAnnotations();
-
+
fCommandQueue= new ProjectionCommandQueue();
-
+
boolean isRedrawing= redraws();
int topIndex= isRedrawing ? getTopIndex() : -1;
-
+
processDeletions(event, removedAnnotations, true);
List coverage= new ArrayList();
processChanges(addedAnnotations, true, coverage);
processChanges(changedAnnotation, true, coverage);
-
+
ProjectionCommandQueue commandQueue= fCommandQueue;
fCommandQueue= null;
-
+
if (commandQueue.passedRedrawCostsThreshold()) {
setRedraw(false);
try {
@@ -1133,7 +1133,7 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
IDocument document= getDocument();
if (document == null)
return null;
-
+
int line= document.getLineOfOffset(position.getOffset());
int offset= document.getLineOffset(line + 1);
@@ -1478,7 +1478,7 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
selection= getSelectedRange();
if (exposeModelRange(new Region(selection.x, selection.y)))
return;
-
+
if (selection.y == 0)
copyMarkedRegion(true);
else
@@ -1536,7 +1536,7 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
if (redraws())
collapseAll();
break;
-
+
case COLLAPSE:
if (redraws()) {
collapse();
diff --git a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/SourceViewerInformationControl.java b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/SourceViewerInformationControl.java
index 8d13f88fc77..92882fccd13 100644
--- a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/SourceViewerInformationControl.java
+++ b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/SourceViewerInformationControl.java
@@ -78,7 +78,7 @@ class SourceViewerInformationControl implements IInformationControl, IInformatio
* styles are applied to the created shell. The given styles are applied to the created styled
* text widget. The text widget will be initialized with the given font. The status field will
* contain the given text or be hidden.
- *
+ *
* @param parent the parent shell
* @param isResizable <code>true</code> if resizable
* @param symbolicFontName the symbolic font name
@@ -336,7 +336,7 @@ class SourceViewerInformationControl implements IInformationControl, IInformatio
public boolean hasContents() {
return fText.getCharCount() > 0;
}
-
+
/*
* @see org.eclipse.jface.text.IInformationControlExtension3#computeTrim()
* @since 3.4
@@ -349,7 +349,7 @@ class SourceViewerInformationControl implements IInformationControl, IInformatio
/**
* Adds the internal trimmings to the given trim of the shell.
- *
+ *
* @param trim the shell's trim, will be updated
* @since 3.4
*/
@@ -418,7 +418,7 @@ class SourceViewerInformationControl implements IInformationControl, IInformatio
public boolean isVisible() {
return fShell != null && !fShell.isDisposed() && fShell.isVisible();
}
-
+
/*
* @see org.eclipse.jface.text.IInformationControlExtension5#computeSizeConstraints(int, int)
*/

Back to the top