Compare commits

..
291 Commits
Author SHA1 Message Date
Eberhard Graether 637a91088f ui: Fixed scope annotations were highlighted with selection when only one was active 2015-06-01 22:41:27 +02:00
Eberhard Graether 20ce168712 ui: scroll to code snippet containing clicked edge
This change scrolls animated to the snippet representing the clicked edge instead of showing only this code snippet.
2015-05-31 22:52:16 +02:00
Eberhard Graether 3e419bb41f ui: polishing for presentation
* enabled highDpi icons in QApplication for Searchbar Icons
* realigned StartScreen contents
* showing version number 0.1
* "Search" as placeholder text in SearchBar
* same content margins for each dockwidget view
* brighter variable color in Graph
* press ESC to close StartScreen
2015-05-30 21:18:18 +02:00
Eberhard Graether 0153330317 data: log storage stats after parsing 2015-05-29 16:49:10 +02:00
Eberhard Graether f8d3f14cbd web: prepared webpage for publishing
* renamed admin directory to php because adblocker blocked ajax
* don't refresh page when pressing enter
* improved english
* added db_config for live page
2015-05-27 12:24:18 +02:00
Andreas Stallinger b0a5461316 ui: startscreen
startscreen with recent projects, "recent" projects are the xml files in the projects folder
2015-05-27 10:56:25 +02:00
malte_langkabel 837fb24dc6 web: initial setup for mediacube page
* added the initial setup for mediacube page.
* using mysql as database and foundation for layout support.
2015-05-27 10:40:38 +02:00
malte_langkabel 8949470848 data: Fixed splitting of name hierarchy for template Arguments
* fixed bug where types used by templates as arguments have not been split into proper name hierarchy.
2015-05-27 10:35:41 +02:00
Eberhard Graether 149bb52c4c data: fixes and improvements
* save forward declarations of classes and structs as NODE_UNDEFINED_TYPE
* put whole files on top in snippet sorting
* uses aggregation count as weight in graph layouting instead of adding all edges to graph
* refreshing all views of components on MessageRefresh in ComponentManager
* reloading ApplikatinoSettings on MessageRefresh
2015-05-25 04:12:52 +02:00
Eberhard Graether f15f0de414 ui: new style for CodeView 2015-05-25 01:47:14 +02:00
Eberhard Graether d985009bff src: fixed crash in scope title retrieval 2015-05-24 15:37:57 +02:00
Eberhard Graether 3eac920f8d logic: Fixed classes not collapsing correctly 2015-05-24 15:23:50 +02:00
Eberhard Graether 23da81136f ui: new colors and other ui improvements
* smoothing for edge lines
* fixed activation of token not working when multiple tokens active
* changed inheritance arrow
* thicker width for edges on focus
2015-05-24 14:47:52 +02:00
Eberhard Graether bd5de1d271 src: refactoring of GraphNode and GraphEdge classes
* common base class QtGraphNode
* derived class QtGraphNodeData for nodes representing the data model
* removed GraphNode and GraphEdge interface classes
* moved and renamed files for DummyNode and DummyEdge
* refactored includes throughout Graph UI related files
2015-05-22 13:54:50 +02:00
Eberhard Graether 1e8d8cece0 ui: Prevent activation of already activated Tokens 2015-05-21 03:32:02 +02:00
Eberhard Graether 5868fe4d39 ui: minimize and maximize buttons for QtCodeFile
This change switches the code view UI to use minimize and maximize buttons within the QtCodeView instead of creating
separate windows for each maximized code file. Real icons for the buttons are still missing.
2015-05-19 16:27:42 +02:00
Eberhard Graether 1f3be0e60d data: fixes for clearing on refresh
* reduce aggregation count when clearing
* added TokenLocation to method override edge
* added TokenLocations to template related edges
2015-05-18 16:22:39 +02:00
Eberhard Graether f0e101e994 ui: fixed 2 nodes layouted on top of each other 2015-05-18 14:02:19 +02:00
Eberhard Graether e4d71f8a01 ui: draw scope annotations in CodeView using one big rectangle
And refactored QtCodeFile classes.
2015-05-16 12:57:47 +02:00
Eberhard Graether 8e9b7ec7bc ui: status showing data for active token ids 2015-05-12 16:21:02 +02:00
Eberhard Graether f58b6f50ed ui: bug fixes in search bar
* use DEL key to delete next element
* cursor not jumping to end of word anymore when autocompletions are updated
* holding down arrows for moving to start or end of word won't turn word into element

fortune cookie message = You deserve to have a good time after a hard days work.
2015-05-12 14:46:20 +02:00
Andreas Stallinger a41c0e1b85 ui: bidirectional hovering
hovering for graphview and codeview via messaging, hovering in one view will "hover" the equivalent in the other view
2015-05-12 13:55:23 +02:00
malte_langkabel 97345cc72f ui: scope names in snippet titles
* added title for snippets
* title displays name of parent scope.
* when new TokenLocationFiles are created in the storage they are now returned as shared_ptr to ensure correct linking in the contained data.
* Storage::getTokenLocationsForLinesInFile() now always returns pairs of start and end locations.
* Adjusted code snippet view to regard the change described above.
2015-05-11 12:34:27 +02:00
Eberhard Graether 7d48a873f7 data: parse type usages of types used as template arguments
This change ist just an interim solution and does not cover all cases.
The TokenLocation saved for the template argument is the location of the whole expression.
2015-05-05 23:21:43 +02:00
Eberhard Graether 7dcf8b0bdb src: various fixes
* fixed crash when hovering GraphNode while expanding/collapsing it
* fixed clang warnings
* fixed GraphNodeExpandToggle to show empty circle
* fixed Searchbar showing empty block when nothing was parsed
* made template related edges in GraphView red
2015-05-05 23:12:25 +02:00
Andreas Stallinger 0763dc9cdf ui: splashscreen
displays an animated splayscreen
2015-05-04 15:11:49 +02:00
Andreas Stallinger 9c7e76b80a ui: Menu Namings
reorganized Menu
2015-05-04 15:06:09 +02:00
malte_langkabel fd73abde64 ui: snippet sizes
* added SnippetMerger class that conducts the merging and snapping of TokenLocations to create snippets.
* added parameters for snippet snapping and merging to ApplicationSettings.
* added forEachStartTokenLocation() and forEachEndTokenLocation() to TokenLocationLine and TokenLocationFile.
* added < and > operators to TokenLocation that compare the location part (not the id).
2015-05-04 15:00:18 +02:00
Eberhard Graether 4ec3dfd372 src: fixed clang warnings 2015-05-04 10:15:55 +02:00
Eberhard Graether 7231ae36f6 ui: usability improvements
* darkened red of error message in status bar
* added status error when not defined startupproject
* added tooltips for remaining search view buttons
* added filepath as tooptip for title in code view
* opening file when clicking title in code view
2015-05-03 00:52:04 +02:00
Eberhard Graether aa0c40b213 ui: Improved graph layouting to properly place and resize subnodes
This change moves the toplevel node resizing from the QtPostProcessor to the GraphController to place and resize their
subnodes accordingly as well.
2015-04-30 16:25:24 +02:00
Eberhard Graether 749b1647e4 ui: added loader animation gif to StatusBar
The loader animation can be activated by setting the showLoader flag on MessageStatus.
2015-04-28 20:26:31 +02:00
Eberhard Graether 791189c3c3 ui: only single class expand button next to class name
This change reduces the size of collapsed classes in the GraphView by removing the condensed view of the class access
nodes and using a single button next to the class name for collapsing and expanding instead.
2015-04-28 20:08:05 +02:00
malte_langkabel a0340d9438 data: name resolving refactored
* Created CxxNameResolver classes that take care of resolving the name hierarchies of clang components.
* NameResolvers store clang::Decls they ignore when traversing the hierarchy of DeclContext nodes. This approach is used to avoid infinite loops when parsing template parameters of a template class that depends on it's template parameters that depend on the template class....

<description>
2015-04-27 10:33:31 +02:00
Eberhard Graether e0ddc67597 utility: Sending Messages via TaskScheduler by default
This change makes the MessageQueue use Tasks for sending a Message to each MessageListener. Messages can define their
behavior by setting setSendAsTask(), the default is true. Only MessageStatus and MessageInterruptTasks are still sent on
the Messaging thread to allow for immediate effect.

This change also introduced the class SimpleTask which holds only a single perform() callback to override, for Tasks
that are finished in a single step. The class LambdaTask derives from SimpleTask and allows for passing a lambda as the
perform() callback.
2015-04-26 22:21:01 +02:00
Eberhard Graether d1db054d98 test: added TaskSchedulerTestSuite 2015-04-24 17:39:32 +02:00
Eberhard Graether abd29b1060 utility: Wait until threads stopped when stopping loops of MessageQueue or TaskScheduler 2015-04-24 16:18:13 +02:00
Eberhard Graether d56a9afe24 data: Only show parse errors in project files 2015-04-24 00:37:40 +02:00
Eberhard Graether ee8d35f084 utility: Fixed bad performance of FilePath comparison 2015-04-23 22:31:51 +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 a18213d172 utility: logging fix: +1 to month for range 1-12 instead of 0-11 2015-04-21 16:52:49 +02:00
Andreas Stallinger 6b9f30c444 ui: layout loading fix for loading dockwidgets on linux 2015-04-21 16:29:50 +02:00
Andreas Stallinger 7655d43299 build: Linux package(.deb)
.deb package file for debian distros like ubuntu
To create the package use the command: ninja package
in the build directory
2015-04-21 12:01:06 +02:00
malte_langkabel 4692ca961a build: windows icon
IMPORTANT: Windows users will have to execute clean, setup and cmake after this commit.

* added script to generate the program icon on windows.
* modified setup script to execute icon generator.
* modified CMakeLists to automatically generate the resource file required for windows builds and link it to the visual studio project.
2015-04-14 14:30:35 +02:00
malte_langkabel bdbd266a67 data: NameHierarchy class
* replaced vector of strings as name hierarchy by a new NameHierarchy class.
* Adjusted code in ASTVisitor, Storage and various test cases.
2015-03-28 16:57:30 +01:00
Eberhard Graether 07ca387326 utility: fixed sorting of FilePaths in STL containers 2015-03-24 23:57:43 +01:00
Eberhard Graether eb9092a07f logic: show whole file in CodeView when file node is active 2015-03-24 23:01:40 +01:00
Eberhard Graether 0d2a76c2eb logic: added default header and source extensions to ProjectSettings
Loading source from the menu using Project->New resulted in nothing being loaded because no extensions are set.
2015-03-24 20:53:02 +01:00
Eberhard Graether be123a33b4 data: fixed parser issues to load whole Coati on Mac 2015-03-24 20:34:55 +01:00
malte_langkabel 3738f196b9 data: fixed crashed when parsing own code
* fixed test that was expecting a wrong result.
* refactored DataType class.
* added code to parse dependent type names.
* refactored utilityCxx a little.
2015-03-23 17:00:54 +01:00
Eberhard Graether c83dbae4d4 logic: removed visible edges from aggregation edges in GraphController 2015-03-23 16:51:46 +01:00
Eberhard Graether 7790241926 ui: panning GraphView and resizing after node was moved 2015-03-23 16:16:26 +01:00
Eberhard Graether 5fc7182dc0 ui: added new icon and moved it to data/gui/icon 2015-03-23 15:17:49 +01:00
Andreas Stallinger 9c224dc519 ui: keyboard grab commit reverted 2015-03-23 14:38:40 +01:00
Eberhard Graether 524f15187b utility: Fixed ConfigManager not logging warnings for undefined lists in config files 2015-03-23 13:55:10 +01:00
Eberhard Graether f5aa698225 ui: separated GraphView style settings into class GraphViewStyle
This change adds the class GraphViewStyle that holds all values for defining the style of Nodes and Edges in the Graph.
The GraphViewStyleImpl interface and the QtGraphViewStyleImpl implementation are used to request Qt specific metrics,
like the charwidth of used fonts.

This change includes the following fixes:
* aggregation number always in the middle between nodes
* darker color for aggregation edge
* split off QGraphicsLineItem implementations from QtGraphEdge
* fixed some colors in color scheme

fortune cookie message = Sorge dich nicht! Du wirst bekommen was du brauchst.
2015-03-23 11:44:57 +01:00
Eberhard Graether fbd3b7ea5c data: speeded up Dictionary lookup by using another hashmap 2015-03-19 00:26:32 +01:00
Andreas Stallinger 416756b1c7 ui: keyboard input direct to searchbar
typing is directed to the searchbar
2015-03-18 17:01:38 +01:00
Andreas Stallinger ac090dd624 ui: adapt autocompletebox size
adapt autocompletebox size, starts at cursor ends at the end of the inputbox, minium size is 400

<description>
2015-03-18 16:15:44 +01: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 52baca3962 logic: flag FilterUndefinedNodesFromGraph in ApplicationSettings
If set to true the flag filters all undefined nodes from the graph, unless every active node is undefined.
2015-03-17 15:42:20 +01:00
Eberhard Graether c4ca420677 src: added StartupProject setting to ApplicationSettings 2015-03-17 14:45:49 +01:00
Eberhard Graether ba48731c8c data: Fixed data in headers being saved to Storage multiple times 2015-03-17 14:28:16 +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
malte_langkabel 0e0553c90b test: added missing template parameter tests
* Added tests for parameter parsing of template functions.
* Added missing tests for template parameters and arguments.
* Fixed warning when using the "typename" keyword in combination with template template arguments.
* Added code to handle template template default arguments and implemented test case.
2015-03-11 15:50:07 +01:00
Eberhard Graether d6ad7614af script: added app icon to mac bundle
Extended the script to create an iconset from our logo and define it as icon for the bundled application.
2015-03-11 13:23:04 +01:00
Eberhard Graether ca85d5a5d3 build: bug fixes for release version
* fixed search activating 2 nodes, because of NodeType in query
* fixed search results didn't contain results with same name
* added protected contents to sample and tictactoe code
* fixed CxxParserTests not logging errors, disabled logging for tests with errors
* fixed CxxParserTests not finding system headers, added TestSettings.xml and pass headers to Parser::parseFile()
2015-03-11 13:14:22 +01:00
Andreas Stallinger 5a259ed7c7 ui: qt windowicon added 2015-03-11 11:16:49 +01:00
malte_langkabel 9b3f9ebdbf data: non-type- and template-template parameters
* name of template class now also contains type information on the template parameters (e.g. typename, class, bool, const std::string&, etc.)
* implemented handling of non-type template parameters and template template parameters.
* implemented lots of tests for these features.
2015-03-09 18:07:30 +01:00
Andreas Stallinger 5afd9aed2d UI: new public,protected,private icons 2015-03-09 15:23:05 +01:00
Eberhard Graether 299cb49540 logic: fixed underflow in fuzzy search after 100 chars 2015-03-09 15:01:54 +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
Andreas Stallinger 3893868386 build: Appname change
Appname changed to coati + build script for unix
2015-03-09 12:50:55 +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 7014c8ac4c data: ClangTool gets invoked for cpp files only, headers are parsed on-the-fly
This change adds the class FileRegister, that splits cpp and h files for the Parser and keeps track which headers have
been parsed yet. TranslationUnits get only created for cpp files now, and headers are parsed on the fly. This reduces
parse time by around half.
2015-03-09 01:32:51 +01:00
Andreas Stallinger abddf57004 logic: undoredo
Undoredo ignore sequential identical activatetoken messages
2015-03-07 18:14:27 +01:00
Manuel 06aa7bdb58 UI: Overlaps resolve
Fixed several issues with the overlaps resolving algorithm.

