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

de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor Class Reference

aXLang source code editor main class. More...

List of all members.

Public Member Functions

 AXLEditor (AXLMultiPageEditor parent)
 Constructor, sets color manager, configuration, document provider and creates the PropertyChangeListener.
void createPartControl (Composite theParent)
 Creates the part control of the editor.
IPartListener2 createPartListener ()
 realize the synchronization of the outlines between related axlfiles.
void dispose ()
 Cleans up the memory.
void editorChanged ()
 The content of the editor was changed, therefore validate the document and mark errors, if there are any.
void elementChanged (Object objCaller)
Object getAdapter (Class clsRequired)
 Provides class adapters, especially the outline page.
ISourceViewer getISourceViewer ()
AXLEditorOperations getMy_operations ()
AXLMultiPageEditor getMymultipageeditor ()
IPartListener2 getPartlistener ()
AXLEditorOutlinePage getTheOutlinePage ()
ArrayList< ViewActiongetViewactions ()
ArrayList< String > getViewids ()
void handleCall (Object objCaller, String content)
void highlightElement (IAXLangElement element)
boolean isSaved ()
void performRedo ()
 provides the redo functionality for other classes.
void performUndo ()
 provides the undo functionality for other classes.
void refreshAll ()
 refreshes the editor via the AXLWriter. this method is called e.g. by the editable view class.
void refreshViews ()
 this method refreshes all other views which exists.
void remeberSelection ()
 to save the actual selection.
void resetAdditionalHighlighting ()
 resets the actual highlighted area.
void resetHighlightRange ()
void restoreSelection ()
 to restore the last selection.
void selectionChanged (SelectionChangedEvent event)
 to inform the axl multi page editor about the changed selection.
void setAdditionalHighlighting (int offset, int length)
 creates the additional highlighting.
void setHighlightRange (int offset, int length, boolean moveCursor)
void setSaved (boolean saved)
void setSessionElement ()
 Sets the session element to the current editor element.
void updateFoldingStructure (ArrayList< Position > positions)
 updates the folding structure.

Protected Member Functions

ISourceViewer createSourceViewer (Composite parent, IVerticalRuler ruler, int styles)
 overwritten, to create a ProjectionViewer for folding.
void doSetInput (IEditorInput newInput) throws CoreException
 Sets the input.
void editorContextMenuAboutToShow (IMenuManager menu)
 adds the refactor low level menu to the popup menu of the editor.
void editorSaved ()
 Called when the editor was saved-.
ISourceViewer getTheSourceViewer ()
void handleCursorPositionChanged ()
 handles the change of the cursor position.
void pageSelectionChanged (IWorkbenchPart thePart, ISelection theSelection)
 Reacts on changes of page selections.

Protected Attributes

boolean highlighted = false
 to know if a highlighting occurred
AXLEditorOperations my_operations = null
 the operations of the editor
IPositionUpdater positionUpdater = null
 the position updater

Package Functions

void createOutlineSynchronize (String synchronizestring)
 creates the synchronization for the outline view (needed for included files).
boolean isHighlighted ()

Package Attributes

int actuallength = -1
int actualoffset = -1
AXLMultiPageEditor mymultipageeditor = null
 the multi page editor

Private Member Functions

void handlePositionChange (String content)
void handleRefactorLowLevelMenu ()
 handles if a rename action is available for the selected text.
void hookPageSelection ()
 Hooks this view to the page selections.
String writeOutChanges (String modelfilepath, Map< String, Object > mapInputParameter)
 writes out the changes into the idocument of the opened files.

Private Attributes

ProjectionAnnotationModel annotationModel = null
 the annoation model
AXLConfiguration configurator = null
ColorManager newColorManager = null
 color manager für syntax highlighting
Annotation[] oldAnnotations = null
 the old annotations
Vector< Color > oldbackgrounds = null
 to save the old backgrounds before highlighting (and reset after)
Vector< Color > oldforegrounds = null
 to save the old foregrounds before highlighting (and reset after)
StyleRange[] oldstyleranges = null
 to know the old styled ranges
IPartListener2 partlistener = null
 needed for the tabs
ProjectionSupport projectionSupport = null
 the projection support
MenuManager refactorlowlevelmenu = null
RenameAction renameaction = null
boolean saved = false
 indents that the editor was saved-inside the Session.class it will marked
IStorageEditorInput theEditorInput = null
 editor input,don't have to be a IStorageEditorInput
AXLEditorOutlinePage theOutlinePage = null
 outline page
ISelectionListener thePageSelectionListener = null
 listener for page changes
IPropertyChangeListener thePropertyChangeListener = null
 listener for the property change
ArrayList< ViewActionviewactions = null
ArrayList< String > viewids = null
ArrayList< String > viewnames = null

Static Private Attributes

static String SHOWIN_TEXT = "Sho&w In"
static String viewExtensionID = "de.fraunhofer.isst.axbench.views.axbenchviews"

Detailed Description

aXLang source code editor main class.

Author:
Ekkart Kleinod
skaegebein
Version:
0.8.0
Since:
0.1.0

Constructor & Destructor Documentation

