Public Member Functions | Protected Member Functions | Package Attributes | Private Member Functions | Private Attributes

de.fraunhofer.isst.axbench.views.AbstractAXLView Class Reference

Abstract implementation for all aXBench views. This implementation provides the standard hooks for the synchronization between editors and views. More...

List of all members.

Public Member Functions

 AbstractAXLView (AXLMultiPageEditor editor)
TreeViewerColumn buildUpToolTipAndIncludeForColumn (TreeColumn column)
void collectEditorInfos (Object objCaller)
 collects the info about the actual opened editor. needed to save the expanded tree into the linked hash map of the superclass
void collectExpandedElements (boolean actual) throws Exception
 collects the visibleexpandedelements and expandedtreepaths from the old model.
void collectSelectedElement ()
 collects the selected element. only one node can be selected, a StructureNode or an IAXLangElementNode
void createPartControl (Composite theParent)
 Creates the part control of the view.
void dispose ()
 Cleans up the memory.
void doEditorSelection (IAXLangElement element)
 this method realizes the selection of an iaxlangelement if its inside the file.
void elementChanged (Object objCaller)
 Reacts on a change of the session element.
IFile getActualeditedfile ()
AXLContentProvider getContentProvider ()
AXLLabelProvider getLabelProvider ()
AXLMultiPageEditor getMymultipageeditor ()
IFile getOldeditedfile ()
TreeViewer getTreeViewer ()
 Returns the tree viewer of the view.
void handleCall (Object objCaller, String content)
void handleUpdate (boolean collect)
 handles the update.
void hookContextMenu ()
 Prepares the view for a context menu.
void hookPageSelection ()
 Hooks this view to the page selections.
boolean isFirstbuild ()
boolean isReactonchange ()
IAXLangElement provideIAXLangElementFromSelection (IStructuredSelection selection, boolean editorSelection)
 this method realizes the mapping from a selection to the iaxlangelement.
void refreshSelection ()
 refresh the selections. needed because of the stackoverflow if the TreeViewer handles this action
void refreshTreeView ()
 refresh the View for the new model (expands the tree). to use this methods below, it was necessary to separate the IAXLangElement from the view/tree/outline
void selectionChanged (SelectionChangedEvent theChangeEvent)
void setActualeditedfile (IFile actualeditedfile)
void setFocus ()
 Sets focus to view's control.
void setInput (Object theInput)
 this method should be implemented by the subclass again tin influence the input! See e.g. InstanceView or SimulationTraceView.
void setMymultipageeditor (AXLMultiPageEditor mymultipageeditor)
void setOldeditedfile (IFile oldeditedfile)
void setReactonchange (boolean reactonchange)
void setSpecialUpdateAction (Object specialUpdateAction)
void setTreeViewer (TreeViewer treeviewer)

Protected Member Functions

void hookSessionListener ()
 to notice a possible save inside the axl lang editor
void pageSelectionChanged (IWorkbenchPart thePart, ISelection theSelection)
 Reacts on changes of page selections.

Package Attributes

AXLMultiPageEditor mymultipageeditor = null
 the multipageeditor which belongs to this view

Private Member Functions

boolean checkIncludedPath ()
void collectViewElementInfos (boolean collect)

Private Attributes

IFile actualeditedfile = null
 the actual opened editor file
boolean currentElementUpdateFlag = false
 this flag handles the update, after the currentElement was set to null
LinkedHashMap< IFile, TreePath[]> expandedtreepaths = null
 saves the treepaths towards the editorinstancename
boolean firstbuild = false
TreeViewer jfTreeViewer = null
 the tree viewer
Object lastaction = ""
IFile oldeditedfile = null
 the last opened editor file
boolean reactonchange = false
 to save the state that the tab was changed
LinkedHashMap< IFile, Object > selectedNode = null
 map to save the selected tree item path
Object specialUpdateAction = ""
ISelectionListener thePageSelectionListener = null
 listener for page changes

Detailed Description

Abstract implementation for all aXBench views. This implementation provides the standard hooks for the synchronization between editors and views.

Author:
ekleinod
skaegebein
Version:
0.8.0
Since:
0.7.2

Constructor & Destructor Documentation

de.fraunhofer.isst.axbench.views.AbstractAXLView.AbstractAXLView ( AXLMultiPageEditor  editor  ) 

the constructor


Member Function Documentation

TreeViewerColumn de.fraunhofer.isst.axbench.views.AbstractAXLView.buildUpToolTipAndIncludeForColumn ( TreeColumn  column  ) 
boolean de.fraunhofer.isst.axbench.views.AbstractAXLView.checkIncludedPath (  )  [private]
void de.fraunhofer.isst.axbench.views.AbstractAXLView.collectEditorInfos ( Object  objCaller  ) 

collects the info about the actual opened editor. needed to save the expanded tree into the linked hash map of the superclass

Parameters:
objCaller 
void de.fraunhofer.isst.axbench.views.AbstractAXLView.collectExpandedElements ( boolean  actual  )  throws Exception

collects the visibleexpandedelements and expandedtreepaths from the old model.

Parameters:
actual - needed to know if a save occurs->the editor doesn't changed
Exceptions:
Exception (NullPointerExpection occurs if eclipse was closed immediately)
void de.fraunhofer.isst.axbench.views.AbstractAXLView.collectSelectedElement (  ) 

collects the selected element. only one node can be selected, a StructureNode or an IAXLangElementNode

void de.fraunhofer.isst.axbench.views.AbstractAXLView.collectViewElementInfos ( boolean  collect  )  [private]
void de.fraunhofer.isst.axbench.views.AbstractAXLView.createPartControl ( Composite  theParent  ) 
void de.fraunhofer.isst.axbench.views.AbstractAXLView.dispose (  ) 