Introducing the cell padding in the last graph update caused some issues that are now resolved.

Coincidently the average number of algorithm iterations needed could be reduced, therefore the thing is now faster.

fortune cookie message = All the answers you need are right there in front of you!
2015-03-04 23:07:34 -08:00
Andreas Stallinger da1a6d69c4 ui: Colors in SearchView
Show the right colors in SearchView for the different NodeTypes or QueryNodeTyps

Note: add colors to your Applcationsettings like in the template

fortune cookie message = recognition will come from unexpected sources
2015-03-04 11:55:25 +01:00
Eberhard Graether 284fb336a6 ui: fixed crash on Windows caused by transition animation being deleted right after taking place 2015-03-04 10:58:50 +01:00
Eberhard Graether e71caf23dc test: fixed test fails for wrong slashes on windows 2015-03-04 10:47:22 +01:00
Eberhard Graether d3ac8bfbcf test: fixed GraphFilterConductorTestSuite to not use full filepath of file node for comparision 2015-03-04 10:36:29 +01:00
Eberhard Graether 89d3a9ab9f ui: fixed leak in QtGraphView transition 2015-03-03 01:16:30 +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
malte_langkabel 5370541a0f data: filename info
* Changed the TokenLocation of TemplateArguments to have at least a valid file name.
* Extended name of anonymous namespace by the containing file's name.
* Adjusted tests to reflect these changes.
2015-02-27 16:07:51 +01:00
malte_langkabel d0c92a6553 data: refined template parameter names
* Fixed template parameters to be resolved to their correct names even if they are (re)definied outside of the class (e.g. for template method definitions).
* Added test code.
2015-02-27 14:40:38 +01:00
Eberhard Graether 4f7d31eb79 ui: graph transitions
This change adds animated transitions to the QtGraphView using sequential and parallel animations. First vanishing nodes
and all edges get faded out, then the remaining nodes are moved and resized, lastly new nodes and all edges are faded in.

fortune cookie message = Sorge dich nicht! Du wirst bekommen, was du brauchst.
2015-02-23 12:11:01 +01:00
Manuel 35867c17af ui: graph rastering
Graph nodes are now placed within a raster. This is true for initial layout as well as drag-and-droped stuff.
2015-02-17 23:40:53 -08:00
malte_langkabel 6c3c8cdcc1 data: parsing template functions
* implemented parsing of template functions.
* added tests for those cases.
2015-02-16 16:22:58 +01:00
malte_langkabel 115b19c266 data: fixed parsing errors.
* (quick) fixed all the crashes that occurred when parsing the own source code.
2015-02-12 14:01:43 +01:00
Eberhard Graether 0d53e69d21 utility: added log levels for Loggers
This change allows setting log levels on loggers. The apps ConsoleLogger was switched to only logging warnings and
errors the FileLogger still saves all types of logs.
2015-02-12 10:51:43 +01:00
Eberhard Graether 1fd7703995 ui: offset Edges to left or right whether they go up or down to avoid overlapping of different directions 2015-02-10 15:19:28 +01:00
Eberhard Graether b8f6b4be4e data: added Node type NODE_ENUM_CONSTANT 2015-02-10 14:28:53 +01:00
Eberhard Graether 0b9a2bf4a1 build: fixed clang warnings and console errors 2015-02-10 13:48:20 +01:00
Eberhard Graether 51c6675464 data: parsing and saving method overrides
This change parses method overrides and saves them in the Storage with type EDGE_OVERRIDE.
2015-02-10 12:18:40 +01:00
Eberhard Graether 53eab0a517 logic: fixed Searchbutton not searching and wrong destruction order in ComponentManager 2015-02-10 10:31:14 +01:00
Eberhard Graether 229c7a763b ui: saving and restoring DockWidget layout 2015-02-09 16:58:08 +01:00
Eberhard Graether 5ecc4fb39a logic/ui: added CompositeView for combining Views to one DockWidget
Added CompositView, which implements both View and ViewLayout, for combining Views to one Widget. The layout can be set
to either horizontal or vertical. SearchView, RefreshView and UndoRedoView are combined to one DockWidget by the
ComponentManager now.

fortune cookie message = You'll get more secure and confident with your relationship with your co-workers.
2015-02-09 16:27:23 +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
malte_langkabel 4da51180ca data: fixed crash when parsing initialization of global variable
handled visiting of global variable usage in initialization of another global variable.
2015-02-09 11:20:01 +01:00
Eberhard Graether af1462f955 ui: fixed autocompletion issues
* click in autocompletions list causes search
* right arrow for autocompletion
* changed query operator has from '>' to '.' and operator sub from '.' to '+'
* fixed autocompletions to fit to query
and
* fixed spectral layouting endless looping on unconnected node
2015-02-06 00:51:02 +01:00
Eberhard Graether 1f6d503b9c logic: fixed layouting and parsing
* Fixed spectral layouting not initializing matrices with 0
* Fixed some kinds of template arguments don't resolve to a name
2015-02-05 13:52:34 +01:00
malte_langkabel 0649644663 data: fixed template specialization parse crash
handled conversion to DataType of clang::TemplateArgument when it is of integral kind.
2015-02-05 12:08:57 +01:00
Eberhard Graether 9fc71f9d7f build: fixed MacOS bundle to include all libraries and frameworks
Follwed instructions for Qt from: http://qt-project.org/doc/qt-4.8/deployment-mac.html

fortune cookie message = Smile! A smile will make you younger.
2015-02-05 11:48:39 +01:00
Andreas Stallinger 2e61f38441 logic: undo
undo with shared_ptr
2015-02-05 11:04:03 +01:00
Eberhard Graether 33aff14813 logic: only show edges connected to active node
* split active and visible setting for DummyNodes
* set and check visible on DummyEdges
* include fix for Mac in MatrixDynamicBase
* fix for disappearing style and crashes in GraphView
* cleaned up DummyNode

fortune cookie message = Du stehst kurz davor etwas Neues zu unternehmen.
2015-02-03 16:48:32 +01:00
malte_langkabel bdcca6dbad data: template arguments default parameters
* implemented parsing of template argument default parameters.
* added tests for default arguments of template parameters.

fortune cookie message = If you continually give, you will continually have.
2015-02-03 16:22:48 +01:00
malte_langkabel 799f324463 script: added missing boost libraries
added dynamic libraries for boost date time to setup folder.
2015-02-03 16:11:20 +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
malte_langkabel e17341fc43 data: parse partial template specializations
* fixed: implicit template specializations will be found even if the original template definition is located in a different file (that gets included).
* implemented correct extraction of template parameters, template arguments and template specialization edges.
* added token locations for template parameters of partial template specializations.
* graph view displays full names of template parameters and template arguments.
* added test code for features
2015-02-03 13:10:56 +01:00
Andreas Stallinger 944554d034 logic: UndoRedo
UndoRedo working for ActiveTokensMessages
2015-02-03 10:47:56 +01:00
Andreas Stallinger 00f15a2ce3 UI: Graphlayouting Linux
added missing include
changed std::sqrtf to std::sqrt
2015-02-02 18:03:56 +01:00
Manuel a7eaeae432 UI: GraphLayouting
Implemented graph layouting, hybrid approach using spectral and force based layouting

fortune cookie message = Giving credit where it's due ensures loyalty to you.
2015-01-29 15:47:02 +01:00
Eberhard Graether 016d692dda ui: preparations for user study
* added sample code
* bigger and closed arrow for inheritance edge
* fixed code hover
* lightened scope colors
* fixed interrupted scope ranges to show all lines
* fixed edge creation to correctly show recursion
* prevent aggregation edge number from floating around
* scroll to top when changing codesnippets
2015-01-26 06:50:23 +01:00
malte_langkabel 4775a87104 data: elaborated type name usage fix
* fixed node name hierarchy creation for elaborated type names (like when using the class namespaceA::B)
2015-01-19 17:22:27 +01:00
malte_langkabel 6fc61a7e22 data: token locations for constructor calls
* fixed token locations for implicit constructor calls.
* removed error line from test code.
2015-01-19 15:08:16 +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 7596c699d6 ui: improvements proposed by Julian Mautner
* automatically expand active class
* increase arrow size
* return child nodes in autocompletions
* always return filters in autocompletions
2015-01-12 23:47:57 +01:00
Eberhard Graether 8242454104 ui/data: cleaned up UI and parsing
* HOT FIX: typename not always correctly split to name hierarchy
* show node main if available as first active token after parsing
* show all contents of namespaces if searched for
* added missing enum type and enum value usages
* added inheritance for structs
* removed MessageActivateToken and replaced it with MessageActivateTokens
* activating correct nodes for clicks in GraphView and CodeView
* no graph change when clicking an edge, but highlighting the edge instead
* only show active nodes without connections when multiple are activated
* fixed snippet sorting to put file that contains declarations on top
* set sizeHints on CodeView and SearchView to increase their initial size

fortune cookie message = Das Leben wird eine positive Wendung nehmen.
2015-01-08 12:12:50 +01:00
Eberhard Graether ee85abfc7b data/logic/ui: added aggregation edges
This change adds the creation of aggregation edges to the StorageGraph, which save the connection counts between
children in their parents. Aggregation edges are displayed using a straight line, that is thicker than more connections
it represents with the connection count in the middle.
2015-01-07 14:42:35 +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
Eberhard Graether d3e50c53e1 test: fixed waitForThread() in MessageQueueTestSuite to always wait at least one cycle 2014-12-14 11:28:37 +01:00
Eberhard Graether 67b8186658 logic: added sleep time of 25ms to messaging loop 2014-12-12 17:09:16 +01:00
Eberhard Graether 5f20344252 build: updated to clang version 3.6 2014-12-12 10:35:01 +01:00
Eberhard Graether 3f4ae8343c logic: initially parse source on message thread and add more StatusBar messages
This change puts the initial project loading into a MessageLoadProject so that the UI thread is still responding.
Also the StatusBar is now responding to more Messages and it's MessageListeners get added to the MessageQueue in
front of other listeners so that the StatusBar UI can announce actions.
2014-12-02 01:20:08 +01:00
Eberhard Graether c54c405dd1 logic: fixed warnings, tests and bugs
* fixed clang warnings
* fixed cxxparser tests
* added missing checks for valid location in ASTVisitor callbacks for templates
* removed warning when statusbar view is removed
* made font of activated classes bold
* fixed search box not responding to autocompletion tab or enter press
* fixed search box not updated when active token changes
2014-12-02 00:55:57 +01:00
Eberhard Graether 3b7b02ff8c ui: styled search view
fortune cookie message = Dein Einsatz wird in Kuerze belohnt werden
2014-12-01 11:27:35 +01:00
malte_langkabel 63407c2c81 data: basic template parsing
* Implemented basic parsing and storage of template parameter types, template classes and template functions
* Added template specialization edge.
* Implemented handling of partial specializations. Needs some more tweaking.
* Added a lot of test code for template stuff (still needs some cases to be tested)
* Removed the isTemplateParameterType from DataType, since it shouldn't be needed
* Function qualTypeToDataType uses clang PrintingPolicy to fetch the desired format.
* Merged a lot of code for getting the correct names and name hierarchies of definitions
* Removed TokenComponentDataType
* Merged both of the Storage::addTypeEdge(...) functions
* Added "-fno-delayed-template-parsing" flag to parser for parsing test code.
2014-11-24 16:50:31 +01:00
malte_langkabel 7b17f5b3ad ui: font size fix
* switched from using setPointSize() to setPixelSize() for fonts
2014-11-24 16:44:33 +01:00
Andreas Stallinger af4e3f7676 ui: statusbar
statusbar added, listen to status- , error-  and parsingfinishedmessages
2014-11-24 16:35:46 +01:00
Eberhard Graether 048fcb28b4 ui: moved subnode layouting from GraphView to GraphController
This change moves nested layouting of the Graph to GraphController. The DummyNodes get the correct size assigned, as
well as a visible flag. Mouse interaction with the Graph is now handled via the GraphController, which makes it
easier to undo them or reuse the changed state after graph updates.
2014-11-20 20:53:01 +01:00
Eberhard Graether 113aab8e60 ui: styled edges in graph view
This change styles the edges in the QtGraphView. They get drawn with vertical and horizontal parts and rounded corners.
2014-11-15 17:48:13 +01:00
Eberhard Graether 72c5847d75 ui: styled nodes in graph view
This change styles the nodes in the QtGraphView. Since Stylesheets can't be applied to QGraphicsItems, the style
implementation was done in the source files. The containers for public/protected/private nodes are now subclassed from
QtGraphNode as QtGraphNodeAccess, including a helper class QtAccessArrow for indicating the opened/colapsed state.
2014-11-12 01:42:49 +01:00
Eberhard Graether 5b230cefa0 ui: extented graph view ui features
* fitting boxes to name length
* highlighting active edges and nodes
* hover for edges and nodes
* single click selection for edges and nodes
* edges have transparent second line for easier clicking
* sub structure class members by public/protected/private
2014-11-09 05:18:37 +01:00
Andreas Stallinger 3441b6a8f4 data: saving for projectsettings
<description>
2014-11-03 16:34:42 +01:00
Eberhard Graether 38d9ec07a5 ui: bug fixes in smart search box
* hide completer when elements are updated
* show correct indices in sub query search
* move query elements forward when the cursor is at the end of the box
2014-11-03 16:16:35 +01:00
Eberhard Graether e972dbe098 ui: augmented autocompletion list
This change adds search match information to the autocompletion list:
- matching letters
- color for token or command
- node type as string
2014-11-02 17:21:51 +01:00
Andreas Stallinger 250918a4e7 logic: Configmanager support for lists
Configmanager now works with list. Use getValues for list. Configmanager
is able to save into a file now.
2014-10-30 14:22:28 +01:00
Eberhard Graether 2c84bf20ed data: split off inner classes of SearchIndex 2014-10-28 22:06:22 +01:00
Eberhard Graether 86f4629b0d logic: preselecting SearchNodes for autocompletion by prefiltering the Graph with the entered Query
This change only shows matches in the autocompletion list that are prefiltered by the already entered query. The
autocompletion now also shows up after an operator of type . or > has been entered to show an alphabetical list of
possible tokens.
2014-10-28 20:21:19 +01:00
Eberhard Graether ede0af4291 logic: Fixed GraphView not updated because MessageActivateTokens was not handled in GraphController 2014-10-27 12:14:21 +01:00
Andreas Stallinger 0a4c65d198 logic: Codeview Snippet order
Sorting the Snippets in. the Codeview. Active Token first then declaration,
filename and extension
2014-10-24 13:37:06 +02:00
malte_langkabel a1b874c520 data: name hierarchy refactoring
* replaced typenames (which have been stored as single sting where "::" indicated hierarchy levels) by a vector of strings where each element indicates a hierarchy level.
* introduced this change to the Storage method signatures, the ParseFunction and ParseVariable
* this way the SearchIndex creates a node for each level of the hierarchy.
2014-10-24 11:25:34 +02:00
Eberhard Graether ce91216e97 ui: fixed issues in smart search box
* spaces can be entered again
* fixed completer disappearing when going through the list
* changed query operators to sub: > and has: . and changed
2014-10-24 11:14:31 +02:00
Eberhard Graether a9c93a9437 ui: added smart search box
This change switches the search box in the search view from QLineEdit to the derived QtSmartSearchBox implementation,
which is capeable of displaying tokens of the query as selectable button elements in different colors. It allows for all
the usual mouse and keyboard interactions that the QLineEdit offers.

