Commit Graph
50 Commits
Author SHA1 Message Date
Eberhard Graether 9f684ad9f5 data: saving errors to Storage
* saving errors in separate sqlite table
* use MessageShowErrors to show the errors in the UI
* show error count permanently in the right side of the status bar with click to show
* fixed clicking of error locations
* fixed expanding of files with errors
2015-11-04 12:00:28 +01:00
Eberhard Graether 42ab36fbad data: Saving application version to storage and refresh when version changes
The version string of the application is stored on every parse. The utility class Version is used to parse the version
string and compare application and stored string. The third number in the version string is now the storage refresh
number, the project will be refreshed when it changes. (0.2.1 -> 0.2.2)
2015-11-02 10:14:03 +01:00
Eberhard Graether c553e29ff8 data: save undefined in database field instead of using different node types
* expand toggle also for undefined classes
* changed direction of some template edges
* save same access component to specialized template functions and classes
2015-10-08 23:12:37 +02:00
Eberhard Graether 8d3112d5a9 data: increased file clearing performance
This change passes all file node ids for clearing to the sqlite storage at once and makes use of ON DELETE CASCADE for
everything else, instead of manally deleting all source locations.
2015-10-05 09:44:27 +02:00
Eberhard Graether acfbe510fb logic: fixes all over the place
* fixed refreshing to send another ui refresh message after parsing
* keepContent field for MessageBase so that views won't update
* fixed searchmatching to only weigh uppercase letters next to lowercase ones
* fixed file not jumping back to snippets when activating edge
* clicking into empty space deselects active edge
* clear file manager files on every fetch
* added db transaction for file clearing
* use zooming instead of changing font size
2015-10-02 17:07:03 +02:00
Eberhard Graether 2704d47cd8 logic: multiple fixes and improvements
* showing project name in main window title
* keep reference count visible when maximizing code file
* show first node in db when no main function is available
* log Storage stats after parse
* fixed macro locations saved multiply
* using NameHierarchy when retrieving ids
2015-10-01 19:03:05 +02:00
Eberhard Graether 8fa9bdde5e data: refactored file clearing on reparse to use TaskClearStorage 2015-10-01 13:45:31 +02:00
Eberhard Graether 8777c9874b logic: don't refresh project on reopen 2015-09-29 14:47:36 +02:00
Andreas Stallinger e3696df5e1 data: Macro handling
Macros have now edges from Files where they are usesd
2015-09-28 15:25:52 +02:00
Eberhard Graether bb3a8bf351 ui: force refresh option in menu for reloading whole project 2015-09-23 16:44:39 +02:00
Eberhard Graether 78c1b32797 data: increased parse and graph assembly performance
* removed header search in subdirectories of header search paths
* cache file node ids in Storage for faster lookup
* retrieve node names from SearchIndex
* fixed addNodeAndAllChildren also called for member edges
* added check if node already present in addEdgeAndAllChildren
2015-09-23 09:26:03 +02:00
Eberhard Graether 04f24ba63d test: Fixed tests 2015-09-17 15:07:46 +02:00
Eberhard Graether a596c58b02 data: Fixed performance drop in file path search 2015-09-17 13:53:28 +02:00
Eberhard Graether a14bfaff56 data: saving and loading Storage with sqlite file next to project file 2015-09-17 12:08:25 +02:00
Andreas Stallinger f702b79892 src: fixed headersearchpaths, there where not inlcuded
<description>
2015-09-17 11:31:00 +02:00
malte_langkabel 3d94b78b8c data: refreshing with DB
* database stores modification time of files.
* FileManager updates internal state based on database info.
* reimplemented FileManager's check if a file is in project.
* implemented clearing data of updated or removed files before reparsing the updated and added files.
2015-09-16 18:53:33 +02:00
Andreas Stallinger 73b1b77ca8 data, utility: Fixes to run Opensource Projects
templateSpecializationArgsAsWritten returning null caused a crash
VisitMemberExprInDeclBody for vardecl was missing
subdirectories for headersearchpaths, that the user does not need to add a hugh amount of folders
2015-09-16 17:08:16 +02:00
Eberhard Graether 1ba802dd9b ui: added ApplicationSettingsScreen
* opens on first start autmatically
* open from the menu under Preferences
* show version number on splash screen
* added recent projects markup to app settings template
* moved all qt window classes to qt/window
* put common form stuff from project setup and app settings into QtSettingsWindow
2015-09-04 14:38:30 +02:00
Eberhard Graether 5ab627b735 ui: reworked StartScreen and ProjectSettupScreen UI flow
* realigned buttons and elements
* fixed retina styles for mac
* removed MessageLoadSource and subsequent functionality
* edit existing project through menu
* browsing paths from the line item in QtDirectoryListBox
* grow QtDirectoryListBox instead of scroll
* take any file or directory as valid path
* fixed new project setup screen background
* fixed screen handling on cancelation
2015-09-04 10:54:37 +02:00
Eberhard Graether 2044ff9723 data: cleaned up Graph classes
* removed self assignment of id from Token
* removed FilterableGraph interface from Graph
* creating Nodes and Edges on Graph with addNode and addGraph methods
* removed obsolete Aggregation edge filtering
* fixed clang warnings
* fixed memory leak for Node creation
2015-08-27 17:25:52 +02:00
Eberhard Graether c0a31fca18 logic: Reloading ProjectSettings on refresh 2015-08-04 16:21:55 +02:00
Eberhard Graether 5f25311389 logic: paths in ProjectSettings relative to file not working directory
This change checks all paths in the ProjectSettings file for relativity and makes them relative to the location of the
ProjectSettings file if necessary. The paths are also correctly saved relative to the file.
2015-07-29 22:20:26 +02:00
Eberhard Graether 3c6782d94d data: fixed graph display errors
* fixed Storage saving specialized template functions as undefined function node
* fixed usages of same type in functions in return or parameter not clickable in graph, because the edges are on top
2015-06-11 14:04:20 +02:00
Eberhard Graether 0153330317 data: log storage stats after parsing 2015-05-29 16:49:10 +02:00
Eberhard Graether 3c7c3da527 logic: made parsing interruptable by introducing TaskScheduler
This change introduces the TaskScheduler, which queues and processes Tasks on a separate thread. The Task class provides
a common interface for deriving all specific tasks. A task can split it's processing into multiple update calls. The
TaskScheduler will update a task until it is finished or interrupt it when necessary. TaskGroups can be used to bundle
multiple Tasks together. So far only TaskGroupSequential was implemented which runs the Tasks in the set order.

