1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 02:36:01 +02:00

[cleanup] Add @noimplement and similar API Tools Javadoc Markup

This commit is contained in:
Martin Oberhuber 2008-03-28 14:27:50 +00:00
parent 7eebb4ff9f
commit 0f05234334
4 changed files with 130 additions and 119 deletions

View file

@ -15,12 +15,10 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
/**
* A pagebook is a composite control where only a single control is visible
* at a time. It is similar to a notebook, but without tabs.
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
* A pagebook is a composite control where only a single control is visible at a
* time. It is similar to a notebook, but without tabs.
*
* @noextend This class is not intended to be subclassed by clients.
*/
public class PageBook extends Composite {
private StackLayout fLayout;

View file

@ -17,15 +17,16 @@ import org.eclipse.swt.widgets.Shell;
/**
* Represents the terminal view as seen by a terminal connection.
*
* <p> Not to be implemented by clients.
* @author Michael Scharf
* <p>
* <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
* work or that it will remain the same. Please do not use this API without
* consulting with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
* part of a work in progress. There is no guarantee that this API will work or
* that it will remain the same. Please do not use this API without consulting
* with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a>
* team.
* </p>
*
* @author Michael Scharf
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ITerminalControl {

View file

@ -12,12 +12,13 @@ package org.eclipse.tm.terminal.model;
/**
* A writable matrix of characters and {@link Style}. This is intended to be the
* low level representation of the text of a Terminal. Higher layers are responsible
* to fill the text and styles into this representation.
*
* <p><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.
* A writable matrix of characters and {@link Style}. This is intended to be
* the low level representation of the text of a Terminal. Higher layers are
* responsible to fill the text and styles into this representation.
* <p>
* <b>Note: </b> Implementations of this interface has to be thread safe.
* </p>
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ITerminalTextData extends ITerminalTextDataReadOnly {

View file

@ -13,29 +13,36 @@ package org.eclipse.tm.terminal.model;
/**
* This class maintains a snapshot of an instance of {@link ITerminalTextData}.
* While the {@link ITerminalTextData} continues changing, the snapshot remains
* unchanged until the next snapshot is taken by calling {@link #updateSnapshot(boolean)}.
* This is important, because the {@link ITerminalTextData} might get
* modified by another thread. Suppose you would want to draw the content of
* the {@link ITerminalTextData} using the following loop:
* unchanged until the next snapshot is taken by calling
* {@link #updateSnapshot(boolean)}. This is important, because the
* {@link ITerminalTextData} might get modified by another thread. Suppose you
* would want to draw the content of the {@link ITerminalTextData} using the
* following loop:
*
* <pre>
* for (int line = 0; line &lt; term.getHeight(); line++)
* for (int column = 0; column &lt; term.getWidth(); column++)
* drawCharacter(column, line, term.getChar(column, line), term.getStyle(column, line));
* </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
* track of lines that have changed since the previous snapshot.</p>
* 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 track of lines that have changed since the previous snapshot.
* </p>
*
* <pre>
* // 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));
* </pre>
*
* <p><b>Scroll optimization:</b> Often new lines are appended at the bottom of the
* terminal and the rest of the lines are scrolled up. In this case all lines would be
* marked as changed. To optimize for this
* case, {@link #updateSnapshot(boolean)} can be called with <code>true</code> for
* the <code>detectScrolling</code> parameter. The object will keep track of scrolling.
* The UI must <b>first</b> handle the scrolling and then use the {@link #hasLineChanged(int)}
* method to determine scrolling:
* <p>
* <b>Scroll optimization:</b> Often new lines are appended at the bottom of
* the terminal and the rest of the lines are scrolled up. In this case all
* lines would be marked as changed. To optimize for this case,
* {@link #updateSnapshot(boolean)} can be called with <code>true</code> for
* the <code>detectScrolling</code> parameter. The object will keep track of
* scrolling. The UI must <b>first</b> handle the scrolling and then use the
* {@link #hasLineChanged(int)} method to determine scrolling:
*
* <pre>
* // scroll the visible region of the UI <b>before</b> drawing the changed lines.
* // scroll the visible region of the UI &lt;b&gt;before&lt;/b&gt; drawing the changed lines.
* doUIScrolling(snap.getScrollChangeY(), snap.getScrollChangeN(), snap.getScrollChangeShift());
* // iterate over the potentially changed lines
* for (int line = snap.getFirstChangedLine(); line &lt;= snap.getFirstChangedLine(); line++)
@ -64,11 +73,13 @@ package org.eclipse.tm.terminal.model;
* drawCharacter(column, line, snap.getChar(column, line), snap.getStyle(column, line));
* </pre>
* </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>
* <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>
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ITerminalTextDataSnapshot extends ITerminalTextDataReadOnly {
/**