org.eclipse.xtext.xtext.ui.graph
Class RailroadSynchronizer

java.lang.Object
  extended by org.eclipse.xtext.xtext.ui.graph.RailroadSynchronizer
All Implemented Interfaces:
org.eclipse.ui.IPartListener, IXtextModelListener

public class RailroadSynchronizer
extends java.lang.Object
implements org.eclipse.ui.IPartListener, IXtextModelListener

Synchronizes the railroad diagram view with the active editor.

Author:
Jan Koehnlein - Initial contribution and API

Constructor Summary
RailroadSynchronizer()
           
 
Method Summary
 org.eclipse.swt.graphics.Font getFont()
           
 void modelChanged(XtextResource resource)
           
 void partActivated(org.eclipse.ui.IWorkbenchPart part)
          Notifies this listener that the given part has been activated.
 void partBroughtToTop(org.eclipse.ui.IWorkbenchPart part)
          Notifies this listener that the given part has been brought to the top.
 void partClosed(org.eclipse.ui.IWorkbenchPart part)
          Notifies this listener that the given part has been closed.
 void partDeactivated(org.eclipse.ui.IWorkbenchPart part)
          Notifies this listener that the given part has been deactivated.
 void partOpened(org.eclipse.ui.IWorkbenchPart part)
          Notifies this listener that the given part has been opened.
 void start(org.eclipse.ui.IWorkbenchPartSite site)
           
 void stop(org.eclipse.ui.IWorkbenchPartSite site)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RailroadSynchronizer

public RailroadSynchronizer()
Method Detail

start

public void start(org.eclipse.ui.IWorkbenchPartSite site)

stop

public void stop(org.eclipse.ui.IWorkbenchPartSite site)

partActivated

public void partActivated(org.eclipse.ui.IWorkbenchPart part)
Description copied from interface: org.eclipse.ui.IPartListener
Notifies this listener that the given part has been activated.

Specified by:
partActivated in interface org.eclipse.ui.IPartListener
Parameters:
part - the part that was activated
See Also:
IWorkbenchPage.activate(org.eclipse.ui.IWorkbenchPart)

partBroughtToTop

public void partBroughtToTop(org.eclipse.ui.IWorkbenchPart part)
Description copied from interface: org.eclipse.ui.IPartListener
Notifies this listener that the given part has been brought to the top.

These events occur when an editor is brought to the top in the editor area, or when a view is brought to the top in a page book with multiple views. They are normally only sent when a part is brought to the top programmatically (via IPerspective.bringToTop). When a part is activated by the user clicking on it, only partActivated is sent.

Specified by:
partBroughtToTop in interface org.eclipse.ui.IPartListener
Parameters:
part - the part that was surfaced
See Also:
IWorkbenchPage.bringToTop(org.eclipse.ui.IWorkbenchPart)

partClosed

public void partClosed(org.eclipse.ui.IWorkbenchPart part)
Description copied from interface: org.eclipse.ui.IPartListener
Notifies this listener that the given part has been closed.

Specified by:
partClosed in interface org.eclipse.ui.IPartListener
Parameters:
part - the part that was closed
See Also:
IWorkbenchPage.hideView(IViewPart)

partDeactivated

public void partDeactivated(org.eclipse.ui.IWorkbenchPart part)
Description copied from interface: org.eclipse.ui.IPartListener
Notifies this listener that the given part has been deactivated.

Specified by:
partDeactivated in interface org.eclipse.ui.IPartListener
Parameters:
part - the part that was deactivated
See Also:
IWorkbenchPage.activate(IWorkbenchPart)

partOpened

public void partOpened(org.eclipse.ui.IWorkbenchPart part)
Description copied from interface: org.eclipse.ui.IPartListener
Notifies this listener that the given part has been opened.

Specified by:
partOpened in interface org.eclipse.ui.IPartListener
Parameters:
part - the part that was opened
See Also:
IWorkbenchPage.showView(String)

modelChanged

public void modelChanged(XtextResource resource)
Specified by:
modelChanged in interface IXtextModelListener

getFont

public org.eclipse.swt.graphics.Font getFont()