TaskParseCxx utilizes the CxxParser to parse each source file in a single update call. Parsing can be interrupted using
the ESC key. The Statusbar shows the parsing progress.
2015-04-23 18:57:38 +02:00
Andreas Stallinger 69ea6adddd src: file extension for header and source in config
header and source extensions are now in the projectsettings
2015-03-18 15:48:59 +01:00
Eberhard Graether e3f1f004a0 logic: combined GraphAccess and LocationAccess to StorageAccess
Having only one access point to the Storage will simplify caching and parallelisation in the future. Also the two
accesses were never really independent of each other anyways, because in some cases they had to access both data sets.
2015-03-17 16:38:17 +01:00
Eberhard Graether 03cf9eeb5f data: Fixes and features for loading Coati into Coati
This change facilitates loading Coati into Coati:
* removed error logs for TokenComponent setting
* fixed edge checks regarding template stuff
* separated CommonSettings to be inherited by Project- and ApplicationSettings for common settings
* pluralized SourcePaths setting in xml to allow for loading multiple directories and single files
* added CompilerFlags section to settings
* passing Compiler arguments to Parser via struct Parser::Arguments
* setting -isystem for all header search paths to avoid distinction between "" and <> headers
* parsing all headers from the SourcePaths, even the ones that are not included
* fixed parsing time measurement and display
* added utility.h file for general utility functionality
2015-03-16 10:07:57 +01:00
Eberhard Graether ca9dfe7f75 ui: improved file nodes
* added colors for file nodes and dependency edges
* use TokenComponentFilePath on file nodes to store FilePath
2015-03-09 14:07:58 +01:00
Eberhard Graether df888e4151 utility: added FilePath abstraction and rewrote data management to use it
The utility class FilePath wraps an instance of boost::filesystem::path. Using FilePath allows for easy comparision of
file paths on different platforms using absolute or relative paths. Whereever file paths are compared, this wrapper
should be used.
2015-03-09 01:51:32 +01:00
Eberhard Graether 598041f896 data: parsing file dependencies
This change adds the node NODE_FILE to the graph and the edge EDGE_INCLUDE, which determine the dependencies between
files by parsing the include preprocessor directive. File nodes can be searched and displayed in the GraphView as file
dependency graph. The filter "file" allows for selecting all files. The file depency information is used on project
refresh do determine which files need to get reparsed.
2015-03-03 00:33:13 +01:00
Eberhard Graether 0b9a2bf4a1 build: fixed clang warnings and console errors 2015-02-10 13:48:20 +01:00
malte_langkabel 8bc11c9d9c logic: File Manager
* added FileManager that keeps track of the files analyzed by the project. It therefore checks if files get added, updated or deleted from the source- and include folders.
* refactored ASTVisitor::hasValidLocation() and implemented one version that search for the location in the currently parsed file and one that searches in all the project's source files.
* quickfix: switched order in FileManager so that header files are parsed first.
* created folder for helper classes used in tests.
* added test code for FileManager
* adjusted test code for Parser Tests.
2015-02-09 14:52:31 +01:00
Eberhard Graether 1690479b0e ui/logic/data: refreshing only source files that have been updated
This change adds the refresh component that allows for refreshing the source code via UI or shortcut. If automatic
refreshing is activated via the UI, the code is refreshed anytime the window gets focus. The contents of all the
updated source files get removed from Storage, before reparsing them. File dependencies are not respected yet.
2015-02-03 14:27:39 +01:00
Eberhard Graether bdb38acbce ui/logic/data: show parse errors in CodeView
This change saves the errors while parsing in the Storage and displays them in the CodeView. The error messages can be
read in the tooltip on hovering. The error count is visible in the status bar.
2015-01-15 19:38:19 +01:00
Eberhard Graether 8dafd0435f build: different location for clang release libs on UNIX
This change fixes the clang cmake config to use release libs of clang, adds the TicTacToe source files to bin/app/src/
and adds time measuring to the parse call in Project.
2014-12-14 11:51:35 +01:00
Andreas Stallinger 3441b6a8f4 data: saving for projectsettings
<description>
2014-11-03 16:34:42 +01:00
Eberhard Graether f41e1c429d data: Added HeaderSearchPaths to Application- and ProjectSettings
This change allows for parsing of a real codebase by specifying the system header search paths in
ApplicationSettings.xml and the additional header search paths in ProjectSettings.xml.

