mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
[cleanup] Add @noimplement and similar API Tools Javadoc Markup
This commit is contained in:
parent
7eebb4ff9f
commit
0f05234334
4 changed files with 130 additions and 119 deletions
|
@ -15,12 +15,10 @@ import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Control;
|
import org.eclipse.swt.widgets.Control;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A pagebook is a composite control where only a single control is visible
|
* A pagebook is a composite control where only a single control is visible at a
|
||||||
* at a time. It is similar to a notebook, but without tabs.
|
* time. It is similar to a notebook, but without tabs.
|
||||||
* <p>
|
|
||||||
* This class may be instantiated; it is not intended to be subclassed.
|
|
||||||
* </p>
|
|
||||||
*
|
*
|
||||||
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
*/
|
*/
|
||||||
public class PageBook extends Composite {
|
public class PageBook extends Composite {
|
||||||
private StackLayout fLayout;
|
private StackLayout fLayout;
|
||||||
|
|
|
@ -17,15 +17,16 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the terminal view as seen by a terminal connection.
|
* Represents the terminal view as seen by a terminal connection.
|
||||||
*
|
|
||||||
* <p> Not to be implemented by clients.
|
|
||||||
* @author Michael Scharf
|
|
||||||
* <p>
|
* <p>
|
||||||
* <strong>EXPERIMENTAL</strong>. This class or interface has been added as
|
* <strong>EXPERIMENTAL</strong>. This class or interface has been added as
|
||||||
* part of a work in progress. There is no guarantee that this API will
|
* part of a work in progress. There is no guarantee that this API will work or
|
||||||
* work or that it will remain the same. Please do not use this API without
|
* that it will remain the same. Please do not use this API without consulting
|
||||||
* consulting with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
|
* with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a>
|
||||||
|
* team.
|
||||||
* </p>
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Michael Scharf
|
||||||
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ITerminalControl {
|
public interface ITerminalControl {
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,13 @@ package org.eclipse.tm.terminal.model;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A writable matrix of characters and {@link Style}. This is intended to be the
|
* A writable matrix of characters and {@link Style}. This is intended to be
|
||||||
* low level representation of the text of a Terminal. Higher layers are responsible
|
* the low level representation of the text of a Terminal. Higher layers are
|
||||||
* to fill the text and styles into this representation.
|
* responsible to fill the text and styles into this representation.
|
||||||
*
|
* <p>
|
||||||
* <p><b>Note: </b> Implementations of this interface has to be thread safe.
|
* <b>Note: </b> Implementations of this interface has to be thread safe.
|
||||||
* <p><b>Note: </b> This interface is not intended to be implemented by clients.
|
* </p>
|
||||||
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ITerminalTextData extends ITerminalTextDataReadOnly {
|
public interface ITerminalTextData extends ITerminalTextDataReadOnly {
|
||||||
|
|
||||||
|
|
|
@ -13,29 +13,36 @@ package org.eclipse.tm.terminal.model;
|
||||||
/**
|
/**
|
||||||
* This class maintains a snapshot of an instance of {@link ITerminalTextData}.
|
* This class maintains a snapshot of an instance of {@link ITerminalTextData}.
|
||||||
* While the {@link ITerminalTextData} continues changing, the snapshot remains
|
* While the {@link ITerminalTextData} continues changing, the snapshot remains
|
||||||
* unchanged until the next snapshot is taken by calling {@link #updateSnapshot(boolean)}.
|
* unchanged until the next snapshot is taken by calling
|
||||||
* This is important, because the {@link ITerminalTextData} might get
|
* {@link #updateSnapshot(boolean)}. This is important, because the
|
||||||
* modified by another thread. Suppose you would want to draw the content of
|
* {@link ITerminalTextData} might get modified by another thread. Suppose you
|
||||||
* the {@link ITerminalTextData} using the following loop:
|
* would want to draw the content of the {@link ITerminalTextData} using the
|
||||||
|
* following loop:
|
||||||
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* for (int line = 0; line < term.getHeight(); line++)
|
* for (int line = 0; line < term.getHeight(); line++)
|
||||||
* for (int column = 0; column < term.getWidth(); column++)
|
* for (int column = 0; column < term.getWidth(); column++)
|
||||||
* drawCharacter(column, line, term.getChar(column, line), term.getStyle(column, line));
|
* drawCharacter(column, line, term.getChar(column, line), term.getStyle(column, line));
|
||||||
* </pre>
|
* </pre>
|
||||||
* This might fail because the background thread could change the dimensions of the
|
|
||||||
* {@link ITerminalTextData} while you iterate the loop. One solution would be to
|
|
||||||
* put a <code>synchronized(term){}</code> statement around the code. This has
|
|
||||||
* two problems: 1. you would have to know about the internals of the synchronisation
|
|
||||||
* of {@link ITerminalTextData}. 2. The other thread that changes {@link ITerminalTextData}
|
|
||||||
* is blocked while the potentially slow drawing is done.
|
|
||||||
* <p>
|
|
||||||
* <b>Solution:</b> Take a snapshot of the terminal and use the snapshot to draw
|
|
||||||
* the content. There is no danger that the data structure get changed while
|
|
||||||
* you draw. There are also methods to find out what has changed to minimize
|
|
||||||
* the number of lines that get redrawn.</p>
|
|
||||||
*
|
*
|
||||||
* <p><b>Drawing optimization</b>: To optimize redrawing of changed lines, this class keeps
|
* This might fail because the background thread could change the dimensions of
|
||||||
* track of lines that have changed since the previous snapshot.</p>
|
* the {@link ITerminalTextData} while you iterate the loop. One solution would
|
||||||
|
* be to put a <code>synchronized(term){}</code> statement around the code.
|
||||||
|
* This has two problems: 1. you would have to know about the internals of the
|
||||||
|
* synchronisation of {@link ITerminalTextData}. 2. The other thread that
|
||||||
|
* changes {@link ITerminalTextData} is blocked while the potentially slow
|
||||||
|
* drawing is done.
|
||||||
|
* <p>
|
||||||
|
* <b>Solution:</b> Take a snapshot of the terminal and use the snapshot to
|
||||||
|
* draw the content. There is no danger that the data structure get changed
|
||||||
|
* while you draw. There are also methods to find out what has changed to
|
||||||
|
* minimize the number of lines that get redrawn.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* <b>Drawing optimization</b>: To optimize redrawing of changed lines, this
|
||||||
|
* class keeps track of lines that have changed since the previous snapshot.
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* // iterate over the potentially changed lines
|
* // iterate over the potentially changed lines
|
||||||
|
@ -46,15 +53,17 @@ package org.eclipse.tm.terminal.model;
|
||||||
* drawCharacter(column, line, snap.getChar(column, line), snap.getStyle(column, line));
|
* drawCharacter(column, line, snap.getChar(column, line), snap.getStyle(column, line));
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* <p><b>Scroll optimization:</b> Often new lines are appended at the bottom of the
|
* <p>
|
||||||
* terminal and the rest of the lines are scrolled up. In this case all lines would be
|
* <b>Scroll optimization:</b> Often new lines are appended at the bottom of
|
||||||
* marked as changed. To optimize for this
|
* the terminal and the rest of the lines are scrolled up. In this case all
|
||||||
* case, {@link #updateSnapshot(boolean)} can be called with <code>true</code> for
|
* lines would be marked as changed. To optimize for this case,
|
||||||
* the <code>detectScrolling</code> parameter. The object will keep track of scrolling.
|
* {@link #updateSnapshot(boolean)} can be called with <code>true</code> for
|
||||||
* The UI must <b>first</b> handle the scrolling and then use the {@link #hasLineChanged(int)}
|
* the <code>detectScrolling</code> parameter. The object will keep track of
|
||||||
* method to determine scrolling:
|
* scrolling. The UI must <b>first</b> handle the scrolling and then use the
|
||||||
|
* {@link #hasLineChanged(int)} method to determine scrolling:
|
||||||
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* // scroll the visible region of the UI <b>before</b> drawing the changed lines.
|
* // scroll the visible region of the UI <b>before</b> drawing the changed lines.
|
||||||
* doUIScrolling(snap.getScrollChangeY(), snap.getScrollChangeN(), snap.getScrollChangeShift());
|
* doUIScrolling(snap.getScrollChangeY(), snap.getScrollChangeN(), snap.getScrollChangeShift());
|
||||||
* // iterate over the potentially changed lines
|
* // iterate over the potentially changed lines
|
||||||
* for (int line = snap.getFirstChangedLine(); line <= snap.getFirstChangedLine(); line++)
|
* for (int line = snap.getFirstChangedLine(); line <= snap.getFirstChangedLine(); line++)
|
||||||
|
@ -64,11 +73,13 @@ package org.eclipse.tm.terminal.model;
|
||||||
* drawCharacter(column, line, snap.getChar(column, line), snap.getStyle(column, line));
|
* drawCharacter(column, line, snap.getChar(column, line), snap.getStyle(column, line));
|
||||||
* </pre>
|
* </pre>
|
||||||
* </p>
|
* </p>
|
||||||
|
* <p>
|
||||||
|
* <b>Threading Note</b>: This class is not thread safe! All methods have to be
|
||||||
|
* called by the a same thread, that created the instance by calling
|
||||||
|
* {@link ITerminalTextDataReadOnly#makeSnapshot()}.
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* <p><b>Note</b>: This interface is not intended to be implemented by clients.</p>
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
* <p><b>Threading Note</b>: This class is not thread save! All methods have to be called by
|
|
||||||
* the a same thread, that created the instance by calling
|
|
||||||
* {@link ITerminalTextDataReadOnly#makeSnapshot()}. </p>
|
|
||||||
*/
|
*/
|
||||||
public interface ITerminalTextDataSnapshot extends ITerminalTextDataReadOnly {
|
public interface ITerminalTextDataSnapshot extends ITerminalTextDataReadOnly {
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue