Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes

de.fraunhofer.isst.axbench.utilities.Constants Class Reference

aXLang source code editor and project constants. More...

List of all members.

Public Member Functions

boolean checkIfElementIsInFile (IAXLangElement element, MultiPageEditorPart part)
 checks if the element is defined inside the current file.
boolean checkIfTheIFileIsIncluded (IFile possibleIncludedFile, IFile modelfile) throws Exception
boolean containsModel (File file)
 looks inside the content to find out if it contains a model.
IFile convertFileToIFile (File file,@SuppressWarnings("unused") IProject project)
 converts a File to a IFile. (other direction-->IFile.getRawLocation().toFile)
String correctedPath (File file, IProject project)
 searches for the correct name of the model, starting from the project name.
ArrayList< File > findAllFilesRekursiv (IFileStore store, ArrayList< String > fileextensions)
 searches for all files recursively.
String findFileName (IAXLangElement element)
 not all iaxlangelements have an information about their file!especially the expressions....
String findIncludeFileName (IAXLangElement element)
 not all iaxlangelements have an information about their file!especially the expressions....
AXLMultiPageEditor findTheMultiPageEditor (IAXLView view)
ArrayList< File > getAllAXLFilesFromProject (IProject project, boolean ignoreaxlproject)
 searches for all files inside an axlproject.
String getCorrectAXBenchFilePath (IFile file)
AXLMultiPageEditor getCurrentmultipage ()
ImageData getImageData (String path)
 get the image data.
LinkedHashMap< String, TreePath[]> getOldExpandedTreePaths ()
ISelection getOldISelection ()
LinkedHashMap< String,
AXLMultiPageEditor
getOldopenedmultieditor ()
LinkedHashMap< String,
ArrayList< File > > 
getOpencorrespondingfiles ()
LinkedHashMap< File, IDocument > getOpendocumentfiles ()
LinkedHashMap< String,
ArrayList< AXLMultiPageEditor > > 
getOpenmultipageeditors ()
String getOutlineSynchronizeString (IFile file)
ArrayList< String > getPrefixmatch ()
LinkedHashMap< String,
AtomicBoolean > 
getTreepathcollected ()
LinkedHashMap< String,
AtomicBoolean > 
getTreeviewrefreshed ()
boolean isIncludedFile (String theNameToSearch, File file)
boolean isLockSetSessionElement ()
boolean isNavigated ()
void setCurrentmultipage (AXLMultiPageEditor currentopenmultipageeditor)
void setLockSetSessionElement (boolean lockSetSessionElement)
void setNavigated (boolean navigated)
void setOldISelection (ISelection oldISelection)

Static Public Member Functions

static Constants getInstance ()
static String[] getTokenArray ()
 Returns the defined token types.

Static Public Attributes

static final String AXBENCHNATUREID = "de.fraunhofer.isst.AXBenchNature"
static final String AXL_POSITION_CATEGORY = "AXL_CATEGORY"
 the axl_category for the position save
static final String CURRENT_VERSION = "0.9.0"
 the current axbench version
static final String PVNATUREID = "com.ps.consul.eclipse.core.ConsulNature"
static final Map< KeywordKind,
AXLToken
TOKENS

Private Member Functions

boolean isValidIncludeTag (String includetag)
 checks if the string is a valid include tag (no / \ before include ).

Private Attributes

AXLMultiPageEditor currentmultipage = null
 needed e.g. for the instance view
boolean lockSetSessionElement = false
boolean navigated = false
LinkedHashMap< String, TreePath[]> oldExpandedTreePaths = null
 perhapse for later changes the outline page could be always the same inside one project (in dependency to the current chosen model)
ISelection oldISelection = null
LinkedHashMap< String,
AXLMultiPageEditor
oldopenedmultieditor = null
LinkedHashMap< String,
ArrayList< File > > 
opencorrespondingfiles = null
LinkedHashMap< File, IDocument > opendocumentfiles = null
 the currently opened document files
LinkedHashMap< String,
ArrayList< AXLMultiPageEditor > > 
openmultipageeditors = null
 the currently opened mutlipageeditors
ArrayList< String > prefixmatch = null
 needed for the content assit to find the typed word by the user.
LinkedHashMap< String,
AtomicBoolean > 
treepathcollected = null
LinkedHashMap< String,
AtomicBoolean > 
treeviewrefreshed = null

Static Private Attributes

static Constants constantsInstance = null

Detailed Description

aXLang source code editor and project constants.

Author:
Ekkart Kleinod
skaegebein
Version:
0.8.0
Since:
0.1.0