Both settings files are now documented in ApplicationSettings_template.xml and ProjectSettings_template.xml, which show
all possible settings for each file.

This change also fixes some parsing edge cases that occured.
2014-10-07 12:11:48 +02:00
Eberhard Graether 5c89e49ff0 test: added GraphFilter and GraphFilterConductor tests 2014-09-01 12:15:17 +02:00
Eberhard Graether 4bf459fa99 logic: Refreshing reloads the source code and resets the Token ids to start from 1 2014-07-26 15:31:55 +02:00
Eberhard Graether 2eaecc4913 logic: moved Storage into Project
Moved Storage instantiation into the Project. Storage access is still handled via the GraphAccess and LocationAccess
interfaces, but the ComponentFactory now only serves proxy implementations of these access classes. Project is
responsible for setting the subject of the proxies to the current Storage instance.
2014-07-10 11:31:24 +02:00
Eberhard Graether f07f2051f2 ui: load source from directory via MenuBar
Added MenuBar action Project->New, which opens a directory dialog for choosing the new source directory to parse the
files from. The ConfigManager can be created empty now and setValue calls can be used to set values.

fortune cookie message = Your troubles will be faded by the luck you will soon have.
2014-07-09 16:41:11 +02:00
malte_langkabel c02767362f ui: search view autocompletion
- Implemented autocompletion for the QtSearchView.
- Added: MessageFinishedParsing that will be dispatched by the Project after the parsing step is done.
- Moved the initial MessageActivateToken from the Project to the Application.
- Added getNamesForNodesWithNamePrefix() to GraphAccess.
2014-07-07 11:25:46 +02:00
malte_langkabel 4ae6f4a04a logic: code controller
- Renamed MessageActivateTokenLocation to MessageActivateToken, since it uses the Token id (not the TokenLocation id).
- Implemented CodeController to add one snippet for each location where the activated token occurred.
- Added Semaphore to QtThreadedFunctor to prevent an evil race-condition.
- CodeView dispatches message when a token is clicked.
2014-07-03 16:03:06 +02:00
malte_langkabel 400e2629d2 logic: code controller communication
- Replaced CodeAccess with LocationAccess.
- Implemented basic functionality for CodeController.
- Added messaging to the project.
- Added QtThreadedFunctor to enable our Messaging thread to invoke calls on the QtThread.
- Added GraphController.

