From d77b078388163500961bdab34c0248806eb5c208 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Wed, 11 Jan 2017 21:53:52 +0100 Subject: Bug 510313 - Remove unnecessary whitespace from org.eclipse.jface.text Change-Id: I19139e6aba0aaa20eb06882a4b721298cdfe138b Signed-off-by: Lars Vogel --- .../text/source/projection/ProjectionViewer.java | 2 +- .../projection/SourceViewerInformationControl.java | 8 +-- .../jface/internal/text/SelectionProcessor.java | 68 +++++++++--------- .../jface/internal/text/TableOwnerDrawSupport.java | 2 +- .../text/html/BrowserInformationControl.java | 22 +++--- .../jface/internal/text/html/HTMLPrinter.java | 22 +++--- .../contentassist/CompletionProposalPopup2.java | 8 +-- .../text/link/contentassist/ContentAssistant2.java | 2 +- .../link/contentassist/LineBreakingReader.java | 6 +- .../internal/text/revisions/RevisionPainter.java | 4 +- .../AbstractHoverInformationControlManager.java | 4 +- .../jface/text/AbstractInformationControl.java | 12 ++-- .../text/AbstractInformationControlManager.java | 8 +-- .../org/eclipse/jface/text/BlockTextSelection.java | 6 +- .../org/eclipse/jface/text/CursorLinePainter.java | 2 +- .../jface/text/DefaultTextDoubleClickStrategy.java | 16 ++--- .../org/eclipse/jface/text/DocumentCommand.java | 2 +- .../eclipse/jface/text/IBlockTextSelection.java | 12 ++-- .../eclipse/jface/text/IInformationControl.java | 2 +- .../src/org/eclipse/jface/text/ITextViewer.java | 2 +- .../org/eclipse/jface/text/IViewportListener.java | 4 +- .../org/eclipse/jface/text/TextPresentation.java | 4 +- .../src/org/eclipse/jface/text/TextSelection.java | 2 +- .../src/org/eclipse/jface/text/TextViewer.java | 38 +++++----- .../jface/text/WhitespaceCharacterPainter.java | 10 +-- .../text/contentassist/BoldStylerProvider.java | 12 ++-- .../contentassist/CompletionProposalPopup.java | 16 ++--- .../jface/text/contentassist/ContentAssistant.java | 42 +++++------ .../contentassist/ContextInformationPopup.java | 4 +- .../ICompletionListenerExtension2.java | 4 +- .../text/contentassist/ICompletionProposal.java | 6 +- .../ICompletionProposalExtension7.java | 6 +- .../contentassist/ICompletionProposalSorter.java | 4 +- .../text/contentassist/IContextInformation.java | 2 +- .../text/hyperlink/DefaultHyperlinkPresenter.java | 14 ++-- .../jface/text/hyperlink/HyperlinkManager.java | 22 +++--- .../jface/text/hyperlink/IHyperlinkPresenter.java | 2 +- .../hyperlink/IHyperlinkPresenterExtension2.java | 4 +- .../text/hyperlink/MultipleHyperlinkPresenter.java | 16 ++--- .../text/information/InformationPresenter.java | 2 +- .../text/presentation/PresentationReconciler.java | 4 +- .../text/quickassist/QuickAssistAssistant.java | 2 +- .../jface/text/revisions/RevisionInformation.java | 2 +- .../jface/text/rules/DefaultDamagerRepairer.java | 2 +- .../jface/text/rules/IPartitionTokenScanner.java | 2 +- .../text/rules/RuleBasedPartitionScanner.java | 2 +- .../eclipse/jface/text/rules/WhitespaceRule.java | 6 +- .../src/org/eclipse/jface/text/rules/WordRule.java | 2 +- .../text/source/AnnotationBarHoverManager.java | 2 +- .../jface/text/source/AnnotationPainter.java | 6 +- .../jface/text/source/AnnotationRulerColumn.java | 6 +- .../text/source/DefaultCharacterPairMatcher.java | 42 +++++------ .../jface/text/source/ICharacterPairMatcher.java | 10 +-- .../source/ICharacterPairMatcherExtension.java | 16 ++--- .../eclipse/jface/text/source/IOverviewRuler.java | 2 +- .../jface/text/source/IOverviewRulerExtension.java | 4 +- .../eclipse/jface/text/source/ISourceViewer.java | 4 +- .../eclipse/jface/text/source/LineChangeHover.java | 2 +- .../text/source/LineNumberChangeRulerColumn.java | 4 +- .../jface/text/source/LineNumberRulerColumn.java | 2 +- .../text/source/MatchingCharacterPainter.java | 32 ++++----- .../eclipse/jface/text/source/OverviewRuler.java | 82 +++++++++++----------- .../eclipse/jface/text/source/SourceViewer.java | 26 +++---- .../jface/text/source/VerticalRulerEvent.java | 4 +- .../jface/text/templates/TemplateProposal.java | 4 +- .../persistence/TemplateReaderWriter.java | 2 +- 66 files changed, 348 insertions(+), 348 deletions(-) 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 6c8cd088658..6455181de60 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 @@ -1554,7 +1554,7 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi /** * Deletes the selection and sets the caret before the deleted range. - * + * * @param selection the selection to delete * @param textWidget the widget * @throws BadLocationException on document access failure 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 8266ab28236..16a68b5f2da 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 @@ -72,7 +72,7 @@ class SourceViewerInformationControl implements IInformationControl, IInformatio private Font fStatusTextFont; /** * The color of the optional status text label or null if none. - * + * * @since 3.6 */ private Color fStatusTextForegroundColor; @@ -195,7 +195,7 @@ class SourceViewerInformationControl implements IInformationControl, IInformatio Assert.isLegal(bg != null); Assert.isLegal(fg != null); Assert.isLegal(factor >= 0f && factor <= 1f); - + float complement= 1f - factor; return new RGB( (int) (complement * bg.red + factor * fg.red), @@ -203,7 +203,7 @@ class SourceViewerInformationControl implements IInformationControl, IInformatio (int) (complement * bg.blue + factor * fg.blue) ); } - + /** * @see org.eclipse.jface.text.IInformationControlExtension2#setInput(java.lang.Object) * @param input the input object @@ -239,7 +239,7 @@ class SourceViewerInformationControl implements IInformationControl, IInformatio if (fStatusTextForegroundColor != null && !fStatusTextForegroundColor.isDisposed()) fStatusTextForegroundColor.dispose(); fStatusTextForegroundColor= null; - + fTextFont= null; fShell= null; fText= null; diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/SelectionProcessor.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/SelectionProcessor.java index 0f34d8f15df..a1321e0ee45 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/SelectionProcessor.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/SelectionProcessor.java @@ -42,7 +42,7 @@ import org.eclipse.jface.text.TextUtilities; /** * Processes {@link ITextSelection}s. - * + * * @since 3.5 */ public final class SelectionProcessor { @@ -50,7 +50,7 @@ public final class SelectionProcessor { /** * Returns a text edit describing the text modification that would be executed if the given * selection was replaced by replacement. - * + * * @param selection the selection to replace * @param replacement the replacement text * @return a text edit describing the operation needed to replace selection @@ -62,7 +62,7 @@ public final class SelectionProcessor { /** * Returns the text covered by selection - * + * * @param selection the selection * @return the text covered by selection * @throws BadLocationException if computing the edit failed @@ -75,7 +75,7 @@ public final class SelectionProcessor { * Returns true if the text covered by selection does not contain any * characters. Note the difference to {@link ITextSelection#isEmpty()}, which returns * true only for invalid selections. - * + * * @param selection the selection * @return true if selection does not contain any text, * false otherwise @@ -88,11 +88,11 @@ public final class SelectionProcessor { /** * Returns true if selection covers text on two or more lines, * false otherwise. - * + * * @param selection the selection * @return true if selection covers text on two or more lines, * false otherwise - * @throws BadLocationException if selection is not a valid selection on the target document + * @throws BadLocationException if selection is not a valid selection on the target document */ boolean isMultiline(ISelection selection) throws BadLocationException { if (selection == null) @@ -111,7 +111,7 @@ public final class SelectionProcessor { /** * Returns a selection similar to selection but {@linkplain #isEmpty(ISelection) * empty}. Typically, the selection is reduced to its left-most offset. - * + * * @param selection the selection * @param beginning true to collapse the selection to its smallest position * (i.e. its left-most offset), false to collapse it to its greatest @@ -125,7 +125,7 @@ public final class SelectionProcessor { /** * Returns the text regions covered by the given selection. - * + * * @param selection the selection * @return the text regions corresponding to selection * @throws BadLocationException if accessing the document failed @@ -135,8 +135,8 @@ public final class SelectionProcessor { } /** - * Returns the number of lines touched by selection. - * + * Returns the number of lines touched by selection. + * * @param selection the selection * @return the number of lines touched by selection * @throws BadLocationException if accessing the document failed @@ -147,7 +147,7 @@ public final class SelectionProcessor { /** * Returns the selection after replacing selection by replacement. - * + * * @param selection the selection to be replaced * @param replacement the replacement text * @return the selection that the user expects after the specified replacement operation @@ -204,7 +204,7 @@ public final class SelectionProcessor { @Override ISelection makeEmpty(ISelection selection, boolean beginning) { ITextSelection ts= (ITextSelection)selection; - return beginning ? + return beginning ? new TextSelection(fDocument, ts.getOffset(), 0) : new TextSelection(fDocument, ts.getOffset() + ts.getLength(), 0); } @@ -214,13 +214,13 @@ public final class SelectionProcessor { ITextSelection ts= (ITextSelection)selection; return new IRegion[] { new Region(ts.getOffset(), ts.getLength()) }; } - + @Override int getCoveredLines(ISelection selection) throws BadLocationException { ITextSelection ts= (ITextSelection)selection; return ts.getEndLine() - ts.getStartLine() + 1; } - + @Override ISelection makeReplaceSelection(ISelection selection, String replacement) { ITextSelection ts= (ITextSelection)selection; @@ -372,7 +372,7 @@ public final class SelectionProcessor { } return new BlockTextSelection(fDocument, startLine, startColumn, endLine, endColumn, fTabWidth); } - + @Override ISelection makeReplaceSelection(ISelection selection, String replacement) throws BadLocationException { IBlockTextSelection bts= (IBlockTextSelection)selection; @@ -412,7 +412,7 @@ public final class SelectionProcessor { return ranges; } - + @Override int getCoveredLines(ISelection selection) throws BadLocationException { ITextSelection ts= (ITextSelection)selection; @@ -530,7 +530,7 @@ public final class SelectionProcessor { * Returns the increment in visual length represented by character given the * current visual length. The visual length is 1 unless character * is a tabulator (\t). - * + * * @param character the character the length of which to compute * @param visual the current visual length * @return the increment in visual length represented by character, which is in @@ -569,7 +569,7 @@ public final class SelectionProcessor { /** * Creates a new processor on the given viewer. - * + * * @param viewer the viewer */ public SelectionProcessor(ITextViewer viewer) { @@ -584,7 +584,7 @@ public final class SelectionProcessor { /** * Creates a new processor on the given document and using the given tab width. - * + * * @param document the document * @param tabWidth the tabulator width in space equivalents, must be >=0 */ @@ -598,7 +598,7 @@ public final class SelectionProcessor { /** * Returns a text edit describing the text modification that would be executed if the delete key * was pressed on the given selection. - * + * * @param selection the selection to delete * @return a text edit describing the operation needed to delete selection * @throws BadLocationException if computing the edit failed @@ -610,7 +610,7 @@ public final class SelectionProcessor { /** * Returns a text edit describing the text modification that would be executed if the backspace * key was pressed on the given selection. - * + * * @param selection the selection to delete * @return a text edit describing the operation needed to delete selection * @throws BadLocationException if computing the edit failed @@ -622,7 +622,7 @@ public final class SelectionProcessor { /** * Returns a text edit describing the text modification that would be executed if the given * selection was replaced by replacement. - * + * * @param selection the selection to replace * @param replacement the replacement text * @return a text edit describing the operation needed to replace selection @@ -634,7 +634,7 @@ public final class SelectionProcessor { /** * Returns the text covered by selection - * + * * @param selection the selection * @return the text covered by selection * @throws BadLocationException if computing the edit failed @@ -647,7 +647,7 @@ public final class SelectionProcessor { * Returns true if the text covered by selection does not contain any * characters. Note the difference to {@link ITextSelection#isEmpty()}, which returns * true only for invalid selections. - * + * * @param selection the selection * @return true if selection does not contain any text, * false otherwise @@ -660,7 +660,7 @@ public final class SelectionProcessor { /** * Returns true if selection extends to two or more lines, * false otherwise. - * + * * @param selection the selection * @return true if selection extends to two or more lines, * false otherwise @@ -674,7 +674,7 @@ public final class SelectionProcessor { /** * Returns a selection similar to selection but {@linkplain #isEmpty(ISelection) * empty}. Typically, the selection is reduced to its extreme offsets. - * + * * @param selection the selection * @param beginning true to collapse the selection to its smallest position (i.e. * its left-most offset), false to collapse it to its greatest position @@ -685,7 +685,7 @@ public final class SelectionProcessor { public ISelection makeEmpty(ISelection selection, boolean beginning) throws BadLocationException { return getImplementation(selection).makeEmpty(selection, beginning); } - + private ISelection makeReplaceSelection(ISelection selection, String replacement) throws BadLocationException { return getImplementation(selection).makeReplaceSelection(selection, replacement); } @@ -693,7 +693,7 @@ public final class SelectionProcessor { /** * Convenience method that applies the edit returned from {@link #delete(ISelection)} to the * underlying document. - * + * * @param selection the selection to delete * @throws BadLocationException if accessing the document failed */ @@ -713,11 +713,11 @@ public final class SelectionProcessor { fRewriteTarget.endCompoundChange(); } } - + /** * Convenience method that applies the edit returned from {@link #replace(ISelection, String)} * to the underlying document and adapts the selection accordingly. - * + * * @param selection the selection to replace * @param replacement the replacement text * @throws BadLocationException if accessing the document failed @@ -739,10 +739,10 @@ public final class SelectionProcessor { fRewriteTarget.endCompoundChange(); } } - + /** * Returns the text regions covered by the given selection. - * + * * @param selection the selection * @return the text regions corresponding to selection * @throws BadLocationException if accessing the document failed @@ -754,7 +754,7 @@ public final class SelectionProcessor { /** * Returns the number of lines touched by selection. Note that for linear * selections, this is the number of contained delimiters plus 1. - * + * * @param selection the selection * @return the number of lines touched by selection * @throws BadLocationException if accessing the document failed @@ -765,7 +765,7 @@ public final class SelectionProcessor { /** * Returns the implementation. - * + * * @param selection the selection * @return the corresponding processor implementation */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/TableOwnerDrawSupport.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/TableOwnerDrawSupport.java index c95a3f8d437..d0cfc19e0db 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/TableOwnerDrawSupport.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/TableOwnerDrawSupport.java @@ -93,7 +93,7 @@ public class TableOwnerDrawSupport implements Listener { /** * Handles the measure event. - * + * * @param event the measure event */ private void measureItem(Event event) { diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java index a20c9c5e6bf..82ecddf1978 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java @@ -68,7 +68,7 @@ import org.eclipse.jface.text.TextPresentation; *
  • focusLost event is not sent - see https://bugs.eclipse.org/bugs/show_bug.cgi?id=84532
  • * *

    - * + * * @since 3.2 */ public class BrowserInformationControl extends AbstractInformationControl implements IInformationControlExtension2, IDelayedInputChangeProvider { @@ -77,7 +77,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem /** * Tells whether the SWT Browser widget and hence this information * control is available. - * + * * @param parent the parent component used for checking or null if none * @return true if this control is available */ @@ -170,7 +170,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem /** * Creates a browser information control with the given shell as parent. - * + * * @param parent the parent shell * @param symbolicFontName the symbolic name of the font used for size computations * @param resizable true if the control should be resizable @@ -184,7 +184,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem /** * Creates a browser information control with the given shell as parent. - * + * * @param parent the parent shell * @param symbolicFontName the symbolic name of the font used for size computations * @param statusFieldText the text to be used in the optional status field @@ -199,7 +199,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem /** * Creates a browser information control with the given shell as parent. - * + * * @param parent the parent shell * @param symbolicFontName the symbolic name of the font used for size computations * @param toolBarManager the manager or null if toolbar is not desired @@ -385,7 +385,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem /** * Creates and initializes the text layout used * to compute the size hint. - * + * * @since 3.2 */ private void createTextLayout() { @@ -496,7 +496,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem /** * Adds the listener to the collection of listeners who will be * notified when the current location has changed or is about to change. - * + * * @param listener the location listener * @since 3.4 */ @@ -524,7 +524,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem /** * Adds a listener for input changes to this input change provider. * Has no effect if an identical listener is already registered. - * + * * @param inputChangeListener the listener to add * @since 3.4 */ @@ -536,7 +536,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem /** * Removes the given input change listener from this input change provider. * Has no effect if an identical listener is not registered. - * + * * @param inputChangeListener the listener to remove * @since 3.4 */ @@ -551,7 +551,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem /** * Tells whether a delayed input change listener is registered. - * + * * @return true iff a delayed input change * listener is currently registered * @since 3.4 @@ -562,7 +562,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem /** * Notifies listeners of a delayed input change. - * + * * @param newInput the new input, or null to request cancellation * @since 3.4 */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java index 1e49e72a36b..5fc2cea8c0a 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java @@ -35,7 +35,7 @@ public class HTMLPrinter { private static volatile RGB BG_COLOR_RGB= new RGB(255, 255, 225); // RGB value of info bg color on WindowsXP private static volatile RGB FG_COLOR_RGB= new RGB(0, 0, 0); // RGB value of info fg color on WindowsXP - + private static final String UNIT; // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=155993 static { UNIT= Util.isMac() ? "px" : "pt"; //$NON-NLS-1$//$NON-NLS-2$ @@ -68,7 +68,7 @@ public class HTMLPrinter { BG_COLOR_RGB= display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB(); FG_COLOR_RGB= display.getSystemColor(SWT.COLOR_INFO_FOREGROUND).getRGB(); } - + private static void installColorUpdater(final Display display) { display.addListener(SWT.Settings, new Listener() { @Override @@ -77,7 +77,7 @@ public class HTMLPrinter { } }); } - + private static String replace(String text, char c, String s) { int previous= 0; @@ -102,10 +102,10 @@ public class HTMLPrinter { * Escapes reserved HTML characters in the given string. *

    * Warning: Does not preserve whitespace. - * + * * @param content the input string * @return the string with escaped characters - * + * * @see #convertToHTMLContentWithWhitespace(String) for use in browsers * @see #addPreFormatted(StringBuffer, String) for rendering with an {@link HTML2TextReader} */ @@ -125,7 +125,7 @@ public class HTMLPrinter { * @param content the input string * @return the processed string - * + * * @see #addPreFormatted(StringBuffer, String) * @see #convertToHTMLContent(String) * @since 3.7 @@ -137,7 +137,7 @@ public class HTMLPrinter { content= replace(content, '>', ">"); //$NON-NLS-1$ return "" + content + ""; //$NON-NLS-1$ //$NON-NLS-2$ } - + public static String read(Reader rd) { StringBuffer buffer= new StringBuffer(); @@ -226,7 +226,7 @@ public class HTMLPrinter { private static void appendStyleSheet(StringBuffer buffer, String styleSheet, RGB fgRGB, RGB bgRGB) { if (styleSheet == null) return; - + // workaround for https://bugs.eclipse.org/318243 StringBuffer fg= new StringBuffer(); appendColor(fg, fgRGB); @@ -317,10 +317,10 @@ public class HTMLPrinter { * Warning: This starts a new paragraph when rendered in a browser, but * it doesn't starts a new paragraph when rendered with a {@link HTML2TextReader} * (e.g. in a {@link DefaultInformationControl} that renders simple HTML). - * + * * @param buffer the output buffer * @param preFormatted the string that should be rendered with whitespace preserved - * + * * @see #convertToHTMLContent(String) * @see #convertToHTMLContentWithWhitespace(String) * @since 3.7 @@ -363,7 +363,7 @@ public class HTMLPrinter { boolean italic= (fontData.getStyle() & SWT.ITALIC) != 0; String size= Integer.toString(fontData.getHeight()) + UNIT; String family= "'" + fontData.getName() + "',sans-serif"; //$NON-NLS-1$ //$NON-NLS-2$ - + styles= styles.replaceFirst("(html\\s*\\{.*(?:\\s|;)font-size:\\s*)\\d+pt(\\;?.*\\})", "$1" + size + "$2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ styles= styles.replaceFirst("(html\\s*\\{.*(?:\\s|;)font-weight:\\s*)\\w+(\\;?.*\\})", "$1" + (bold ? "bold" : "normal") + "$2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ styles= styles.replaceFirst("(html\\s*\\{.*(?:\\s|;)font-style:\\s*)\\w+(\\;?.*\\})", "$1" + (italic ? "italic" : "normal") + "$2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java index 4d6a932b403..34cb8769962 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java @@ -367,7 +367,7 @@ class CompletionProposalPopup2 implements IContentAssistListener2 { if (fInvocationCounter != fInvocationProcessedCounter) if (!doFilterProposals()) return false; - + ICompletionProposal p= getSelectedProposal(); hide(); if (p != null) { @@ -588,7 +588,7 @@ class CompletionProposalPopup2 implements IContentAssistListener2 { } finally { fProposalTable.setRedraw(true); } - + resizeProposalSelector(false); selectProposal(selectionIndex, false); @@ -881,7 +881,7 @@ class CompletionProposalPopup2 implements IContentAssistListener2 { /** * Filters the displayed proposal based on the given cursor position and the * offset of the original invocation of the content assistant. - * + * * @return true if there are still proposals left, false if the popup has been closed * @since 3.7 */ @@ -899,7 +899,7 @@ class CompletionProposalPopup2 implements IContentAssistListener2 { fDocumentEvents.clear(); } fFilterOffset= offset; - + if (proposals != null && proposals.length > 0) { setProposals(proposals); return true; 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 26ea2ecc0f3..6549c11d5a4 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 @@ -819,7 +819,7 @@ public class ContentAssistant2 implements IContentAssistant, IContentAssistantEx /** * Installs and uninstall the listeners needed for auto activation. - * + * * @param start true if listeners must be installed, false if they * must be removed * @since 2.0 diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/LineBreakingReader.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/LineBreakingReader.java index 4bfebf2ac8c..4d1529e921a 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/LineBreakingReader.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/LineBreakingReader.java @@ -36,7 +36,7 @@ public class LineBreakingReader { /** * Creates a reader that breaks an input text to fit in a given width. - * + * * @param reader reader for the input text * @param gc The graphic context that defines the currently used font sizes * @param maxLineWidth The max width (pixels) where the text has to fit in @@ -47,7 +47,7 @@ public class LineBreakingReader { /** * Creates a reader that breaks an input text to fit in a given width. - * + * * @param reader the reader for the input text * @param bufferSize the buffer size * @param gc The graphic context that defines the currently used font sizes @@ -59,7 +59,7 @@ public class LineBreakingReader { /** * Creates a reader that breaks an input text to fit in a given width. - * + * * @param reader the buffered reader for the input text * @param gc The graphic context that defines the currently used font sizes * @param maxLineWidth The max width (pixels) where the text has to fit in 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 b95be75bb15..8c6ee5bfa0b 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 @@ -1133,7 +1133,7 @@ public final class RevisionPainter { /** * Handles the selection of a revision and informs listeners. - * + * * @param revision the selected revision, null for none */ void handleRevisionSelected(Revision revision) { @@ -1266,7 +1266,7 @@ public final class RevisionPainter { fWheelHandlerInstalled= true; } } - + /** * @return true iff the mouse wheel handler is installed and others should avoid * handling mouse wheel events diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java index a83577eabc4..43adcc88e55 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java @@ -457,13 +457,13 @@ abstract public class AbstractHoverInformationControlManager extends AbstractInf if (fSubjectControl != null && !fSubjectControl.isDisposed()) fSubjectControl.addMouseTrackListener(this); - + fIsInRestartMode= false; fIsComputing= false; fMouseLostWhileComputing= false; fShellDeactivatedWhileComputing= false; } - + /** * Stops this mouse tracker. Removes itself as mouse track, mouse move, and * shell listener from the subject control. diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java index af42edc8126..b3c410fc0a1 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java @@ -90,7 +90,7 @@ public abstract class AbstractInformationControl implements IInformationControl, private Font fStatusLabelFont; /** * Color for the label in the status line or null if none. - * + * * @since 3.6 */ private Color fStatusLabelForeground; @@ -182,7 +182,7 @@ public abstract class AbstractInformationControl implements IInformationControl, fResizable= (shellStyle & SWT.RESIZE) != 0; fShell= new Shell(parentShell, shellStyle); Display display= fShell.getDisplay(); - + ColorRegistry colorRegistry = JFaceResources.getColorRegistry(); Color foreground= colorRegistry.get("org.eclipse.ui.workbench.HOVER_FOREGROUND"); //$NON-NLS-1$ if (foreground == null) { @@ -206,7 +206,7 @@ public abstract class AbstractInformationControl implements IInformationControl, setColor(fContentComposite, foreground, background); createStatusComposite(statusFieldText, toolBarManager, foreground, background); - + addDisposeListener(new DisposeListener() { @Override public void widgetDisposed(DisposeEvent e) { @@ -250,7 +250,7 @@ public abstract class AbstractInformationControl implements IInformationControl, } fStatusLabelFont= new Font(fStatusLabel.getDisplay(), fontDatas); fStatusLabel.setFont(fStatusLabelFont); - + fStatusLabelForeground= new Color(fStatusLabel.getDisplay(), Colors.blend(background.getRGB(), foreground.getRGB(), 0.56f)); setColor(fStatusLabel, fStatusLabelForeground, background); setColor(fStatusComposite, foreground, background); @@ -484,7 +484,7 @@ public abstract class AbstractInformationControl implements IInformationControl, * The given parent comes with a {@link FillLayout}. Subclasses may set a different * layout. *

    - * + * * @param parent the container of the content */ protected abstract void createContent(Composite parent); @@ -531,7 +531,7 @@ public abstract class AbstractInformationControl implements IInformationControl, /** * Frees all resources allocated by this information control. Internally called when the * information control's shell has been disposed. - * + * * @since 3.6 */ protected void handleDispose() { diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java index f5ee2396d13..a1af6b22e74 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java @@ -626,7 +626,7 @@ abstract public class AbstractInformationControlManager { /** * Tells whether the control takes focus when visible. - * + * * @return true if the control takes focus when visible, false * otherwise * @since 3.7 @@ -1264,7 +1264,7 @@ abstract public class AbstractInformationControlManager { /** * Tells whether internal data can be cleared on hide. - * + * * @return true if data can be cleared on hide * @see #hideInformationControl() * @since 3.6 @@ -1281,10 +1281,10 @@ abstract public class AbstractInformationControlManager { */ protected void showInformationControl(Rectangle subjectArea) { fInformationControl.setVisible(true); - + if (fInformationControl == null) return; // could already be disposed if setVisible(..) runs the display loop - + if (fTakesFocusWhenVisible) fInformationControl.setFocus(); diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/BlockTextSelection.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/BlockTextSelection.java index 97484036313..e060cddcc82 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/BlockTextSelection.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/BlockTextSelection.java @@ -17,7 +17,7 @@ import org.eclipse.jface.internal.text.SelectionProcessor; /** * Standard implementation of {@link org.eclipse.jface.text.IBlockTextSelection}. - * + * * @since 3.5 */ public class BlockTextSelection extends TextSelection implements IBlockTextSelection { @@ -35,7 +35,7 @@ public class BlockTextSelection extends TextSelection implements IBlockTextSelec /** * Creates a column selection for the given lines and columns. - * + * * @param document the document that this selection refers to * @param startLine the start line * @param startColumn the possibly virtual start column, measured in characters from the start @@ -64,7 +64,7 @@ public class BlockTextSelection extends TextSelection implements IBlockTextSelec * points beyond the end of the line, the end of the line is returned (virtual location). If the * line points beyond the number of lines, the end of the document is returned; if the line is * < zero, 0 is returned. - * + * * @param document the document to get line information from * @param line the line in the document, may be greater than the line count * @param column the offset in the given line, may be greater than the line length diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/CursorLinePainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/CursorLinePainter.java index 83171688c5e..6b2705a97f8 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/CursorLinePainter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/CursorLinePainter.java @@ -253,7 +253,7 @@ public class CursorLinePainter implements IPainter, LineBackgroundListener { /** * Returns true if the widget has a selection spanning multiple lines, * false otherwise. - * + * * @param textWidget the text widget to check * @return true if textWidget has a multiline selection, * false otherwise diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultTextDoubleClickStrategy.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultTextDoubleClickStrategy.java index 6ccb56e9661..196142e8428 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultTextDoubleClickStrategy.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultTextDoubleClickStrategy.java @@ -160,7 +160,7 @@ public class DefaultTextDoubleClickStrategy implements ITextDoubleClickStrategy * Used to workaround ICU bug not treating '.' as word boundary, see * http://bugs.icu-project.org/trac/ticket/8371 for details. *

    - * + * * @since 3.7 */ private BreakIterator fPOSIXWordBreakIterator; @@ -195,7 +195,7 @@ public class DefaultTextDoubleClickStrategy implements ITextDoubleClickStrategy * Note: This method must return null if it simply selects the word at * the given offset. *

    - * + * * @param document the document * @param offset the offset * @return the selection or null if none to indicate simple word selection @@ -207,7 +207,7 @@ public class DefaultTextDoubleClickStrategy implements ITextDoubleClickStrategy /** * Tries to find the word at the given offset. - * + * * @param document the document * @param offset the offset * @return the word or null if none @@ -219,7 +219,7 @@ public class DefaultTextDoubleClickStrategy implements ITextDoubleClickStrategy /** * Returns the locale specific word break iterator. - * + * * @return the locale specific word break iterator * @since 3.7 */ @@ -231,12 +231,12 @@ public class DefaultTextDoubleClickStrategy implements ITextDoubleClickStrategy /** * Returns the POSIX word break iterator. - * + * *

    * Used to workaround ICU bug not treating '.' as word boundary, see * http://bugs.icu-project.org/trac/ticket/8371 for details. *

    - * + * * @return the POSIX word break iterator. * @since 3.7 */ @@ -248,7 +248,7 @@ public class DefaultTextDoubleClickStrategy implements ITextDoubleClickStrategy /** * Tries to find the word at the given offset. - * + * * @param document the document * @param offset the offset * @param wordBreakIterator the word break iterator @@ -306,6 +306,6 @@ public class DefaultTextDoubleClickStrategy implements ITextDoubleClickStrategy } return new Region(start, length); - + } } diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/DocumentCommand.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/DocumentCommand.java index cc3731f6051..3e1dd5ced35 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/DocumentCommand.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/DocumentCommand.java @@ -114,7 +114,7 @@ public class DocumentCommand { /** * An iterator, which iterates in reverse over a list. - * + * * @param the type of elements returned by this iterator */ private static class ReverseListIterator implements Iterator { diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/IBlockTextSelection.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/IBlockTextSelection.java index 7c9c806b8c0..e4ddd2071ed 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/IBlockTextSelection.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/IBlockTextSelection.java @@ -16,7 +16,7 @@ package org.eclipse.jface.text; * column may not be equal for two different lines, therefore computing the set of disjunct * character ranges covered by a column selection is influenced by the used font and tabulator * width. Using column selections with proportional fonts may render unexpected results. - * + * *
    Virtual Spaces
    * The {@linkplain #getStartColumn() start column} and {@linkplain #getEndColumn() end column} may * refer to "virtual offsets" in the white space beyond the end of the line. Such an @@ -30,7 +30,7 @@ package org.eclipse.jface.text; * Clients may implement this interface or use the default implementation provided by * {@link org.eclipse.jface.text.BlockTextSelection}. *

    - * + * * @see org.eclipse.jface.text.BlockTextSelection * @since 3.5 */ @@ -40,7 +40,7 @@ public interface IBlockTextSelection extends ITextSelection { * selection starts. The returned column is a character count measured from the start of the * line. It may be larger than the length of the line, in which case it is a virtual offset. - * + * * @return the start column measured from the line start */ int getStartColumn(); @@ -49,7 +49,7 @@ public interface IBlockTextSelection extends ITextSelection { * selection ends. The returned column is a character count measured from the start of the * line. It may be larger than the length of the line, in which case it is a virtual offset. - * + * * @return the end column measured from the line start */ int getEndColumn(); @@ -63,7 +63,7 @@ public interface IBlockTextSelection extends ITextSelection { * Any virtual spaces beyond the end of the selected lines are * materialized and returned as text. *

    - * + * * @see org.eclipse.jface.text.ITextSelection#getText() */ @Override @@ -71,7 +71,7 @@ public interface IBlockTextSelection extends ITextSelection { /** * Returns a non-empty array containing the selected text range for each line covered by the * selection. - * + * * @return an array containing a the covered text range for each line covered by the receiver */ IRegion[] getRegions(); diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/IInformationControl.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/IInformationControl.java index 88d34a21ce9..4be58e5facc 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/IInformationControl.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/IInformationControl.java @@ -163,7 +163,7 @@ public interface IInformationControl { * Returns whether this information control (or one of its children) has the focus. * The suggested implementation is like this (fShell is this information control's shell): *
    return fShell.getDisplay().getActiveShell() == fShell
    - * + * *

    Note that implementations of {@link IInformationControlExtension5} are required to use this * suggested implementation. *

    diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewer.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewer.java index b9547312a6b..5d78a817357 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewer.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewer.java @@ -209,7 +209,7 @@ public interface ITextViewer { /** * Adds the given view port listener to this viewer. If the listener is already registered with * this viewer, this call has no effect. - * + * * @param listener the listener to be added */ void addViewportListener(IViewportListener listener); diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/IViewportListener.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/IViewportListener.java index 0bd60aff113..4bf1a918134 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/IViewportListener.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/IViewportListener.java @@ -20,7 +20,7 @@ package org.eclipse.jface.text; *

    * Clients may implement this interface. *

    - * + * * @see org.eclipse.jface.text.ITextViewer#addViewportListener(IViewportListener) */ public interface IViewportListener { @@ -31,7 +31,7 @@ public interface IViewportListener { *

    * Note: This event will not be sent when the viewer is resized. *

    - * + * * @param verticalOffset the vertical offset measured in pixels */ void viewportChanged(int verticalOffset); diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextPresentation.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextPresentation.java index d38b0790102..1f87a4bfc2c 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextPresentation.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextPresentation.java @@ -156,7 +156,7 @@ public class TextPresentation { /** * Creates a new empty text presentation. sizeHint tells the expected size of this * presentation. - * + * * @param sizeHint the expected size of this presentation, must be positive */ public TextPresentation(int sizeHint) { @@ -167,7 +167,7 @@ public class TextPresentation { /** * Creates a new empty text presentation with the given extent. sizeHint tells the * expected size of this presentation. - * + * * @param extent the extent of the created TextPresentation * @param sizeHint the expected size of this presentation, must be positive * @since 3.0 diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextSelection.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextSelection.java index 92e4fb0c896..d798b0aee6a 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextSelection.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextSelection.java @@ -194,7 +194,7 @@ public class TextSelection implements ITextSelection { /** * Returns the document underlying the receiver, possibly null. - * + * * @return the document underlying the receiver, possibly null * @since 3.5 */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java index a22f2f103b7..f58949da8c1 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java @@ -1053,10 +1053,10 @@ public class TextViewer extends Viewer implements fStateMask= stateMask; } } - + /** * Position storing block selection information in order to maintain a column selection. - * + * * @since 3.5 */ private static final class ColumnPosition extends Position { @@ -1435,7 +1435,7 @@ public class TextViewer extends Viewer implements /** * The shared printer data. - * + * * @since 3.6 */ private static PrinterData fgPrinterData= null; @@ -1643,7 +1643,7 @@ public class TextViewer extends Viewer implements private int fLastEventTime; /** * Pointer to disposed control. - * + * * @since 3.8 */ private Control fDisposedControl; @@ -1928,7 +1928,7 @@ public class TextViewer extends Viewer implements *

    * This implementation returns {@link OpenStrategy#getPostSelectionDelay()}. *

    - * + * * @return delay in milliseconds * @see org.eclipse.jface.util.OpenStrategy * @since 3.0 @@ -2386,7 +2386,7 @@ public class TextViewer extends Viewer implements IRegion endLineInfo= fDocument.getLineInformation(endLine); int endLineLength= endLineInfo.getLength(); int endVirtuals= Math.max(0, s.getEndColumn() - endLineLength); - + IRegion startRegion= new Region(startLineInfo.getOffset() + s.getStartColumn() - startVirtuals, 0); int startOffset= modelRange2ClosestWidgetRange(startRegion).getOffset(); IRegion endRegion= new Region(endLineInfo.getOffset() + s.getEndColumn() - endVirtuals, 0); @@ -2426,7 +2426,7 @@ public class TextViewer extends Viewer implements int[] ranges= fTextWidget.getSelectionRanges(); int startOffset= ranges[0]; int endOffset= ranges[ranges.length - 2] + ranges[ranges.length - 1]; - + // getBlockSelectionBounds returns pixel coordinates relative to document Rectangle bounds= fTextWidget.getBlockSelectionBounds(); int clientAreaX= fTextWidget.getHorizontalPixel(); @@ -2435,7 +2435,7 @@ public class TextViewer extends Viewer implements int avgCharWidth= getAverageCharWidth(); int startVirtuals= computeVirtualChars(startOffset, startX, avgCharWidth); int endVirtuals= computeVirtualChars(endOffset, endX, avgCharWidth); - + IDocument document= getDocument(); Point modelSelection= widgetSelection2ModelSelection(new Point(startOffset, endOffset - startOffset)); if (modelSelection == null) @@ -2446,7 +2446,7 @@ public class TextViewer extends Viewer implements try { int startLine= document.getLineOfOffset(startOffset); int endLine= document.getLineOfOffset(endOffset); - + int startColumn= startOffset - document.getLineOffset(startLine) + startVirtuals; int endColumn= endOffset - document.getLineOffset(endLine) + endVirtuals; if (startLine == -1 || endLine == -1) @@ -2456,7 +2456,7 @@ public class TextViewer extends Viewer implements return TextSelection.emptySelection(); } } - + Point p= getSelectedRange(); if (p.x == -1 || p.y == -1) return TextSelection.emptySelection(); @@ -2467,7 +2467,7 @@ public class TextViewer extends Viewer implements /** * Returns the number of virtual characters that exist beyond the end-of-line at offset * offset for an x-coordinate x. - * + * * @param offset the non-virtual offset to consider * @param x the x-coordinate (relative to the client area) of the possibly virtual offset * @param avgCharWidth the average character width to assume for virtual spaces @@ -3109,7 +3109,7 @@ public class TextViewer extends Viewer implements * NOTE: Only {@link #revealRange(int, int)} needs to use this method. The other methods are * called at a time where the editor is already realized. *

    - * + * * @param start the start offset of the range * @param end the end offset of the range * @since 3.8.1, but only used/effective in 4.x @@ -3132,7 +3132,7 @@ public class TextViewer extends Viewer implements /** * Reveals the given range of the visible document. - * + * * @param start the start offset of the range * @param end the end offset of the range */ @@ -3548,7 +3548,7 @@ public class TextViewer extends Viewer implements /** * Selects from the given map the one which is registered under the content type of the * partition in which the given offset is located. - * + * * @param offset the offset for which to find the plug-in * @param plugins the map from which to choose * @return the plug-in registered under the offset's content type or null if none @@ -3636,7 +3636,7 @@ public class TextViewer extends Viewer implements if (!e.doit) return; } - + if (fTextWidget.getBlockSelection() && (e.text == null || e.text.length() < 2)) { Point sel = fTextWidget.getSelection(); if (fTextWidget.getLineAtOffset(sel.x) != fTextWidget.getLineAtOffset(sel.y)) { @@ -3704,7 +3704,7 @@ public class TextViewer extends Viewer implements /** * Simulates typing behavior in block selection mode. - * + * * @param e the verify event. * @since 3.5 */ @@ -3715,7 +3715,7 @@ public class TextViewer extends Viewer implements the events share no manifest attribute to group them together or to detect the last event of a sequence, we simulate the modification at the first event and veto any following events with an equal event time. - + See also bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=268044 */ e.doit= false; @@ -3990,7 +3990,7 @@ public class TextViewer extends Viewer implements * passed code is wrapped into a begin/endCompoundChange undo session on the * {@linkplain #getRewriteTarget() rewrite target}; otherwise, the runnable is executed * directly. - * + * * @param runnable the code to wrap when in block selection mode * @since 3.5 */ @@ -4006,7 +4006,7 @@ public class TextViewer extends Viewer implements } finally { target.endCompoundChange(); } - + } /** diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/WhitespaceCharacterPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/WhitespaceCharacterPainter.java index 3093d98e7a0..4a5bd8eeedd 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/WhitespaceCharacterPainter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/WhitespaceCharacterPainter.java @@ -96,7 +96,7 @@ public class WhitespaceCharacterPainter implements IPainter, PaintListener { /** * Creates a new painter for the given text viewer and the painter options. - * + * * @param viewer the text viewer the painter should be attached to * @param showLeadingSpaces if true, show leading Spaces * @param showEnclosedSpaces if true, show enclosed Spaces @@ -182,7 +182,7 @@ public class WhitespaceCharacterPainter implements IPainter, PaintListener { int startLine= fTextWidget.getLineIndex(y); int endLine= fTextWidget.getLineIndex(y + h - 1); if (startLine <= endLine && startLine < fTextWidget.getLineCount()) { - + // avoid painting into the margins: Rectangle clipping= gc.getClipping(); Rectangle clientArea= fTextWidget.getClientArea(); @@ -279,7 +279,7 @@ public class WhitespaceCharacterPainter implements IPainter, PaintListener { /** * Draw characters of content range. - * + * * @param gc the GC * @param startOffset inclusive start index of the drawing range * @param endOffset exclusive end index of the drawing range @@ -424,11 +424,11 @@ public class WhitespaceCharacterPainter implements IPainter, PaintListener { } } } - + /** * Returns true if offset is selection in widget, * false otherwise. - * + * * @param widget the widget * @param offset the offset * @return true if offset is selection, false otherwise diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/BoldStylerProvider.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/BoldStylerProvider.java index d9477a9362e..5853d4e14a7 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/BoldStylerProvider.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/BoldStylerProvider.java @@ -20,7 +20,7 @@ import org.eclipse.jface.viewers.StyledString.Styler; /** * Provides {@link Styler} that applies bold style on the given font. - * + * * @since 3.11 */ public final class BoldStylerProvider { @@ -33,7 +33,7 @@ public final class BoldStylerProvider { /** * Creates a {@link BoldStylerProvider} instance which uses the given font. - * + * * @param font the font to use for creating the bold font */ public BoldStylerProvider(Font font) { @@ -52,7 +52,7 @@ public final class BoldStylerProvider { /** * Returns a {@link Styler} that applies bold style to the given {@link TextStyle}'s font. - * + * * @return a bold styler */ public Styler getBoldStyler() { @@ -70,12 +70,12 @@ public final class BoldStylerProvider { /** * Creates (if not already done) and returns the bold font used by the styler to apply the bold * style. - * + * *

    * Note: The callers must not cache and re-use the returned font outside the * current call. *

    - * + * * @return the bold font used by the styler */ public Font getBoldFont() { @@ -91,7 +91,7 @@ public final class BoldStylerProvider { /** * Returns the font used by the styler to create the bold font. - * + * * @return the font used for creating the bold font */ public Font getFont() { diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java index 5778315c5dd..7a88390db4f 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java @@ -415,7 +415,7 @@ class CompletionProposalPopup implements IContentAssistListener { /** * The sorter to be used for sorting the proposals or null if no sorting is * requested. - * + * * @since 3.8 */ private ICompletionProposalSorter fSorter; @@ -423,7 +423,7 @@ class CompletionProposalPopup implements IContentAssistListener { /** * Set to true by {@link #computeProposals(int)} when initial sorting is performed on the * computed proposals using {@link #fSorter}. - * + * * @since 3.11 */ private boolean fIsInitialSort; @@ -1134,7 +1134,7 @@ class CompletionProposalPopup implements IContentAssistListener { /** * Initializes the proposal selector with these given proposals. If a proposal sorter is * configured, the given proposals are sorted before. - * + * * @param proposals the proposals * @param isFilteredSubset if true, the proposal table is * not cleared, but the proposals that are not in the passed array @@ -1419,7 +1419,7 @@ class CompletionProposalPopup implements IContentAssistListener { /** * Fires an event after applying the given proposal, see {@link ICompletionListenerExtension2}. - * + * * @param proposal the applied proposal * @since 3.8 */ @@ -1429,7 +1429,7 @@ class CompletionProposalPopup implements IContentAssistListener { /** * Returns whether the given character is contained in the given array of characters. - * + * * @param characters the list of characters * @param c the character to look for in the list * @return true if character belongs to the list @@ -1799,7 +1799,7 @@ class CompletionProposalPopup implements IContentAssistListener { * proposals are also present along with prefix proposals (i.e. fFilteredProposals * list has mixed proposals) then casing of substring matches is ignored for the computation of * common prefix. - * + * * @return true if fFilteredProposals list contains proposals based on * different rules */ @@ -1953,7 +1953,7 @@ class CompletionProposalPopup implements IContentAssistListener { /** * Sets the proposal sorter. - * + * * @param sorter the sorter to be used, or null if no sorting is requested * @since 3.8 * @see ContentAssistant#setSorter(ICompletionProposalSorter) @@ -1964,7 +1964,7 @@ class CompletionProposalPopup implements IContentAssistListener { /** * Sorts the given proposal array. - * + * * @param proposals the new proposals to display in the popup window * @throws NullPointerException if no sorter has been set * @since 3.8 diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java index 358b16e6bd9..bc6a52a4f64 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java @@ -856,28 +856,28 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt /** * Dialog store constant for the x-size of the completion proposal pop-up - * + * * @since 3.0 */ public static final String STORE_SIZE_X= "size.x"; //$NON-NLS-1$ /** * Dialog store constant for the y-size of the completion proposal pop-up - * + * * @since 3.0 */ public static final String STORE_SIZE_Y= "size.y"; //$NON-NLS-1$ - + /** * Dialog store constant for the x-size of the context selector pop-up - * + * * @since 3.9 */ public static final String STORE_CONTEXT_SELECTOR_POPUP_SIZE_X= "contextSelector.size.x"; //$NON-NLS-1$ - + /** * Dialog store constant for the y-size of the context selector pop-up - * + * * @since 3.9 */ public static final String STORE_CONTEXT_SELECTOR_POPUP_SIZE_Y= "contextSelector.size.y"; //$NON-NLS-1$ @@ -1037,7 +1037,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt /** * The sorter to be used for sorting the proposals or null if no sorting is * requested. - * + * * @since 3.8 */ private ICompletionProposalSorter fSorter; @@ -1200,7 +1200,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt /** * Sets the delay after which the content assistant is automatically invoked if the cursor is * behind an auto activation character. - * + * * @param delay the auto activation delay (as of 3.6 a negative argument will be set to 0) */ public void setAutoActivationDelay(int delay) { @@ -1210,7 +1210,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt /** * Gets the delay after which the content assistant is automatically invoked if the cursor is * behind an auto activation character. - * + * * @return the auto activation delay (will not be negative) * @since 3.4 */ @@ -1350,9 +1350,9 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt /** * Sets the {@link BoldStylerProvider} used to emphasize matches in a proposal's styled display * string. - * + * * @param boldStylerProvider the bold styler provider - * + * * @see ICompletionProposalExtension7#getStyledDisplayString(IDocument, int, BoldStylerProvider) * @since 3.11 */ @@ -1363,9 +1363,9 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt /** * Returns the {@link BoldStylerProvider} used to emphasize matches in a proposal's styled * display string. - * + * * @see ICompletionProposalExtension7#getStyledDisplayString(IDocument, int, BoldStylerProvider) - * + * * @return the {@link BoldStylerProvider}, or null if not set * @since 3.11 */ @@ -1770,7 +1770,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt return false; } } - + promoteKeyListener(); fireSessionBeginEvent(isAutoActivated); return true; @@ -2183,7 +2183,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt *
  • {@link ContentAssistant#STORE_CONTEXT_SELECTOR_POPUP_SIZE_Y}
  • * *

    - * + * * @param dialogSettings the dialog settings * @since 3.0 */ @@ -2209,7 +2209,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt /** * Stores the content assist's context selector pop-up size. - * + * * @since 3.9 */ protected void storeContextSelectorPopupSize() { @@ -2226,7 +2226,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt /** * Restores the content assist's proposal pop-up size. - * + * * @return the stored size or null if none * @since 3.0 */ @@ -2275,7 +2275,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt /** * Restores the content assist's context selector pop-up size. - * + * * @return the stored size or null if none * @since 3.9 */ @@ -2320,7 +2320,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt /** * Sets the prefix completion property. If enabled, content assist delegates completion to * prefix completion. - * + * * @param enabled true to enable prefix completion, false to * disable */ @@ -2499,7 +2499,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt /** * Fires an event after applying a proposal, see {@link ICompletionListenerExtension2}. - * + * * @param proposal the applied proposal * @since 3.8 */ @@ -2604,7 +2604,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt /** * Sets the proposal sorter. - * + * * @param sorter the sorter to be used, or null if no sorting is requested * @since 3.8 */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java index 611b509ece0..1e51617a7e2 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java @@ -604,7 +604,7 @@ class ContextInformationPopup implements IContentAssistListener { /** * Returns the size of the context selector pop-up. - * + * * @return a Point containing the size * @since 3.9 */ @@ -628,7 +628,7 @@ class ContextInformationPopup implements IContentAssistListener { /** * Sets the contexts in the context selector to the given set. - * + * * @param contexts the possible contexts * @param selectionIndex the index of the proposal to select */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionListenerExtension2.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionListenerExtension2.java index f888c90013b..f2152bde1a9 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionListenerExtension2.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionListenerExtension2.java @@ -17,14 +17,14 @@ package org.eclipse.jface.text.contentassist; *

    * Clients may implement this interface. *

    - * + * * @since 3.8 */ public interface ICompletionListenerExtension2 { /** * Called after applying a proposal. - * + * * @param proposal the applied proposal */ void applied(ICompletionProposal proposal); diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionProposal.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionProposal.java index cf545e9e50d..7f800770c47 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionProposal.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionProposal.java @@ -68,7 +68,7 @@ import org.eclipse.jface.text.IDocument; *
  • {@link org.eclipse.jface.text.contentassist.ICompletionProposalExtension7} since version 3.11 introducing * the following function: *
      - *
    • Emphasize ranges in the styled display string of the proposal that match the token at the + *
    • Emphasize ranges in the styled display string of the proposal that match the token at the * current caret offset.
    • *
    *
  • @@ -122,8 +122,8 @@ public interface ICompletionProposal { * Returns the string to be displayed in the list of completion proposals. * * @return the string to be displayed - * - * @see ICompletionProposalExtension6#getStyledDisplayString() + * + * @see ICompletionProposalExtension6#getStyledDisplayString() * @see ICompletionProposalExtension7#getStyledDisplayString(IDocument, int, BoldStylerProvider) */ String getDisplayString(); diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionProposalExtension7.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionProposalExtension7.java index 3ba223a7d9e..973e3088ae3 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionProposalExtension7.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionProposalExtension7.java @@ -26,7 +26,7 @@ import org.eclipse.jface.text.IDocument; * Note: {@link ICompletionProposal#getDisplayString()} still needs to be correctly * implemented as this method might be ignored in case of uninstalled owner draw support. *

    - * + * * @since 3.11 */ public interface ICompletionProposalExtension7 { @@ -35,11 +35,11 @@ public interface ICompletionProposalExtension7 { * token at the current caret offset. This can for example be used to emphasize prefix, camel * case or substring matches in the display string. Clients can emphasize the matches using any * font style. It is encouraged to use the bold font as the style. - * + * * @param document the document where content assist is invoked * @param offset the offset in the document at current caret location * @param boldStylerProvider to provide a {@link Styler} that applies bold style - * + * * @return the styled display string for this proposal with emphasized ranges matching the token * at the given offset */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionProposalSorter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionProposalSorter.java index 3ca673b8ac5..4ca0794ec1a 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionProposalSorter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ICompletionProposalSorter.java @@ -19,14 +19,14 @@ package org.eclipse.jface.text.contentassist; * needed. See {@link ContentAssistant#setSorter(ICompletionProposalSorter)} for more information on * how to register a proposal sorter. *

    - * + * * @since 3.8 */ public interface ICompletionProposalSorter { /** * The orderings imposed by an implementation need not be consistent with equals. - * + * * @param p1 the first proposal to be compared * @param p2 the second proposal to be compared * @return a negative integer, zero, or a positive integer as the first argument is less than, diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/IContextInformation.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/IContextInformation.java index 041c87e3d71..8b4520cef84 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/IContextInformation.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/IContextInformation.java @@ -69,7 +69,7 @@ public interface IContextInformation { * Note: As specified in {@link Object#equals(Object)} clients will most likely * also have to implement {@link Object#hashCode()}. *

    - * + * * @see Object#equals(Object) */ @Override diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/DefaultHyperlinkPresenter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/DefaultHyperlinkPresenter.java index 6a5bf5604e0..7d5bed65370 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/DefaultHyperlinkPresenter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/DefaultHyperlinkPresenter.java @@ -58,7 +58,7 @@ public class DefaultHyperlinkPresenter implements IHyperlinkPresenter, IHyperlin * Value is of type String. A RGB color value encoded as a string using class * PreferenceConverter. *

    - * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter */ @@ -69,7 +69,7 @@ public class DefaultHyperlinkPresenter implements IHyperlinkPresenter, IHyperlin *

    * The preference value is of type Boolean. *

    - * + * * @since 3.5 */ public final static String HYPERLINK_COLOR_SYSTEM_DEFAULT= "hyperlinkColor.SystemDefault"; //$NON-NLS-1$ @@ -82,7 +82,7 @@ public class DefaultHyperlinkPresenter implements IHyperlinkPresenter, IHyperlin /** * Tells whether to use native link color. - * + * * @since 3.5 */ private boolean fIsUsingNativeLinkColor; @@ -111,7 +111,7 @@ public class DefaultHyperlinkPresenter implements IHyperlinkPresenter, IHyperlin /** * Creates a new default hyperlink presenter. - * + * * @param color the hyperlink color or null if the existing text color should be * preserved; to be disposed by the caller */ @@ -121,7 +121,7 @@ public class DefaultHyperlinkPresenter implements IHyperlinkPresenter, IHyperlin /** * Creates a new default hyperlink presenter. - * + * * @param color the hyperlink color or null if the existing text color should be * preserved */ @@ -208,7 +208,7 @@ public class DefaultHyperlinkPresenter implements IHyperlinkPresenter, IHyperlin /** * Sets the hyperlink foreground color. - * + * * @param color the hyperlink foreground color or null if the existing text color * should be preserved */ @@ -324,7 +324,7 @@ public class DefaultHyperlinkPresenter implements IHyperlinkPresenter, IHyperlin /** * Creates a color from the information stored in the given preference store. - * + * * @return the color or null if there is no such information available or i f the * text widget is not available */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/HyperlinkManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/HyperlinkManager.java index e38a970cf2d..9997c39632a 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/HyperlinkManager.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/HyperlinkManager.java @@ -261,7 +261,7 @@ public class HyperlinkManager implements ITextListener, Listener, KeyListener, M /** * Returns the hyperlinks in the given region or null if none. - * + * * @param region the selection region * @return the array of hyperlinks found or null if none * @since 3.7 @@ -340,7 +340,7 @@ public class HyperlinkManager implements ITextListener, Listener, KeyListener, M /** * Returns the offset in the given viewer that corresponds to the current cursor location. - * + * * @return the offset in the given viewer that corresponds to the current cursor location. */ protected int getCurrentTextOffset() { @@ -356,7 +356,7 @@ public class HyperlinkManager implements ITextListener, Listener, KeyListener, M } fActive= true; - + // do not show hyperlink, since that would often be confusing (e.g. when pressing Ctrl+C) } @@ -380,18 +380,18 @@ public class HyperlinkManager implements ITextListener, Listener, KeyListener, M if (!isRegisteredStateMask(event.stateMask)) { if (fActive) deactivate(); - + return; } - + if (event.button != 1) { deactivate(); return; } - + fActive= true; fActiveHyperlinkStateMask= event.stateMask & SWT.MODIFIER_MASK; - + StyledText text= fTextViewer.getTextWidget(); if (text == null || text.isDisposed()) { deactivate(); @@ -533,16 +533,16 @@ public class HyperlinkManager implements ITextListener, Listener, KeyListener, M /** * Opens the hyperlink at the current caret location directly if there's only one link, else * opens the hyperlink control showing all the hyperlinks at that location. - * + * * @param takesFocusWhenVisible true if the control takes focus when visible, * false otherwise - * + * * @return true if at least one hyperlink has been found at the caret location, * false otherwise * @since 3.7 */ private boolean showHyperlinks(boolean takesFocusWhenVisible) { - + if (fActiveHyperlinks == null || fActiveHyperlinks.length == 0) { fHyperlinkPresenter.hideHyperlinks(); return false; @@ -562,7 +562,7 @@ public class HyperlinkManager implements ITextListener, Listener, KeyListener, M /** * Opens the hyperlink at the caret location or opens a chooser * if more than one hyperlink is available. - * + * * @return true if at least one hyperlink has been found at the caret location, false otherwise * @see #OPEN_HYPERLINK * @since 3.6 diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/IHyperlinkPresenter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/IHyperlinkPresenter.java index 562133d24ef..b62985615d0 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/IHyperlinkPresenter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/IHyperlinkPresenter.java @@ -27,7 +27,7 @@ import org.eclipse.jface.text.ITextViewer; *
  • {@link IHyperlinkPresenterExtension2} since version 3.7, * adds the ability distinguish between the modes in which the * control either takes focus or not when visible. - *
  • + * *

    *

    * Clients may implement this interface. A default implementation is provided diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/IHyperlinkPresenterExtension2.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/IHyperlinkPresenterExtension2.java index a08fb27109a..ba98875d4c5 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/IHyperlinkPresenterExtension2.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/IHyperlinkPresenterExtension2.java @@ -17,7 +17,7 @@ package org.eclipse.jface.text.hyperlink; *

    * Clients may implement this interface. *

    - * + * * @since 3.7 */ public interface IHyperlinkPresenterExtension2 { @@ -25,7 +25,7 @@ public interface IHyperlinkPresenterExtension2 { /** * Tells this hyperlink presenter to show the given hyperlinks on the installed text viewer and * specifies whether or not the control takes focus when visible. - * + * * @param activeHyperlinks the hyperlinks to show * @param takesFocusWhenVisible true if the control takes the focus when visible, * false otherwise. Will be ignored if there is only one hyperlink to diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/MultipleHyperlinkPresenter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/MultipleHyperlinkPresenter.java index 2972bca1ada..e3d8d49a332 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/MultipleHyperlinkPresenter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/MultipleHyperlinkPresenter.java @@ -168,7 +168,7 @@ public class MultipleHyperlinkPresenter extends DefaultHyperlinkPresenter implem protected void createContent(Composite parent) { fParent= parent; GridLayout layout= new GridLayout(); - + if (IS_OLD_WINDOWS) { layout.marginWidth= 0; layout.marginHeight= 4; @@ -187,7 +187,7 @@ public class MultipleHyperlinkPresenter extends DefaultHyperlinkPresenter implem layout.marginWidth= 4; layout.marginHeight= 4; } - + fParent.setLayout(layout); fParent.setForeground(fForegroundColor); fParent.setBackground(fBackgroundColor); @@ -212,7 +212,7 @@ public class MultipleHyperlinkPresenter extends DefaultHyperlinkPresenter implem scrollBarWidth--; scrollBarHeight--; } - + int width; if (preferedSize.y - scrollBarHeight <= constraints.y) { width= preferedSize.x - scrollBarWidth; @@ -349,7 +349,7 @@ public class MultipleHyperlinkPresenter extends DefaultHyperlinkPresenter implem private void openSelectedLink() { if (fTable.getSelectionCount() < 1) return; - + TableItem selection= fTable.getSelection()[0]; IHyperlink link= (IHyperlink)selection.getData(); fManager.hideInformationControl(); @@ -620,7 +620,7 @@ public class MultipleHyperlinkPresenter extends DefaultHyperlinkPresenter implem /** * Sets the caret where hyperlinking got initiated. - * + * * @since 3.5 */ private void setCaret() { @@ -697,7 +697,7 @@ public class MultipleHyperlinkPresenter extends DefaultHyperlinkPresenter implem /** * Creates a new multiple hyperlink presenter which uses {@link #HYPERLINK_COLOR} to read the * color from the given preference store. - * + * * @param store the preference store */ public MultipleHyperlinkPresenter(IPreferenceStore store) { @@ -757,7 +757,7 @@ public class MultipleHyperlinkPresenter extends DefaultHyperlinkPresenter implem /** * {@inheritDoc} - * + * * @since 3.7 */ @Override @@ -790,7 +790,7 @@ public class MultipleHyperlinkPresenter extends DefaultHyperlinkPresenter implem /** * Sets the caret where hyperlinking got initiated. - * + * * @since 3.5 */ private void setCaret() { diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/information/InformationPresenter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/information/InformationPresenter.java index 45e927dc274..6d0cf936086 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/information/InformationPresenter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/information/InformationPresenter.java @@ -346,7 +346,7 @@ public class InformationPresenter extends AbstractInformationControlManager impl Point loc= styledText.getLocationAtOffset(start); bounds= new Rectangle(loc.x, loc.y, 0, styledText.getLineHeight(start)); } - + Rectangle clientArea= styledText.getClientArea(); Geometry.moveInside(bounds, clientArea); return bounds; diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/presentation/PresentationReconciler.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/presentation/PresentationReconciler.java index 5fe6030a56f..d8b1922f396 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/presentation/PresentationReconciler.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/presentation/PresentationReconciler.java @@ -217,7 +217,7 @@ public class PresentationReconciler implements IPresentationReconciler, IPresent /** * Translates the given text event into the corresponding range of the viewer's document. - * + * * @param e the text event * @return the widget region corresponding the region of the given event or * null if none @@ -488,7 +488,7 @@ public class PresentationReconciler implements IPresentationReconciler, IPresent damageStart= Math.min(damageStart, fChangedDocumentPartitions.getOffset()); damageEnd= Math.max(damageEnd, fChangedDocumentPartitions.getOffset() + fChangedDocumentPartitions.getLength()); } - + damage= damageEnd == -1 ? r : new Region(damageStart, damageEnd - damageStart); } diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/quickassist/QuickAssistAssistant.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/quickassist/QuickAssistAssistant.java index 3f74c5baa27..54c5c48577d 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/quickassist/QuickAssistAssistant.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/quickassist/QuickAssistAssistant.java @@ -179,7 +179,7 @@ public class QuickAssistAssistant implements IQuickAssistAssistant, IQuickAssist public void setRestoreCompletionProposalSize(IDialogSettings dialogSettings) { fQuickAssistAssistantImpl.setRestoreCompletionProposalSize(dialogSettings); } - + /** * Callback to signal this quick assist assistant that the presentation of the * possible completions has been stopped. diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/revisions/RevisionInformation.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/revisions/RevisionInformation.java index aaf5656c653..0988ab60f48 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/revisions/RevisionInformation.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/revisions/RevisionInformation.java @@ -114,7 +114,7 @@ public final class RevisionInformation implements ITextHoverExtension, IInformat * Adjusts the revision information to the given diff information. Any previous diff information * is discarded. Note: This is an internal framework method and must not be * called by clients. - * + * * @param hunks the diff hunks to adjust the revision information to * @since 3.3 * @noreference This method is not intended to be referenced by clients. diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/DefaultDamagerRepairer.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/DefaultDamagerRepairer.java index 578cee27034..840eb87a0cd 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/DefaultDamagerRepairer.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/DefaultDamagerRepairer.java @@ -121,7 +121,7 @@ public class DefaultDamagerRepairer implements IPresentationDamager, IPresentati *

    * This implementation damages entire lines unless clipped by the given partition. *

    - * + * * @return the full lines containing the document changes described by the document event, * clipped by the given partition. If there was a partitioning change then the whole * partition is returned. diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/IPartitionTokenScanner.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/IPartitionTokenScanner.java index f0d2ebd2f29..05967a33374 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/IPartitionTokenScanner.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/IPartitionTokenScanner.java @@ -31,7 +31,7 @@ public interface IPartitionTokenScanner extends ITokenScanner { * range may not only contain complete partitions but starts at the beginning of a line in the * middle of a partition of the given content type. This requires that a partition delimiter can * not contain a line delimiter. - * + * * @param document the document to scan * @param offset the offset of the document range to scan * @param length the length of the document range to scan diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedPartitionScanner.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedPartitionScanner.java index 3e0491d1854..1bb0c91f3e9 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedPartitionScanner.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/RuleBasedPartitionScanner.java @@ -22,7 +22,7 @@ import org.eclipse.jface.text.IDocument; * content type that is not null then this scanner will first try the rules that match * the given content type. *

    - * + * * @since 2.0 */ public class RuleBasedPartitionScanner extends BufferedRuleBasedScanner implements IPartitionTokenScanner { diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WhitespaceRule.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WhitespaceRule.java index d48d35393ad..2f0048853a9 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WhitespaceRule.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WhitespaceRule.java @@ -36,7 +36,7 @@ public class WhitespaceRule implements IRule { /** * Creates a rule which, with the help of an whitespace detector, will return * {@link Token#WHITESPACE} when a whitespace is detected. - * + * * @param detector the rule's whitespace detector */ public WhitespaceRule(IWhitespaceDetector detector) { @@ -46,7 +46,7 @@ public class WhitespaceRule implements IRule { /** * Creates a rule which, with the help of an whitespace detector, will return the given * whitespace token when a whitespace is detected. - * + * * @param detector the rule's whitespace detector * @param token the token returned for whitespace * @since 3.5 @@ -60,7 +60,7 @@ public class WhitespaceRule implements IRule { /** * {@inheritDoc} - * + * * @return {@link #fWhitespaceToken} if whitespace got detected, {@link Token#UNDEFINED} * otherwise */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordRule.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordRule.java index d091e18d60b..2c71c57a809 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordRule.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordRule.java @@ -142,7 +142,7 @@ public class WordRule implements IRule { // If case-insensitive, convert to lower case before accessing the map if (fIgnoreCase) buffer= buffer.toLowerCase(); - + IToken token= fWords.get(buffer); if (token != null) diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java index 3b96efa606a..cddb1370434 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java @@ -664,7 +664,7 @@ public class AnnotationBarHoverManager extends AbstractHoverInformationControlMa } return super.computeInformationControlLocation(subjectArea, controlSize); } - + @Override protected Point computeLocation(Rectangle subjectArea, Point controlSize, Anchor anchor) { MouseEvent event= getHoverEvent(); diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java index ef1addf1982..93a20c2f4fa 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java @@ -1100,7 +1100,7 @@ public class AnnotationPainter implements IPainter, PaintListener, IAnnotationMo * Adds the given annotation type to the list of annotation types whose annotations should be * painted by this painter using squiggly drawing. If the annotation type is already in this * list, this method is without effect. - * + * * @param annotationType the annotation type * @deprecated As of 3.4 replaced by * {@link #addTextStyleStrategy(Object, AnnotationPainter.ITextStyleStrategy)} and @@ -1115,7 +1115,7 @@ public class AnnotationPainter implements IPainter, PaintListener, IAnnotationMo * Adds the given annotation type to the list of annotation types whose annotations should be * painted by this painter using the given strategy. If the annotation type is already in this * list, the old strategy gets replaced. - * + * * @param annotationType the annotation type * @param strategyID the id of the drawing or text style strategy that should be used for this * annotation type @@ -1517,7 +1517,7 @@ public class AnnotationPainter implements IPainter, PaintListener, IAnnotationMo /** * Returns the widget region that corresponds to the * given offset and length in the viewer's document. - * + * * The returned object can be the fReusableRegion and may used * only to read the return values and must not used to store * the region. diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java index 8954752f27f..8000691121e 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java @@ -700,7 +700,7 @@ public class AnnotationRulerColumn implements IVerticalRulerColumn, IVerticalRul int lines= endLine - startLine; if (startLine != endLine || !isWrapActive || length <= 0) { - // line height for different lines includes wrapped line info already, + // line height for different lines includes wrapped line info already, // end we show annotations without offset info at very first line anyway r.height= JFaceTextUtil.computeLineHeight(fCachedTextWidget, startLine, endLine + 1, lines + 1); r.y= JFaceTextUtil.computeLineHeight(fCachedTextWidget, 0, startLine, startLine) - fScrollPos; @@ -809,7 +809,7 @@ public class AnnotationRulerColumn implements IVerticalRulerColumn, IVerticalRul int lines= endLine - startLine; if(startLine != endLine || !isWrapActive || length <= 0){ - // line height for different lines includes wrapped line info already, + // line height for different lines includes wrapped line info already, // end we show annotations without offset info at very first line anyway r.height= JFaceTextUtil.computeLineHeight(fCachedTextWidget, startLine, endLine + 1, lines + 1); r.y= JFaceTextUtil.computeLineHeight(fCachedTextWidget, 0, startLine, startLine) - fScrollPos; @@ -819,7 +819,7 @@ public class AnnotationRulerColumn implements IVerticalRulerColumn, IVerticalRul r.height= textBounds.height; r.y = textBounds.y; } - + if (r.y < dimension.y && fAnnotationAccessExtension != null) // annotation within visible area fAnnotationAccessExtension.paint(annotation, gc, fCanvas, r); } diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java index d4a4c57337e..51f3d83102e 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java @@ -38,12 +38,12 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar * specified partitioning. The specified list of characters must have the form
    { * start, end, start, end, ..., start, end * }
    For instance: - * + * *
     	 * char[] chars = new char[] {'(', ')', '{', '}', '[', ']'};
     	 * new DefaultCharacterPairMatcher(chars, ...);
     	 * 
    - * + * * @param chars a list of characters * @param partitioning the partitioning to match within */ @@ -56,12 +56,12 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar * specified partitioning. The specified list of characters must have the form
    { * start, end, start, end, ..., start, end * }
    For instance: - * + * *
     	 * char[] chars = new char[] {'(', ')', '{', '}', '[', ']'};
     	 * new DefaultCharacterPairMatcher(chars, ...);
     	 * 
    - * + * * @param chars a list of characters * @param partitioning the partitioning to match within * @param caretEitherSideOfBracket controls the matching behavior. When true, the @@ -82,12 +82,12 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar * Creates a new character pair matcher that matches characters within the default partitioning. * The specified list of characters must have the form
    { start, end, * start, end, ..., start, end }
    For instance: - * + * *
     	 * char[] chars= new char[] { '(', ')', '{', '}', '[', ']' };
     	 * new DefaultCharacterPairMatcher(chars);
     	 * 
    - * + * * @param chars a list of characters */ public DefaultCharacterPairMatcher(char[] chars) { @@ -197,12 +197,12 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar String currEndContentType= TextUtilities.getContentType(document, fPartitioning, currentEndOffset, false); if (!prevEndContentType.equals(currEndContentType)) return true; - + String prevStartContentType= TextUtilities.getContentType(document, fPartitioning, previousStartOffset, true); String currStartContentType= TextUtilities.getContentType(document, fPartitioning, currentStartOffset, true); if (!prevStartContentType.equals(currStartContentType)) return true; - + int start; int end; if (currentEndOffset > previousEndOffset) { @@ -217,7 +217,7 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar return true; } } - + if (currentStartOffset > previousStartOffset) { start= previousStartOffset; end= currentStartOffset; @@ -239,7 +239,7 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar /** * Computes the adjustment in the start offset for the purpose of finding a matching peer. This * is required as the direction of selection can be right-to-left or left-to-right. - * + * * @param document the document to work on * @param offset the start offset * @param length the selection length @@ -347,7 +347,7 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar */ private IRegion findEnclosingPeers(IDocument document, DocumentPartitionAccessor doc, int offset, int length, int lowerBoundary, int upperBoundary) throws BadLocationException { char[] pairs= fPairs.fPairs; - + int start; int end; if (length >= 0) { @@ -357,7 +357,7 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar end= offset; start= offset + length; } - + boolean lowerFound= false; boolean upperFound= false; int[][] counts= new int[pairs.length][2]; @@ -371,12 +371,12 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar pos1= start; pos2= doc.getNextPosition(start, true); } - + while ((pos1 >= lowerBoundary && !lowerFound) || (pos2 < upperBoundary && !upperFound)) { for (int i= 0; i < counts.length; i++) { counts[i][0]= counts[i][1]= 0; } - + outer1: while (pos1 >= lowerBoundary && !lowerFound) { final char c= doc.getChar(pos1); int i= getCharacterIndex(c, document, pos1); @@ -395,7 +395,7 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar } pos1= doc.getNextPosition(pos1, false); } - + outer2: while (pos2 < upperBoundary && !upperFound) { final char c= doc.getChar(pos2); int i= getCharacterIndex(c, document, pos2); @@ -414,7 +414,7 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar } pos2= doc.getNextPosition(pos2, true); } - + if (pos1 > start || pos2 < end - 1) { //match inside selection => discard pos1= doc.getNextPosition(pos1, false); @@ -432,7 +432,7 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar /** * Determines the index of the character in the char array passed to the constructor of the pair * matcher. - * + * * @param ch the character * @param document the document * @param offset the offset in document @@ -582,7 +582,7 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar /** * Returns true if the specified character occurs in one of the character pairs. - * + * * @param c a character * @return true exactly if the character occurs in one of the pairs */ @@ -613,7 +613,7 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar /** * Returns true if the specified character is a start character. - * + * * @param c a character * @return true exactly if the character is a start character */ @@ -623,7 +623,7 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar /** * Returns true if the specified character is an end character. - * + * * @param c a character * @return true exactly if the character is an end character * @since 3.8 @@ -634,7 +634,7 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar /** * Returns the matching character for the specified character. - * + * * @param c a character occurring in a character pair * @return the matching character */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ICharacterPairMatcher.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ICharacterPairMatcher.java index d916eb9997c..d89ef7d0491 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ICharacterPairMatcher.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ICharacterPairMatcher.java @@ -21,7 +21,7 @@ import org.eclipse.jface.text.IRegion; * of the initial offset. The matcher then searches for the matching peer character of the chosen * character and if it finds one, delivers the minimal region of the document that contains both * characters. - * + * *

    * In order to provide backward compatibility for clients of ICharacterPairMatcher, * extension interfaces are used to provide a means of evolution. The following extension interface @@ -36,7 +36,7 @@ import org.eclipse.jface.text.IRegion; * Clients may implement this interface and its extension interface or use the default * implementation provided by DefaultCharacterPairMatcher. *

    - * + * * @see org.eclipse.jface.text.source.ICharacterPairMatcherExtension * @since 2.1 */ @@ -68,13 +68,13 @@ public interface ICharacterPairMatcher { * Starting at the given offset, the matcher chooses a character close to this offset. The * matcher then searches for the matching peer character of the chosen character and if it finds * one, returns the minimal region of the document that contains both characters. - * + * *

    * Since version 3.8 the recommended way for finding matching peers is to use * {@link org.eclipse.jface.text.source.ICharacterPairMatcherExtension#match(IDocument, int, int)} * . *

    - * + * * @param document the document to work on * @param offset the start offset * @return the minimal region containing the peer characters or null if there is no @@ -86,7 +86,7 @@ public interface ICharacterPairMatcher { * Returns the anchor for the region of the matching peer characters. The anchor says whether * the character that has been chosen to search for its peer character has been the left or the * right character of the pair. - * + * * @return RIGHT or LEFT */ int getAnchor(); diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ICharacterPairMatcherExtension.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ICharacterPairMatcherExtension.java index 9d01713f698..bfb7fb88b8e 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ICharacterPairMatcherExtension.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ICharacterPairMatcherExtension.java @@ -18,7 +18,7 @@ import org.eclipse.jface.text.IRegion; *

    * Extends the character pair matcher with the concept of matching peer character and enclosing peer * characters for a given selection. - * + * * @see org.eclipse.jface.text.source.ICharacterPairMatcher * @since 3.8 */ @@ -28,7 +28,7 @@ public interface ICharacterPairMatcherExtension { * Starting at the given offset (i.e. length 0) or the selected character, the matcher searches * for the matching peer character and if it finds one, returns the minimal region of the * document that contains both characters. - * + * * @param document the document to work on * @param offset the start offset * @param length the selection length which can be negative indicating right-to-left selection @@ -41,7 +41,7 @@ public interface ICharacterPairMatcherExtension { /** * Starting at the given selection, the matcher searches for a pair of enclosing peer characters * and if it finds one, returns the minimal region of the document that contains the pair. - * + * * @param document the document to work on * @param offset the start offset * @param length the selection length which can be negative indicating right-to-left selection @@ -52,7 +52,7 @@ public interface ICharacterPairMatcherExtension { /** * Checks whether the character is one of the characters matched by the pair matcher. - * + * * @param ch the character * @return true if the the character is one of the characters matched by the pair * matcher, and false otherwise @@ -61,12 +61,12 @@ public interface ICharacterPairMatcherExtension { /** * Checks whether the character is one of the characters matched by the pair matcher. - * + * *

    * Clients can use this method to handle characters which may have special meaning in some * situations. E.g. in Java, '<' is used as an angular bracket and as well as less-than operator. *

    - * + * * @param ch the character * @param document the document * @param offset the offset in document @@ -78,14 +78,14 @@ public interface ICharacterPairMatcherExtension { /** * Computes whether a client needs to recompute the enclosing pair after a selection change in * the document. - * + * *

    * This is intended to be a quick test to determine whether a re-computation of the enclosing pair is * required, as the re-computation after each selection change via a * {@link #findEnclosingPeerCharacters(IDocument, int, int)} call can be expensive for some * clients. *

    - * + * * @param document the document to work on * @param currentSelection the current selection in the document * @param previousSelection the previous selection in the document diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.java index 2248b1a2e4c..44168fc4557 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.java @@ -40,7 +40,7 @@ import org.eclipse.swt.widgets.Control; * Clients may implement this interface or use the default implementation provided by * OverviewRuler. *

    - * + * * @see org.eclipse.jface.text.ITextViewer * @see org.eclipse.jface.text.source.IOverviewRulerExtension * @since 2.1 diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRulerExtension.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRulerExtension.java index 82fcc0a63c2..341bd20880a 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRulerExtension.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRulerExtension.java @@ -16,7 +16,7 @@ package org.eclipse.jface.text.source; *

    * Allows to set whether to use saturated colors in the overview ruler. *

    - * + * * @see org.eclipse.jface.text.source.IOverviewRuler * @since 3.8 */ @@ -27,7 +27,7 @@ public interface IOverviewRulerExtension { *

    * The initial value is defined by the ruler implementation. *

    - * + * * @param useSaturatedColors true if saturated colors should be used, * false otherwise */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ISourceViewer.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ISourceViewer.java index caa4ce9b66a..d8f4c2373b4 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ISourceViewer.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ISourceViewer.java @@ -93,7 +93,7 @@ public interface ISourceViewer extends ITextViewer { * @since 3.2 */ int QUICK_ASSIST= ITextOperationTarget.STRIP_PREFIX + 10; - + /* * XXX: Next free number is HyperlinkManager.OPEN_HYPERLINK + 1 */ @@ -170,7 +170,7 @@ public interface ISourceViewer extends ITextViewer { /** * Sets the viewers's range indication to the specified range. It is indicated whether the * cursor should also be moved to the beginning of the specified range. - * + * * @param offset the offset of the range * @param length the length of the range * @param moveCursor indicates whether the cursor should be moved to the given offset diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineChangeHover.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineChangeHover.java index 4b1bc516477..fe1912ae89d 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineChangeHover.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineChangeHover.java @@ -139,7 +139,7 @@ public class LineChangeHover implements IAnnotationHover, IAnnotationHoverExtens return trimTrailing(text.toString()); } } - + text = new StringBuffer(text.toString().trim()); if (text.length() == 0 && added-- > 0 && maxLines-- > 0) { text.append("+ ");//$NON-NLS-1$ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java index daf6e4c4c96..5a41b5db854 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java @@ -30,7 +30,7 @@ import org.eclipse.jface.text.revisions.RevisionInformation; /** * A vertical ruler column displaying line numbers and serving as a UI for quick diff. Clients * usually instantiate and configure object of this class. - * + * * @since 3.0 * @noextend This class is not intended to be subclassed by clients. */ @@ -328,7 +328,7 @@ public class LineNumberChangeRulerColumn extends LineNumberRulerColumn implement fDiffPainter.setModel(null); super.handleDispose(); } - + @Override void handleMouseScrolled(MouseEvent e) { if (fRevisionPainter.isWheelHandlerInstalled()) { diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java index 2d944d157de..d0671754d82 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java @@ -917,7 +917,7 @@ public class LineNumberRulerColumn implements IVerticalRulerColumn { /** * Handles mouse scrolled events on the ruler by forwarding them to the text widget. - * + * * @param e the mouse event * @since 3.10 */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java index d1d6670ef97..f7afc6b1767 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java @@ -38,7 +38,7 @@ import org.eclipse.jface.text.TextEvent; *

    * Clients instantiate and configure an object of this class. *

    - * + * * @since 2.1 */ public final class MatchingCharacterPainter implements IPainter, PaintListener { @@ -62,42 +62,42 @@ public final class MatchingCharacterPainter implements IPainter, PaintListener { /** * Whether to highlight enclosing peer characters or not. - * + * * @since 3.8 */ private boolean fHighlightEnclosingPeerCharacters; /** * Whether to highlight the character at caret location or not. - * + * * @since 3.8 */ private boolean fHighlightCharacterAtCaretLocation; /** * Whether a character is present at caret location or not. - * + * * @since 3.8 */ private boolean fCharacterPresentAtCaretLocation; /** * The previous selection, used to determine the need for computing enclosing brackets. - * + * * @since 3.8 */ private IRegion fPreviousSelection; /** * Previous length of the document this painter is associated with. - * + * * @since 3.8 */ private int fPreviousLengthOfDocument; /** * The text viewer change listener. - * + * * @since 3.8 */ private TextListener fTextListener; @@ -118,7 +118,7 @@ public final class MatchingCharacterPainter implements IPainter, PaintListener { /** * Sets whether to highlight the character at caret location or not. - * + * * @param highlightCharacterAtCaretLocation whether to highlight the character at caret location * or not * @since 3.8 @@ -130,7 +130,7 @@ public final class MatchingCharacterPainter implements IPainter, PaintListener { /** * Sets whether to highlight enclosing peer characters or not. - * + * * @param highlightEnclosingPeerCharcters whether to highlight enclosing peer characters or not * @since 3.8 */ @@ -185,7 +185,7 @@ public final class MatchingCharacterPainter implements IPainter, PaintListener { /** * Handles a redraw request. * - * @param gc the GC to draw into or null to send a redraw request if necessary + * @param gc the GC to draw into or null to send a redraw request if necessary */ private void handleDrawRequest(GC gc) { @@ -272,7 +272,7 @@ public final class MatchingCharacterPainter implements IPainter, PaintListener { *

    * The selection offset is model based. *

    - * + * * @param sourceViewer the source viewer * @return a region denoting the current signed selection, for a resulting RtoL selections * length is < 0 @@ -398,15 +398,15 @@ public final class MatchingCharacterPainter implements IPainter, PaintListener { /** * Installs or uninstalls the text listener depending on the boolean parameter. - * + * * @param install true to install the text listener, false to uninstall - * + * * @since 3.8 */ private void installUninstallTextListener(boolean install) { if (!(fMatcher instanceof ICharacterPairMatcherExtension)) return; - + if (install) { fTextListener= new TextListener(); fSourceViewer.addTextListener(fTextListener); @@ -421,7 +421,7 @@ public final class MatchingCharacterPainter implements IPainter, PaintListener { /** * Listens to document changes and if required by those document changes causes a re-computation * of matching characters. - * + * * @since 3.8 */ private class TextListener implements ITextListener { @@ -446,7 +446,7 @@ public final class MatchingCharacterPainter implements IPainter, PaintListener { /** * Searches for matched characters in the given string. - * + * * @param text the string to search * @param matcher the pair matcher * @return true if a matched character is found, false otherwise diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java index 64b492046c3..763054ef53f 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java @@ -67,7 +67,7 @@ import org.eclipse.jface.text.source.projection.AnnotationBag; *

    * Clients usually instantiate and configure objects of this class. *

    - * + * * @since 2.1 */ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { @@ -272,7 +272,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { Point s= fHeader.getSize(); e.gc.setBackground(fIndicatorColor); - + Rectangle headerBounds= fHeader.getBounds(); boolean isOnTop= headerBounds.y + headerBounds.height <= fCanvas.getLocation().y; boolean isTall= s.y > s.x + 2*ANNOTATION_HEIGHT; @@ -306,7 +306,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { /** * Container for cached widget infos. - * + * * @since 3.7 */ static class WidgetInfos { @@ -334,10 +334,10 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { * the writable area in the text widget (height of all lines in pixels) */ int writable; - + /** * Initializes the widget infos. - * + * * @param textWidget the text widget * @param canvas the overview ruler canvas */ @@ -345,7 +345,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { maxLines= textWidget.getLineCount(); bounds= canvas.getBounds(); writable= JFaceTextUtil.computeLineHeight(textWidget, 0, maxLines, maxLines); - + ScrollBar verticalBar= textWidget.getVerticalBar(); if (verticalBar != null && !verticalBar.getVisible()) { // Note: when the vertical bar is invisible, the thumbHeight is not reliable, @@ -364,17 +364,17 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { } else { thumbHeight= verticalBar != null ? Math.max(Math.min(bounds.height, verticalBar.getThumbBounds().height), 0) : 0; } - + int partialTopIndex= JFaceTextUtil.getPartialTopIndex(textWidget); int topLineHeight= textWidget.getLineHeight(textWidget.getOffsetAtLine(partialTopIndex)); int topLinePixel= textWidget.getLinePixel(partialTopIndex); double topIndex= partialTopIndex - (double) topLinePixel / topLineHeight; - + int partialBottomIndex= JFaceTextUtil.getPartialBottomIndex(textWidget); int bottomLineHeight= textWidget.getLineHeight(textWidget.getOffsetAtLine(partialBottomIndex)); int bottomLinePixel= textWidget.getLinePixel(partialBottomIndex); double bottomIndex= partialBottomIndex - ((double) bottomLinePixel - textWidget.getClientArea().height) / bottomLineHeight; - + visibleLines= bottomIndex - topIndex; invisibleLines= maxLines - visibleLines; } @@ -383,7 +383,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { private static final boolean DEBUG_DRAW= false; private static final boolean DEBUG_COMPUTE_Y= false; private static final boolean DEBUG_TO_DOCUMENT_LINE_NUMBER= false; - + private static final int INSET= 2; private static final int ANNOTATION_HEIGHT= 4; private static boolean ANNOTATION_HEIGHT_SCALABLE= true; @@ -493,10 +493,10 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { * @since 3.4 */ private boolean fIsTemporaryAnnotationDiscolored; - + /** * Tells whether saturated colors are used in the overview ruler. - * + * * @since 3.8 */ private boolean fUseSaturatedColors= false; @@ -620,7 +620,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { handleMouseScrolled(e); } }); - + if (fTextViewer != null) { fTextViewer.addTextListener(fInternalListener); // on word wrap toggle a "resized" ControlEvent is fired: suggest a redraw of the ruler @@ -746,7 +746,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { visible= fTextViewer.getVisibleRegion(); // legacy support WidgetInfos infos= null; - + for (Iterator iterator= fAnnotationsSortedByLayer.iterator(); iterator.hasNext();) { Object annotationType= iterator.next(); @@ -781,7 +781,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { if (widgetRegion == null) continue; } - + if (infos == null) { infos= new WidgetInfos(textWidget, fCanvas); r.x= INSET; @@ -791,9 +791,9 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { try { int startOffset= visible != null ? annotationOffset - visible.getOffset() : widgetRegion.getOffset(); int startLine= textWidget.getLineAtOffset(startOffset); - + yy= computeY(startLine, infos); - + if (ANNOTATION_HEIGHT_SCALABLE) { int numberOfLines= document.getNumberOfLines(annotationOffset, annotationLength); // don't count empty trailing line @@ -809,7 +809,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { } } fAnnotationHeight= hh; - + if (!areColorsComputed) { stroke= getStrokeColor(annotationType, style[t] == FilterIterator.TEMPORARY); fill= fUseSaturatedColors ? stroke : getFillColor(annotationType, style[t] == FilterIterator.TEMPORARY); @@ -835,7 +835,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { } } } - + if (DEBUG_DRAW) { // draw debugging guides (boundaries): if (infos == null) @@ -845,7 +845,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { gc.drawLine(0, yy, infos.bounds.x/2, yy); yy= infos.bounds.height - infos.thumbHeight / 2; gc.drawLine(0, yy, infos.bounds.x/2, yy); - + gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_BLUE)); yy= 0; gc.drawLine(0, yy, infos.bounds.x/2, yy); @@ -856,7 +856,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { /** * Computes and returns the y location of the given startLine. - * + * * @param startLine the start line * @param infos the cached widget infos * @return the vertical position of the given startLine in the overview ruler @@ -864,23 +864,23 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { */ private int computeY(int startLine, WidgetInfos infos) { // this is the inverse of #toLineNumbers(int) - + int yy; if (infos.bounds.height > infos.writable || infos.invisibleLines <= 0) { // too few lines for relative positions: align annotations with textWidget lines yy = Math.max(0, (2 * startLine + 1) * infos.writable / (infos.maxLines * 2) - infos.bounds.y); if (DEBUG_COMPUTE_Y) System.out.println("static: " + yy); //$NON-NLS-1$ - + } else if (startLine + 1 < infos.visibleLines / 2) { // before middle of first page: map to area from 0 to thumbHeight/2 yy= (int) (startLine * infos.thumbHeight / infos.visibleLines); // == startLine * (thumbHeight / 2) / (visibleLines / 2); if (DEBUG_COMPUTE_Y) System.out.println("start: " + yy); //$NON-NLS-1$ - + } else if (infos.maxLines - infos.visibleLines / 2 <= startLine) { // after middle of last page: map to area from canvasHeight-1 - thumbHeight/2 to canvasHeight-1 yy= (int) (infos.bounds.height-1 - (double)infos.thumbHeight / 2 + (startLine - (infos.maxLines - infos.visibleLines / 2) + 1) * infos.thumbHeight / infos.visibleLines); if (DEBUG_COMPUTE_Y) System.out.println("end: " + yy); //$NON-NLS-1$ - + } else { // middle of text: map to area from thumbHeight/2 to (canvasHeight-1 - thumbHeight/2) yy= (int) ((double)infos.thumbHeight/2 + (startLine + 1 - infos.visibleLines / 2) * (infos.bounds.height-1 - infos.thumbHeight) / infos.invisibleLines); if (DEBUG_COMPUTE_Y) @@ -940,15 +940,15 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { */ private int[] toLineNumbers(int y_coordinate, boolean annotationRect) { // this is the inverse of #computeY(int, WidgetInfos) - + WidgetInfos infos= new WidgetInfos(fTextViewer.getTextWidget(), fCanvas); - + if (y_coordinate >= infos.writable || y_coordinate >= infos.bounds.height || y_coordinate < 0) return new int[] {-1, -1}; - + if (annotationRect && ANNOTATION_HEIGHT >= infos.bounds.height / infos.maxLines) annotationRect= false; - + int[] lines= new int[2]; int[] pixels; @@ -959,28 +959,28 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { int pixelStart= Math.max(y_coordinate - ANNOTATION_HEIGHT / 2 + 1, 0); pixels= new int[] { pixelStart, pixelEnd }; } - + if (infos.bounds.height > infos.writable || infos.invisibleLines <= 0) { // too few lines for relative positions: align annotations with textWidget lines // yy = Math.max(0, (2 * startLine + 1) * infos.writable / (infos.maxLines * 2) - infos.bounds.y); for (int i= 0; i < pixels.length; i++) lines[i]= (int) ((pixels[i] + infos.bounds.y) * infos.maxLines / (double)infos.writable); if (DEBUG_TO_DOCUMENT_LINE_NUMBER) System.out.println("static y: " + y_coordinate + " => [" + lines[0] + ", " + lines[1] + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - + } else if (y_coordinate < infos.thumbHeight / 2) { // before middle of first page: map to area from 0 to thumbHeight/2 // yy= (int) (startLine * infos.thumbHeight / infos.visibleLines); for (int i= 0; i < pixels.length; i++) lines[i] = (int) (pixels[i] * infos.visibleLines / infos.thumbHeight); if (DEBUG_TO_DOCUMENT_LINE_NUMBER) System.out.println("start y: " + y_coordinate + " => [" + lines[0] + ", " + lines[1] + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - + } else if (infos.bounds.height - 1 - infos.thumbHeight / 2 < y_coordinate) { // after middle of last page: map to area from canvasHeight-1 - thumbHeight/2 to canvasHeight-1 // yy= (int) (infos.bounds.height-1 - (double)infos.thumbHeight / 2 + (startLine - (infos.maxLines - infos.visibleLines / 2) + 1) * infos.thumbHeight / infos.visibleLines); for (int i= 0; i < pixels.length; i++) lines[i] = (int) ((pixels[i] - (infos.bounds.height-1) + (double)infos.thumbHeight / 2) * infos.visibleLines / infos.thumbHeight - 1 + (infos.maxLines - infos.visibleLines / 2)); if (DEBUG_TO_DOCUMENT_LINE_NUMBER) System.out.println("end y: " + y_coordinate + " => [" + lines[0] + ", " + lines[1] + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - + } else { // middle of text: map to area from thumbHeight/2 to (canvasHeight-1 - thumbHeight/2) // yy= (int) ((double)infos.thumbHeight/2 + (startLine + 1 - infos.visibleLines / 2) * (infos.bounds.height-1 - infos.thumbHeight) / infos.invisibleLines); for (int i= 0; i < pixels.length; i++) @@ -988,12 +988,12 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { if (DEBUG_TO_DOCUMENT_LINE_NUMBER) System.out.println("middle y: " + y_coordinate + " => [" + lines[0] + ", " + lines[1] + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ } - + if (y_coordinate < ANNOTATION_HEIGHT && y_coordinate < infos.bounds.y) lines[0]= 0; else if (lines[0] < 0) lines[0]= 0; - + if (annotationRect) { int y0= computeY(lines[0], infos); if (y_coordinate < y0 || y0 + ANNOTATION_HEIGHT < y_coordinate) { @@ -1004,10 +1004,10 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { lines[1]= lines[0]; } } - + if (lines[1] > infos.maxLines) lines[1]= infos.maxLines; - + if (fTextViewer instanceof ITextViewerExtension5) { ITextViewerExtension5 extension= (ITextViewerExtension5) fTextViewer; lines[0]= extension.widgetLine2ModelLine(lines[0]); @@ -1021,7 +1021,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { } catch (BadLocationException x) { } } - + if (DEBUG_TO_DOCUMENT_LINE_NUMBER) System.out.println("result: [" + lines[0] + ", " + lines[1] + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ return lines; @@ -1250,7 +1250,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { Boolean cached= allowed.get(annotationType); if (cached != null) return cached.booleanValue(); - + covered = isCovered(annotationType, configured); allowed.put(annotationType, covered ? Boolean.TRUE : Boolean.FALSE); } @@ -1505,7 +1505,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { if (fHeader.getToolTipText() != null) return; - StringBuffer overview = new StringBuffer(); + StringBuffer overview = new StringBuffer(); for (int i= fAnnotationsSortedByLayer.size() -1; i >= 0; i--) { @@ -1541,7 +1541,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { /** * {@inheritDoc} - * + * * @since 3.8 */ @Override diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/SourceViewer.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/SourceViewer.java index 959293a59e1..b091fbd6c4f 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/SourceViewer.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/SourceViewer.java @@ -92,7 +92,7 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi /** The gap between the text viewer and the vertical ruler. */ protected int fGap; - + /** * Cached arrow heights of the vertical scroll bar: An array containing {topArrowHeight, bottomArrowHeight}. * @since 3.6 @@ -158,16 +158,16 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi if (overviewRulerWidth != -1) { if (scrollbarHeight <= 0) scrollbarHeight= overviewRulerWidth; - + int bottomOffset= clArea.y + clArea.height - scrollbarHeight; int[] arrowHeights= getVerticalScrollArrowHeights(textWidget, bottomOffset); - + int overviewRulerX= clArea.x + clArea.width - overviewRulerWidth - 1; boolean noSpaceForHeader= (arrowHeights[0] <= 0 && arrowHeights[1] <= 0 && !hScrollVisible); Control headerControl= fOverviewRuler.getHeaderControl(); Control rulerControl= fOverviewRuler.getControl(); if (noSpaceForHeader) { - // If we don't have space to draw because we don't have arrows and the horizontal scroll is invisible, + // If we don't have space to draw because we don't have arrows and the horizontal scroll is invisible, // use the whole space for the ruler and leave the headerControl without any space (will actually be invisible). rulerControl.setBounds(overviewRulerX, clArea.y, overviewRulerWidth, clArea.height); headerControl.setBounds(0, 0, 0, 0); @@ -188,18 +188,18 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi /** * Computes and caches the arrow heights of the vertical scroll bar. - * + * * @param textWidget the StyledText * @param bottomOffset y-coordinate of the bottom of the overview ruler area * @return an array containing {topArrowHeight, bottomArrowHeight} - * + * * @since 3.6 */ private int[] getVerticalScrollArrowHeights(StyledText textWidget, int bottomOffset) { ScrollBar verticalBar= textWidget.getVerticalBar(); if (verticalBar == null || !verticalBar.getVisible()) return new int[] { 0, 0 }; - + int[] arrowHeights= computeScrollArrowHeights(textWidget, bottomOffset); if (arrowHeights[0] > 0 || arrowHeights[1] > 0) { fScrollArrowHeights= arrowHeights; @@ -224,11 +224,11 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi /** * Computes the arrow heights of the vertical scroll bar. - * + * * @param textWidget the StyledText * @param bottomOffset y-coordinate of the bottom of the overview ruler area * @return an array containing {topArrowHeight, bottomArrowHeight} - * + * * @since 3.6 */ private int[] computeScrollArrowHeights(StyledText textWidget, int bottomOffset) { @@ -239,7 +239,7 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi // SWT returns bogus values on Windows when the control is too small, see https://bugs.eclipse.org/485540 return new int[] { 0, 0 }; } - + int topArrowHeight= thumbTrackBounds.y; int bottomArrowHeight= bottomOffset - (thumbTrackBounds.y + thumbTrackBounds.height); return new int[] { topArrowHeight, bottomArrowHeight }; @@ -826,7 +826,7 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi /** * Position storing block selection information in order to maintain a column selection. - * + * * @since 3.5 */ private static final class ColumnPosition extends Position { @@ -1177,7 +1177,7 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi /** * Adds the give column as last column to this viewer's vertical ruler. - * + * * @param column the column to be added * @since 3.8 */ @@ -1191,7 +1191,7 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi /** * Removes the give column from this viewer's vertical ruler. - * + * * @param column the column to be removed * @since 3.8 */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRulerEvent.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRulerEvent.java index 73481fbea0b..2efa88bf76e 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRulerEvent.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRulerEvent.java @@ -58,9 +58,9 @@ public class VerticalRulerEvent { public void setSelectedAnnotation(Annotation annotation) { fAnnotation= annotation; } - + /** - * @return the SWT event that triggered this vertical ruler event, or null. + * @return the SWT event that triggered this vertical ruler event, or null. * @since 3.8 */ public Event getEvent() { diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/TemplateProposal.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/TemplateProposal.java index 3e10c2bef56..6b924b5c5de 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/TemplateProposal.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/TemplateProposal.java @@ -128,7 +128,7 @@ public class TemplateProposal implements ICompletionProposal, ICompletionProposa /** * {@inheritDoc} - * + * * @deprecated This method is no longer called by the framework and clients should overwrite * {@link #apply(ITextViewer, char, int, int)} instead */ @@ -420,7 +420,7 @@ public class TemplateProposal implements ICompletionProposal, ICompletionProposa /** * {@inheritDoc} - * + * * @deprecated This method is no longer called by the framework and clients should overwrite * {@link #apply(ITextViewer, char, int, int)} instead */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java index 862fa2be2cf..4bd27a2f9b1 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java @@ -340,7 +340,7 @@ public class TemplateReaderWriter { /** * Validates whether the given string only contains valid XML characters. - * + * * @param string the string to validate * @return the input string * @throws IOException when the first invalid character is detected -- cgit v1.2.3