Member Function Documentation

boolean de.fraunhofer.isst.axbench.utilities.Constants.checkIfElementIsInFile ( IAXLangElement  element,
MultiPageEditorPart  part 
)

checks if the element is defined inside the current file.

Parameters:
element 
part 
Returns:
boolean de.fraunhofer.isst.axbench.utilities.Constants.checkIfTheIFileIsIncluded ( IFile  possibleIncludedFile,
IFile  modelfile 
) throws Exception
boolean de.fraunhofer.isst.axbench.utilities.Constants.containsModel ( File  file  ) 

looks inside the content to find out if it contains a model.

Parameters:
file 
Returns:
IFile de.fraunhofer.isst.axbench.utilities.Constants.convertFileToIFile ( File  file,
@SuppressWarnings("unused") IProject  project 
)

converts a File to a IFile. (other direction-->IFile.getRawLocation().toFile)

Parameters:
file 
Returns:
String de.fraunhofer.isst.axbench.utilities.Constants.correctedPath ( File  file,
IProject  project 
)

searches for the correct name of the model, starting from the project name.

Parameters:
path 
project 
Returns:
ArrayList<File> de.fraunhofer.isst.axbench.utilities.Constants.findAllFilesRekursiv ( IFileStore  store,
ArrayList< String >  fileextensions 
)

searches for all files recursively.

Parameters:
store 
fileextensions - e.g. .axl or .vdm
Returns:
String de.fraunhofer.isst.axbench.utilities.Constants.findFileName ( IAXLangElement  element  ) 

not all iaxlangelements have an information about their file!especially the expressions....

Parameters:
element 
Returns:
the fileinformation from the parent, which has one.
null if no filename was found
String de.fraunhofer.isst.axbench.utilities.Constants.findIncludeFileName ( IAXLangElement  element  ) 

not all iaxlangelements have an information about their file!especially the expressions....

Parameters:
element 
Returns:
the includefileinformation from the parent, which has one.
AXLMultiPageEditor de.fraunhofer.isst.axbench.utilities.Constants.findTheMultiPageEditor ( IAXLView  view  ) 
ArrayList<File> de.fraunhofer.isst.axbench.utilities.Constants.getAllAXLFilesFromProject ( IProject  project,
boolean  ignoreaxlproject 
)

searches for all files inside an axlproject.

Parameters:
project 
Returns:
all axl files from a axlproject
String de.fraunhofer.isst.axbench.utilities.Constants.getCorrectAXBenchFilePath ( IFile  file  ) 
Parameters:
file 
Returns:
the corrected axbench file path.
AXLMultiPageEditor de.fraunhofer.isst.axbench.utilities.Constants.getCurrentmultipage (  ) 
Returns:
the currentopenmultipageeditor
ImageData de.fraunhofer.isst.axbench.utilities.Constants.getImageData ( String  path  ) 

get the image data.

static Constants de.fraunhofer.isst.axbench.utilities.Constants.getInstance (  )  [static]
Returns:
the instance
LinkedHashMap<String, TreePath[]> de.fraunhofer.isst.axbench.utilities.Constants.getOldExpandedTreePaths (  ) 
Returns:
the oldExpandedTreePaths
ISelection de.fraunhofer.isst.axbench.utilities.Constants.getOldISelection (  ) 
LinkedHashMap<String, AXLMultiPageEditor> de.fraunhofer.isst.axbench.utilities.Constants.getOldopenedmultieditor (  ) 
Returns:
the oldopenedmultieditor
LinkedHashMap<String, ArrayList<File> > de.fraunhofer.isst.axbench.utilities.Constants.getOpencorrespondingfiles (  ) 
Returns:
the opencorrespondingfiles
LinkedHashMap<File, IDocument> de.fraunhofer.isst.axbench.utilities.Constants.getOpendocumentfiles (  ) 
Returns:
the opendocumentfiles
LinkedHashMap<String, ArrayList<AXLMultiPageEditor> > de.fraunhofer.isst.axbench.utilities.Constants.getOpenmultipageeditors (  ) 
Returns:
the openmultipageeditors
String de.fraunhofer.isst.axbench.utilities.Constants.getOutlineSynchronizeString ( IFile  file  ) 
ArrayList<String> de.fraunhofer.isst.axbench.utilities.Constants.getPrefixmatch (  ) 
Returns:
the defined prefixs
static String [] de.fraunhofer.isst.axbench.utilities.Constants.getTokenArray (  )  [static]

