org.eclipse.xtext.xtext.ui.graph
Class RailroadView

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 org.eclipse.xtext.xtext.ui.graph.RailroadView
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 RailroadView
extends org.eclipse.ui.part.ViewPart

A railroad diagram view for Xtext grammars.

Author:
Jan Koehnlein - Initial contribution and API

Field Summary
static java.lang.String ID
           
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
RailroadView()
           
 
Method Summary
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
          Creates the SWT controls for this workbench part.
 void dispose()
          The WorkbenchPart implementation of this IWorkbenchPart method disposes the title image loaded by setInitializationData.
 org.eclipse.draw2d.IFigure findFigureAt(org.eclipse.draw2d.geometry.Point location)
           
 org.eclipse.draw2d.IFigure getContents()
           
 org.eclipse.swt.widgets.Control getControl()
           
 void init(org.eclipse.ui.IViewSite site)
          Initializes this view with the given view site.
 void reveal(org.eclipse.draw2d.IFigure figure)
           
 void setContents(org.eclipse.draw2d.IFigure newContents)
           
 void setFocus()
          Asks this part to take focus within the workbench.
 
Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, saveState, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, 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, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

ID

public static final java.lang.String ID
See Also:
Constant Field Values
Constructor Detail

RailroadView

public RailroadView()
Method Detail

createPartControl

public void createPartControl(org.eclipse.swt.widgets.Composite parent)
Description copied from interface: org.eclipse.ui.IWorkbenchPart
Creates the SWT controls for this workbench part.

Clients should not call this method (the workbench calls this method when it needs to, which may be never).

For implementors this is a multi-step process:

  1. Create one or more controls within the parent.
  2. Set the parent layout as needed.
  3. Register any global actions with the site's IActionBars.
  4. Register any context menus with the site.
  5. Register a selection provider with the site, to make it available to the workbench's ISelectionService (optional).

Specified by:
createPartControl in interface org.eclipse.ui.IWorkbenchPart
Specified by:
createPartControl in class org.eclipse.ui.part.WorkbenchPart
Parameters:
parent - the parent control

init

public void init(org.eclipse.ui.IViewSite site)
          throws org.eclipse.ui.PartInitException
Description copied from interface: org.eclipse.ui.IViewPart
Initializes this view with the given view site.

This method is automatically called by the workbench shortly after the part is instantiated. It marks the start of the views's lifecycle. Clients must not call this method.

Specified by:
init in interface org.eclipse.ui.IViewPart
Overrides:
init in class org.eclipse.ui.part.ViewPart
Parameters:
site - the view site
Throws:
org.eclipse.ui.PartInitException - if this view was not initialized successfully

dispose

public void dispose()
Description copied from class: org.eclipse.ui.part.WorkbenchPart
The WorkbenchPart implementation of this IWorkbenchPart method disposes the title image loaded by setInitializationData. Subclasses may extend.

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

setContents

public void setContents(org.eclipse.draw2d.IFigure newContents)

getContents

public org.eclipse.draw2d.IFigure getContents()

findFigureAt

public org.eclipse.draw2d.IFigure findFigureAt(org.eclipse.draw2d.geometry.Point location)

reveal

public void reveal(org.eclipse.draw2d.IFigure figure)

setFocus

public void setFocus()
Description copied from interface: org.eclipse.ui.IWorkbenchPart
Asks this part to take focus within the workbench. Parts must assign focus to one of the controls contained in the part's parent composite.

Clients should not call this method (the workbench calls this method at appropriate times). To have the workbench activate a part, use IWorkbenchPage.activate(IWorkbenchPart) instead.

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

getControl

public org.eclipse.swt.widgets.Control getControl()