sk.uniba.euromath.plugin.views.outline
Class XMLOutlinePage

java.lang.Object
  extended by org.eclipse.ui.part.Page
      extended by sk.uniba.euromath.plugin.views.outline.XMLOutlinePage
All Implemented Interfaces:
IAdaptable, ISelectionChangedListener, ISelectionProvider, IPage, IPageBookViewPage, IContentOutlinePage, IDOMSelectionChangedListener, IDOMSelectionProvider

public class XMLOutlinePage
extends Page
implements IContentOutlinePage, IDOMSelectionChangedListener, ISelectionChangedListener, IAdaptable, IDOMSelectionProvider


Field Summary
protected  XMLOutlineActionContributor actionContributor
          Outline action contributor.
 
Constructor Summary
XMLOutlinePage(EditorSite site)
           
 
Method Summary
 void addSelectionChangedListener(IDOMSelectionChangedListener listener)
          Adds a listener for selection changes in this selection provider.
 void addSelectionChangedListener(ISelectionChangedListener listener)
           
protected  IStructuredSelection convertIXMLSelectionToIStructureSelection(sk.baka.ikslibs.interval.DOMIntervalSet xmlSelection)
           
 void createControl(Composite parent)
           
protected  TreeViewer createTreeViewer(Composite parent)
           
protected  void fireSelectionChangeEvent(sk.baka.ikslibs.interval.DOMIntervalSet xmlSelection)
           
 XMLOutlineActionContributor getActionContributor()
           
 Object getAdapter(Class adapter)
           
 XMLAccessContentProvider getContentProvider()
           
 Control getControl()
           
 sk.baka.ikslibs.interval.DOMIntervalSet getDOMSelection()
          Returns copy of the current selection of provider.
protected  sk.uniba.euromath.plugin.views.outline.OutlineItemsLabelProvider getLabelProvider()
           
protected  Node getRoot()
          Returns a XML node which will be the root of the outline tree.
 ISelection getSelection()
           
 TreeViewer getViewer()
           
 XMLAccess getXMLAccess()
           
protected  IGeneralListener getXmlAccessChangeHandler()
           
 void handleDocumentTransformation(XMLAccess newData)
           
protected  boolean isShowingTransformed()
           
protected  void prepareStatusLineManager(IStatusLineManager manager)
           
 void refresh()
           
 void refreshViewerData(Node topNode)
           
 void removeSelectionChangedListener(IDOMSelectionChangedListener listener)
          Removes the given selection change listener from this selection provider.
 void removeSelectionChangedListener(ISelectionChangedListener listener)
           
 void selectionChanged(DOMSelectionChangedEvent event)
          This should be called from TreeViewer or from EditorSite Selection in the Event can be IStructureSelection or IXMLSelection depending on even source.
 void selectionChanged(SelectionChangedEvent event)
           
 void setActionContributor(XMLOutlineActionContributor actionContributor)
           
 void setContentProvider(XMLAccessContentProvider contentProvider)
           
 void setFocus()
           
protected  void setLabelProvider(sk.uniba.euromath.plugin.views.outline.OutlineItemsLabelProvider labelProvider)
           
 void setSelection(sk.baka.ikslibs.interval.DOMIntervalSet selection)
          Routs information about this new IXMLSelection to SelectionListeners and to TreeViewer
 void setSelection(ISelection selection)
           
protected  void setShowingTransformed(boolean showingTransformed)
           
 void setShowTransformed(boolean showTrn)
           
protected  void setStatusLineManager(StatusLineUpdateManager statusLineManager)
           
 void setViewer(TreeViewer viewer)
           
protected  sk.baka.ikslibs.interval.DOMIntervalSet synchronizeViewerSelection(IStructuredSelection sSel, sk.baka.ikslibs.interval.DOMIntervalSet xmlSelection)
          Makes IDs from IStructureSelection and IDs from IXMLSelection.
 
Methods inherited from class org.eclipse.ui.part.Page
dispose, getSite, init, makeContributions, setActionBars
 
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.part.IPage
dispose, setActionBars
 

Field Detail

actionContributor

protected XMLOutlineActionContributor actionContributor
Outline action contributor.

Constructor Detail

XMLOutlinePage

public XMLOutlinePage(EditorSite site)
Method Detail

createControl

public void createControl(Composite parent)
Specified by:
createControl in interface IPage
Specified by:
createControl in class Page

getRoot

protected Node getRoot()
Returns a XML node which will be the root of the outline tree.


prepareStatusLineManager

protected void prepareStatusLineManager(IStatusLineManager manager)

createTreeViewer

protected TreeViewer createTreeViewer(Composite parent)

getAdapter

public Object getAdapter(Class adapter)
Specified by:
getAdapter in interface IAdaptable

getControl

public Control getControl()
Specified by:
getControl in interface IPage
Specified by:
getControl in class Page

handleDocumentTransformation

public void handleDocumentTransformation(XMLAccess newData)

refreshViewerData

public void refreshViewerData(Node topNode)

refresh

public void refresh()

setFocus

public void setFocus()
Specified by:
setFocus in interface IPage
Specified by:
setFocus in class Page