fortune cookie message = Good news from someone dear is coming soon.
2014-10-22 17:28:46 +02:00
Eberhard Graether 89ac3a0512 build: fixed clang errors and warnings 2014-10-22 16:58:57 +02:00
Manuel Dobusch 103e60b52a ui: graphView
Graph view has now toggle-able subnodes. Subnodes connected to the active node are always visible.

fortune cookie message = You will enjoy true success in whatever you do.
2014-10-20 14:36:57 +02:00
malte_langkabel ce666acbfd data: _Bool to bool
* changed internal typename of "_Bool" to "bool".
2014-10-14 10:40:51 +02:00
malte_langkabel e91d5474b6 data: fixes in TokenLocations
* TokenLocations for used datatypes are more precise now.
* added -c option to parser to indicate that no executable will be built.
2014-10-13 16:19:50 +02: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
Manuel Dobusch d720414467 test: bug fixes
Fixed several platform specific bugs.
2014-10-06 14:16:57 +02:00
Andreas Stallinger fe919c4776 build: bugfix for linux
changed all QtHighLighter to QtHighlighter
2014-10-06 11:37:38 +02:00
malte_langkabel 0f34f55844 data: windows crash fix
* fixed a crash on windows that occurred when the name of a token was stored in a container that was destroyed after a const & was returned.
2014-10-06 11:18:27 +02:00
Eberhard Graether a294519cd1 logic: clear views when search query doesn't have a result 2014-09-30 22:23:54 +02:00
Eberhard Graether 390df1db1f data: removed Singleton from Dictionary and made it a member of SearchIndex
Dictionary never had a good reason of being a Singleton in the first place so this will avoid concurrency and
structural issues in the future.
2014-09-30 22:10:42 +02:00
Eberhard Graether 95ece9ef2e utility: removed templates from utilityString functions to use std::deque by default 2014-09-11 17:37:18 +02:00
Eberhard Graether fec7abbc9b ui: integrated autocompletion and filtering into SearchView
- QtSearchView was split into QtSearchView and QtSearchBox.
- QtSearchBox contains all Qt elements and can use them purely
- QtSearchView forwards calls from the SearchController to QtSearchBox
- Searching is initiated with MessageSearch to the SearchController
- Autocompletion is initiated with MessageSearchAutocomplete to the SearchController
- The search field is able to create filter queries by only giving autocompletions for the last token in the query
- For named tokens the search field adds their token ids to the query in the form of "A,25" for faster lookup

bug id = #21
2014-09-11 14:53:03 +02:00
Eberhard Graether 760e5ffafd logic: refactored GraphAccess and GraphController to use single call that returns Graph
This change refactors the GraphController to use the GraphAccess only with a single call that returns a Graph. The Graph
contains all information for visually representing the active Token with all parent and child nodes and edges. This
reduces coupling of the data and logic tiers.
2014-09-10 01:07:26 +02:00
Eberhard Graether 9a546b4312 test: added SearchIndexTestSuite and refined SearchIndex API 2014-09-09 16:35:18 +02:00
Eberhard Graether ac12410b27 test: instantiating TestStorage dynamically
Having the TestStorage as static field of the TestSuites caused problems in test startup, because the TestSuites are
instantiated globally and for some reason the programm has trouble allocating memory when initializing the SearchIndex.
2014-09-06 02:56:00 +02:00
Eberhard Graether 4fd1f330ed data: added SearchIndex for fuzzy name search and rewrote name handling in the Storage
This change stores each Token name in the separate singleton class Dictionary. The Dictionary gives each saved word an
Id and thereby avoids duplicated names. E.g if the constructor method "Graph::Graph" is stored then the word "Graph"
only appears once in memory.

The class SearchIndex is now responsible for the name hierarchy and is instantiated by the Storage. The SearchIndex
builds the name hierarchy using SearchNodes, each holding a Dictionary string reference of the name it holds. E.g if the
names "math::ceil" and "math::floor" are added to the SearchIndex then 3 nodes get created, the SearchNode "math" will
hold the two childs "ceil" and "floor".

The hierarchical graph creation functionality got split off from Graph into the new subclass StorageGraph. The
StorageGraph creates nodes with a passed SearchNode pointer of the name it represents in the SearchIndex. Thereby the
StorageGraph reuses the hierarchical information in the SearchIndex and can create nodes much quicker by avoiding node
searches and name comparisions.

The name information is now stored in the Nodes via the TokenComponentName class, which is subclassed into
TokenComponentNameReferenced and TokenComponentNameCached. The StorageClass creates nodes with the component
TokenComponentNameReferenced, which holds a pointer to the SearchNode instance holding the name. This allows for
retrieving the full name of the node, without using other Nodes int the Graph, which might not be present. If the Node
is copied then the component changes to a TokenComponentNameCached, which holds the full name as a string, so the
memory in the Storage doesn't have to be accessed anymore.

TokenComponentSignature is now only holding an Id of the signature string saved in the Dictionary, which speeds up the
signature comparison. A follow-up will change saving the whole signature as string to reusing the wordIds it is
consisting of.

Lastly the SearchIndex holds basic fuzzy search functionality. A passed query gets compared down the SearchNode
hierarchy as long as matches for each letter are found. Matches must contain all letters of the query. The search is
case-insensitive. If letters are found in front positions, next to each other or written in uppercase they are weighed
higher in the match ranking. The character ':' is also interpreted and found, although the '::' delimiter is not stored.

E.g. the query "m:l" used on the example above will return both "math::floor" and "math::ceil", but "floor" is ranked
higher because the 'l' appears closer to the start.
2014-09-06 01:13:07 +02:00
Eberhard Graether 5c89e49ff0 test: added GraphFilter and GraphFilterConductor tests 2014-09-01 12:15:17 +02:00
Eberhard Graether aee0b7c337 test: added QueryTree tests checking correct query syntax 2014-08-31 11:36:08 +02:00
Eberhard Graether c84972b96e logic: added query syntax and filtering system for search
This change allows the user to use a simple query syntax in the search field to filter the results using names,
operators and predefined filters.

The class QueryTree is capable of parsing a simple query language consiting of QueryNodes, subclassed as
QueryOperators, QueryCommands and QueryTokens. QueryToken identifies a Token by name. QueryCommand represents predefined
filters. QueryOperator defines the syntactic relationship.

QueryNode examples:
	"A" -> QueryToken that identifies the Token named A
	class -> QueryCommand that filters all Nodes that are classes
	. -> QueryOperator that concatenates filters

QueryExamples:
	"A".class -> All Tokens named A that are classes
	method.(private|protected) -> All methods that are private or protected
	"A".member -> All members of A
	"A":field.!const -> All fields of A that are not const (':' can be used instead of '.member')

QueryTree checks for correct operator precedence and validity of the query.
All QueryCommands can be found in data/query/QueryCommand.cpp
All QueryOperators can be found in data/query/QueryOperator.cpp

The parsed QueryTree is then passed to the class GraphFilterConductor, which is capable of applying the query on a
Graph. Each part of the query gets assigned a GraphFilter that filters the input Graph in order of node precedence. The
class SubGraph is used as intermediate container, only holding bare pointers to Nodes and Edges. The output Graph holds
all Nodes that match the query.

MessageActivateTokens is used to show all of the results in the CodeView. The GraphView currently only shows the first
Node of the results.

bug id = #6
2014-08-30 18:24:00 +02:00
malte_langkabel b0d27ba559 utility: visual studio 2012 compatibility for tests
* fixed build issues in tests: they must specify template parameter for all template functions.
2014-08-01 16:38:57 +02:00
malte_langkabel 9ea28ed64a utility: visual studio 2012 compatibility
* removed default template parameters for template functions.
2014-08-01 16:26:02 +02:00
Eberhard Graether 8950d679e1 data: Saving virtual abstraction of methods as TokenComponentAbstraction 2014-08-01 05:27:09 +02:00
Eberhard Graether 5893d0c776 test: added StorageTestSuite
This change adds the StorageTestSuite that checks whether the ParserClient callbacks cause the right things to be saved.
In order to allow for easier data retrieval the ParserClient callbacks now return the Id of the inserted Token, which
can then be used to retrieve the Token pointer.
2014-08-01 02:10:42 +02:00
Eberhard Graether b110d528dc data: Added type bitmasking to Node and Edge and check type on Edge creation 2014-07-31 15:07:18 +02:00
Eberhard Graether af9b75348c test: Changed ProjectSettingsTestSuite to SettingsTestSuite and extended it substantially 2014-07-31 02:17:17 +02:00
Eberhard Graether 890575cd90 data: Parsing type usages within function and method bodies
This change parses type usages in function and method bodies and saves them with an edge of type EDGE_TYPE_USAGE. This
also includes base class types used in initialization lists of derived class constructors.
2014-07-30 22:35:30 +02:00
Eberhard Graether dc09860680 data: Parsing functions with ParseFunction for signature comparing
This change switches function and method parsing to use the structure ParseFunction, which holds all important values of
the function. This structure is then used also in call and usage parsing to allow distinction between signatures.
2014-07-30 13:32:38 +02:00
Eberhard Graether acfc4934c2 data: Parsing field usage in initialization list 2014-07-30 13:28:35 +02:00
Eberhard Graether da4811c5ea data: Parsing Typedefs with ParseTypeUsage
With this change typedefs have two TokenLocations, one for the TypeName and one for the UnderlyingType. When the
typedef is used with a variable the typedef is referenced now and not the underlying type.
2014-07-30 13:24:25 +02:00
Eberhard Graether 96df63055a data: Saving TokenLocations of scopes separately
This change parses the TokenLocations of scopes of classes, structs, functions, methods, namespaces and enums and
saves them in Storage with type LOCATION_SCOPE. The TokenLocations of these nodes are just their name declarations now.
Scope locations are displayed in blue color in the code view.
2014-07-28 17:54:36 +02:00
Eberhard Graether 182e18840e ui: show annotation in code snippets for TokenLocations that wrap around the snippet
bug id = #12
2014-07-28 03:27:16 +02:00
Eberhard Graether ecd17c17a0 ui: Added close window shortcut and menu action to close the active window 2014-07-28 02:33:08 +02:00
Eberhard Graether 95929db6e0 ui: improved ui of maximized code file window
* Annotations updated when active token Id changes
* FileName in window title
* Maximize button not shown
* Scrolls roughly to the maximized location.
* Maximizing also on double click in code snippet
2014-07-28 01:17:01 +02:00
Eberhard Graether dea79f701b ui: added maximize button to CodeSnippets that opens the full file in a separate window 2014-07-27 16:13:59 +02:00
Eberhard Graether b0e3cda41e data: Added getName() method to Edge
format = EdgeType:fromNode->toNode
2014-07-27 02:22:45 +02:00
Eberhard Graether 473e26f072 data: Switched Graph implementation to use std::map with Id as key for Nodes and Edges 2014-07-26 23:32:16 +02:00
Eberhard Graether 16d49e58cc logic: extended CodeView to show locations of edges to the active Token and merge overlapping snippets 2014-07-26 23:07:47 +02:00
Eberhard Graether eeacb92b55 data: polished location parsing in clang to capture exact type and variable name locations. 2014-07-26 18:34:02 +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 68c6ede244 data: saving graph nodes with short name only
This change saves only the short names in the node, getName() no only gives the short version. The fullName is assembled
from the parent nodes on demand using the getFullName() method.
2014-07-26 14:58:06 +02:00
Eberhard Graether 641acc2bde data: Moved EdgeComponent system to Token and extended it to cover all type specific Edge and Token fields
This change moves the EdgeComponent system to Token and redefines them as TokenComponents.
* Performance tests on the side showed that using typeid() in getComponent() is faster than dynamically casting every
pointer.
* The hasComponent() method was deliberately left out in the implementation, because it used to look up the right
component and discard it again. This check for presence can also be achieved by just using getComponent().
* The method addComponent() is protected in Token, so that Node and Edge can guard which Component is set on which type
by implementing specific setters for each Component.
* The GraphTestSuite was extended to include tests for the Component implementation (and missing tests for locationIds
in Token and copying of Node and Edge were added).
2014-07-26 02:26:59 +02:00
Eberhard Graether 4262be133a ui: fixed SearchView style on mac and aligned it at top 2014-07-21 20:32:20 +02:00
Eberhard Graether 5d201b9880 ui: added shortcut to refresh view
Added a refresh shortcut to the new View menu, that causes stylesheets to be refreshed by dispatching a MessageRefresh.
2014-07-21 17:49:41 +02:00
Eberhard Graether 0074db86e8 src: replaced gui wording with view wording
Changed gui wording in lib and app to view wording, since MVC views do not necessarily deal with GUIs. And moved files
so structure is similar in lib and app.
2014-07-21 14:48:02 +02:00
Eberhard Graether bf563f92f3 logic: moved font and logger initialization into init() in main 2014-07-21 13:25:18 +02:00
Eberhard Graether 160e67a94d utility: added stream logging macros
For easier use with int and other basic types, new logging macros where introduced that use stringstream internally, so
heterogeneous data can be logged using the following syntax:
	LOG_INFO_STREAM(<< "hello " << 42 << '!');
2014-07-21 02:11:07 +02:00
Eberhard Graether 0d46de871a src: fixed clang warnings, fixed undefined symbols logs, fixed code convention violations 2014-07-21 01:26:35 +02:00
Eberhard Graether 0c570d54af script: publish script showing commit messages as comment below template 2014-07-17 16:17:32 +02:00
malte_langkabel 2d7af3dda2 ui: tooltip
* added tooltip to case_sensitive button.
* styled tooltip.
2014-07-17 16:01:38 +02:00
malte_langkabel ad5056354d data: parse variable usage
* Implemented functions for parsing usages of fields and global variables in ASTBodyVisitor and ASTVisitor.
* Storage adds TokenLocatons and Edges for usages.
* Added tests for parsing usage of fields and global variables.

fortune cookie message = Fame, riches and love are yours for the taking.
2014-07-17 15:09:53 +02:00
Eberhard Graether 4578c109ec ui: added find shortcut to set focus in search view
The shortcut is added to the new Find menubar item and dispatches a MessageFind, which is handled by the
SearchController. QtSearchView assures via the ViewLayout that the view is visible when setting focus on the search box.
2014-07-17 14:38:18 +02:00
Eberhard Graether 75e1cb7229 ui: fixed fontMetrics lineheight working with wrong font in QtCodeSnippet
FontMetric specific settings are now applied in the showEvent method, which is executed right before showing the Widget
where the font setting from the stylesheet is already present.
2014-07-17 13:41:51 +02:00
Eberhard Graether efe3316ae3 ui: styled code view
* updated spacings and colors in QtCodeView and QtCodeFile
* using Source Code Pro Regular (had to remove light cut from the Fonts folder because it got always used)
* updated syntax highlighted colors to fit design
* changed colors of highlights
* indent all QtCodeSnippets by maximum line number in QtCodeFile
* fixed syntax highlighting to work with sole multiline comment end

