Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Represents any type of source file in some Eclipse source folder.
The suffix S indicates that this is an elemement of the language independent representation of source information (S = Source), not an element of an Abstract Syntax Tree (which has the suffix T – for Tree). Projects, source folders, and files fall into this category. compilationUnitT is the link from the Java AST to the file system.
#id: id
the unique ID assigned to this file.
#sourceFolder: sourceFolderS
The source folder in which this file is contained. The folder is the parent of the file in the containment hierarchy.
'path':
The path to this file relative to the eclipse workspace including project name and source folders, e.g. /Project/src/pckg/filename.ext
If the file MyException.java has the path '/ForJT/src/MyException.java' within the project “ForJT” then the following facts will exist:
projectS(#projectID,'ForJT', '/usr/me/eclipse/workspace/ForJT', 'ForJT-output', '/usr/me/eclipse/workspace/ForJT-output'). // Containing project sourceFolderS(#srcFolder, #projectID, '/ForJT/src'). // Containing source folder fileS(#id, #srcFolder, '/ForJT/src/MyException.java'). // File
ast_node_def('Source',fileS,[ ast_arg(id, mult(1,1,no ), id, [fileS]), ast_arg(parent, mult(0,1,no), id, [sourceFolderS]), ast_arg(file, mult(1,1,no ), attr, [atom]) ]).