Skip to content

Commit

Permalink
Merge pull request #89 from eprogramming/master
Browse files Browse the repository at this point in the history
no messageDialog no @author tags
  • Loading branch information
helio-frota committed Nov 18, 2014
2 parents 64c64d4 + d557443 commit 3ba600d
Show file tree
Hide file tree
Showing 26 changed files with 13 additions and 216 deletions.
8 changes: 1 addition & 7 deletions src/main/java/org/jboss/aesh/mterm/Mterm.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

import org.jboss.aesh.mterm.gui.MessageDialog;
import org.jboss.aesh.mterm.gui.MtermUI;

/**
* The main class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
public class Mterm {

public static void main(String... args) {
Expand All @@ -33,7 +27,7 @@ public void run() {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception e) {
new MessageDialog().error(e.getMessage());
e.printStackTrace();
}
new MtermUI();
}
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/org/jboss/aesh/mterm/action/BaseAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
import org.jboss.aesh.mterm.util.AeshUtil;
import org.jboss.aesh.mterm.util.MtermUtil;

/**
* BaseAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
abstract class BaseAction extends AbstractAction {

Expand Down
7 changes: 0 additions & 7 deletions src/main/java/org/jboss/aesh/mterm/action/BlockAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@

import org.jboss.aesh.mterm.util.MtermUtil;

/**
* BlockAction class.
*
* This action blocks the deletion of the prompt string.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class BlockAction extends AbstractAction {

Expand Down
15 changes: 1 addition & 14 deletions src/main/java/org/jboss/aesh/mterm/action/ClearAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,11 @@
import javax.swing.JTextArea;
import javax.swing.text.BadLocationException;

import org.jboss.aesh.mterm.gui.MessageDialog;
import org.jboss.aesh.mterm.util.MtermUtil;

/**
* ClearAction class.
*
* This action clears the terminal and is fired when user types control + l.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class ClearAction extends BaseAction {

/**
* Parametric constructor initializes this action with JTextArea.
*
* @param textArea JTextArea
*/
public ClearAction(JTextArea textArea) {
super(textArea);
}
Expand All @@ -44,7 +31,7 @@ public void actionPerformed(ActionEvent ae) {
textArea.getDocument().remove(0, textArea.getDocument().getLength());
}
catch (BadLocationException e) {
new MessageDialog().error(e.getMessage());
e.printStackTrace();
}
System.out.print(MtermUtil.INSTANCE.getPs1());

Expand Down
18 changes: 1 addition & 17 deletions src/main/java/org/jboss/aesh/mterm/action/RunAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,12 @@
import javax.swing.JTextArea;
import javax.swing.text.BadLocationException;

import org.jboss.aesh.mterm.gui.MessageDialog;
import org.jboss.aesh.mterm.util.AeshUtil;
import org.jboss.aesh.mterm.util.MtermUtil;

/**
* RunAction class.
*
* This action delegates commands to aesh.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class RunAction extends BaseAction {

/**
* Parametric constructor initializes this action with target textarea and <br>
* aesh handler.
*
* @param textArea AeshHandler
* @param aesh JTextArea
*/
public RunAction(JTextArea textArea) {
super(textArea);
}
Expand Down Expand Up @@ -68,7 +53,6 @@ public void actionPerformed(ActionEvent ae) {
}
catch (Exception e) {
e.printStackTrace();
new MessageDialog().error(e.getMessage());
}

}
Expand All @@ -78,7 +62,7 @@ private void clear() {
textArea.getDocument().remove(0, textArea.getDocument().getLength());
}
catch (BadLocationException e) {
new MessageDialog().error(e.getMessage());
e.printStackTrace();
}
}

Expand Down
8 changes: 1 addition & 7 deletions src/main/java/org/jboss/aesh/mterm/action/TabAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,8 @@

import javax.swing.JTextArea;

import org.jboss.aesh.mterm.gui.MessageDialog;
import org.jboss.aesh.mterm.util.MtermUtil;