fortune cookie message = Your present plans are going to succeed.
2014-07-17 12:26:37 +02:00
Manuel Dobusch 7157f0d127 ui: graph edges clickable
The graph views edges are now clickable. On click the edge and its connected nodes will be displayed.

fortune cookie message = Be prepared to accept an exciting opportunity in the future.
2014-07-17 12:19:28 +02:00
Manuel Dobusch 2c9c83d003 ui: typed edges
Edges in the graph view are now colored according to their type.
2014-07-16 15:38:54 +02:00
Eberhard Graether 40ca86a172 build: added script for creating MacOSX app bundle
This change makes it possible to create a MacOSX app bundle of either Debug or Release builds:
* The script setup/MacOSX/bundle_install.sh is configured by cmake to be placed in the apps Debug and Release folders.
* Execution of bundle_install.sh creates the bundle file structure and copies binaries, libs, frameworks and resources
into it.
* The script uses install_name_tool to reconfigure the dynamic library paths and framework paths of the binary, so they
won't point to the system libraries, but to the locations in the bundle instead.
* An Info.plist file is also configured by cmake and placed in the bundle by the script. Note: It is named
bundle_info.plist in the Debug and Release folders after configuration so the start of the binary during developement
does not use it.
* When opening the bundle it is assured via setup() in src/app/platform_includes/includesMac.h that the working
directory of the binary is set to .app/Contents/Resources so the paths to the data files are evaluated correctly.

fortune cookie message = Dein Einsatz wird in Kürze belohnt werden.
2014-07-16 13:53:34 +02:00
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 e3cf57e2ec script: Removed review id as default in commit message template
We decided to stop code reviews for now, because they are too time consuming. We will consider reintroducing them when
the project is at a more mature stage.
2014-07-01 00:28:19 +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
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
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
Manuel Dobusch 6b82ea6860 Build: Warnings
Fixed some compiler warnings, joint ops with ebsi and stalli

review id = 10
2014-04-30 17:11:12 +02:00
Eberhard Graether ad54b0d1fa build: remove rtti for files using clang
Clang is usually compiled without runtime type information, so all files that use clang classes can't have rtti. This
change creates a separate CLANG_FILES variable which holds all clang files, so they can be compiled without rtti.

review id = 11
2014-04-29 17:23:20 +02:00
Eberhard Graether 330c38d9af build: use TEST_FILES variable in cxxtestgen command for UNIX, so cmake realizes changes
review id = 8
2014-04-29 16:44:19 +02:00
Eberhard Graether b561fe77e7 build: added module name 'test' to git_commit_template 2014-04-29 16:42:41 +02:00
Eberhard Graether b0302af7f2 test: removed unnecessary UtilityTestSuite 2014-04-29 16:40:40 +02:00
Andreas Stallinger be779546e8 test: fix - replaced sqrtf with sqrt 2014-04-29 16:36:28 +02:00
Manuel Dobusch 1282c5e9cd Utility: LogManager Threadsafe
The LogManager is now threadsafe.

review id = 7
2014-04-29 15:12:54 +02:00
Eberhard Graether 50d1127f61 utility: fixed clang error in Vector2 2014-04-24 16:16:25 +02:00
Manuel Dobusch 651f0f68a2 Utility: Vector2
2d template vector (with typedefs for int and float)

review id = 5
2014-04-24 14:06:45 +02:00
Andreas Stallinger 879373a22f build: unix build - make replaced with ninja 2014-04-10 15:28:33 +02:00
Eberhard Graether 0f0d75729d build: updated git commit message template 2014-04-10 13:53:34 +02:00
Eberhard Graether 4b4c9f56d8 setup: Added clang and llvm
Adds clang and llvm include directories and libraries to the build. The
environment variable CLANG_DIR is used to define the location of llvm
and clang. A simple clang tool implementation was added to assure proper
operation of the libraries.
2014-04-09 16:25:32 +02:00
Eberhard Graether 9902288cab utility: Added ConsoleLogger
Adds the class ConsoleLogger, which logs LogMessages to std::cout. The
Application class creates and registers a ConsoleLogger on creation.

Output format:
<time> | <filename>:<line> <function>() | <type>: <message>

Example:
12:58:18 | Application.cpp:21 create() | INFO: hello world!
12:58:18 | Application.cpp:22 create() | WARNING: attention world!
12:58:18 | Application.cpp:23 create() | ERROR: world failed

review=4
reviewer=stalli, malte
2014-04-09 14:43:48 +02:00
Andreas Stallinger 6b02f6ff87 utility: fix missing algorithm include in LogManager.cpp 2014-04-09 14:24:10 +02:00
Manuel Dobusch c85d997021 Utility: Logging
Added logging utility classes supposed to be used for all your logging
needs, e.g. instead of cout

reviewer=ebsi
2014-04-07 14:44:54 +02:00
malte_langkabel a1de92c58d config: setup
Added implementation of config Manager and tests.

reviewer=Ebsi
review
url=https://git.mediacube.at/egraether.mmt-b2009/masterproject/merge_request/3
2014-04-04 14:32:10 +02:00
Eberhard Graether b854cb1f46 setup: improved sh scripts
- switched to !/bin/bash because of issues with echo -e on Mac OS
- improved git-sync-master.sh to also rebase on current feature branch
- improved logs in git-publish.sh
- changed build scripts to execute from /bin
2014-04-02 22:42:27 +02:00
Andreas Stallinger 6afd52a3d2 Setup: Valgrind Setup
Valgrind scripts for linux added
leak-logfile output in build directory
2014-04-02 17:58:13 +02:00
Manuel Dobusch 195e7bb574 Setup: VLD
Added VLD for windows

