From 185d19bfcfdfe0e032c9377ea7d8232ec1751c0a Mon Sep 17 00:00:00 2001 From: Emmanuel Bigeon Date: Fri, 30 Nov 2018 21:35:17 -0500 Subject: [PATCH] Added documentation Signed-off-by: Emmanuel Bigeon --- .../net/bigeon/gclc/swt/SWTConsoleShell.java | 8 +++++++- .../net/bigeon/gclc/swt/SWTConsoleView.java | 19 ++++++++++--------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/gclc-swt/src/main/java/net/bigeon/gclc/swt/SWTConsoleShell.java b/gclc-swt/src/main/java/net/bigeon/gclc/swt/SWTConsoleShell.java index 40bf9de..5481e1f 100644 --- a/gclc-swt/src/main/java/net/bigeon/gclc/swt/SWTConsoleShell.java +++ b/gclc-swt/src/main/java/net/bigeon/gclc/swt/SWTConsoleShell.java @@ -93,7 +93,8 @@ public final class SWTConsoleShell extends Shell { /** Create the shell. * - * @param display the display */ + * @param display the display + * @param style the shell style */ public SWTConsoleShell(final Display display, final int style) { super(display, style); setLayout(new GridLayout(2, false)); @@ -121,6 +122,11 @@ public final class SWTConsoleShell extends Shell { setText("Console Application"); //$NON-NLS-1$ } + /** Connect the console parts to the shell. + * + * @param input the input + * @param output the output + * @param promptStream the stream where the prompts are forwarded. */ public void connect(final PipedConsoleInput input, final PipedConsoleOutput output, final BufferedReader promptStream) { inputManager.setManager(input); diff --git a/gclc-swt/src/main/java/net/bigeon/gclc/swt/SWTConsoleView.java b/gclc-swt/src/main/java/net/bigeon/gclc/swt/SWTConsoleView.java index 4bee431..55c4276 100644 --- a/gclc-swt/src/main/java/net/bigeon/gclc/swt/SWTConsoleView.java +++ b/gclc-swt/src/main/java/net/bigeon/gclc/swt/SWTConsoleView.java @@ -45,13 +45,15 @@ import net.bigeon.gclc.ConsoleApplication; import net.bigeon.gclc.utils.PipedConsoleInput; import net.bigeon.gclc.utils.PipedConsoleOutput; -/** A SWT component to connect to gclc {@link ConsoleApplication} - *

+/** A SWT component to connect to gclc {@link ConsoleApplication}. * * @author Emmanuel Bigeon */ public final class SWTConsoleView extends Composite { + /** The input manager. */ private final ConsoleInputManager inManager; + /** The output manager. */ private final ConsoleOutputManager outManager; + /** Create the composite. * * @param parent the prent composite @@ -73,11 +75,6 @@ public final class SWTConsoleView extends Composite { consoleInput.addKeyListener(new HistoryTextKeyListener(inManager)); } - @Override - protected void checkSubclass() { - // Disable the check that prevents subclassing of SWT components - } - /* (non-Javadoc) * @see org.eclipse.swt.widgets.Composite#setFocus() */ @Override @@ -95,12 +92,16 @@ public final class SWTConsoleView extends Composite { inManager.setManager(input); } - /** @return the inManager */ + /** Get the manager of console input. + * + * @return the input manager */ public ConsoleInputManager getInputManager() { return inManager; } - /** @return the outManager */ + /** Get the manager of console output. + * + * @return the output manager */ public ConsoleOutputManager getOutputManager() { return outManager; }