Returns the defined token types.

Returns:
defined content types
LinkedHashMap<String, AtomicBoolean> de.fraunhofer.isst.axbench.utilities.Constants.getTreepathcollected (  ) 
Returns:
the treepathcollected
LinkedHashMap<String, AtomicBoolean> de.fraunhofer.isst.axbench.utilities.Constants.getTreeviewrefreshed (  ) 
Returns:
the treeviewrefreshed
boolean de.fraunhofer.isst.axbench.utilities.Constants.isIncludedFile ( String  theNameToSearch,
File  file 
)
Parameters:
nametosearch 
file to search in
Returns:
boolean de.fraunhofer.isst.axbench.utilities.Constants.isLockSetSessionElement (  ) 
Returns:
the lockSetSessionElement
boolean de.fraunhofer.isst.axbench.utilities.Constants.isNavigated (  ) 
boolean de.fraunhofer.isst.axbench.utilities.Constants.isValidIncludeTag ( String  includetag  )  [private]

checks if the string is a valid include tag (no / \ before include ).

Parameters:
includetag 
Returns:
void de.fraunhofer.isst.axbench.utilities.Constants.setCurrentmultipage ( AXLMultiPageEditor  currentopenmultipageeditor  ) 
Parameters:
currentopenmultipageeditor the currentopenmultipageeditor to set
void de.fraunhofer.isst.axbench.utilities.Constants.setLockSetSessionElement ( boolean  lockSetSessionElement  ) 
Parameters:
lockSetSessionElement the lockSetSessionElement to set
void de.fraunhofer.isst.axbench.utilities.Constants.setNavigated ( boolean  navigated  ) 
void de.fraunhofer.isst.axbench.utilities.Constants.setOldISelection ( ISelection  oldISelection  ) 

Member Data Documentation

final String de.fraunhofer.isst.axbench.utilities.Constants.AXBENCHNATUREID = "de.fraunhofer.isst.AXBenchNature" [static]

the axl_category for the position save

the current axbench version

needed e.g. for the instance view

LinkedHashMap<String, TreePath[]> de.fraunhofer.isst.axbench.utilities.Constants.oldExpandedTreePaths = null [private]

perhapse for later changes the outline page could be always the same inside one project (in dependency to the current chosen model)

LinkedHashMap<String, ArrayList<File> > de.fraunhofer.isst.axbench.utilities.Constants.opencorrespondingfiles = null [private]
LinkedHashMap<File, IDocument> de.fraunhofer.isst.axbench.utilities.Constants.opendocumentfiles = null [private]

the currently opened document files

the currently opened mutlipageeditors

needed for the content assit to find the typed word by the user.

final String de.fraunhofer.isst.axbench.utilities.Constants.PVNATUREID = "com.ps.consul.eclipse.core.ConsulNature" [static]
Initial value:
 new HashMap<KeywordKind, AXLToken>() {

        
        private static final long serialVersionUID = 8704450280149961189L;

        {
            put( KeywordKind.COMMENT, new AXLToken( new RGB( 136, 136, 136 ), null, SWT.ITALIC ) );
            put( KeywordKind.DEFAULT, new AXLToken( new RGB( 0, 0, 0 ), null, SWT.NORMAL ) );
            put( KeywordKind.KEYWORD1, new AXLToken( new RGB( 0, 0, 0 ), null, SWT.BOLD ) );
            put( KeywordKind.KEYWORD2, new AXLToken( new RGB( 0, 0, 136 ), null, SWT.BOLD ) );
            put( KeywordKind.KEYWORD3, new AXLToken( new RGB( 51, 51, 170 ), null, SWT.NORMAL ) );
            put( KeywordKind.KEYWORD4, new AXLToken( new RGB( 0, 102, 0 ), null, SWT.NORMAL ) );
            put( KeywordKind.KEYWORD5, new AXLToken( new RGB( 136, 0, 0 ), null, SWT.NORMAL ) );
            put( KeywordKind.KEYWORD6, new AXLToken( new RGB( 205, 133, 63 ), null, SWT.NORMAL ) );
            put( KeywordKind.STRING, new AXLToken( new RGB( 51, 170, 51 ), null, SWT.NORMAL ) );
        }
    }

Map of language tokens.

LinkedHashMap<String, AtomicBoolean> de.fraunhofer.isst.axbench.utilities.Constants.treepathcollected = null [private]
LinkedHashMap<String, AtomicBoolean> de.fraunhofer.isst.axbench.utilities.Constants.treeviewrefreshed = null [private]