Commit Graph
2178 Commits
Author SHA1 Message Date
malte_langkabel 886171cb2a ui: save and load view layout
* QtMainWindow now saves and loads its layout parameters.
2014-07-16 13:48:40 +02:00
Eberhard Graether 810ed7c064 build: fixed errors in clang
* removed const m_dimensions in VectorBase and replaced it with N
* changed signature of DummyNode::operator=
* fixed warning for DummyNode wrongly declared as class
2014-07-16 11:54:16 +02:00
Manuel Dobusch ec42ef708d ui: graph view layouting and member rendering
Added simple layouting functions (implementations for simple grid and circle layout).
Also the graph displays class members and connections (edges) to or from them "correctly" now.

fortune cookie message = Your exotic ideas will lead you to many exciting new adventures.
2014-07-15 16:40:52 +02:00
malte_langkabel 61cb4afd91 ui: style search view
Added stylesheet for search view.
Added utility function that loads all font files inside a folder.
Added icons and font files.
2014-07-15 12:30:40 +02:00
Eberhard Graether bbe5874a89 data: saving typedef to Storage
This change save typedef expressions to the Storage using a node of type Node::NODE_TYPEDEF and an edge of type
Edge::EDGE_TYPEDEF_OF that leads to the original type, with the qualifiers saved as DataType on the edge.
2014-07-14 16:47:40 +02:00
Eberhard Graether b7cbef3772 data: saving locations of return and parameter types
This change introduces the structure ParseTypeUsage for passing information about type usage from the parser to it's
client. It is used for passing data type and location information about return types and parameter types, which now
get saved to the corresponding edges in the Storage.
2014-07-14 16:21:10 +02:00
malte_langkabel ce54bd50ed data: Tests for DataType
* Added Array and Reference Modifier for DataType.
* Created basic tests for DataType.
* Fixed bug where qualifiers of modifiers were not copied correctly.
* Fixed bug where DataType modifiers were applied in the wrong (reverse) order.
2014-07-14 11:29:44 +02:00
Eberhard Graether 9284397d46 data: refactored Storage
* put TypeEdge creation into private method
* removed commented code
* removed signature test code
* fixed line breaks
2014-07-10 16:52:35 +02:00
Eberhard Graether e2ec5ffee2 data: compare signatures when storing overloaded functions and methods
Function and method nodes are now distincted by their signature when added to the graph. A different node for each
overloaded declaration is created with the signature as member field.

fortune cookie message = Deine harte Arbeit wird schnell belohnt werden.
2014-07-10 16:08:59 +02:00
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 773d714ecf test: refactored CxxParserTestSuite
* put TestParserClient initialization into helper method
* added tests for checking access types on fields
2014-07-08 23:10:42 +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
malte_langkabel 1045ce4ab9 test: Fixed parser tests to use TextAccess.
modified tests to check different cases more independently.

review id = 23

fortune cookie message = You will have a peace of mind when you talk to an old friend. (Du wirst einem alten Freund begegnen und deine Ruhe finden.)
2014-06-04 16:47:38 +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