Commit Graph
1414 Commits
Author SHA1 Message Date
malte_langkabel cdeece6231 logic: deep copy edge components
- added a copy method to EdgeComponents
- added a copy method to DataTypeModifier

fortune cookie message = Roem Rijkdom en Liefde liggen op je Weg.
2014-07-10 13:42:44 +02:00
malte_langkabel f1f2ea0ccd data: storing type modifiers in edges
- ASTVisitor uses DataType instead of string to pass on type information.
- Edges can have EdgeComponents.
- EdgeComponentDataType stores information that modifies the type a ...TYPE_OF edge points to.
- EdgeComponentDataType can create a complete DataType using it's internal information.
- Fixed a bug where DataTypeModifiers did not apply their qualifiers.
2014-07-10 11:54:29 +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
Manuel Dobusch d12fd3edf3 ui: graph showing neighbours
The graph view can now display the n1 neighbours of the active node, including connections between neighbours.
2014-07-09 16:32:15 +02:00
Eberhard Graether 2009b7526a ui: load project via MenuBar
This change adds a MenuBar to QtMainWindow and adds an action for opening a different project settings XML file. The
message MessageLoadProject is thereon used to load a new project in the Application and clearing the Storage.
2014-07-09 15:22:41 +02:00
Eberhard Graether 37f5579649 data: parsing static global variables as static 2014-07-09 12:41:40 +02:00
malte_langkabel 78704b6407 data: complex typename parsing
Added DataType class that can be constructed with a clang::qualType.
DataType keeps an internal QualifierList and ModifierStack.
2014-07-09 11:00:35 +02:00
Eberhard Graether f6e6c93f71 ui: improved code snippet location clicks
* activate token of most nested location
* show parts of locations with start or end outside of snippet
* (fix for multiple parsing of function and method bodies)
2014-07-09 01:03:28 +02:00
Eberhard Graether af54da4ce4 data: parsing and saving calls
This change parses calls in CxxParser by using the class ASTBodyVisitor which traverses the Stmts and Exprs in the body
of the function and method declarations.

The calls include:
* calls in functions
* calls in methods
* constructor calls
* constructor calls in initialization lists
* implicit constructor calls of fields
* calls to operators
* global constructor calls of global variables
* global function calls for global variables

The calls don't include:
* destructor calls
* some calls to implicit constructors and copy constructors

fortune cookie message = Don't be afraid to take that big step.
2014-07-08 16:38:40 +02:00
Manuel Dobusch 0f60a9a556 ui: GraphView can set active tokenId on node clicked
By now the graph displays the active node, without neighbours or anything, and clicking a node sets the active token id to the clicked nodes id.

fortune cookie message = Be prepared to accept an exciting opportunity in the future.
2014-07-07 16:53:44 +02:00
Eberhard Graether e38914887d utility: Fixed name collision of log macros in clang
This change removes the local std::string variable in the log macros due to possible name collisions with macro callers
in clang. Responsibility of this change is held by Malte.
2014-07-07 13:43:29 +02:00
Eberhard Graether addd86288f data: parsing and saving inheritance
This change parses inheritance in CxxParser and saves them as EDGE_INHERITANCE in the Storage's graph. Tests for correct
inheritance recognition were added to CxxParserTestSuite.

fortune cookie message = If you continually give, you will continually have.
2014-07-07 13:12:01 +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
Eberhard Graether a70a9009cc ui: Improved scrolling and layouting in QtCodeView and colored locations of active TokenId differently 2014-07-04 15:33:51 +02:00
Manuel Dobusch 610aa2eb09 ui: graph view edges
Added simple edges to the graph view. Also fixed a memory leak source in QtMainWindow.

fortune cookie message = Good health will be with you.
2014-07-04 14:11:09 +02:00
malte_langkabel b1023ba4ac ui: basic search view
- Added a basic SearchView (+ controller and qt implementation)
- SearchView can set the active element of other views by dispatching a message.
- SearchView adjusts its text when the active element is changed by other views.
- Added wrappers for Button and EditBox that allow the usage of simple callback functions.
2014-07-04 13:43:27 +02:00
Eberhard Graether 9297ea6d6d ui: Separated QtCodeSnippet and added QtCodeFile to display filename 2014-07-04 10:13:41 +02:00
Eberhard Graether 042a508422 ui: Refactored QtCodeSnippet and added view settings to ApplicationSettings
This change refactors parts of the QtCodeSnippet and places some settings into ApplicationSettings.
Additionally Application- and ProjectSettings were abstracted to the common base class Settings, which takes care of the
getting and setting values of the Configmanager member.
2014-07-03 16:10:55 +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
Eberhard Graether 4c7bbbe28e ui: Improved QtCodeView to annotate code
Added some features to QTCodeSnippet:
* Code is now annotated using information from TokenLocationFile
* Start of line numbering can be set
* Clicking on an annotation in the code gives the corresponding Token Id

fortune cookie message = Your kindness will be repaid.
2014-07-03 10:35:30 +02:00
Eberhard Graether e63106b13b build: fixed missing include and clang warnings 2014-07-02 21:39:39 +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
Manuel Dobusch a8e32af5dd ui: graphView
Added basic graph view with simple nodes (just text, no edges or anything...)

fortune cookie message = Don't be afraid to take that big step.
2014-07-02 16:14:56 +02:00
Eberhard Graether 5251e3ecb6 test: Removed __FUNCTION__ part in PlainFileLogger logs because of platform differences 2014-07-02 14:50:15 +02:00
Eberhard Graether fdba1b2a84 ui: Abstracting the UI on view level instead of element level
This change switches the view creation architecture from element based creation in the lib to view based creation in the
app. This avoids wrapping of the Qt elements and instead defines interfaces for the different View implementations.

