de.cau.cs.kieler.krep.evalbench.ui.views
Class ConnectionView

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 de.cau.cs.kieler.krep.evalbench.ui.views.ConnectionView
All Implemented Interfaces:
ICommunicationListener, IAdaptable, IExecutableExtension, IPersistable, IViewPart, IWorkbenchPart, IWorkbenchPart2, IWorkbenchPart3, IWorkbenchPartOrientation

public class ConnectionView
extends ViewPart
implements ICommunicationListener

A view for logging of connection messages to targets. This includes the information on the current target.

Rating yellow
(2010-03-09) review by msp, soh

Field Summary
static String ID
          The identifier string for this view.
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
ConnectionView()
           
 
Method Summary
 void comment(String comment)
          Write optional comment about the next transaction.
 void createPartControl(Composite parent)
           
 void dataReceived(String data)
          Executed when data is received from the target.
 void dataSent(String data)
          Executed when data is sent to the target.
 void disable()
          Disable logging of the connection.
 void enable()
          Enable logging of the connection.
 TextViewer getViewer()
          Gets the text viewer.
static boolean log(String msg)
          Display the given message in the connection view if the view is open.
 void setFocus()
           
 
Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, dispose, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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
 

Field Detail

ID

public static final String ID
The identifier string for this view.

See Also:
Constant Field Values
Constructor Detail

ConnectionView

public ConnectionView()
Method Detail

createPartControl

public void createPartControl(Composite parent)
Specified by:
createPartControl in interface IWorkbenchPart
Specified by:
createPartControl in class WorkbenchPart

setFocus

public void setFocus()
Specified by:
setFocus in interface IWorkbenchPart
Specified by:
setFocus in class WorkbenchPart

dataReceived

public void dataReceived(String data)
Executed when data is received from the target.

Specified by:
dataReceived in interface ICommunicationListener
Parameters:
data - that is received

dataSent

public void dataSent(String data)
Executed when data is sent to the target.

Specified by:
dataSent in interface ICommunicationListener
Parameters:
data - data to send

getViewer

public TextViewer getViewer()
Gets the text viewer.

Returns:
text viewer

log

public static boolean log(String msg)
Display the given message in the connection view if the view is open.

Parameters:
msg - message to display in the connection view
Returns:
true if the message was displayed

comment

public void comment(String comment)
Write optional comment about the next transaction.

Specified by:
comment in interface ICommunicationListener
Parameters:
comment - that describes the next transaction in the protocol.

enable

public void enable()
Enable logging of the connection.


disable

public void disable()
Disable logging of the connection.