Cleans up the memory.

void de.fraunhofer.isst.axbench.views.AbstractAXLView.doEditorSelection ( IAXLangElement  element  ) 

this method realizes the selection of an iaxlangelement if its inside the file.

Parameters:
element 
void de.fraunhofer.isst.axbench.views.AbstractAXLView.elementChanged ( Object  objCaller  ) 

Reacts on a change of the session element.

Parameters:
objCaller calling object

Implements de.fraunhofer.isst.axbench.api.ISessionListener.

Reimplemented in de.fraunhofer.isst.axbench.editors.axlmultipage.treeeditor.EditableView.

IFile de.fraunhofer.isst.axbench.views.AbstractAXLView.getActualeditedfile (  ) 
Returns:
the actualeditedfile
AXLContentProvider de.fraunhofer.isst.axbench.views.AbstractAXLView.getContentProvider (  ) 
AXLLabelProvider de.fraunhofer.isst.axbench.views.AbstractAXLView.getLabelProvider (  ) 
AXLMultiPageEditor de.fraunhofer.isst.axbench.views.AbstractAXLView.getMymultipageeditor (  ) 
Returns:
the mymultipageeditor
IFile de.fraunhofer.isst.axbench.views.AbstractAXLView.getOldeditedfile (  ) 
Returns:
the oldeditedfile
TreeViewer de.fraunhofer.isst.axbench.views.AbstractAXLView.getTreeViewer (  ) 

Returns the tree viewer of the view.

Returns:
tree viewer
Return values:
null if none is used
void de.fraunhofer.isst.axbench.views.AbstractAXLView.handleCall ( Object  objCaller,
String  content 
)
void de.fraunhofer.isst.axbench.views.AbstractAXLView.handleUpdate ( boolean  collect  ) 

handles the update.

void de.fraunhofer.isst.axbench.views.AbstractAXLView.hookContextMenu (  ) 

Prepares the view for a context menu.

Reimplemented in de.fraunhofer.isst.axbench.editors.axlmultipage.treeeditor.EditableView.

void de.fraunhofer.isst.axbench.views.AbstractAXLView.hookPageSelection (  ) 

Hooks this view to the page selections.

Reimplemented in de.fraunhofer.isst.axbench.editors.axlmultipage.treeeditor.EditableView.

void de.fraunhofer.isst.axbench.views.AbstractAXLView.hookSessionListener (  )  [protected]

to notice a possible save inside the axl lang editor

boolean de.fraunhofer.isst.axbench.views.AbstractAXLView.isFirstbuild (  ) 
boolean de.fraunhofer.isst.axbench.views.AbstractAXLView.isReactonchange (  ) 
Returns:
the reactonchange
void de.fraunhofer.isst.axbench.views.AbstractAXLView.pageSelectionChanged ( IWorkbenchPart  thePart,
ISelection  theSelection 
) [protected]

Reacts on changes of page selections.

Parameters:
thePart workbench part
theSelection selection
IAXLangElement de.fraunhofer.isst.axbench.views.AbstractAXLView.provideIAXLangElementFromSelection ( IStructuredSelection  selection,
boolean  editorSelection 
)
void de.fraunhofer.isst.axbench.views.AbstractAXLView.refreshSelection (  ) 

refresh the selections. needed because of the stackoverflow if the TreeViewer handles this action

void de.fraunhofer.isst.axbench.views.AbstractAXLView.refreshTreeView (  ) 

refresh the View for the new model (expands the tree). to use this methods below, it was necessary to separate the IAXLangElement from the view/tree/outline

void de.fraunhofer.isst.axbench.views.AbstractAXLView.selectionChanged ( SelectionChangedEvent  theChangeEvent  ) 
void de.fraunhofer.isst.axbench.views.AbstractAXLView.setActualeditedfile ( IFile  actualeditedfile  ) 
Parameters:
actualeditedfile the actualeditedfile to set
void de.fraunhofer.isst.axbench.views.AbstractAXLView.setFocus (  ) 

Sets focus to view's control.

void de.fraunhofer.isst.axbench.views.AbstractAXLView.setInput ( Object  theInput  ) 
void de.fraunhofer.isst.axbench.views.AbstractAXLView.setMymultipageeditor ( AXLMultiPageEditor  mymultipageeditor  ) 
Parameters:
themymultipageeditor the mymultipageeditor to set
void de.fraunhofer.isst.axbench.views.AbstractAXLView.setOldeditedfile ( IFile  oldeditedfile  ) 
Parameters:
oldeditedfile the oldeditedfile to set
void de.fraunhofer.isst.axbench.views.AbstractAXLView.setReactonchange ( boolean  reactonchange  ) 
Parameters:
reactonchange the reactonchange to set
void de.fraunhofer.isst.axbench.views.AbstractAXLView.setSpecialUpdateAction ( Object  specialUpdateAction  ) 
void de.fraunhofer.isst.axbench.views.AbstractAXLView.setTreeViewer ( TreeViewer  treeviewer  ) 

Member Data Documentation

the actual opened editor file

this flag handles the update, after the currentElement was set to null

LinkedHashMap<IFile, TreePath[]> de.fraunhofer.isst.axbench.views.AbstractAXLView.expandedtreepaths = null [private]

saves the treepaths towards the editorinstancename

the tree viewer

the multipageeditor which belongs to this view

the last opened editor file

to save the state that the tab was changed

LinkedHashMap<IFile, Object> de.fraunhofer.isst.axbench.views.AbstractAXLView.selectedNode = null [private]

map to save the selected tree item path

listener for page changes