* GuiElementFactory was renamed to GuiFactory and is now responsible for View creation instead of Element creation.
* WidgetWrappers are now used on Views to access their root widget.
* Removed DummyView and DummyController.
* Removed GuiElement and corresponding QtElement files.
* Removed ViewManager, functionality is now handled via MainView.
* Added MainView, where Views are registered via the ViewLayout interface.
* Added QtMainWindow, derived from QMainWindow and instantiated by QtMainView, which displays the Views as QDockWidgets.

fortune cookie message = All your hard work will soon pay off.
2014-07-02 12:25:51 +02:00
malte_langkabel 3dabe009e0 data: compile error fix
fixed compile errors for TokenLocation.
2014-07-01 14:25:28 +02:00
Eberhard Graether b72584559c data: Renamed Global to GlobalVariable in Graph 2014-07-01 11:13:27 +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 4c0f07c16f test: Put test data into TestSuite specific folders 2014-07-01 00:19:48 +02:00
Eberhard Graether 324dff80a8 utilty: fixed generic vector for clang 2014-06-30 23:29:58 +02:00
Manuel Dobusch ff3ddcca2a utility: generic vector
Changed old 2d vector template to a generic vector class that can have any amount of dimensions. Added implementations for 2d and 4d and typedefs for int and float.
Updated the unit tests accordingly

fortune cookie message = pray for what you want but work for the things you need
2014-06-30 17:45:50 +02:00
Eberhard Graether 3a983598e6 test: Save logs during testing and add them to version control
This change removes the ConsoleLogger from the TestSuiteFixture and registers a PlainFileLogger instead, which saves
logs during testing into the file bin/test/data/log/test_log.txt.
2014-06-30 17:15:17 +02:00
malte_langkabel b38252e894 build: created separate bin folder for each target.
Changed build process to use an individual bin/<subfolder> for each target.
This way each target has its own data folder and its own set of dlls.
2014-06-30 16:39:23 +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
Eberhard Graether 73b74cb618 ui: basic CodeView with syntax highlighting
Added CodeView interface and QtCodeView implementation for showing syntax highlighted code snippets. This change avoids
using the GuiElement hierarchy by using directly using QtClasses and creating QtCodeView in the QtElementFactory.
2014-06-30 13:50:19 +02:00
Eberhard Graether 69026163cb logic: Fixed warning in ProjectSettings 2014-06-04 11:43:18 +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
malte_langkabel 4ff064cb1d data: parse typedefs
- added callbacks that will be called when clang encounters typedefs.
- added tests for this feature.

review id = 20

fortune cookie message = New ideas could be profitable.
2014-06-03 13:37:13 +02:00
Andreas Stallinger 877ee4d56e utility: filesystemfix
replaced boost::filesystem::path string() with generic_string()

bug id = 1
2014-05-27 12:46:34 +02:00
Eberhard Graether 38c8aaebe8 data: Extended CxxParser to detect elements
Detects most elements in the code, currently classes, structs, global variables, fields, functions, methods, namespaces
and enums. The structs ParseLocation and ParseVariable are helper objects to transmit information to the ParserClient.
Currently the parsed information only gets logged in the Storage.

review id = 15

fortune cookie message = In dreams and in life, nothing is impossible.
2014-05-19 12:51:00 +02:00
Manuel Dobusch bb6640369a Utility: TextAccess
Abstraction for file or text access.

review id = 16

fortune cookie message = Good news from someone dear is coming soon.
2014-05-19 12:45:44 +02:00
malte_langkabel b29209a79e ui: gui wrapper extension
- added classes for qt layout abstraction.

review id = 18
2014-05-19 11:44:04 +02:00
Andreas Stallinger ac55261af6 utility: boost integration
Added boost components: filesystem and system to the project
environment varibable BOOST_155_DIR targeting the boost_1_55_0 folder is needed

review id = 14

fortune cookie message = when you speak honestly and openly, others truly listen to you
2014-05-13 17:24:53 +02:00
Andreas Stallinger 95e51b1780 utility,logic : missing algorithm includes added 2014-05-13 15:40:20 +02:00
Eberhard Graether ed8d527b65 utility: Added messaging system
To use the messaging system the classes Message and MessageListener need to get derived. The Singelton MessageQueue is
responsible for managing listeners and sending messages in a threadsafe way.

review id = 9

fortune cookie message = You are on your track to starting something new.
2014-05-12 17:35:55 +02:00
Eberhard Graether c3cd0b7e6f utility: Fixed Vector2 includes 2014-05-12 15:46:00 +02:00
malte_langkabel 37d0dd33a4 ui: implemented gui abstraction and dummy view
- added abstract class tree for gui elements.
- implemented concrete gui classes that wrap the qt specific content.
- implemented first DummyView which plays nice with the ViewManager.

review id = 12
2014-05-07 13:00:17 +02:00
Andreas Stallinger 387618d922 data: fixed wrong case in include in file ASTConsumer.h 2014-05-06 17:32:35 +02:00
Manuel Dobusch 7badd1217f Test: Logging
Enabled logging in unit tests.
Seperated LogManager into LogManager (singleton stuff) and LogManagerImplementation (actual logging stuff)
Implemented simple FileLogger

review id = 13
2014-05-06 17:03:50 +02:00