reviewer=ebsi
2014-04-02 15:38:03 +02:00
Andreas Stallinger 27e68e0e1e gitprecommithook: replaced echo with echo -e for color on linux(maybe for windows too 2014-03-31 23:04:01 +02:00
Andreas Stallinger f61425b4e8 scripts: replaced echo with echo -e for color in linux (maybe windows) 2014-03-31 20:42:53 +02:00
Eberhard Graether 055b3d0029 project: switched back to using space in nested template definitions
Clang on Mac OS X produced an error when compiling nested template definitions
without a space at the end "A<B<int>>"
2014-03-31 18:09:42 +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
Manuel Dobusch b5f91e62fa Setup: Added platform dlls for qt 2014-03-28 17:09:15 +01:00
Eberhard Graether 4fa1e22035 setup: added basic cmake project structure
Added cmake build instructions for app, lib and test.
Included Qt via environment variable QT_DIR.
Included CxxTest via environment variable CXX_TEST_DIR.
Added scripts for setup, syncing master and publishing features.
Added dlls for QT on Windows.
2014-03-24 15:40:50 +01:00
Eberhard Gräther e763532523 setup: added setup.sh script
The setup.sh script is responsible for setting up the environment
including all configurations.

reviewer=
review url=
2014-02-04 00:28:32 +01:00
Eberhard Gräther 441d274ad7 setup: added commit message template
This change adds the commit message template in file
.git_commit_message.txt. It will be used after once running:
$ git config commit.template .git_commit_message.txt

reviewer=
review url=
2014-02-04 00:12:58 +01:00
568 changed files with 54100 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
<module>: <title>
<description>
# bug id = <id>
# review id = <id>
# fortune cookie message = <message>
# modules: build, src, logic, ui, data, utility, test, script
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
ABORT="\033[31mAbort:\033[00m"
SUCCESS="\033[32mSuccess:\033[00m"
INFO="\033[33mInfo:\033[00m"
BRANCH_NAME=$(git symbolic-ref -q --short HEAD)
if [ -z $BRANCH_NAME ]
then
echo -e $ABORT "You are not on any branch."
exit 1
fi
if [ $BRANCH_NAME == "master" ]
then
echo -e $ABORT "Commiting to master is prohibited."
exit 1
fi
exit 0
+18
View File
@@ -0,0 +1,18 @@
/build/
/bin/app/Debug/
/bin/app/data/log/
/bin/app/data/projects/
/bin/app/data/ApplicationSettings.xml
/bin/app/data/window_settings.ini
/bin/app/Release/
/bin/lib/
/bin/test/Debug/
/bin/test/Release/
/bin/test/data/log/
/bin/test/data/temp.xml
/bin/test/data/TestSettings.xml
.DS_Store
+336
View File
@@ -0,0 +1,336 @@
cmake_minimum_required(VERSION 2.8.9)
include(cmake/add_files.cmake)
include(cmake/create_source_groups.cmake)
# Variables --------------------------------------------------------------------
set(PROJECT_NAME Coati)
set(APP_PROJECT_NAME "${PROJECT_NAME}")
set(LIB_PROJECT_NAME "${PROJECT_NAME}_lib")
set(TEST_PROJECT_NAME "${PROJECT_NAME}_test")
if (WIN32)
set(PLATFORM_INCLUDE "includesWindows.h")
LINK_DIRECTORIES($ENV{VLD_DIR}/lib/Win32) # this adds the library path for VLD, must be done before the project target is created
elseif (APPLE)
set(PLATFORM_INCLUDE "includesMac.h")
else ()
set(PLATFORM_INCLUDE "includesDefault.h")
endif ()
# Settings ---------------------------------------------------------------------
if (UNIX)
add_definitions(-std=c++11 -Wno-unknown-warning-option -fcolor-diagnostics -DQT_COMPILING_QSTRING_COMPAT_CPP )
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
endif ()
# Project ----------------------------------------------------------------------
project(${PROJECT_NAME})
# Clang ------------------------------------------------------------------------
find_package(LLVM REQUIRED PATHS "$ENV{CLANG_DIR}/build/share/llvm/cmake")
find_package(CLANG REQUIRED PATHS "${CMAKE_SOURCE_DIR}/cmake")
add_definitions(${CLANG_DEFINITIONS})
# Boost ------------------------------------------------------------------------
set(BOOST_ROOT $ENV{BOOST_155_DIR})
set(Boost_USE_MULTITHREAD ON)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_STATIC_RUNTIME OFF)
set(BOOST_LIBRARYDIR $ENV{BOOST_155_DIR})
find_package(Boost 1.55 COMPONENTS system filesystem date_time REQUIRED)
# Eigen -------------------------------------------------------------------------
set(EIGEN_ROOT $ENV{EIGEN_DIR})
# Lib --------------------------------------------------------------------------
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib)
add_subdirectory(src/lib)
add_subdirectory(src/external)
set_source_files_properties(${CLANG_FILES} PROPERTIES COMPILE_FLAGS "-fno-rtti")
add_library(${LIB_PROJECT_NAME} ${LIB_FILES} ${CLANG_FILES} ${EXTERNAL_FILES})
create_source_groups(${LIB_FILES})
create_source_groups(${CLANG_FILES})
create_source_groups(${EXTERNAL_FILES})
set_target_properties(
${LIB_PROJECT_NAME}
PROPERTIES
DEBUG_OUTPUT_NAME ${PROJECT_NAME}_d
RELEASE_OUTPUT_NAME ${PROJECT_NAME}
)
set_property(
TARGET ${LIB_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/lib"
"${CMAKE_SOURCE_DIR}/src/external"
${LLVM_INCLUDE_DIRS}
${CLANG_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${EIGEN_ROOT}
)
link_directories(${LLVM_LIBRARY_DIRS} ${CLANG_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS})
target_link_libraries(${LIB_PROJECT_NAME} ${CLANG_LIBRARIES} ${LLVM_AVAILABLE_LIBS} ${Boost_LIBRARIES})
# App --------------------------------------------------------------------------
if (UNIX)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/${CMAKE_BUILD_TYPE})
else ()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/)
endif ()
add_subdirectory(src/app)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# Find the QtWidgets library
set(CMAKE_PREFIX_PATH "$ENV{QT_DIR}/")
find_package(Qt5Widgets)
find_package(Qt5PrintSupport)
if (WIN32)
file(WRITE ${CMAKE_SOURCE_DIR}/build/Coati.rc
"// Icon with lowest ID value placed first to ensure application icon\n"
"// remains consistent on all systems.\n"
"IDI_ICON1 ICON \"${CMAKE_SOURCE_DIR}/build/coati.ico\"\n"
)
add_executable(${APP_PROJECT_NAME} ${APP_FILES} ${CMAKE_SOURCE_DIR}/build/Coati.rc)
else ()
add_executable(${APP_PROJECT_NAME} ${APP_FILES})
endif ()
create_source_groups(${APP_FILES})
target_link_libraries(${APP_PROJECT_NAME} ${LIB_PROJECT_NAME})
set_property(
TARGET ${APP_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/lib"
"${CMAKE_SOURCE_DIR}/src/app"
"${CMAKE_SOURCE_DIR}/build/src/app"
"${CMAKE_SOURCE_DIR}/src/external"
${Boost_INCLUDE_DIRS}
)
# Use the Widgets module from Qt 5.
qt5_use_modules(${APP_PROJECT_NAME} Widgets)
# configure platform specific include file
configure_file(
"${PROJECT_SOURCE_DIR}/src/app/platform_includes/includes.h.in"
"${PROJECT_SOURCE_DIR}/build/src/app/includes.h"
)
# add platform specific libraries
if (APPLE)
find_library(CORE_FOUNDATION CoreFoundation)
target_link_libraries(${APP_PROJECT_NAME} ${CORE_FOUNDATION})
endif ()
set(CMAKE_AUTOMOC OFF)
# MacOSX Bundle ----------------------------------------------------------------
if (APPLE)
set(MACOSX_BUNDLE_NAME ${PROJECT_NAME})
set(MACOSX_BINARY_NAME ${APP_PROJECT_NAME})
set(MACOSX_DYNAMIC_LIBRARIES ${Boost_LIBRARIES} "${LLVM_LIBRARY_DIRS}/libLTO.dylib")
string(REPLACE ";" " " MACOSX_DYNAMIC_LIBRARIES "${MACOSX_DYNAMIC_LIBRARIES}")
get_property(QT_CORE_PATH TARGET ${Qt5Core_LIBRARIES} PROPERTY LOCATION)
get_filename_component(QT_CORE_PATH ${QT_CORE_PATH} REALPATH)
get_property(QT_GUI_PATH TARGET ${Qt5Gui_LIBRARIES} PROPERTY LOCATION)
get_filename_component(QT_GUI_PATH ${QT_GUI_PATH} REALPATH)
get_property(QT_WIDGETS_PATH TARGET ${Qt5Widgets_LIBRARIES} PROPERTY LOCATION)
get_filename_component(QT_WIDGETS_PATH ${QT_WIDGETS_PATH} REALPATH)
get_property(QT_PRINT_PATH TARGET ${Qt5PrintSupport_LIBRARIES} PROPERTY LOCATION)
get_filename_component(QT_PRINT_PATH ${QT_PRINT_PATH} REALPATH)
list(APPEND MACOSX_QT_FRAMEWORKS ${QT_CORE_PATH} ${QT_GUI_PATH} ${QT_WIDGETS_PATH} ${QT_PRINT_PATH})
string(REPLACE ";" " " MACOSX_QT_FRAMEWORKS "${MACOSX_QT_FRAMEWORKS}")
set(MACOSX_QT_DIR "$ENV{QT_DIR}")
configure_file(
${PROJECT_SOURCE_DIR}/setup/MacOSX/bundle_install.sh.in
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/bundle_install.sh
@ONLY
)
configure_file(
${PROJECT_SOURCE_DIR}/setup/MacOSX/Info.plist.in
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/bundle_info.plist
@ONLY
)
endif ()
# CxxTest ----------------------------------------------------------------------
if (UNIX)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/test/${CMAKE_BUILD_TYPE})
else ()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/test/)
endif ()
add_subdirectory(src/test)
set(CXXTEST_INCLUDE_DIR $ENV{CXX_TEST_DIR})
set(CXXTEST_PYTHON_TESTGEN_EXECUTABLE ${CXXTEST_INCLUDE_DIR}/bin/cxxtestgen)
set(TESTGEN_FILE ${CMAKE_CURRENT_BINARY_DIR}/test_main.cpp)
find_package(PythonInterp REQUIRED)
add_executable (${TEST_PROJECT_NAME} ${TESTGEN_FILE} ${TEST_FILES})
create_source_groups(${TEST_FILES})
target_link_libraries(${TEST_PROJECT_NAME} ${LIB_PROJECT_NAME})
find_package(CxxTest)
if (CXXTEST_FOUND)
set_property(
TARGET ${TEST_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/lib"
"${CXXTEST_INCLUDE_DIR}"
"${CMAKE_SOURCE_DIR}/src/external"
${Boost_INCLUDE_DIRS}
)
endif (CXXTEST_FOUND)
if (WIN32)
add_custom_command(
TARGET ${TEST_PROJECT_NAME}
PRE_BUILD
COMMAND ${PYTHON_EXECUTABLE} ${CXXTEST_PYTHON_TESTGEN_EXECUTABLE} --runner=ParenPrinter -o ${TESTGEN_FILE} ${PROJECT_SOURCE_DIR}/src/test/*.h
COMMENT "Generating unittest code with cxxtestgen"
)
add_custom_command(
TARGET ${TEST_PROJECT_NAME}
POST_BUILD
COMMAND cd $(ProjectDir)../bin/test/\n$(OutDir)$(TargetName)$(TargetExt)
COMMENT "Running unittest code"
)
elseif (UNIX)
add_custom_command(
OUTPUT ${TESTGEN_FILE}
PRE_BUILD
COMMAND cd ${PROJECT_SOURCE_DIR} && ${PYTHON_EXECUTABLE} ${CXXTEST_PYTHON_TESTGEN_EXECUTABLE} --runner=ParenPrinter -o ${TESTGEN_FILE} ${TEST_FILES}
COMMENT "Generating unittest code with cxxtestgen"
)
add_custom_target(gen DEPENDS ${TESTGEN_FILE})
add_dependencies(${TEST_PROJECT_NAME} gen)
endif ()
# Visual Leak Detector ---------------------------------------------------------
if (WIN32)
include_directories($ENV{VLD_DIR}/include)
endif ()
# Linux package
if(UNIX AND NOT APPLE)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/data
DESTINATION share/coati
)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/setup/Linux/coati.desktop
DESTINATION share/applications
)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/bin/app/data/gui/icon/logo_1024_1024.png
DESTINATION share/icons
RENAME coati.png)
INSTALL(FILES
${CMAKE_SOURCE_DIR}/setup/Linux/libedit.so.0.0.52
${CMAKE_SOURCE_DIR}/setup/Linux/libboost_filesystem.so.1.55.0
${CMAKE_SOURCE_DIR}/setup/Linux/libboost_system.so.1.55.0
${CMAKE_SOURCE_DIR}/setup/Linux/libboost_date_time.so.1.55.0
${CMAKE_SOURCE_DIR}/setup/Linux/libstdc++.so.6
${CMAKE_SOURCE_DIR}/setup/Linux/libpng16.so.16
${CMAKE_SOURCE_DIR}/setup/Linux/libQt5Core.so.5
${CMAKE_SOURCE_DIR}/setup/Linux/libQt5DBus.so.5
${CMAKE_SOURCE_DIR}/setup/Linux/libQt5Gui.so.5
${CMAKE_SOURCE_DIR}/setup/Linux/libQt5Widgets.so.5
${CMAKE_SOURCE_DIR}/setup/Linux/libicui18n.so.54
${CMAKE_SOURCE_DIR}/setup/Linux/libicuuc.so.54
${CMAKE_SOURCE_DIR}/setup/Linux/libpcre16.so.0
${CMAKE_SOURCE_DIR}/setup/Linux/libsystemd.so.0
${CMAKE_SOURCE_DIR}/setup/Linux/libicudata.so.54
${CMAKE_SOURCE_DIR}/setup/Linux/liblz4.so.1
${CMAKE_SOURCE_DIR}/setup/Linux/libgcrypt.so.20
${CMAKE_SOURCE_DIR}/setup/Linux/libgpg-error.so.0
DESTINATION share/coati/lib
)
INSTALL(FILES
${CMAKE_SOURCE_DIR}/setup/Linux/libqxcb.so
DESTINATION share/coati/platforms
)
INSTALL(PROGRAMS
${CMAKE_SOURCE_DIR}/setup/Linux/Coati.sh
DESTINATION share/coati
)
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
INSTALL(TARGETS ${APP_PROJECT_NAME}
DESTINATION share/coati
)
SET(CPACK_GENERATOR "DEB;TGZ")
# DEBIAN PACKAGE
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Andreas Stallinger <astallinger.mmt-m2013@fh-salzburg.ac.at>")
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
SET(CPACK_PACKAGE_NAME "Coati")
SET(CPACK_PACKAGE_VERSION_MAJOR 0)
SET(CPACK_PACKAGE_VERSION_MINOR 1)
SET(CPACK_PACKAGE_VERSION_PATCH 2)
SET(CPACK_PACKAGE_EXECUTABLES "Coati")
INCLUDE(CPack)
endif ()
+27 -1
View File
@@ -1,2 +1,28 @@
### Masterproject ###
### Masterproject
#### Setup
##### External Software
* QT 5.2.1
* CxxTest 4.3
* Valgrind 3.9.0(linux, macOS)
* Clang & LLVM (installation guide http://clang.llvm.org/docs/LibASTMatchersTutorial.html)
* Boost 1.55 ()
* Eigen 3.2.3
##### Environment Variables
* QT_DIR - ...\Qt\Qt5.2.1\5.2.1\<IDE>\
* CXX_TEST_DIR - .../cxxtest-4.3/
* CLANG_DIR - .../clang-llvm/
* BOOST_155_DIR - .../boost_1_55_0
* EIGEN_DIR - .../eigen
For Win32:
* VLD_DIR - .../Visual Leak Detector
##### Settings
Run setup script:
$ ./script/setup.sh
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- BOOL: 0, 1 -->
<!-- INTEGER: int e.g 123 -->
<!-- DECIMAL: float e.g 123.456 -->
<!-- STRING: string e.g hello -->
<!-- COLOR: int int int int - rgba e.g. 125 125 125 255 -->
<config>
<StartupProject><!-- STRING: path to project settings xml file --></StartupProject>
<FilterUndefinedNodesFromGraph><!-- BOOL: filter out undefined nodes in graph --></FilterUndefinedNodesFromGraph>
<source>
<CompilerFlags>
<CompilerFlag><!-- STRING: compiler flag, including the dash e.g. -v --></CompilerFlag>
</CompilerFlags>
<HeaderSearchPaths>
<HeaderSearchPath><!-- STRING: header search path for each path a HeaderSearchPath element --></HeaderSearchPath>
</HeaderSearchPaths>
<!-- MAC ONLY -->
<FrameworkSearchPaths>
<FrameworkSearchPath><!-- STRING: framework search path --></FrameworkSearchPath>
</FrameworkSearchPaths>
</source>
<code>
<TabWidth><!-- INTEGER: number of spaces to represent a tab in code files --></TabWidth>
<FontName><!-- STRING: name of the font used for source view --></FontName> <!-- DEPRECATED -->
<FontSize><!-- INTEGER: size of the font in the source view --></FontSize> <!-- DEPRECATED -->
<snippet>
<snap_range><!-- INTEGER: max amount of lines that the current snippet will be extended to snap to scope start/end --></snap_range>
<expand_range><!-- INTEGER: amount of lines that the snippet range (not snapped) will be extended --></expand_range>
</snippet>
</code>
<colors>
<!-- QueryNodeType -->
<command>
<normal>#8FBC92</normal>
<hover>#5EA071</hover>
</command>
<operator>
<normal>#FCA47E</normal>
<hover>#F97A4E</hover>
</operator>
<!-- NodeType -->
<class>
<normal>#ededed</normal>
<hover>#ededed</hover>
</class>
<struct>
<normal>#ededed</normal>
<hover>#ededed</hover>
</struct>
<enum>
<normal>#ededed</normal>
<hover>#ededed</hover>
</enum>
<function>
<normal>#F4D07D</normal>
<hover>#F4BC3D</hover>
</function>
<method>
<normal>#F4D07D</normal>
<hover>#F4BC3D</hover>
</method>
<field>
<normal>#7BB5D4</normal>
<hover>#42A1D4</hover>
</field>
<global>
<normal>#7BB5D4</normal>
<hover>#42A1D4</hover>
</global>
<undefined>
<normal>#00000000</normal>
<hover>#00000000</hover>
</undefined>
<undefined_variable>
<normal>#7BB5D4</normal>
<hover>#42A1D4</hover>
</undefined_variable>
<undefined_function>
<normal>#F4D07D</normal>
<hover>#F4BC3D</hover>
</undefined_function>
<undefined_type>
<normal>#ededed</normal>
<hover>#ededed</hover>
</undefined_type>
<namespace>
<normal>#00000000</normal>
<hover>#00000000</hover>
</namespace>
<typedef>
<normal>#ededed</normal>
<hover>#ededed</hover>
</typedef>
<enum_constant>
<normal>#7BB5D4</normal>
<hover>#42A1D4</hover>
</enum_constant>
<template_parameter_type>
<normal>#ededed</normal>
<hover>#ededed</hover>
</template_parameter_type>
<file>
<normal>#88BAB3</normal>
<hover>#6AA39B</hover>
</file>
</colors>
</config>
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- BOOL: 0, 1 -->
<!-- INTEGER: int e.g 123 -->
<!-- DECIMAL: float e.g 123.456 -->
<!-- STRING: string e.g hello -->
<!-- COLOR: int int int int - rgba e.g. 125 125 125 255 -->
<config>
<source>
<SourcePaths>
<SourcePath><!-- STRING: path to source file or directory, also used as header search path --></SourcePath>
</SourcePaths>
<CompilerFlags>
<CompilerFlag><!-- STRING: compiler flag, including the dash e.g. -v --></CompilerFlag>
</CompilerFlags>
<HeaderSearchPaths>
<HeaderSearchPath><!-- STRING: header search path for each path a HeaderSearchPath element --></HeaderSearchPath>
</HeaderSearchPaths>
<!-- MAC ONLY -->
<FrameworkSearchPaths>
<FrameworkSearchPath><!-- STRING: framework search path --></FrameworkSearchPath>
</FrameworkSearchPaths>
<Extensions>
<HeaderExtensions><!-- STRING: extension for header/include e.g. .h --></HeaderExtensions>
<SourceExtensions><!-- STRING: extension for source e.g. .cpp --></SourceExtensions>
</Extensions>
</source>
</config>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+109
View File
@@ -0,0 +1,109 @@
#code_file_list {
background-color: white;
}
#code_file {
background-color: white;
border: 2px solid #E0E0E0;
border-radius: 14px;
}
#code_file #title_widget {
background-color: #E0E0E0;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
margin-bottom: 5px;
min-height: 28px;
padding-right: 5px;
}
#code_file #title_label {
background: none;
border: none;
border-radius: 3px;
font-size: 14px;
padding: 2px 4px;
margin: 2px 8px;
}
#code_file #title_label:hover {
background-color: #D0D0D0;
}
#code_file #title_label:disabled {
color: black;
}
#code_file #code_snippet{
border-top: 2px solid #E0E0E0;
padding-top: 2px;
}
#code_file #code_snippet[isFirst=true] {
border: none;
padding-top: 0px;
}
#code_file #code_snippet #scope_name, #code_file #code_snippet #dots {
background: none;
color: gray;
border: none;
font-family: "Source Code Pro";
font-size: 14px;
}
#code_file #code_snippet #dots {
padding-right: 13px;
text-align: right;
}
#code_file #code_snippet #scope_name {
padding-left: 4px;
}
#code_area {
background-color: transparent;
font-family: "Source Code Pro";
font-size: 14px;
}
#code_area #line_number_area {
font-family: "Source Code Pro";
font-size: 14px;
}
#code_file #maximize_button, #code_file #snippet_button, #code_file #minimize_button {
margin: 3px;
max-height: 16px;
max-width: 16px;
}
#code_file #maximize_button {
border-image: url(data/gui/code_view/images/maximize_inactive.png);
}
#code_file #maximize_button:enabled {
border-image: url(data/gui/code_view/images/maximize_active.png);
}
#code_file #snippet_button {
border-image: url(data/gui/code_view/images/snippet_inactive.png);
}
#code_file #snippet_button:enabled {
border-image: url(data/gui/code_view/images/snippet_active.png);
}
#code_file #minimize_button {
border-image: url(data/gui/code_view/images/minimize_inactive.png);
}
#code_file #minimize_button:enabled {
border-image: url(data/gui/code_view/images/minimize_active.png);
}
QToolTip {
background-color: rgb(204, 204, 204);
border: 1px solid rgb(0, 0, 0);
color: rgb(0, 0, 0);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

@@ -0,0 +1,35 @@
#refresh_bar {
background: white;
}
QPushButton {
background: #E0E0E0;
border: none;
height: 30px;
width: 30px;
}
QPushButton:hover, QPushButton:checked {
background: #B2B2B2;
}
QPushButton:pressed {
background: #626262;
}
#refresh_button {
border-bottom-left-radius: 12px;
border-top-left-radius: 12px;
margin-right: 2px;
}
#auto_refresh_button {
border-bottom-right-radius: 12px;
border-top-right-radius: 12px;
}
QToolTip {
background-color: rgb(204, 204, 204);
border: 1px solid rgb(0, 0, 0);
color: rgb(0, 0, 0);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

@@ -0,0 +1,8 @@
QPushButton {
border: none;
font-family: "Source Code Pro";
font-size: 16px;
height: 20px;
padding-left: 4px;
padding-right: 4px;
}
@@ -0,0 +1,72 @@
#search_bar {
background: white;
}
QWidget#search_box_container {
background: #E0E0E0;
border: none;
border-bottom-left-radius: 12px;
border-top-left-radius: 12px;
margin-right: 2px;
}
QLineEdit#search_box {
background: #E0E0E0;
border: none;
font-family: "Source Code Pro";
font-size: 16px;
height: 24px;
selection-background-color: #B2B2B2;
}
QWidget#search_box_highlight {
background: #B2B2B2;
border: none;
height: 24px;
}
QAbstractItemView#search_box_popup {
background-color: white;
border: none;
font-family: "Source Code Pro";
font-size: 14pt;
margin: 8px 0 0;
min-height: 26px;
selection-background-color: #B2B2B2;
}
QPushButton#search_button {
background: #E0E0E0;
border: none;
border-bottom-right-radius: 12px;
border-top-right-radius: 12px;
background-position: 15px 5px;
height: 30px;
width: 30px;
}
#search_button:hover {
background: #B2B2B2;
}
#search_button:pressed {
background: #626262;
}
/*QPushButton#case_sensitive_button {
border: none;
border-image: url(data/gui/search_view/images/button_case_sensitive_inactive.png);
height: 26px;
width: 26px;
margin-left: 4px;
}
QPushButton#case_sensitive_button:checked {
border-image: url(data/gui/search_view/images/button_case_sensitive_active.png);
}*/
QToolTip {
background-color: rgb(204, 204, 204);
border: 1px solid rgb(0, 0, 0);
color: rgb(0, 0, 0);
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

@@ -0,0 +1,40 @@
#undo_redo_bar {
background: white;
}
QPushButton {
background: #E0E0E0;
border: none;
background-position: 15px 5px;
height: 30px;
width: 30px;
}
#undo_button {
border-bottom-left-radius: 12px;
border-top-left-radius: 12px;
margin-right: 2px;
}
#redo_button {
border-bottom-right-radius: 12px;
border-top-right-radius: 12px;
}
QPushButton:disabled {
background: #F4F4F4;
}
QPushButton:hover {
background: #B2B2B2;
}
QPushButton:pressed {
background: #626262;
}
QToolTip {
background-color: rgb(204, 204, 204);
border: 1px solid rgb(0, 0, 0);
color: rgb(0, 0, 0);
}
+34
View File
@@ -0,0 +1,34 @@
class Player {
public:
void Do() {}
};
class Base {
protected:
void Init() {}
};
class Game : public Base {
public:
Game() {
Init();
}
void Run() {
player.Do();
}
private:
Player player;
};
Game* game;
int main() {
game = new Game();
game->Run();
delete game;
return 0;
}
+272
View File
@@ -0,0 +1,272 @@
const bool *abd(int abc, int bca);
bool const *abc(int a, int b);
bool *const abcd(int a, int b);
int main();
void foo();
int sum(int a, int b);
int diff(int a, int b);
void funk();
class A
{
public:
A(char c)
: m_importantValue(42)
, m_importanterValue(c)
, m_importantestValue(3.14159265359f)
{
}
~A()
{
}
void doImportantStuff()
{
int a = 1;
m_importantValue *= a;
}
void doModeratelyImportantStuff()
{
m_importanterValue = 'R';
int answer = sum(21, 21);
}
private:
int m_importantValue;
char m_importanterValue;
const float m_importantestValue;
};
A globalA(' ');
class B : public A
{
public:
B()
: A('b')
{
}
virtual ~B()
{
}
protected:
virtual float getNumber() = 0;
};
class C
{
public:
C()
: m_valuable(0)
{
globalA.doImportantStuff();
s_count++;
}
~C()
{
s_count--;
}
static int getCount()
{
return s_count;
}
void solveAllProblems() const
{
A aInstance('a');
aInstance.doImportantStuff();
aInstance.doModeratelyImportantStuff();
}
private:
static int s_count;
int m_valuable;
};
namespace
{
namespace noname
{
struct V
{
int x;
int y;
};
}
enum E
{
X,
Y
};
}
noname::V voo;
typedef A* D;
D globalD;
class E
{
public:
E(){}
~E(){}
class SubE
{
public:
SubE(){}
~SubE(){}
};
private:
int m_importantInt;
};
class AnotherClass
: public A
{
public:
AnotherClass()
: A('x')
{
}
int publicInt;
protected:
int protectedInt;
private:
int privateInt;
};
class circleA
{
public:
circleA()
{
}
private:
//circleB m_b;
};
class circleB
{
public:
circleB()
{
m_a = circleA();
}
circleA foo(){return circleA();}
private:
circleA m_a;
};
struct circleC
{
public:
circleC()
{
m_b = circleB();
}
circleA foo0(){return circleA();}
circleB foo1(){return circleB();}
private:
circleB m_b;
};
class circleD
{
public:
circleD()
{
m_c = circleC();
}
circleC foo(){return circleC();}
circleA foo2(){return circleA();}
circleB foo3(){return circleB();}
private:
circleC m_c;
};
class circleE
{
public:
circleE()
{
m_d = circleD();
}
circleC foo(){return circleC();}
circleB foo1(){return circleB();}
circleD foo2(){return circleD();}
circleA foo3(){return circleA();}
private:
circleD m_d;
};
class circleF
{
public:
circleF()
{
m_e = circleE();
}
circleC foo(){return circleC();}
circleB foo1(){return circleB();}
circleD foo2(){return circleD();}
circleA foo3(){return circleA();}
circleE foo4(){return circleE();}
private:
circleE m_e;
};
class circleCenter
{
public:
circleCenter()
{
m_a = circleA();
m_b = circleB();
m_c = circleC();
m_d = circleD();
}
circleA foo0(){return circleA();}
circleB foo1(){return circleB();}
circleC foo2(){return circleC();}
circleD foo3(){return circleD();}
circleE foo4(){return circleE();}
circleF foo5(){return circleF();}
private:
circleA m_a;
circleB m_b;
circleC m_c;
circleD m_d;
//AnotherClass m_anotherClass;
};
+48
View File
@@ -0,0 +1,48 @@
#include "header.h"
int main();
void foo();
int sum(int a, int b);
int sum(int* a, int* b);
int diff(int a, int b);
int main()
{
A aInstance('m');
aInstance.doImportantStuff();
int a = sum(1, 2);
int b = diff(a, 3);
int c = a * b;
int x = 0;
return 0;
}
int sum(int a, int b);
int diff(int a, int b);
void foo()
{
const char* foo = "bar";
}
int diff(int a, int b);
int sum(int a, int b)
{
return a + b;
}
int diff(int a, int b)
{
return a - b;
}
void funk()
{
A aInstance('x');
aInstance.doModeratelyImportantStuff();
}
+13
View File
@@ -0,0 +1,13 @@
#include "header.h"
void test(int i, int b)
{
int x;
A instanceOfA('v');
return;
}
+23
View File
@@ -0,0 +1,23 @@
#include <memory>
class A
{
};
template <typename T>
class B
{
};
int main()
{
A a;
A* aPtr = nullptr;
std::shared_ptr<A> aSharedPtr = std::make_shared<A>();
B<A> b;
return 0;
}
+8
View File
@@ -0,0 +1,8 @@
template <bool B, typename, class F>
class Foo
{
public:
void bar()
{
}
};
+8
View File
@@ -0,0 +1,8 @@
#include "header.h"
int main()
{
Foo<true, int, float> ft;
ft.bar();
return 0;
}
+82
View File
@@ -0,0 +1,82 @@
#ifndef _ARTIFICIAL_
#define _ARTIFICIAL_
#include <stdlib.h>
#include <time.h>
#include "player.h"
class ArtificialPlayer : public Player {
public:
ArtificialPlayer( Field::Token token, const std::string& name )
: Player( token, name ) {
}
virtual ~ArtificialPlayer() {}
virtual Field::Move Turn( const Field& field ) const {
// srand( static_cast<unsigned int>( time( NULL ) ) );
Field fakeField = field.Clone();
Node node = MinMax( fakeField, token_ );
return node.move;
}
private:
struct Node {
Field::Move move;
int value;
};
Node MinMax( Field& field, Field::Token token ) const {
Node node;
node.value = -10000;
Field::Move move;
int sameMove;
for ( int i = 0; i < 3; i++ ) {
move.row = i;
for ( int j = 0; j < 3; j++ ) {
move.col = j;
if ( !field.IsEmpty( move ) ) {
continue;
}
field.MakeMove( move, token );
int turnValue = Evaluate( field, token );
if ( !turnValue && !field.IsFull() ) {
turnValue = -MinMax( field, Field::Opponent( token ) ).value;
}
field.ClearMove( move );
if ( turnValue > node.value ) {
node.move = move;
node.value = turnValue;
sameMove = 1;
} else if ( turnValue == node.value ) {
sameMove++;
if ( 1 % sameMove == 0 ) {
node.move = move;
}
}
}
}
return node;
}
int Evaluate( const Field& field, Field::Token token ) const {
if ( field.SameInRow( token, 3 ) ) {
return 2;
} else if ( field.SameInRow( Field::Opponent( token ), 2 ) ) {
return -1;
} else if ( field.SameInRow( token, 2 ) > 1 ) {
return 1;
}
return 0;
}
};
#endif // _ARTIFICIAL_
+147
View File
@@ -0,0 +1,147 @@
#ifndef _FIELD_
#define _FIELD_
#include <cassert>
#include <iostream>
class Field {
public:
enum Token {
None = 0,
PlayerA = 1,
PlayerB = 4
};
static Token Opponent( Token token ) {
assert( token != None );
if ( token == PlayerA ) {
return PlayerB;
} else {
return PlayerA;
}
}
struct Move {
int row;
int col;
};
Field()
: left_( 9 ) {
grid_ = new Token* [3];
for ( int i = 0; i < 3 ; i++ ) {
grid_[i] = new Token[3];
}
}
~Field() {
for ( int i = 0; i < 3; i++ ) {
delete grid_[i];
}
delete [] grid_;
}
Field Clone() const {
Field field;
for ( int i = 0; i < 3; i++ ) {
for ( int j = 0; j < 3; j++ ) {
field.grid_[i][j] = grid_[i][j];
}
}
field.left_ = left_;
return field;
}
void Clear() {
for ( int i = 0; i < 3; i++ ) {
for ( int j = 0; j < 3; j++ ) {
grid_[i][j] = None;
}
}
left_ = 9;
}
void Show() const {
std::cout << " 1 2 3\n";
for ( int row = 0; row < 3; row++ ) {
std::cout << row + 1 << " ";
for ( int col = 0; col < 3; col++ ) {
if ( grid_[row][col] == PlayerA ) {
std::cout << " X ";
} else if ( grid_[row][col] == PlayerB ) {
std::cout << " O ";
} else {
std::cout << " ";
}
if ( col < 2 ) {
std::cout << "|";
}
}
if ( row < 2 ) {
std::cout << "\n -----------\n";
}
}
std::cout << "\n\n";
}
int SameInRow( Token token, int amount ) const {
int sum = amount * token;
int count = 0;
for ( int i = 0; i < 3; i++ ) {
if ( grid_[i][0] + grid_[i][1] + grid_[i][2] == sum ) {
count++;
} else if ( grid_[0][i] + grid_[1][i] + grid_[2][i] == sum ) {
count++;
}
}
if ( grid_[0][0] + grid_[1][1] + grid_[2][2] == sum ) {
count++;
} else if ( grid_[2][0] + grid_[1][1] + grid_[0][2] == sum ) {
count++;
}
return count;
}
bool InRange( const Move& move ) const {
return move.row >= 0 && move.row < 3 && move.col >= 0 && move.col < 3;
}
bool IsEmpty( const Move& move ) const {
return grid_[move.row][move.col] == None;
}
bool IsFull() const {
return left_ == 0;
}
void MakeMove( const Move& move, Token token ) {
assert( InRange( move ) );
assert( IsEmpty( move ) );
assert( token != None );
assert( left_ );
grid_[move.row][move.col] = token;
left_--;
}
void ClearMove( const Move& move ) {
assert( InRange(move) );
assert( !IsEmpty(move) );
assert( left_ < 9 );
grid_[move.row][move.col] = None;
left_++;
}
private:
Token** grid_;
int left_;
};
#endif // _FIELD_
+51
View File
@@ -0,0 +1,51 @@
#ifndef _HUMAN_
#define _HUMAN_
#include "input.h"
#include "player.h"
class HumanPlayer : public Player {
public:
HumanPlayer( Field::Token token, const std::string& name )
: Player( token, name ) {
}
virtual ~HumanPlayer() {}
virtual Field::Move Turn( const Field& field ) const {
Field::Move move;
std::cout << name_ << '\n';
do {
move = Input();
move.row -= 1;
move.col -= 1;
} while ( !Check( field, move ) );
return move;
}
private:
Field::Move Input() const {
Field::Move move;
std::cout << "Insert row: ";
input::number( &move.row );
std::cout << "Insert column: ";
input::number( &move.col );
std::cout << '\n';
return move;
}
bool Check( const Field& field, const Field::Move& move ) const {
if ( !field.InRange( move ) ) {
std::cout << "Wrong input!\n";
return false;
} else if ( !field.IsEmpty( move ) ) {
std::cout << "Is occupied!\n";
return false;
}
return true;
}
};
#endif // _HUMAN_
+20
View File
@@ -0,0 +1,20 @@
#ifndef _INPUT_
#define _INPUT_
#include <string>
#include <iostream>
#include <sstream>
namespace input {
template<typename T>
void number( T* number ) {
std::string input;
getline( std::cin, input );
std::stringstream stream( input );
stream >> *number;
}
}
#endif // _INPUT_
+11
View File
@@ -0,0 +1,11 @@
#include "tictactoe.h"
int main() {
TicTacToe tictactoe;
while ( tictactoe.Start() ) {
tictactoe.Run();
}
return 0;
}
+33
View File
@@ -0,0 +1,33 @@
#ifndef _PLAYER_
#define _PLAYER_
#include <string>
#include "field.h"
class Player {
public:
Player( Field::Token token, const std::string& name )
: token_( token )
, name_( name ) {
}
virtual ~Player() {}
virtual Field::Move Turn( const Field& field ) const = 0;
const Field::Token& getToken() const
{
return token_;
}
const std::string getName() const
{
return name_;
}
protected:
const Field::Token token_;
const std::string name_;
};
#endif // _PLAYER_
+93
View File
@@ -0,0 +1,93 @@
#ifndef _TIC_TAC_TOE_
#define _TIC_TAC_TOE_
#include "computer.h"
#include "field.h"
#include "human.h"
#include "input.h"
#include "player.h"
class TicTacToe {
public:
TicTacToe() {
players_[0] = NULL;
players_[1] = NULL;
}
~TicTacToe() {
Reset();
}
bool Start() {
Reset();
std::cout << "Tic Tac Toe\n\n[1] Human\n[2] Computer\n[3] Quit\n\n";
players_[0] = SelectPlayer( Field::PlayerA, "PlayerA" );
if ( !players_[0] ) {
return false;
}
players_[1] = SelectPlayer( Field::PlayerB, "PlayerB" );
if ( !players_[1] ) {
return false;
}
std::cout << '\n';
return true;
}
void Run() {
field_.Show();
int playerIndex = 0;
for ( int i = 0; i < 9; i++ ) {
Player& player = *players_[playerIndex];
field_.MakeMove( player.Turn( field_ ), player.getToken() );
field_.Show();
if ( field_.SameInRow( player.getToken(), 3 ) ) {
std::cout << player.getName() << " won!\n\n";
return;
}
playerIndex = ( playerIndex + 1 ) % 2;
}
std::cout << "Game ends in draw!\n\n";
}
private:
void Reset() {
field_.Clear();
for ( int i = 0; i < 2; i++ ) {
if ( players_[i] ) {
delete players_[i];
players_[i] = NULL;
}
}
}
Player* SelectPlayer( Field::Token token, const std::string& name ) const {
int selection;
while ( true ) {
std::cout << "Choose " << name << ": ";
input::number( &selection );
switch ( selection ) {
case 1 : return new HumanPlayer( token, name );
case 2 : return new ArtificialPlayer( token, name );
case 3 : return NULL;
default : std::cout << "Wrong input!\n";
}
}
}
Player* players_[2];
Field field_;
};
#endif // _TIC_TAC_TOE_
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<config>
<source>
<SourcePath>data/src</SourcePath>
</source>
</config>
+61
View File
@@ -0,0 +1,61 @@
#include "header.h"
char* name;
H g;
int ceil(float a)
{
return static_cast<int>(a) + 1;
}
namespace X
{
struct A;
enum E
{
P,
Q
};
}
class B
{
public:
class C
{
static const int amount;
};
B();
virtual ~B()
{
}
protected:
virtual void process() = 0;
private:
int getCount() const
{
return count;
}
const int count;
H h;
};
B::B()
: count(0)
{
}
namespace
{
int sum(int a, int b)
{
int c = a + b;
return c;
}
}
+11
View File
@@ -0,0 +1,11 @@
typedef unsigned int uint;
class G
{};
class H
: public G
{
private:
int width;
};
@@ -0,0 +1 @@
update
@@ -0,0 +1,21 @@
#ifndef _PLAYER_
#define _PLAYER_
#include <string>
#include "field.h"
class Player {
public:
Player( Field::Token token, const std::string& name )
: token_( token )
, name_( name ) {
}
virtual Field::Move Turn( const Field& field ) const = 0;
const Field::Token token_;
const std::string name_;
};
#endif // _PLAYER_
@@ -0,0 +1,33 @@
class Player {
public:
void Do() {}
};
class Base {};
class Game : public Base {
public:
Game() {
Init();
}
void Init() {}
void Run() {
player.Do();
}
private:
Player player;
};
Game* game;
int main() {
game = new Game();
game->Run();
delete game;
return 0;
}
@@ -0,0 +1,11 @@
#include "tictactoe.h"
int main() {
TicTacToe tictactoe;
while ( tictactoe.Start() ) {
tictactoe.Run();
}
return 0;
}
@@ -0,0 +1,93 @@
#ifndef _TIC_TAC_TOE_
#define _TIC_TAC_TOE_
#include "computer.h"
#include "field.h"
#include "human.h"
#include "input.h"
#include "player.h"
class TicTacToe {
public:
TicTacToe() {
players_[0] = NULL;
players_[1] = NULL;
}
~TicTacToe() {
Reset();
}
bool Start() {
Reset();
std::cout << "Tic Tac Toe\n\n[1] Human\n[2] Computer\n[3] Quit\n\n";
players_[0] = SelectPlayer( Field::PlayerA, "PlayerA" );
if ( !players_[0] ) {
return false;
}
players_[1] = SelectPlayer( Field::PlayerB, "PlayerB" );
if ( !players_[1] ) {
return false;
}
std::cout << '\n';
return true;
}
void Run() {
field_.Show();
int playerIndex = 0;
for ( int i = 0; i < 9; i++ ) {
Player& player = *players_[playerIndex];
field_.MakeMove( player.Turn( field_ ), player.token_ );
field_.Show();
if ( field_.SameInRow( player.token_, 3 ) ) {
std::cout << player.name_ << " won!\n\n";
return;
}
playerIndex = ( playerIndex + 1 ) % 2;
}
std::cout << "Game ends in draw!\n\n";
}
private:
void Reset() {
field_.Clear();
for ( int i = 0; i < 2; i++ ) {
if ( players_[i] ) {
delete players_[i];
players_[i] = NULL;
}
}
}
Player* SelectPlayer( Field::Token token, const std::string& name ) const {
int selection;
while ( true ) {
std::cout << "Choose " << name << ": ";
input::number( &selection );
switch ( selection ) {
case 1 : return new HumanPlayer( token, name );
case 2 : return new ArtificialPlayer( token, name );
case 3 : return NULL;
default : std::cout << "Wrong input!\n";
}
}
}
Player* players_[2];
Field field_;
};
#endif // _TIC_TAC_TOE_
@@ -0,0 +1 @@
update
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<Bool>1</Bool>
<Int>42</Int>
<Float>3.1416</Float>
<String>Hello World!</String>
<source>
<SourcePaths>
<SourcePath>data</SourcePath>
</SourcePaths>
<HeaderSearchPaths>
<HeaderSearchPath>data/</HeaderSearchPath>
<HeaderSearchPath>src/</HeaderSearchPath>
</HeaderSearchPaths>
</source>
</config>
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- INTEGER: int e.g 123 -->
<!-- DECIMAL: float e.g 123.456 -->
<!-- STRING: string e.g hello -->
<!-- COLOR: int int int int - rgba e.g. 125 125 125 255 -->
<config>
<source>
<HeaderSearchPaths>
<HeaderSearchPath><!-- STRING: header search path for each path a HeaderSearchPaht element--></HeaderSearchPath>
</HeaderSearchPaths>
</source>
</config>
@@ -0,0 +1,7 @@
"If you're a researcher on this book thing and you were on Earth, you must have been gathering material on it."
"Well, I was able to extend the original entry a bit, yes."
"Let me see what it says in this edition, then. I've got to see it."
... "What? Harmless! Is that all it's got to say? Harmless! One word! ... Well, for God's sake I hope you managed to recitify that a bit."
"Oh yes, well I managed to transmit a new entry off to the editor. He had to trim it a bit, but it's still an improvement."
"And what does it say now?" asked Arthur.
"Mostly harmless," admitted Ford with a slightly embarrassed cough.
+145
View File
@@ -0,0 +1,145 @@
ConfigManager.cpp WARNING: value path/to/nowhere is not present in config.
Storage.cpp INFO: file: input.cc < 0:0 0:0>
Storage.cpp INFO: class: A <input.cc 1:7 1:7>
Storage.cpp INFO: method: A::A <input.cc 4:2 4:2>
Storage.cpp INFO: global usage: A::A -> A::count <input.cc 5:3 5:7>
Storage.cpp INFO: method: A::A <input.cc 8:2 8:2>
Storage.cpp INFO: global usage: A::A -> A::count <input.cc 9:3 9:7>
Storage.cpp INFO: method: A::getCount <input.cc 12:13 12:20>
Storage.cpp INFO: global usage: A::getCount -> A::count <input.cc 14:10 14:14>
Storage.cpp INFO: method: A::process <input.cc 18:15 18:21>
Storage.cpp INFO: field: A::count <input.cc 21:13 21:17>
Storage.cpp INFO: class: B <input.cc 24:7 24:7>
Storage.cpp INFO: inheritance: B : A <input.cc 25:4 25:11>
Storage.cpp INFO: method: B::process <input.cc 28:15 28:21>
Storage.cpp INFO: override: A::process -> B::process < 0:0 0:0>
Storage.cpp INFO: type usage: B::process -> int <input.cc 30:3 30:5>
Storage.cpp INFO: function: _main_ <input.cc 34:5 34:10>
Storage.cpp INFO: type usage: _main_ -> B <input.cc 36:2 36:2>
Storage.cpp INFO: call: _main_ -> B::B <input.cc 36:4 36:4>
Storage.cpp INFO: call: _main_ -> A::getCount <input.cc 38:9 38:21>
SearchMatch.cpp INFO:
1 matches for "_main_":
931 _main_
^^^^^^
SearchMatch.cpp INFO:
1 matches for "_main_":
931 _main_
^^^^^^
SearchMatch.cpp INFO:
1 matches for "A::A":
190 A::A
^^^^
Storage.cpp INFO: file: input.cc < 0:0 0:0>
Storage.cpp INFO: class: A <input.cc 1:7 1:7>
Storage.cpp INFO: method: A::A <input.cc 4:2 4:2>
Storage.cpp INFO: global usage: A::A -> A::count <input.cc 5:3 5:7>
Storage.cpp INFO: method: A::getCount <input.cc 8:13 8:20>
Storage.cpp INFO: global usage: A::getCount -> A::count <input.cc 10:10 10:14>
Storage.cpp INFO: method: A::process <input.cc 14:15 14:21>
Storage.cpp INFO: field: A::count <input.cc 17:13 17:17>
Storage.cpp INFO: class: B <input.cc 20:7 20:7>
Storage.cpp INFO: inheritance: B : A <input.cc 21:4 21:11>
Storage.cpp INFO: method: B::process <input.cc 24:15 24:21>
Storage.cpp INFO: override: A::process -> B::process < 0:0 0:0>
Storage.cpp INFO: type usage: B::process -> int <input.cc 26:3 26:5>
Storage.cpp INFO: function: main <input.cc 30:5 30:8>
Storage.cpp INFO: type usage: main -> B <input.cc 32:2 32:2>
Storage.cpp INFO: call: main -> B::B <input.cc 32:4 32:4>
Storage.cpp INFO: call: main -> A::getCount <input.cc 34:9 34:21>
Token.cpp ERROR: Location Id was not referenced by this Token.
Node.cpp WARNING: Cannot change NodeType after it was already set from namespace to class
Edge.cpp ERROR: Nodes are not plain copies.
Edge.cpp ERROR: Edge usage can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge usage can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge usage can't go from Node undefined to Node undefined
Settings.cpp WARNING: File for Settings not found.
ConfigManager.cpp WARNING: value Bool is not present in config.
ConfigManager.cpp WARNING: value Int is not present in config.
ConfigManager.cpp WARNING: value Float is not present in config.
ConfigManager.cpp WARNING: value String is not present in config.
Settings.cpp WARNING: File for Settings not found.
ConfigManager.cpp WARNING: value Bool is not present in config.
ConfigManager.cpp WARNING: value Int is not present in config.
ConfigManager.cpp WARNING: value Float is not present in config.
ConfigManager.cpp WARNING: value String is not present in config.
ConfigManager.cpp WARNING: value Bool is not present in config.
ConfigManager.cpp WARNING: value Int is not present in config.
ConfigManager.cpp WARNING: value Float is not present in config.
ConfigManager.cpp WARNING: value String is not present in config.
ConfigManager.cpp WARNING: value NewBool is not present in config.
Graph.cpp ERROR: Can't remove member edge, without removing the child node.
Storage.cpp INFO: typedef: type -> int <file.cpp 1:1 1:1>
Storage.cpp INFO: class: Class <file.cpp 1:1 1:1>
Storage.cpp INFO: struct: Struct <file.cpp 1:1 1:1>
Storage.cpp INFO: global: Global <file.cpp 1:42 1:42>
Storage.cpp INFO: global: Global <file.cpp 1:7 1:7>
Storage.cpp INFO: field: m_field <file.cpp 1:3 1:3>
Storage.cpp ERROR: Field is not a member of anything.
Storage.cpp ERROR: Field needs to have access type [public, protected, private] but has none.
Storage.cpp INFO: field: Struct::m_field <file.cpp 1:11 1:11>
Storage.cpp INFO: function: isTrue <file.cpp 1:14 1:14>
Storage.cpp INFO: method: isMethod <file.cpp 1:9 1:9>
Storage.cpp ERROR: Method is not a member of anything.
Storage.cpp ERROR: Method needs to have access type [public, protected, private] but has none.
Storage.cpp INFO: method: isMethod <file.cpp 1:1 1:1>
Storage.cpp ERROR: Method is not a member of anything.
Storage.cpp ERROR: Method needs to have access type [public, protected, private] but has none.
Storage.cpp INFO: method: Class::isMethod <file.cpp 1:1 1:1>
Storage.cpp INFO: namespace: utility <file.cpp 1:1 1:1>
Storage.cpp INFO: enum: Category <file.cpp 1:17 1:17>
Storage.cpp INFO: enum: Class::Category <file.cpp 1:1 1:1>
Storage.cpp INFO: enum constant: VALUE <file.cpp 1:1 1:1>
Storage.cpp INFO: class: ClassA <file.cpp 1:0 1:0>
Storage.cpp INFO: class: ClassB <file.cpp 1:0 1:0>
Storage.cpp INFO: inheritance: ClassB : ClassA <file.cpp 1:5 1:5>
Storage.cpp INFO: struct: StructA <file.cpp 1:0 1:0>
Storage.cpp INFO: struct: StructB <file.cpp 1:0 1:0>
Storage.cpp INFO: inheritance: StructB : StructA <file.cpp 1:5 1:5>
Storage.cpp INFO: method: A::isMethod <file.cpp 1:9 1:9>
Storage.cpp INFO: method: B::isMethod <file.cpp 1:7 1:7>
Storage.cpp INFO: override: A::isMethod -> B::isMethod < 0:0 0:0>
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: function: func <file.cpp 1:0 1:0>
Storage.cpp INFO: call: isTrue -> func <file.cpp 1:9 1:9>
Storage.cpp INFO: global: global <file.cpp 1:0 1:0>
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: call: global -> isTrue <file.cpp 1:7 1:7>
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: field: Foo::m_field <file.cpp 1:0 1:0>
Storage.cpp INFO: field usage: isTrue -> Foo::m_field <file.cpp 1:7 1:7>
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: global: global <file.cpp 1:0 1:0>
Storage.cpp INFO: global usage: isTrue -> global <file.cpp 1:7 1:7>
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: struct: Struct <file.cpp 1:0 1:0>
Storage.cpp INFO: type usage: isTrue -> Struct <file.cpp 1:0 1:0>
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: function: isTrue <file.h 1:0 1:0>
Storage.cpp INFO: function: main <file.cpp 1:0 1:0>
Storage.cpp INFO: call: main -> isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: function: isTrue <file.h 1:0 1:0>
Storage.cpp INFO: function: main <file.cpp 1:0 1:0>
Storage.cpp INFO: call: main -> isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: function: isTrue <file.h 1:0 1:0>
Storage.cpp INFO: function: main <file.cpp 1:0 1:0>
Storage.cpp INFO: call: main -> isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: file: file.h < 0:0 0:0>
Storage.cpp INFO: file: file.h < 0:0 0:0>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
Storage.cpp INFO: include: file.h <file.cpp 1:7 1:7>
Storage.cpp INFO: file: f.h < 0:0 0:0>
Storage.cpp INFO: file: file.h < 0:0 0:0>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
Storage.cpp INFO: include: f.h <file.cpp 1:0 1:0>
Storage.cpp INFO: include: file.h <file.cpp 1:0 1:0>
TextAccess.cpp WARNING: Index 'firstLine' has to be lower or equal index 'lastLine', is 3 > 2
TextAccess.cpp WARNING: Tried to access index 10. Maximum index is 8
TextAccess.cpp WARNING: Tried to access index 10. Maximum index is 8
TextAccess.cpp WARNING: Line numbers start with one, is 0
TextAccess.cpp WARNING: Line numbers start with one, is 0
TokenLocationCollection.cpp ERROR: Can't create TokenLocation with wrong boundaries.
TokenLocationCollection.cpp ERROR: Can't create TokenLocation with wrong boundaries.
+54
View File
@@ -0,0 +1,54 @@
execute_process(
COMMAND $ENV{CLANG_DIR}/build/bin/llvm-config --cxxflags
OUTPUT_VARIABLE CLANG_DEFINITIONS
)
set(CLANG_INCLUDE_DIRS
"$ENV{CLANG_DIR}/llvm/tools/clang/include"
"$ENV{CLANG_DIR}/build/tools/clang/include"
)
set(CLANG_LIBRARY_DIRS "$ENV{CLANG_DIR}/build/lib")
if (UNIX)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
set(CLANG_LIBRARY_DIRS "$ENV{CLANG_DIR}/build/Release+Asserts/lib")
endif()
endif ()
set(CLANG_LIBRARIES
#clangApplyReplacements
#clangARCMigrate
#clangCodeGen
#clangDynamicASTMatchers
#clangFormat
#clangFrontendTool
#clangIndex
#clangQuer
#clangTidy
#clangTidyGoogleModule
#clangTidyLLVMModule
#clangTidyMiscModule
clangASTMatchers
clangFrontend
clangSerialization
clangDriver
clangTooling
clangParse
clangSema
clangStaticAnalyzerFrontend
clangStaticAnalyzerCheckers
clangStaticAnalyzerCore
clangAnalysis
clangRewriteFrontend
clangEdit
clangAST
clangLex
clangBasic
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CLANG DEFAULT_MSG CLANG_LIBRARIES CLANG_INCLUDE_DIRS)
mark_as_advanced(CLANG_INCLUDE_DIRS CLANG_LIBRARIES)
+29
View File
@@ -0,0 +1,29 @@
#
# Defines a list of files with a given name, prepends the relative path to the
# source dir to each file if available and passes the list to PARENT_SCOPE.
#
# Usage:
# add_files(
# NAME_OF_FILES
# file1.cpp
# file2.cpp
# ...
# )
#
macro(add_files var_name)
file (RELATIVE_PATH _relPath "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
foreach (_src ${ARGN})
if (_relPath)
list (APPEND ${var_name} "${_relPath}/${_src}")
else()
list (APPEND ${var_name} "${_src}")
endif()
endforeach()
if (_relPath)
set(${var_name} ${${var_name}} PARENT_SCOPE)
else()
set(${var_name} ${${var_name}})
endif()
endmacro()
+13
View File
@@ -0,0 +1,13 @@
macro(create_source_groups)
foreach(FILE ${ARGN})
get_filename_component(PARENT_DIR "${FILE}" PATH)
# skip src or include and changes /'s to \\'s
string(REGEX REPLACE "(\\./)?(src|include)/?" "" GROUP "${PARENT_DIR}")
string(REPLACE "/" "\\" GROUP "${GROUP}")
string(LENGTH "${GROUP}" GROUP_NAME_LENGTH)
if (${GROUP_NAME_LENGTH} GREATER 0)
source_group("${GROUP}" FILES "${FILE}")
endif()
endforeach()
endmacro()
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
# Determine path to script
MY_PATH=`dirname "$0"`
cd $MY_PATH/..
# Build and run target
if [ "$1" = "release" ] || [ "$1" = "r" ]
then
if [ "$2" = "test" ]
then
#echo "release test"
ninja -C build/Release Coati_test && cd bin/test && Release/Coati_test
else
#echo "release app"
ninja -C build/Release Coati && cd bin/app && Release/Coati
fi
elif [ "$1" = "debug" ] || [ "$1" = "d" ]
then
if [ "$2" = "test" ]
then
#echo "debug test"
ninja -C build/Debug Coati_test && cd bin/test && Debug/Coati_test
else
#echo "debug app"
ninja -C build/Debug Coati && cd bin/app && Debug/Coati
fi
else
echo "no arguments: first argument 'release' or 'debug', second argument 'test' for tests"
fi
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
SUCCESS="\033[32mSuccess:\033[00m"
# Enter masterproject directory
MY_PATH=`dirname "$0"`
cd $MY_PATH/..
# Remove folders and contents
rm -rf build
rm -rf bin/app/Debug
rm -rf bin/app/Release
rm -rf bin/lib/Debug
rm -rf bin/lib/Release
rm -rf bin/test/Debug
rm -rf bin/test/Release
# Remove log files
find bin/test/data/log -type f -name 'log*' -delete
echo -e $SUCCESS "clean complete"
+20
View File
@@ -0,0 +1,20 @@
MY_PATH=`dirname "$0"`
ICON_INPUT_PATH=$MY_PATH/../bin/app/data/gui/icon
ICON_OUTPUT_PATH=$MY_PATH/../build
ICON_SIZES_PATH=$ICON_INPUT_PATH/sizes
mkdir -p $ICON_SIZES_PATH
convert $ICON_INPUT_PATH/logo_1024_1024.png -resize 16x16 $ICON_SIZES_PATH/icon_16.png
convert $ICON_INPUT_PATH/logo_1024_1024.png -resize 24x24 $ICON_SIZES_PATH/icon_24.png
convert $ICON_INPUT_PATH/logo_1024_1024.png -resize 32x32 $ICON_SIZES_PATH/icon_32.png
convert $ICON_INPUT_PATH/logo_1024_1024.png -resize 40x40 $ICON_SIZES_PATH/icon_40.png
convert $ICON_INPUT_PATH/logo_1024_1024.png -resize 48x48 $ICON_SIZES_PATH/icon_48.png
convert $ICON_INPUT_PATH/logo_1024_1024.png -resize 64x64 $ICON_SIZES_PATH/icon_64.png
convert $ICON_INPUT_PATH/logo_1024_1024.png -resize 128x128 $ICON_SIZES_PATH/icon_128.png
convert $ICON_INPUT_PATH/logo_1024_1024.png -resize 256x256 $ICON_SIZES_PATH/icon_256.png
convert $ICON_SIZES_PATH/icon_16.png $ICON_SIZES_PATH/icon_24.png $ICON_SIZES_PATH/icon_32.png $ICON_SIZES_PATH/icon_40.png $ICON_SIZES_PATH/icon_48.png $ICON_SIZES_PATH/icon_64.png $ICON_SIZES_PATH/icon_128.png $ICON_SIZES_PATH/icon_256.png -colors 256 $ICON_OUTPUT_PATH/coati.ico
rm -rf $ICON_SIZES_PATH
+107
View File
@@ -0,0 +1,107 @@
#!/bin/bash
ABORT="\033[31mAbort:\033[00m"
SUCCESS="\033[32mSuccess:\033[00m"
INFO="\033[33mInfo:\033[00m"
echo -e $INFO "Checking index"
# check clean index
if [[ -n $(git diff HEAD) ]]
then
echo -e $ABORT "You have uncommited changes."
exit 1
fi
BRANCH_NAME=$(git symbolic-ref -q --short HEAD)
PUBLISH_BRANCH_NAME=_publish_"$BRANCH_NAME"_
echo -e $INFO "Checking branch $BRANCH_NAME"
# check if on branch
if [ -z $BRANCH_NAME ]
then
echo -e $ABORT "You are not on any branch."
exit 1
fi
# check if on master
if [ $BRANCH_NAME == "master" ]
then
echo -e $ABORT "You are on master. Use this script only from a feature branch."
exit 1
fi
git checkout -q master
git remote update &>/dev/null
echo -e $INFO "Checking master"
# check if master is up to date
if [[ -n $(git diff origin/master) ]]
then
echo -e $ABORT "Your master is not up-to-date. Run 'git-sync-master.sh' to update master and rebase $BRANCH_NAME."
git checkout -q $BRANCH_NAME
exit 1
fi
MASTER_HEAD_COMMIT=$(git rev-parse HEAD)
BASE_COMMIT=$(git merge-base $BRANCH_NAME master)
git checkout -q $BRANCH_NAME
BRANCH_HEAD_COMMIT=$(git rev-parse HEAD)
# check if feature has commits
if [ $BRANCH_HEAD_COMMIT == $MASTER_HEAD_COMMIT ]
then
echo -e $ABORT "Your feature branch has no commits."
exit 1
fi
# check if feature is not behind master
if [ $BASE_COMMIT != $MASTER_HEAD_COMMIT ]
then
echo -e $ABORT "Your feature branch is behind master. Use 'git rebase master' to update your feature branch."
exit 1
fi
# Prepare publish message with commit messages
GIT_DIR=$(git rev-parse --show-toplevel)/.git
cat $GIT_DIR/../.git_commit_template.txt > $GIT_DIR/PUBLISH_MSG
printf "\n# commits:\n" >> $GIT_DIR/PUBLISH_MSG
git log --graph --format=%B $BASE_COMMIT..HEAD | sed 's/^/# &/' >> $GIT_DIR/PUBLISH_MSG
# switch to temporary branch for squashing
git checkout -q -b $PUBLISH_BRANCH_NAME
echo -e $INFO "Squashing commits"
git reset --soft $BASE_COMMIT
git commit --template=$GIT_DIR/PUBLISH_MSG
if [ $? != 0 ]
then
echo -e $ABORT "Commit was aborted."
git checkout -q $BRANCH_NAME
git branch -q -D $PUBLISH_BRANCH_NAME
exit 1
fi
echo -e $INFO "Rebasing on master"
git checkout -q master
git rebase -q $PUBLISH_BRANCH_NAME
git branch -q -d $PUBLISH_BRANCH_NAME
echo -e $INFO "Uploading to origin master"
git push origin master
if [ $? != 0 ]
then
git reset --hard -q HEAD^
git checkout -q $BRANCH_NAME
echo -e $ABORT "Pushing to origin master has failed, there are new remote changes. Run 'git-sync-master.sh' to update master and rebase $BRANCH_NAME."
exit 1
fi
echo -e $SUCCESS "Published $BRANCH_NAME successfully"
exit 0
+96
View File
@@ -0,0 +1,96 @@
#!/bin/bash
ABORT="\033[31mAbort:\033[00m"
ALERT="\033[31mAlert:\033[00m"
SUCCESS="\033[32mSuccess:\033[00m"
INFO="\033[33mInfo:\033[00m"
BRANCH_NAME=$(git symbolic-ref -q --short HEAD)
# check if on branch
echo -e $INFO "Checking on branch"
if [ -z $BRANCH_NAME ]
then
echo -e $ABORT "You are not on any branch."
exit 1
fi
# check clean index
echo -e $INFO "Checking index"
if [[ -n $(git diff HEAD) ]]
then
echo -e $ABORT "You have uncommited changes."
exit 1
fi
# switch to master
if [ $BRANCH_NAME != 'master' ]
then
echo -e $INFO "Switching to master"
git checkout -q master
if [ $? != 0 ]
then
echo -e $ABORT "Switching to master failed."
exit 1
fi
fi
# fetch remote changes
echo -e $INFO "Fetching changes"
git fetch origin master
if [ $? != 0 ]
then
echo -e $ABORT "Fetching from origin master failed"
git checkout -q "$BRANCH_NAME"
exit 1
fi
# rebase master to origin/master
if [[ -z $(git diff origin/master) ]]
then
echo -e $SUCCESS "Your master is up-to-date"
else
echo -e $INFO "Rebasing to origin/master"
git rebase origin/master
if [ $? != 0 ]
then
echo -e $ALERT "Rebasing on master caused conflicts. This should never happen. Follow the instructions above to resolve them then use 'git push origin master' to update the remote."
exit 1
fi
echo -e $SUCCESS "Updated master"
fi
if [ $BRANCH_NAME == 'master' ]
then
exit 0
fi
# switch to branch
echo -e $INFO "Switching back to $BRANCH_NAME"
git checkout -q "$BRANCH_NAME"
if [ $? != 0 ]
then
echo -e $ABORT "Switching back to $BRANCH_NAME failed."
exit 1
fi
# rebase branch to master
echo -e $INFO "Rebasing $BRANCH_NAME to master"
git rebase master
if [ $? != 0 ]
then
echo -e $ALERT "Rebasing $BRANCH_NAME to master caused conflicts. Follow the instructions above to resolve them."
exit 1
else
echo -e $SUCCESS "$BRANCH_NAME is now up-to-date."
fi
exit 0
+68
View File
@@ -0,0 +1,68 @@
#!/bin/bash
ABORT="\033[31mAbort:\033[00m"
SUCCESS="\033[32mSuccess:\033[00m"
INFO="\033[33mInfo:\033[00m"
# Determine current platform
PLATFORM='unknown'
if [ "$(uname)" == "Darwin" ]; then
PLATFORM='MacOS'
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
PLATFORM='Linux'
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
PLATFORM='Windows'
fi
# Enter masterproject directory
MY_PATH=`dirname "$0"`
cd $MY_PATH/..
# git settings
echo -e $INFO "install git settings"
git config commit.template .git_commit_template.txt
git config color.ui true
cp .git_pre_commit_hook.sh .git/hooks/pre-commit
# Create Debug and Release folders
echo -e $INFO "create build folders"
mkdir -p build
mkdir -p bin/app/Debug
mkdir -p bin/app/Release
mkdir -p bin/lib/Debug
mkdir -p bin/lib/Release
mkdir -p bin/test/Debug
mkdir -p bin/test/Release
# Copy necessary dynamic libraries to bin folder
if [ $PLATFORM == "Windows" ]; then
echo -e $INFO "copy dynamic libraries"
cp -u -r setup/dynamic_libraries/windows/app/Debug/* bin/app/Debug
cp -u -r setup/dynamic_libraries/windows/app/Release/* bin/app/Release
cp -u -r setup/dynamic_libraries/windows/test/Debug/* bin/test/Debug
cp -u -r setup/dynamic_libraries/windows/test/Release/* bin/test/Release
echo -e $INFO "copy test_main file"
cp -u setup/cxx_test/windows/test_main.cpp build
echo -e $INFO "creating program icon"
sh script/create_windows_icon.sh
fi
# Setup both Debug and Release configuration
if [ $PLATFORM == "Linux" ] || [ $PLATFORM == "MacOS" ]; then
mkdir -p build/Debug
mkdir -p build/Release
echo -e $INFO "run cmake with Debug configuration"
cd build/Debug && cmake -G Ninja -DCMAKE_BUILD_TYPE="Debug" ../..
echo -e $INFO "run cmake with Release configuration"
cd ../Release && cmake -G Ninja -DCMAKE_BUILD_TYPE="Release" ../..
fi
echo -e $SUCCESS "setup complete"
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
# Determine path to script
MY_PATH=`dirname "$0"`
cd $MY_PATH/..
# Build and run target
ninja -C build/Debug "$1" && cd bin && valgrind --tool=memcheck --leak-check=yes --log-file=../build/Debug/"$1".leaklog Debug/"$1"
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
# Determine path to script
MY_PATH=`dirname "$0"`
cd $MY_PATH/..
# Build and run target
ninja -C build/Release "$1" && cd bin && valgrind --tool=memcheck --leak-check=yes --log-file=../build/Release/"$1".leaklog Release/"$1"
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
appname=`basename $0 | sed s,\.sh$,,`
dirname=`dirname $0`
echo $dirname
tmp="${dirname#?}"
echo $tmp
if [ "${dirname%$tmp}" != "/" ]; then
dirname=$PWD/$dirname
echo $dirname
fi
LD_LIBRARY_PATH=$dirname/lib
export LD_LIBRARY_PATH
echo $LD_LIBRARY_PATH
$dirname/$appname
+2
View File
@@ -0,0 +1,2 @@
export LD_LIBRARY_PATH=$PWD/lib
exec ./Coati
+11
View File
@@ -0,0 +1,11 @@
[Desktop Entry]
Name=Coati
GenericName=Coati
X-GNOME-FullName=Coati
Comment=Code Explorer
Exec=/usr/share/coati/Coati.sh %u
Icon=coati
Path=/usr/share/coati/
Terminal=true
Type=Application
StartupNotify=true
+1
View File
@@ -0,0 +1 @@
sudo ln -s ./Coati /bin/Coati
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More