getDOMSelection

public sk.baka.ikslibs.interval.DOMIntervalSet getDOMSelection()
Description copied from interface: IDOMSelectionProvider
Returns copy of the current selection of provider.

Specified by:
getDOMSelection in interface IDOMSelectionProvider
Returns:
Selection in that is stored, what is selected in whole document

addSelectionChangedListener

public void addSelectionChangedListener(IDOMSelectionChangedListener listener)
Description copied from interface: IDOMSelectionProvider
Adds a listener for selection changes in this selection provider. Has no effect if an identical listener is already registered.

Specified by:
addSelectionChangedListener in interface IDOMSelectionProvider
Parameters:
listener - a DOM selection changed listener

removeSelectionChangedListener

public void removeSelectionChangedListener(ISelectionChangedListener listener)
Specified by:
removeSelectionChangedListener in interface ISelectionProvider

setSelection

public void setSelection(sk.baka.ikslibs.interval.DOMIntervalSet selection)
Routs information about this new IXMLSelection to SelectionListeners and to TreeViewer

Specified by:
setSelection in interface IDOMSelectionProvider
Parameters:
selection - IXMLSelection to set

selectionChanged

public void selectionChanged(DOMSelectionChangedEvent event)
This should be called from TreeViewer or from EditorSite Selection in the Event can be IStructureSelection or IXMLSelection depending on even source.

Specified by:
selectionChanged in interface IDOMSelectionChangedListener
Parameters:
event - Event that contains Selection

fireSelectionChangeEvent

protected void fireSelectionChangeEvent(sk.baka.ikslibs.interval.DOMIntervalSet xmlSelection)
Parameters:
xmlSelection - IXMLSelection to be routed to selectionListeners

synchronizeViewerSelection

protected sk.baka.ikslibs.interval.DOMIntervalSet synchronizeViewerSelection(IStructuredSelection sSel,
                                                                             sk.baka.ikslibs.interval.DOMIntervalSet xmlSelection)
Makes IDs from IStructureSelection and IDs from IXMLSelection. Then the are 3 cases

Parameters:
sSel - IStructureSelection from TreeViewer
xmlSelection - curent IXMLSelection, that will be updated
Returns:

convertIXMLSelectionToIStructureSelection

protected IStructuredSelection convertIXMLSelectionToIStructureSelection(sk.baka.ikslibs.interval.DOMIntervalSet xmlSelection)

setShowTransformed

public void setShowTransformed(boolean showTrn)

getViewer

public TreeViewer getViewer()
Returns:
Returns the viewer.

setViewer

public void setViewer(TreeViewer viewer)
Parameters:
viewer - The viewer to set.

getActionContributor

public XMLOutlineActionContributor getActionContributor()
Returns:
Returns the actionContributor.

setActionContributor

public void setActionContributor(XMLOutlineActionContributor actionContributor)
Parameters:
actionContributor - The actionContributor to set.

getContentProvider

public XMLAccessContentProvider getContentProvider()
Returns:
Returns the contentProvider.

setContentProvider

public void setContentProvider(XMLAccessContentProvider contentProvider)
Parameters:
contentProvider - The contentProvider to set.

getXMLAccess

public XMLAccess getXMLAccess()
Returns:
Returns the xmlAccess.

getLabelProvider

protected sk.uniba.euromath.plugin.views.outline.OutlineItemsLabelProvider getLabelProvider()
Returns:
Returns the labelProvider.

setLabelProvider

protected void setLabelProvider(sk.uniba.euromath.plugin.views.outline.OutlineItemsLabelProvider labelProvider)
Parameters:
labelProvider - The labelProvider to set.

isShowingTransformed

protected boolean isShowingTransformed()
Returns:
Returns the showingTransformed.

setShowingTransformed

protected void setShowingTransformed(boolean showingTransformed)
Parameters:
showingTransformed - The showingTransformed to set.

getXmlAccessChangeHandler

protected IGeneralListener getXmlAccessChangeHandler()
Returns:
Returns the xmlAccessChangeHandler.

setStatusLineManager

protected void setStatusLineManager(StatusLineUpdateManager statusLineManager)
Parameters:
statusLineManager - The statusLineManager to set.

addSelectionChangedListener

public void addSelectionChangedListener(ISelectionChangedListener listener)
Specified by:
addSelectionChangedListener in interface ISelectionProvider

getSelection

public ISelection getSelection()
Specified by:
getSelection in interface ISelectionProvider

setSelection

public void setSelection(ISelection selection)
Specified by:
setSelection in interface ISelectionProvider

selectionChanged

public void selectionChanged(SelectionChangedEvent event)
Specified by:
selectionChanged in interface ISelectionChangedListener

removeSelectionChangedListener

public void removeSelectionChangedListener(IDOMSelectionChangedListener listener)
Description copied from interface: IDOMSelectionProvider
Removes the given selection change listener from this selection provider. Has no affect if an identical listener is not registered.

Specified by:
removeSelectionChangedListener in interface IDOMSelectionProvider
Parameters:
listener - a DOM selection changed listener


Copyright © 2003-2006 null. All Rights Reserved.