edu.cmu.cs.crystal.internal
Class UserConsoleView

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.ViewPart
              extended by edu.cmu.cs.crystal.internal.UserConsoleView
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation

public class UserConsoleView
extends org.eclipse.ui.part.ViewPart

This is a text console for users to submit messages to.

Author:
David Dickey

Field Summary
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
UserConsoleView()
          The constructor.
 
Method Summary
 void clearConsole()
          Clears all text from the console
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
          Called by the framework to open the view.
static UserConsoleView getInstance()
          The instance of this singleton can be retrieved through this method.
 PrintWriter getPrintWriter()
          Creates a PrintWriter object to allow for text to be printed to the console
 void setFocus()
          Provides the focus to the user console.
 
Methods inherited from class org.eclipse.ui.part.ViewPart
getViewSite, init, init, saveState, setInitializationData
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, dispose, getAdapter, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, showBusy
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

UserConsoleView

public UserConsoleView()
The constructor.

Method Detail

getInstance

public static UserConsoleView getInstance()
The instance of this singleton can be retrieved through this method.

Returns:
the one and only UserConsoleView

createPartControl

public void createPartControl(org.eclipse.swt.widgets.Composite parent)
Called by the framework to open the view.

Specified by:
createPartControl in interface org.eclipse.ui.IWorkbenchPart
Specified by:
createPartControl in class org.eclipse.ui.part.WorkbenchPart

getPrintWriter

public PrintWriter getPrintWriter()
Creates a PrintWriter object to allow for text to be printed to the console

Returns:
the PrintWriter corresponding to this console. Or null if the console has not been properly setup.

clearConsole

public void clearConsole()
Clears all text from the console


setFocus

public void setFocus()
Provides the focus to the user console.

Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart
Specified by:
setFocus in class org.eclipse.ui.part.WorkbenchPart