de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.AXLEditor ( AXLMultiPageEditor  parent  ) 

Constructor, sets color manager, configuration, document provider and creates the PropertyChangeListener.


Member Function Documentation

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.createOutlineSynchronize ( String  synchronizestring  )  [package]

creates the synchronization for the outline view (needed for included files).

Parameters:
synchronizestring 
void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.createPartControl ( Composite  theParent  ) 

Creates the part control of the editor.

Parameters:
theParent parent composite
IPartListener2 de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.createPartListener (  ) 

realize the synchronization of the outlines between related axlfiles.

Returns:
ISourceViewer de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.createSourceViewer ( Composite  parent,
IVerticalRuler  ruler,
int  styles 
) [protected]

overwritten, to create a ProjectionViewer for folding.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.dispose (  ) 

Cleans up the memory.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.doSetInput ( IEditorInput  newInput  )  throws CoreException [protected]

Sets the input.

Parameters:
newInput new editor input
void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.editorChanged (  ) 

The content of the editor was changed, therefore validate the document and mark errors, if there are any.

Todo:
Marking included files works, opening them works not, because they are parsed and cannot be parsed, because they are no Model.
void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.editorContextMenuAboutToShow ( IMenuManager  menu  )  [protected]

adds the refactor low level menu to the popup menu of the editor.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.editorSaved (  )  [protected]

Called when the editor was saved-.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.elementChanged ( Object  objCaller  ) 
Object de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.getAdapter ( Class  clsRequired  ) 

Provides class adapters, especially the outline page.

Parameters:
clsRequired required class
Returns:
adapter object
ISourceViewer de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.getISourceViewer (  ) 
Returns:
the actual source viewer.
AXLEditorOperations de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.getMy_operations (  ) 
Returns:
the my_operations
AXLMultiPageEditor de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.getMymultipageeditor (  ) 
Returns:
the mymultipageeditor
IPartListener2 de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.getPartlistener (  ) 
Returns:
the partlistener
AXLEditorOutlinePage de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.getTheOutlinePage (  ) 
Returns:
the theOutlinePage
ISourceViewer de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.getTheSourceViewer (  )  [protected]
ArrayList<ViewAction> de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.getViewactions (  ) 
ArrayList<String> de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.getViewids (  ) 
void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.handleCall ( Object  objCaller,
String  content 
)
void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.handleCursorPositionChanged (  )  [protected]

handles the change of the cursor position.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.handlePositionChange ( String  content  )  [private]
void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.handleRefactorLowLevelMenu (  )  [private]

handles if a rename action is available for the selected text.

this.isDirty()-->if every element has a dynamic position it wouldn't be necessary

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.highlightElement ( IAXLangElement  element  ) 
void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.hookPageSelection (  )  [private]

Hooks this view to the page selections.

boolean de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.isHighlighted (  )  [package]
Returns:
the highlighted
boolean de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.isSaved (  ) 
void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.pageSelectionChanged ( IWorkbenchPart  thePart,
ISelection  theSelection 
) [protected]

Reacts on changes of page selections.

Parameters:
thePart workbench part
theSelection selection
void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.performRedo (  ) 

provides the redo functionality for other classes.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.performUndo (  ) 

provides the undo functionality for other classes.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.refreshAll (  ) 

refreshes the editor via the AXLWriter. this method is called e.g. by the editable view class.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.refreshViews (  ) 

this method refreshes all other views which exists.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.remeberSelection (  ) 

to save the actual selection.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.resetAdditionalHighlighting (  ) 

resets the actual highlighted area.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.resetHighlightRange (  ) 
void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.restoreSelection (  ) 

to restore the last selection.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.selectionChanged ( SelectionChangedEvent  event  ) 

to inform the axl multi page editor about the changed selection.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.setAdditionalHighlighting ( int  offset,
int  length 
)

creates the additional highlighting.

Parameters:
offset 
length 
void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.setHighlightRange ( int  offset,
int  length,
boolean  moveCursor 
)
void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.setSaved ( boolean  saved  ) 
void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.setSessionElement (  ) 

Sets the session element to the current editor element.

void de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.updateFoldingStructure ( ArrayList< Position >  positions  ) 

updates the folding structure.

Parameters:
positions 
String de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.writeOutChanges ( String  modelfilepath,
Map< String, Object >  mapInputParameter 
) [private]

writes out the changes into the idocument of the opened files.

Parameters:
modelfilepath 
mapInputParameter 

Member Data Documentation

the annoation model

to know if a highlighting occurred

the operations of the editor

the multi page editor

color manager für syntax highlighting

the old annotations

to save the old backgrounds before highlighting (and reset after)

to save the old foregrounds before highlighting (and reset after)

to know the old styled ranges

needed for the tabs

the position updater

the projection support

indents that the editor was saved-inside the Session.class it will marked

editor input,don't have to be a IStorageEditorInput

outline page

listener for page changes

listener for the property change

String de.fraunhofer.isst.axbench.editors.axlmultipage.axleditor.AXLEditor.viewExtensionID = "de.fraunhofer.isst.axbench.views.axbenchviews" [static, private]