/**
* TabAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class TabAction extends BaseAction {

Expand All @@ -41,7 +35,7 @@ protected void perform() {
aesh.run("\t");
}
catch (IOException e) {
new MessageDialog().error(e.getMessage());
e.printStackTrace();
}
System.out.print(aesh.getResult() + MtermUtil.INSTANCE.getPs1());
aesh.reset();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@
import java.awt.event.ActionEvent;

import javax.swing.ImageIcon;
import javax.swing.JOptionPane;

import org.jboss.aesh.mterm.gui.MessageDialog;

/**
* Menu MenuAboutAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class MenuAboutAction extends MenuBaseAction {

Expand All @@ -38,6 +32,6 @@ public void actionPerformed(ActionEvent e) {
sb.append("\n\n\nA simple java terminal emulator");
sb.append(" ");
sb.append("\n\n\n\n\nCreated by Aesh Team");
new MessageDialog().info(sb.toString());
JOptionPane.showMessageDialog(null, sb.toString());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
import javax.swing.AbstractAction;
import javax.swing.ImageIcon;

/**
* General class MenuBaseAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class MenuBaseAction extends AbstractAction {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,8 @@
import javax.swing.JTextArea;
import javax.swing.text.BadLocationException;

import org.jboss.aesh.mterm.gui.MessageDialog;
import org.jboss.aesh.mterm.util.MtermUtil;

/**
* Menu MenuClearAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class MenuClearAction extends MenuBaseAction {

Expand All @@ -42,7 +36,7 @@ public void actionPerformed(ActionEvent e) {
System.out.print(MtermUtil.INSTANCE.getPs1());
}
catch (BadLocationException ex) {
new MessageDialog().error(ex.getMessage());
ex.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
import javax.swing.JOptionPane;
import javax.swing.JTextArea;

/**
* Menu MenuColorAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class MenuColorAction extends MenuBaseAction {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@

import javax.swing.ImageIcon;

import org.jboss.aesh.mterm.gui.MessageDialog;

/**
* Menu MenuContentsAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class MenuContentsAction extends MenuBaseAction {

Expand All @@ -44,7 +37,7 @@ public void actionPerformed(ActionEvent e) {
}
}
catch (Exception ex) {
new MessageDialog().error(ex.getMessage());
ex.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
import javax.swing.ImageIcon;
import javax.swing.JTextArea;

/**
* Menu MenuCopyAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class MenuCopyAction extends MenuBaseAction {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@

import org.jboss.aesh.mterm.util.AeshUtil;

/**
* Menu MenuExitAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class MenuExitAction extends MenuBaseAction {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
import javax.swing.JOptionPane;
import javax.swing.JTextArea;

/**
* Menu MenuFontAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class MenuFontAction extends MenuBaseAction {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@

import org.jboss.aesh.mterm.gui.MtermUI;

/**
* Menu MenuFullScreenAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class MenuFullScreenAction extends MenuBaseAction {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@

import org.jboss.aesh.mterm.gui.MtermUI;

/**
* Menu MenuNewAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class MenuNewAction extends MenuBaseAction {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@
import javax.swing.ImageIcon;
import javax.swing.JTextArea;

import org.jboss.aesh.mterm.gui.MessageDialog;

/**
* Menu MenuPasteAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class MenuPasteAction extends MenuBaseAction {

Expand All @@ -52,7 +45,7 @@ public void actionPerformed(ActionEvent e) {
textArea.replaceRange(clip, textArea.getSelectionStart(), textArea.getSelectionEnd());
}
catch (UnsupportedFlavorException | IOException ex) {
new MessageDialog().error(ex.getMessage());
ex.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@

import org.jboss.aesh.mterm.gui.MtermUI;

/**
* Menu MenuTitleAction class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
@SuppressWarnings("serial")
public class MenuTitleAction extends MenuBaseAction {

Expand Down
5 changes: 0 additions & 5 deletions src/main/java/org/jboss/aesh/mterm/event/EventConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
import org.jboss.aesh.mterm.action.TabAction;
import org.jboss.aesh.mterm.filter.MtermNavigationFilter;

/**
* EventConfig configures terminal events.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
public class EventConfig {

private JScrollPane scrollPane;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
import org.jboss.aesh.mterm.action.BlockAction;
import org.jboss.aesh.mterm.util.MtermUtil;

/**
* MtermNavigationFilter takes care of the caret position.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
public class MtermNavigationFilter extends NavigationFilter {

private int promptStringLength = MtermUtil.INSTANCE.getPs1().length();
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/org/jboss/aesh/mterm/gui/Menu.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@

import org.jboss.aesh.mterm.action.menu.MenuBaseAction;

/**
* The menu class.
*
* @author <a href="mailto:[email protected]">Helio Frota</a>
*/
class Menu {

private JMenuBar menuBar;
Expand Down
Loading

0 comments on commit 3ba600d

Please sign in to comment.