fortune cookie message = Good news from someone dear is coming soon.
2014-07-02 16:42:33 +02:00
Eberhard Graether cf6d17584f data: Saving TokenLocations in Storage
This change adds structures for saving TokenLocations in the Storage and improves the location derival in the
ASTVisitor:
* TokenLocation saves an Id of a Token. For each Token two TokenLocations are created for both start- and endpoint. They
  keep a reference to each other and know whether they are start or end.
* TokenLocationLine saves all TokenLocations in a line and the lineNumber.
* TokenLocationFile saves all TokenLocationLines of a specific file and the filePath.
* TokenLocationCollection saves multiple TokenLocationFiles.
* TokenLocation can derive it's lineNumber and filePath through references to first TokenLocationLine and from there to
  TokenLocationFile.
2014-07-01 10:49:12 +02:00
Eberhard Graether 5ceb7a4b43 data: added Graph data structure for storing code semantics in Storage
This change adds graph data structures Token, Node, Edge and Graph for holding code semantics in the Storage and fills
them with the parsed data. Things to note:
* Token is the base for the classes Edge and Node and holds a unique id.
* Graph is the owner of all Nodes and Edges.
* A Node saves the Edges it is endpoint of.
* An Edge saves the Nodes that are endpoints.
* Nodes and Edges are not subclassed. The different Node and Edge types are distinguished by the enums NodeType and
  EdgeType. Type specific fields are therefore available for all types, a check when assigning them prohibits faulty
  usage.
* Storage uses the Graph::getNodeHierarchy method, which is not strict about knowing type names beforehand. E.g. if A::B
  is passed in and A doesn't exist so far, then node A gets created as NODE_UNDEFINED with B as it's child.
* The Graph methods addNodeAsPlainCopy and addEdgeAsPlainCopy can be used to create a sub-graph without reference to the
  original, but with the same ids.

review id = 19

fortune cookie message = Your cheerful outlook is one of your best assets.
2014-06-30 14:08:01 +02:00
Andreas Stallinger a26f5a52b2 logic : projectsettings loading
loading projectsetting via file

review id = 21

fortune cookie message = in dreams and in life, nothing is impossible
2014-06-03 17:07:32 +02:00
Eberhard Graether 82c88ebd97 data: Added CxxParser, currently only detecting classes
This change adds CxxParser a class for parsing cxx files. It holds basic functionality to detect classes using the clang
libTooling classes. CxxParser is derived from a common Parser interface, which can later be used for other language
parsers. The Parser forwards detected elements to a ParserClient interface, which is implemented by the Storage class.
The detected classes only get logged so far.

review id = 6

* bd3c63a - (HEAD, origin/class, class) applied second review <Eberhard Graether> (4 minutes ago)
* 3db7d93 - added missing files <Eberhard Graether> (4 days ago)
* 6d09f4e - applied review <Eberhard Graether> (4 days ago)
* d9d3e64 - fixed CMake files <Eberhard Graether> (4 days ago)
* f22a771 - only one Storage class <Eberhard Graether> (4 days ago)
* 6ee9553 - added tests <Eberhard Graether> (4 days ago)
* 0a525e8 - fixed includes <Eberhard Graether> (4 days ago)
* ca3fbb8 - added StorageManager as ParserClient <Eberhard Graether> (4 days ago)
* fa185a5 - renamed ParseLocation to ParseObject <Eberhard Graether> (4 days ago)
* 8b89808 - pass location with ParseLocation object <Eberhard Graether> (4 days ago)
* 548ae3c - renamed clang AST classes <Eberhard Graether> (4 days ago)
* d3b2caf - cleaned includes <Eberhard Graether> (4 days ago)
* f7fdf33 - removed using namespace stmts <Eberhard Graether> (4 days ago)
* 5378ef6 - using ParserClient <Eberhard Graether> (4 days ago)
* b9ce2f6 - working with test file <Eberhard Graether> (4 days ago)
* 5585abc - added CxxParser and ParserClient <Eberhard Graether> (4 days ago)
2014-05-06 14:50:51 +02:00
Eberhard Graether d4e3433e5d project: added project skeleton
Skeleton includes emtpy implementations of application class structure.
Source groups were added to CMakeLists to define filters in Visual Studio.
2014-03-31 17:59:52 +02:00