Cut cycle
Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
parent
92a664d193
commit
b6b6ab9d36
@ -79,6 +79,9 @@ import org.eclipse.swt.widgets.Text;
|
||||
|
||||
import net.bigeon.gclc.manager.PipedConsoleInput;
|
||||
import net.bigeon.gclc.manager.PipedConsoleOutput;
|
||||
import net.bigeon.gclc.swt.io.ConsoleInputManager;
|
||||
import net.bigeon.gclc.swt.io.ConsoleOutputManager;
|
||||
import net.bigeon.gclc.swt.io.ConsolePromptManager;
|
||||
|
||||
/** A shell containing a {@link SWTConsoleView}
|
||||
* <p>
|
||||
|
@ -78,6 +78,9 @@ import org.eclipse.swt.widgets.Text;
|
||||
import net.bigeon.gclc.ConsoleApplication;
|
||||
import net.bigeon.gclc.manager.PipedConsoleInput;
|
||||
import net.bigeon.gclc.manager.PipedConsoleOutput;
|
||||
import net.bigeon.gclc.swt.io.ConsoleInputManager;
|
||||
import net.bigeon.gclc.swt.io.ConsoleOutputManager;
|
||||
import net.bigeon.gclc.swt.tools.HistoryTextKeyListener;
|
||||
|
||||
/** A SWT component to connect to gclc {@link ConsoleApplication}.
|
||||
*
|
||||
|
@ -33,7 +33,7 @@
|
||||
* gclc-swt:net.bigeon.gclc.swt.ConsoleDelayIO.java
|
||||
* Created on: Nov 19, 2016
|
||||
*/
|
||||
package net.bigeon.gclc.swt;
|
||||
package net.bigeon.gclc.swt.api;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package net.bigeon.gclc.swt;
|
||||
package net.bigeon.gclc.swt.api;
|
||||
|
||||
/*-
|
||||
* #%L
|
@ -0,0 +1,8 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author Emmanuel Bigeon
|
||||
*
|
||||
*/
|
||||
package net.bigeon.gclc.swt.api;
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package net.bigeon.gclc.swt;
|
||||
package net.bigeon.gclc.swt.io;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
@ -42,6 +42,7 @@ import java.io.IOException;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
|
||||
import net.bigeon.gclc.manager.PipedConsoleInput;
|
||||
import net.bigeon.gclc.swt.api.ConsoleDelayIO;
|
||||
|
||||
/** The object managing the console input.
|
||||
*
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package net.bigeon.gclc.swt;
|
||||
package net.bigeon.gclc.swt.io;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
@ -40,6 +40,8 @@ package net.bigeon.gclc.swt;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
|
||||
import net.bigeon.gclc.manager.PipedConsoleOutput;
|
||||
import net.bigeon.gclc.swt.api.ConsoleOutputDisplay;
|
||||
import net.bigeon.gclc.swt.tools.TextAppendingRunnable;
|
||||
import net.bigeon.gclc.swt.tools.ToSWTConsoleForwardRunnable;
|
||||
|
||||
/** The manager for console output to insert in a text.
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package net.bigeon.gclc.swt;
|
||||
package net.bigeon.gclc.swt.io;
|
||||
|
||||
/*-
|
||||
* #%L
|
@ -0,0 +1,8 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author Emmanuel Bigeon
|
||||
*
|
||||
*/
|
||||
package net.bigeon.gclc.swt.io;
|
@ -33,7 +33,7 @@
|
||||
* gclc-swt:net.bigeon.gclc.swt.HistoryTextKeyListener.java
|
||||
* Created on: Jun 9, 2016
|
||||
*/
|
||||
package net.bigeon.gclc.swt;
|
||||
package net.bigeon.gclc.swt.tools;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
@ -78,6 +78,7 @@ import org.eclipse.swt.events.KeyEvent;
|
||||
|
||||
import net.bigeon.collections.Ribbon;
|
||||
import net.bigeon.collections.ribbon.ArrayRibbon;
|
||||
import net.bigeon.gclc.swt.api.ConsoleDelayIO;
|
||||
|
||||
/** A key listener to validate commands and manage the history of commands.
|
||||
*
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package net.bigeon.gclc.swt;
|
||||
package net.bigeon.gclc.swt.tools;
|
||||
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
|
@ -7,7 +7,7 @@ import org.eclipse.swt.widgets.Widget;
|
||||
|
||||
import net.bigeon.gclc.manager.PipedConsoleOutput;
|
||||
import net.bigeon.gclc.manager.forwarding.AOutputForwardRunnable;
|
||||
import net.bigeon.gclc.swt.ConsoleOutputDisplay;
|
||||
import net.bigeon.gclc.swt.api.ConsoleOutputDisplay;
|
||||
|
||||
/** The local implementation of the forwarding runnable.
|
||||
*
|
||||
|
@ -47,6 +47,7 @@ import org.eclipse.swt.widgets.Text;
|
||||
import org.junit.Test;
|
||||
|
||||
import net.bigeon.gclc.manager.PipedConsoleInput;
|
||||
import net.bigeon.gclc.swt.io.ConsoleInputManager;
|
||||
|
||||
/** @author Emmanuel Bigeon */
|
||||
public class ConsoleInputManagerTest {
|
||||
@ -55,7 +56,7 @@ public class ConsoleInputManagerTest {
|
||||
private final ConsoleInputManager cim = new ConsoleInputManager(text);
|
||||
|
||||
/** Test method for
|
||||
* {@link net.bigeon.gclc.swt.ConsoleInputManager#setInput(java.lang.String)}. */
|
||||
* {@link net.bigeon.gclc.swt.io.ConsoleInputManager#setInput(java.lang.String)}. */
|
||||
@Test
|
||||
public void testSetText() {
|
||||
cim.setInput("Text");
|
||||
@ -63,7 +64,7 @@ public class ConsoleInputManagerTest {
|
||||
}
|
||||
|
||||
/** Test method for
|
||||
* {@link net.bigeon.gclc.swt.ConsoleInputManager#validateInput()}.
|
||||
* {@link net.bigeon.gclc.swt.io.ConsoleInputManager#validateInput()}.
|
||||
*
|
||||
* @throws IOException if an error occurred */
|
||||
@Test
|
||||
@ -101,7 +102,7 @@ public class ConsoleInputManagerTest {
|
||||
}
|
||||
|
||||
/** Test method for
|
||||
* {@link net.bigeon.gclc.swt.ConsoleInputManager#getText()}. */
|
||||
* {@link net.bigeon.gclc.swt.io.ConsoleInputManager#getText()}. */
|
||||
@Test
|
||||
public void testGetText() {
|
||||
assertEquals("Text component should be preserved", text, cim.getText());
|
||||
|
@ -49,6 +49,7 @@ import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
import net.bigeon.gclc.manager.PipedConsoleOutput;
|
||||
import net.bigeon.gclc.swt.io.ConsoleOutputManager;
|
||||
|
||||
/** @author Emmanuel Bigeon */
|
||||
public class ConsoleOutputManagerTest {
|
||||
@ -71,7 +72,7 @@ public class ConsoleOutputManagerTest {
|
||||
}
|
||||
|
||||
/** Test method for
|
||||
* {@link net.bigeon.gclc.swt.ConsoleOutputManager#appendLine(java.lang.String)}. */
|
||||
* {@link net.bigeon.gclc.swt.io.ConsoleOutputManager#appendLine(java.lang.String)}. */
|
||||
@Test
|
||||
public void testAppendConsoleOutput() {
|
||||
when(text.getText()).thenReturn("", "abc",
|
||||
|
@ -45,6 +45,8 @@ import java.io.BufferedReader;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.junit.Test;
|
||||
|
||||
import net.bigeon.gclc.swt.io.ConsolePromptManager;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bigeon
|
||||
*
|
||||
@ -56,7 +58,7 @@ public class ConsolePromptManagerTest {
|
||||
private final ConsolePromptManager manager = new ConsolePromptManager(label);
|
||||
|
||||
/**
|
||||
* Test method for {@link net.bigeon.gclc.swt.ConsolePromptManager#setPrompt(java.lang.String)}.
|
||||
* Test method for {@link net.bigeon.gclc.swt.io.ConsolePromptManager#setPrompt(java.lang.String)}.
|
||||
*/
|
||||
@Test
|
||||
public void testSetPrompt() {
|
||||
@ -65,7 +67,7 @@ public class ConsolePromptManagerTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link net.bigeon.gclc.swt.ConsolePromptManager#setStream(java.io.BufferedReader)}.
|
||||
* Test method for {@link net.bigeon.gclc.swt.io.ConsolePromptManager#setStream(java.io.BufferedReader)}.
|
||||
*/
|
||||
@Test
|
||||
public void testSetStream() {
|
||||
|
@ -75,6 +75,9 @@ import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.KeyEvent;
|
||||
import org.junit.Test;
|
||||
|
||||
import net.bigeon.gclc.swt.api.ConsoleDelayIO;
|
||||
import net.bigeon.gclc.swt.tools.HistoryTextKeyListener;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* TODO
|
||||
@ -83,7 +86,7 @@ import org.junit.Test;
|
||||
public class HistoryTextKeyListenerTest {
|
||||
|
||||
/** Test method for
|
||||
* {@link net.bigeon.gclc.swt.HistoryTextKeyListener#keyPressed(org.eclipse.swt.events.KeyEvent)}. */
|
||||
* {@link net.bigeon.gclc.swt.tools.HistoryTextKeyListener#keyPressed(org.eclipse.swt.events.KeyEvent)}. */
|
||||
@Test
|
||||
public final void testKeyPressedKeyEvent() {
|
||||
final ConsoleDelayIO io = new ConsoleDelayIO() {
|
||||
|
Loading…
Reference in New Issue
Block a user