Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jface.text/src/org/eclipse/jface/internal')
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContentAssistant2.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/LineIndexOutOfBoundsException.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java126
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionSelectionProvider.java130
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/source/DiffPainter.java6
8 files changed, 136 insertions, 136 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java
index 777850d2fc8..ea232664e09 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java
@@ -50,7 +50,7 @@ public abstract class SingleCharReader extends Reader {
/**
* @see Reader#ready()
*/
- @Override
+ @Override
public boolean ready() throws IOException {
return true;
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java
index 4e1a0c0ece8..dea4d1d26f8 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java
@@ -131,7 +131,7 @@ public abstract class SubstitutionTextReader extends SingleCharReader {
/**
* @see Reader#ready()
*/
- @Override
+ @Override
public boolean ready() throws IOException {
return fReader.ready();
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContentAssistant2.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContentAssistant2.java
index 8ea4fae1230..38c6be651ea 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContentAssistant2.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContentAssistant2.java
@@ -1541,7 +1541,7 @@ public class ContentAssistant2 implements IContentAssistant, IContentAssistantEx
* @since 3.4
*/
boolean isColoredLabelsSupportEnabled() {
- return fIsColoredLabelsSupportEnabled;
+ return fIsColoredLabelsSupportEnabled;
}
/**
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java
index b89eaec75fb..5dda118d83c 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java
@@ -564,7 +564,7 @@ class ContextInformationPopup2 implements IContentAssistListener2 {
} else if (key == SWT.ESC) {
e.doit= false;
- hideContextInfoPopup();
+ hideContextInfoPopup();
} else {
validateContextInformation();
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/LineIndexOutOfBoundsException.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/LineIndexOutOfBoundsException.java
index bc95f338820..83fa56f0cd2 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/LineIndexOutOfBoundsException.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/LineIndexOutOfBoundsException.java
@@ -30,7 +30,7 @@ public final class LineIndexOutOfBoundsException extends IndexOutOfBoundsExcepti
super();
}
- /**
+ /**
* Constructs an <code>LineIndexOutOfBoundsException</code> with the specified detail message.
*
* @param s the detail message.
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java
index 0bb4492361d..0daf9b69e00 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java
@@ -285,7 +285,7 @@ public final class RevisionPainter {
updateFocusRevision(null); // kill any focus as the ctx menu is going to show
if (e.button == 1) {
fMouseDownRegion= fFocusRange;
- postRedraw();
+ postRedraw();
}
}
@@ -351,41 +351,41 @@ public final class RevisionPainter {
@Override
protected IInformationControl doCreateInformationControl(Shell parent) {
if (BrowserInformationControl.isAvailable(parent)) {
- return new BrowserInformationControl(parent, JFaceResources.DIALOG_FONT, fIsFocusable) {
- /**
+ return new BrowserInformationControl(parent, JFaceResources.DIALOG_FONT, fIsFocusable) {
+ /**
* {@inheritDoc}
*
* @deprecated use {@link #setInput(Object)}
*/
- @Deprecated
+ @Deprecated
@Override
public void setInformation(String content) {
- content= addCSSToHTMLFragment(content);
- super.setInformation(content);
- }
-
- /**
- * Adds a HTML header and CSS info if <code>html</code> is only an HTML fragment (has no
- * &lt;html&gt; section).
- *
- * @param html the html / text produced by a revision
- * @return modified html
- */
- private String addCSSToHTMLFragment(String html) {
- int max= Math.min(100, html.length());
- if (html.substring(0, max).indexOf("<html>") != -1) //$NON-NLS-1$
- // there is already a header
- return html;
-
- StringBuilder info= new StringBuilder(512 + html.length());
- HTMLPrinter.insertPageProlog(info, 0, fgStyleSheet);
- info.append(html);
- HTMLPrinter.addPageEpilog(info);
- return info.toString();
- }
-
- };
- }
+ content= addCSSToHTMLFragment(content);
+ super.setInformation(content);
+ }
+
+ /**
+ * Adds a HTML header and CSS info if <code>html</code> is only an HTML fragment (has no
+ * &lt;html&gt; section).
+ *
+ * @param html the html / text produced by a revision
+ * @return modified html
+ */
+ private String addCSSToHTMLFragment(String html) {
+ int max= Math.min(100, html.length());
+ if (html.substring(0, max).indexOf("<html>") != -1) //$NON-NLS-1$
+ // there is already a header
+ return html;
+
+ StringBuilder info= new StringBuilder(512 + html.length());
+ HTMLPrinter.insertPageProlog(info, 0, fgStyleSheet);
+ info.append(html);
+ HTMLPrinter.addPageEpilog(info);
+ return info.toString();
+ }
+
+ };
+ }
return new DefaultInformationControl(parent, fIsFocusable);
}
@@ -473,7 +473,7 @@ public final class RevisionPainter {
return range == null ? null : new LineRange(lineNumber, 1);
}
- @Override
+ @Override
public IInformationControlCreator getInformationPresenterControlCreator() {
RevisionInformation revisionInfo= fRevisionInfo;
if (revisionInfo != null) {
@@ -482,7 +482,7 @@ public final class RevisionPainter {
return creator;
}
return new HoverInformationControlCreator(true);
- }
+ }
}
/* Listeners and helpers. */
@@ -1156,8 +1156,8 @@ public final class RevisionPainter {
/**
* Handles the selection of a revision id and informs listeners
*
- * @param id the selected revision id
- */
+ * @param id the selected revision id
+ */
void handleRevisionSelected(String id) {
Assert.isLegal(id != null);
if (fRevisionInfo == null)
@@ -1174,14 +1174,14 @@ public final class RevisionPainter {
handleRevisionSelected((Revision) null);
}
- /**
- * Returns the selection provider.
- *
- * @return the selection provider
- */
- public RevisionSelectionProvider getRevisionSelectionProvider() {
+ /**
+ * Returns the selection provider.
+ *
+ * @return the selection provider
+ */
+ public RevisionSelectionProvider getRevisionSelectionProvider() {
return fRevisionSelectionProvider;
- }
+ }
/**
* Updates the focus line with a new line.
@@ -1232,9 +1232,9 @@ public final class RevisionPainter {
}
private void updateFocusRevision(Revision revision) {
- if (fFocusRevision != revision)
+ if (fFocusRevision != revision)
onFocusRevisionChanged(fFocusRevision, revision);
- }
+ }
/**
* Handles a changing focus revision.
@@ -1423,30 +1423,30 @@ public final class RevisionPainter {
* @param offset the document offset
* @return the revision at offset, or <code>null</code> for none
*/
- Revision getRevision(int offset) {
- IDocument document= fViewer.getDocument();
- int line;
- try {
- line= document.getLineOfOffset(offset);
- } catch (BadLocationException x) {
- return null;
- }
- if (line != -1) {
- RevisionRange range= getRange(line);
- if (range != null)
- return range.getRevision();
- }
- return null;
- }
+ Revision getRevision(int offset) {
+ IDocument document= fViewer.getDocument();
+ int line;
+ try {
+ line= document.getLineOfOffset(offset);
+ } catch (BadLocationException x) {
+ return null;
+ }
+ if (line != -1) {
+ RevisionRange range= getRange(line);
+ if (range != null)
+ return range.getRevision();
+ }
+ return null;
+ }
/**
* Returns <code>true</code> if a revision model has been set, <code>false</code> otherwise.
*
- * @return <code>true</code> if a revision model has been set, <code>false</code> otherwise
- */
- public boolean hasInformation() {
- return fRevisionInfo != null;
- }
+ * @return <code>true</code> if a revision model has been set, <code>false</code> otherwise
+ */
+ public boolean hasInformation() {
+ return fRevisionInfo != null;
+ }
/**
* Returns the width in chars required to display information.
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionSelectionProvider.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionSelectionProvider.java
index 4c43acb41f2..842bd796138 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionSelectionProvider.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionSelectionProvider.java
@@ -46,29 +46,29 @@ public final class RevisionSelectionProvider implements ISelectionProvider {
* Post selection listener on the viewer that remembers the selection provider it is registered
* with.
*/
- private final class PostSelectionListener implements ISelectionChangedListener {
- private final IPostSelectionProvider fPostProvider;
+ private final class PostSelectionListener implements ISelectionChangedListener {
+ private final IPostSelectionProvider fPostProvider;
public PostSelectionListener(IPostSelectionProvider postProvider) {
postProvider.addPostSelectionChangedListener(this);
fPostProvider= postProvider;
- }
+ }
@Override
public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection= event.getSelection();
- if (selection instanceof ITextSelection) {
- ITextSelection ts= (ITextSelection) selection;
- int offset= ts.getOffset();
- setSelectedRevision(fPainter.getRevision(offset));
- }
+ ISelection selection= event.getSelection();
+ if (selection instanceof ITextSelection) {
+ ITextSelection ts= (ITextSelection) selection;
+ int offset= ts.getOffset();
+ setSelectedRevision(fPainter.getRevision(offset));
+ }
- }
+ }
public void dispose() {
fPostProvider.removePostSelectionChangedListener(this);
}
- }
+ }
private final RevisionPainter fPainter;
@@ -98,78 +98,78 @@ public final class RevisionSelectionProvider implements ISelectionProvider {
*
* @param painter the painter that the created provider interacts with
*/
- RevisionSelectionProvider(RevisionPainter painter) {
+ RevisionSelectionProvider(RevisionPainter painter) {
fPainter= painter;
- }
+ }
- @Override
+ @Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
- fListeners.add(listener);
- }
+ fListeners.add(listener);
+ }
- @Override
+ @Override
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- fListeners.remove(listener);
- }
+ fListeners.remove(listener);
+ }
- @Override
+ @Override
public ISelection getSelection() {
- if (fSelection == null)
- return StructuredSelection.EMPTY;
- return new StructuredSelection(fSelection);
- }
+ if (fSelection == null)
+ return StructuredSelection.EMPTY;
+ return new StructuredSelection(fSelection);
+ }
- @Override
+ @Override
public void setSelection(ISelection selection) {
- if (fIgnoreEvents)
- return;
- if (selection instanceof IStructuredSelection) {
- Object first= ((IStructuredSelection) selection).getFirstElement();
- if (first instanceof Revision)
+ if (fIgnoreEvents)
+ return;
+ if (selection instanceof IStructuredSelection) {
+ Object first= ((IStructuredSelection) selection).getFirstElement();
+ if (first instanceof Revision)
fPainter.handleRevisionSelected((Revision) first);
else if (first instanceof String)
fPainter.handleRevisionSelected((String) first);
else if (selection.isEmpty())
fPainter.handleRevisionSelected((Revision) null);
- }
- }
+ }
+ }
- /**
+ /**
* Installs the selection provider on the viewer.
*
* @param viewer the viewer on which we listen to for post selection events
*/
- void install(ITextViewer viewer) {
- uninstall();
+ void install(ITextViewer viewer) {
+ uninstall();
fViewer= viewer;
if (fViewer != null) {
ISelectionProvider provider= fViewer.getSelectionProvider();
if (provider instanceof IPostSelectionProvider) {
- IPostSelectionProvider postProvider= (IPostSelectionProvider) provider;
- fSelectionListener= new PostSelectionListener(postProvider);
- }
+ IPostSelectionProvider postProvider= (IPostSelectionProvider) provider;
+ fSelectionListener= new PostSelectionListener(postProvider);
+ }
}
- }
-
- /**
- * Uninstalls the selection provider.
- */
- void uninstall() {
- fViewer= null;
- if (fSelectionListener != null) {
- fSelectionListener.dispose();
- fSelectionListener= null;
- }
- }
-
- /**
+ }
+
+ /**
+ * Uninstalls the selection provider.
+ */
+ void uninstall() {
+ fViewer= null;
+ if (fSelectionListener != null) {
+ fSelectionListener.dispose();
+ fSelectionListener= null;
+ }
+ }
+
+ /**
* Private protocol used by {@link RevisionPainter} to signal selection of a revision.
*
* @param revision the selected revision, or <code>null</code> for none
*/
- void revisionSelected(Revision revision) {
- setSelectedRevision(revision);
- }
+ void revisionSelected(Revision revision) {
+ setSelectedRevision(revision);
+ }
/**
* Updates the currently selected revision and sends out an event if it changed.
@@ -181,19 +181,19 @@ public final class RevisionSelectionProvider implements ISelectionProvider {
fSelection= revision;
fireSelectionEvent();
}
- }
+ }
- private void fireSelectionEvent() {
- fIgnoreEvents= true;
- try {
- ISelection selection= getSelection();
- SelectionChangedEvent event= new SelectionChangedEvent(this, selection);
+ private void fireSelectionEvent() {
+ fIgnoreEvents= true;
+ try {
+ ISelection selection= getSelection();
+ SelectionChangedEvent event= new SelectionChangedEvent(this, selection);
for (ISelectionChangedListener listener : fListeners) {
listener.selectionChanged(event);
}
- } finally {
- fIgnoreEvents= false;
- }
- }
+ } finally {
+ fIgnoreEvents= false;
+ }
+ }
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/source/DiffPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/source/DiffPainter.java
index fd8f0270ef3..2c1d4ccc808 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/source/DiffPainter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/source/DiffPainter.java
@@ -526,9 +526,9 @@ public final class DiffPainter {
/**
* Returns <code>true</code> if diff information is being displayed, <code>false</code> otherwise.
*
- * @return <code>true</code> if diff information is being displayed, <code>false</code> otherwise
- * @since 3.3
- */
+ * @return <code>true</code> if diff information is being displayed, <code>false</code> otherwise
+ * @since 3.3
+ */
public boolean hasInformation() {
if (fLineDiffer instanceof ILineDifferExtension2)
return !((ILineDifferExtension2) fLineDiffer).isSuspended();

Back to the top