Compare commits

...
71 Commits
Author SHA1 Message Date
malte_langkabel 0aa97adb17 data: fixed tutorial includes 2016-06-14 17:21:55 +02:00
malte_langkabel 247be13650 build: updated windows deploy
* added vim plugin directory to package
* changed version number of installer
2016-06-14 16:19:09 +02:00
malte_langkabel 2b93bdc283 src: headless crash
* fixed crash when loading project in headless mode
2016-06-14 16:02:40 +02:00
malte_langkabel 98b13ef24d ui: overlay window base size
* added property in application settings to define a basic width and height that is used when creating new overlay windows.
* fixed crash in tests
2016-06-14 15:27:03 +02:00
Eberhard Graether b7ba10e119 script: Added vim to plugins in Mac bundle 2016-06-14 12:50:15 +02:00
Eberhard Graether 253af27067 ui: changed wording in the UI to indexing instead of analysing 2016-06-14 12:45:13 +02:00
Andreas Stallinger 83e4bcd049 build: vim plugin readme added to linux package
<description>
2016-06-14 12:41:23 +02:00
Andreas Stallinger 2125396665 utility: vim plugin
readme for vim plugin added to ide_plugins
2016-06-14 12:34:43 +02:00
Eberhard Graether 1c0c2e78df data: Cache current file path in PreprocessorCallbacks to avoid lookup for every macro directive 2016-06-14 10:41:41 +02:00
Eberhard Graether b9c0f9ed3e data: Fixed macro expand location was wrong when used within expansion of different file 2016-06-14 00:01:36 +02:00
Eberhard Graether 72a48f997f logic: Avoid reparsing when no project files nothing changed 2016-06-13 23:21:35 +02:00
Eberhard Graether 986f67df8e data: Removed error logs in CxxDeclNameResolver.cpp
bug id = 94
2016-06-13 22:50:02 +02:00
Eberhard Graether 208f2b1158 ui: Changed full text search character to ? and added shortcut CTRL+SHIFT+F 2016-06-13 21:07:14 +02:00
Eberhard Graether b07d03692d logic: Reworked CDB project setup
* added separate step for project name, project location and cdb path
* added description that project stays up-to-date under cdb path picker.
* added include and framework paths to advanced settings
* disregard source extensions for cdb projects

bug id = 70
2016-06-13 16:43:37 +02:00
Eberhard Graether aae388d8ee logic: Check compilation database path before refreshing 2016-06-12 11:21:18 +02:00
Eberhard Graether b57171552f ui: Added download link to start screen 2016-06-12 10:12:27 +02:00
Eberhard Graether be3ba0ba23 ui: Added status messages for fulltext search 2016-06-12 09:35:11 +02:00
Eberhard Graether 19e26268cf build: Added Qt gif plugin to fix loader gif in release build not working 2016-06-11 04:14:10 +02:00
Eberhard Graether 77080464d7 data: Analyze all types of macro usage 2016-06-11 03:46:44 +02:00
Eberhard Graether 594bb41a6f logic: Fixed app can't find user data after parsing CDB because working directory changed 2016-06-11 03:09:04 +02:00
Eberhard Graether c5af4ed4e5 data: Fixed files being consumed by multiple threads 2016-06-11 02:25:19 +02:00
Eberhard Graether 6821fd1c9a data: Fixed macro expands not saved within macro expands 2016-06-10 22:24:14 +02:00
Eberhard Graether 7e3b2622ec src: miscellaneous bug fixes for upcoming release
* only randomize parsing order of source files for multithreaded indexing
* fixed overview not displayed when switching projects due to MessageScrollCode being dispatched
* avoid adding duplicate TokenLocations that causes highlighting to break in QtCodeArea
* clear all controllers when switching project
* maximize unindexed file when clicking title instead of activating it
2016-06-09 12:30:00 +02:00
Eberhard Graether 5173400b8d logic: Showing annotations in fulltext search results
* new LocationType for errors
* refactored CodeController
* cache active locations in CodeController for later manipulations
2016-06-08 20:33:34 +02:00
Eberhard Graether c6fa1f0969 ui: Defined colors for fulltext search and fulltext code highlights 2016-06-07 15:10:09 +02:00
Eberhard Graether b10c55e7f9 src: Added logic and UI for excluding files and directories from analysis
bug id = 68, 47
2016-06-07 10:46:36 +02:00
Andreas Stallinger 6edcd77eb2 logic: fulltextsearch with suffixarray
* delete test.sqlite in storagetestsuite in desstructor
* remove new and delete from suffixarray
* case sensitive fts
* fixed fulltext results annotated like errors
* lazy suffix array building
* fulltextsearch folder added
* go back too branch without _publish
* suffixarray working
* logic: Improved code view performance
2016-06-07 08:49:34 +02:00
Eberhard Graether 53120cf270 ui: fixed autocompletion list highlights wrong for large indices 2016-06-06 15:40:46 +02:00
Eberhard Graether 468e55f078 ui: Repaint graph view after animation to remove artifacts
bug id = 75
2016-05-31 16:44:24 +02:00
Eberhard Graether ab43d309cb data: optimize memory of sqlite database
* use sqlite "VACUUM" after analysis to reduce memory size
* only add filename to name of local symbol
2016-05-31 15:49:12 +02:00
Eberhard Graether da01855b68 ui: Fixed edge name showing when undoing and redoing 2016-05-31 14:15:50 +02:00
Eberhard Graether 2660465b31 ui: Fixed derived bundle layouted to wrong bucket 2016-05-31 14:02:30 +02:00
Eberhard Graether dfcb9214f4 build: Fixed broken code view style due to app changing working directory while analysing from compilation database 2016-05-31 13:17:36 +02:00
Eberhard Graether d6e2c46420 data: Catch sqlite database close exception that happens sometimes 2016-05-31 12:34:07 +02:00
Eberhard Graether 8222729bb9 logic: Removed undo step for graph and code view manipulations
* graph node moving
* graph node expanding
* code file expanding
* scope expanding
2016-05-31 12:12:05 +02:00
Eberhard Graether 3f032ea822 data: Fixed macro definition not connected to file 2016-05-30 17:06:35 +02:00
Eberhard Graether 5a6e042c8f logic: Removed ActivationTranslator and show old token names in search field 2016-05-30 16:00:55 +02:00
Eberhard Graether 5bb6902cdf src: remove unused stuff
* PersistenStorage::removeUnusedNames
* Dictionary
* DictionaryTestSuite
2016-05-30 14:23:50 +02:00
Eberhard Graether 71cf6bb5f4 logic: randomize source file parsing order to reduce header file double parsing
saves 20% parsing time for Coati
2016-05-30 12:21:39 +02:00
malte_langkabel f02169b08e data: more compiled statements
* added some more statement compilations regarding dangerous names.
2016-05-27 17:20:33 +02:00
Andreas Stallinger 4b734a05f9 utility: Sublime Plugin, import idna encoding
* include fileinfo in fileregister instead of include (for unordered_map)
* sublimeplugin import idna encoading
2016-05-27 12:26:52 +02:00
Eberhard Graether 6165d2fffa ui: Fixed edge drawn wrong when leaving from child nod of smaller node 2016-05-27 12:06:16 +02:00
Eberhard Graether 4e08d86602 logic: Fixed base and derived classes not correctly at top or bottom
Prioritize inheritance and override over all other edges.
2016-05-23 15:58:31 +02:00
malte_langkabel d80a123a5a logic: PARSING files are UNPARSED
* changed ***FileIsUnparsed in FileRegister to disregard files that are currently parsing.
* made Cach more generic by adding the option of providing a custom hasher
2016-05-23 14:58:48 +02:00
Eberhard Graether badad741b0 logic: Fixed slow aggregation click and nodes not staying expanded 2016-05-21 04:44:31 +02:00
Eberhard Graether 5d2a476813 logic: Improved graph and code view performance
* added sql index for component_access
* improved policy for expanded code files
* reduced amount of initially expanded code files
* faster DummyEdge creation
* faster DummyNode search by token id
* switched GraphController DummyNodes and DummyEdges to shared_ptr for memory safety
2016-05-21 00:01:46 +02:00
malte_langkabel 4a6f8cf420 src: crash fixes
* fixed crash when snippet has no code.
* fixed crash when saving a filenode with special characters in its name
* fixed crash when aborting the parsing
2016-05-20 13:52:37 +02:00
Eberhard Graether 946be38fa2 utility: Fixed FilePath::contains 2016-05-20 12:52:37 +02:00
Eberhard Graether 86d1ff2905 logic: Changed include files being analyzed solely by path
* removed header extensions
* added source extensions to source path setup screen
* added caching to hasFilePath check
* don't show header list in CDB setup
* removed TestSettings.xml
2016-05-19 21:47:09 +02:00
Manuel Dobusch 5295267513 ui: generic solution parser
completed first version of generic solution parsers
2016-05-18 16:50:26 +02:00
Manuel Dobusch 2f25279662 logic: vs solution parsing fix
Fixed issue with vs internal macros
2016-05-18 14:19:41 +02:00
Eberhard Graether e943ef149e ui: Added more settings to the preferences
Added font face, font size, tab width, analysis threads
2016-05-18 11:15:28 +02:00
malte_langkabel e40459e71d src: storage refactoring
* used the getFirst/getAll template methods throughout the SqliteStorage.
* renamed LambdaTask to TaskLambda to match our naming convention.
2016-05-17 17:09:18 +02:00
malte_langkabel cb9dde6641 logic: fix local symbols in lambda
* fixed the isImplicit method of the ASTVisitor to use the parent context to determine if a lambda record is implicit.
2016-05-17 16:30:26 +02:00
Eberhard Graether 4097493181 ui: Sort snippets to always show definition on top 2016-05-17 15:26:45 +02:00
Eberhard Graether 9f80bcbcb7 ui: Fixed nodes not sorted when expanding in overview 2016-05-17 14:47:36 +02:00
Eberhard Graether 79f788db2e ui: sort buckets in graph layout alphabetically and put bundles at end 2016-05-17 14:28:22 +02:00
malte_langkabel 67e4d84631 logic: indexer count and fixes
* added option to define the amount of parallel indexers in the appsettings
* fixed unparsed files query in ASTVisitor
* fixed: to update a node's type in the storage the node does not have to be defined anymore
2016-05-13 16:30:16 +02:00
Eberhard Graether 7bb40f2630 logic: Simplified node bundling by collecting relevant data upfront 2016-05-13 14:17:20 +02:00
malte_langkabel c61efbbcde logic: multithreaded parsing
* modified the TaskParseCxx to be able to run multiple times in parallel
* made FileRegister threadsafe and changed a lot of its mechanisms
* added TaskGroupParallel that runs all children in parallel
* added TaskParseWrapper that acts as a decorator to execute some code before and after parsing.
* implemented task setup in project with 4 parsing threads
* removed SimpleTask as it was only used as interface for the LambdaTask
2016-05-13 13:23:54 +02:00
Eberhard Graether 245cafdc7b logic: Improved code view performance
* fixed bottleneck in TokenLocationCollection::findLocationFile()
* cache file ids and paths in PersistenStorage
2016-05-12 22:50:14 +02:00
malte_langkabel 6a576bccc9 src: storage refactoring
* renamed Storage to PersistentStorage
* added Storage as baseclass that implements data injection
* cleaned ParserClient interface
* added default constructors for storage types
* cleaned SqlteStorage by implementing the private getAll methods as template specializations
* added CXX flags to CMakeLists (this is needed for sqlite with visual studio)
* removed TestStorage.h/.cpp since these files were not used anymore.
2016-05-11 13:23:31 +02:00
Andreas Stallinger 2a73c42a18 ui: Colorscheme update for Fulltextsearch 2016-05-10 15:34:06 +02:00
Eberhard Graether 9148a4fafb ui: Fixed file button in code file title bar not visible 2016-05-10 14:25:39 +02:00
Eberhard Graether c4ef18fb6d web: Added jekyll blog with hpstr theme and first post for release 0.6
The README contains the commands for building the blog in all different configurations.
2016-05-10 14:10:21 +02:00
Andreas Stallinger e775ae1ecd logic: Fulltextsearch
* fulltextsearch enabled in sqlite
* fulltextsearch start search with @
* codeview performance improved
* strip sRGB profile from png files to get rid of libpng warning at runtime
2016-05-10 11:10:13 +02:00
malte_langkabel 30faa7e52f ui: fix codeview scrollbar and search crash
* fixed size policies of codeview elements to prevent the codeview from having a global scrollbar
* fixed crash in sorting of search results
* removed debug log when panning a codesnippet
2016-05-04 18:38:53 +02:00
malte_langkabel 75ced4b775 build: update to clang 3.8
* removed unsupported method from ASTVisitor after updating to clang 3.8
2016-05-03 15:59:59 +02:00
malte_langkabel 8ef6d77c50 web: documentation updates 2016-04-27 15:14:48 +02:00
Andreas Stallinger bdf713f078 documentation: Use Bear to generate compilation database 2016-04-27 14:58:57 +02:00
Eberhard Graether 999522ca20 docs: updated changelog and documentation 2016-04-27 12:15:03 +02:00
349 changed files with 15429 additions and 4667 deletions
+17 -14
View File
@@ -1,9 +1,4 @@
cmake_minimum_required(VERSION 2.8.9)
# to get CMP0043 warnings, upgrade to version 3 and change the line above to VERSION 3.0 and remove the line below
if(POLICY CMP0043)
cmake_policy(SET CMP0043 OLD)
endif()
cmake_minimum_required(VERSION 3.1)
include(cmake/add_files.cmake)
include(cmake/create_source_groups.cmake)
@@ -11,8 +6,6 @@ include(cmake/version.cmake)
include(cmake/version_setup.cmake)
include(cmake/licenses.cmake)
# set Standerd build type to Release
set(CMAKE_BUILD_TYPE_INIT "Release")
# Variables --------------------------------------------------------------------
@@ -36,16 +29,13 @@ else ()
set(PLATFORM_INCLUDE "includesLinux.h")
endif ()
# Settings ---------------------------------------------------------------------
if (UNIX)
add_definitions(-std=c++11 -Wno-unknown-warning-option -fcolor-diagnostics -DQT_COMPILING_QSTRING_COMPAT_CPP )
endif ()
# Project ----------------------------------------------------------------------
project(${PROJECT_NAME})
# set Standerd build type to Release
set(CMAKE_BUILD_TYPE_INIT "Release")
#RPATH
if(UNIX AND NOT APPLE)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
@@ -56,6 +46,18 @@ if(UNIX AND NOT APPLE)
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_STANDARD 99)
# Settings ---------------------------------------------------------------------
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-warning-option -fcolor-diagnostics")
endif()
if (UNIX)
#add_definitions(-std=c++11 -Wno-unknown-warning-option -fcolor-diagnostics -DQT_COMPILING_QSTRING_COMPAT_CPP )
add_definitions(-fno-omit-frame-pointer -DQT_COMPILING_QSTRING_COMPAT_CPP )
endif ()
# Clang ------------------------------------------------------------------------
@@ -622,6 +624,7 @@ elseif (UNIX)
add_custom_command(
OUTPUT ${TESTGEN_FILE}
PRE_BUILD
COMMAND rm -f ${TESTGEN_FILE}
COMMAND cd ${PROJECT_SOURCE_DIR} && ${PYTHON_EXECUTABLE} ${CXXTEST_PYTHON_TESTGEN_EXECUTABLE} --runner=ParenPrinter -o ${TESTGEN_FILE} ${TEST_FILES}
COMMENT "Generating unittest code with cxxtestgen"
)
+175 -131
View File
@@ -1,22 +1,22 @@
### Masterproject
## Masterproject
#### Setup
### Setup
##### External Software
#### External Software
* QT 5.5
* QT 5.6
* CxxTest 4.3
* Valgrind 3.9.0 (linux)
* Clang & LLVM (doesnt quite work for windows, use unix setup below and skip all the ninja stuff)(installation guide http://clang.llvm.org/docs/LibASTMatchersTutorial.html)
* Clang & LLVM 3.8 (doesnt quite work for windows, use unix setup below and skip all the ninja stuff)(installation guide http://clang.llvm.org/docs/LibASTMatchersTutorial.html)
* Boost 1.59
* Eigen 3.2.6
* Botan 1.11.24
##### Environment Variables
#### Environment Variables
* QT_DIR - ...\Qt\Qt5.2.1\5.2.1\<IDE>\
* CXX_TEST_DIR - .../cxxtest-4.3/
* CLANG_DIR - .../clang-llvm/
* QT_DIR - .../Qt/Qt5.6.0/5.6/<IDE>
* CXX_TEST_DIR - .../cxxtest-4.3
* CLANG_DIR - .../clang-llvm
* BOOST_159_DIR - .../boost_1_59_0
* EIGEN_DIR - .../eigen
* BOTAN_DIR - .../Botan-1.11.24
@@ -25,7 +25,7 @@ For Win32:
* VLD_DIR - .../Visual Leak Detector
* path - apped path to git.exe
###### Botan setup
##### Botan setup
Build release lib in ${BOTAN_DIR}/release
Build debug lib in ${BOTAN_DIR}/debug
@@ -39,30 +39,30 @@ python configure.py --cc=msvc --cpu=x86_32 --via-amalgamation --disable-shared -
for other:
$ python configure.py --via-amalgamation --disable-shared
##### Settings
#### Settings
Run setup script:
$ ./script/setup.sh
#### Release
### Release
##### App
#### App
* create release build
* make sure it uses the Coati icon
* obfuscate the executable using upx
##### Data folder
#### Data folder
* put data folder in working directory
* add empty log folder
* add working tictactoe.xml project to /projects/tictactoe with sources in /projects/tictactoe/src
* add empty app settings with one recent project tictactoe.xml
* leave window_settings.ini with correct Coati start layout
##### Package
#### Package
* add app
* add web/coati_manual.pdf to package
##### Updating Clang on UNIX
#### Updating Clang on UNIX
$ cd .../clang_llvm
@@ -83,130 +83,174 @@ $ cd ../release_build
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ../llvm
$ ninja -j4 check-all
##### Remarks
#### Remarks
* Boost lib dir: rename library directory for your system (e.g.: 'lib32-msvc-12.0') to 'lib'
#### Tagging
### Tagging
$ git tag -a VERSION_NUMBER -m "DESCRIPTION"
$ git push --tags
#### Changelog
### Changelog
##### 0.3.0
#### 0.6.0.0
released 2016-04-27
* Added Tutorial project
* Added communication interface from and to Coati via TCP sockets
* Added plugin for Visual Studio (2012, 2013, 2015)
* Added plugin for Sublime Text (2 & 3)
* Increased autocompletion performance by caching and limiting results to 100
* Save Coati version to sqlite and reparse project whenever the version changes
* Improved source locations of template scopes
* Fixed horizontal scroll in code view not activated while scrolling vertically
* Save errors to storage and reactivate them via button in the status bar
* Save macro scopes
* Fixed old data was still in new project window when creating another project
* Save comment locations and display them when right next to active symbol
* Reworked code view highlighting
* Fixed cursor was jumping at end of query when editing a search query
* Fixed search query disappeared when not token was found for it
* Improved code view auto scroll to center the first active line in the middle
* Focus all overlapping source locations in the code view
* Added recent projects menu option
* Saving all template arguments type uses
* Smoother graph panning and zooming on keyboard using update loop
* Differentiate between explicit and implicit nodes and only show implicit nodes in the graph view when connected
* Improved file clearing performance on project refresh
* Show deleted projects on the start screen and show messagebox to delete them
* Show analysis duration in hh:mm:ss
* Added suppport for temporary test licenses and show error message when it expired
* Increased graph performance by reducing to fixed number of requests
* Add vs-clang compatibility flags when creating project from Visual Studio solution
* Increased graph edge drawing performance
* Added auto detection for system header paths to project wizard and preferences when using gcc, clang or vs compilers
* Added bug tracker to help menu
* Increased search autocompletion performance to stay mostly below 100ms
* Changed style of aggregation edge to cleaner look
* Allow certain edge types to enter and leave at top and bottom of nodes as well e.g. inheritance
* Increased project load performance
* Increased graph creation performance for overview screen
* Changed namespace activation to show the namespace name in the search bar and the namespace definitions in the code view
* Updated to Qt 5.6
* Added analysis for local symbols and allow selecting them in the code view
* Improved error display performance by not expanding all of them at once
* Added home button next to search field for showing the project overview
* Added shortcut and menu item to show project overview
* Fixed Path boxes not sized correctly when switching back and forth in the project wizard
* Allow support for environment variables in project setup with syntax ${VARIABLE_NAME}
* Show quit button on license enter screen when no valid license was entered yet
* Allow color schemes to define text colors for code view highlights
* Added support for function pointers to analysis
* Added Windows system dlls to installer on Windows so users don't not need to install the redistributable package
* Changed style of out-of-date files to be followed by *
* Set Qt flag for high DPI scaling
* Check analyzed paths for existence in project wizard
* Inform the user about project changes and ask before reparsing the project
* Removed "simple setup" step in project wizard and added "lazy include search"-checkbox
* Edit the project settings by clicking the project name in the overview stats
* Added welcome message to Coati trial
* Defined new highlight colors for code view in all color schemes
##### 0.4.0
#### 0.5.1.21
released 2016-03-16
* Network ports for IDE communication can be defined in the ApplicationSettings.xml
* Coati can now handle inclass initialization of members
* Improved handling of template arguments in analysis
* Coati now handles anonymous symbols when parsing files
* Extended color schemes to allow more extensive use in the graph
* Added new color scheme called "bad_rainbow"
* Coati shows a template's general definition when an implicit specialization is activated
* Fixed source locations of many declarations
* Fixed syntax highlighting to correctly identify strings, comments and block comments
* Added analysis for template parameter packs
* Show function and method signature in tooltip when hovering the graph node
* Fixed graph font size was too small for Windows and Linux
* Removed Coati directory from Linux package
* Introduced file endings .coatiproject and .coatidb for Coati's project files
* Added installer for Windows
* Installing prerequisits in Windows Installer
* Redesigned the about window
* Parse errors will be displayed as they appear during analysis
* Fixed constructors and destructors using return type 'void' withou source location
* Removed 'close window' action from menu
* Added help texts to project setup and preferences window
* Improved lambda handling in analysis
* Fixed style of function or method nodes with children
* Fixed tooltip colors in dark color scheme
* renamed undo&redo to back&forward
* navigate back&forward via mouse buttons
* navigate back via backspace key
##### 0.5.0.4
* Added option to hide widget window title bars to View menu
* Added C support
* Added shortcuts for font size resetting to View menu
* Fixed number postions in graph
* Improved performance of token name saving
* Added commandline option for project file
* Fixed cursor changing for resize and text interactions
* Added C and C++ standard setting to project
* Refresh project editing settings
* Added license key window and license checker
* Added trial target without analysis
* Added web documentation
* Improved code view annotation painting performance
* Update error count while analysis
* Improved back & forward in code view
* Return to last scroll position when going back in code view
* Added .coatiproject file associations with icon for Mac and Windows
* Display scope name at bottom of code snippet
* Improved graph view node bundeling to bundle more
* Improved log file names to be sorted chronologically
* Added application move protection to reenter license key
* Show overview on project open with node bundles per type
* Added overview and error keywords to search view
* Added project setup wizard for step-by-step project setup
* Added Visual Studio solution parsing via project wizard or VS plugin
* Improved style of ui windows
* Save user data in ~/Library/Application Support/Coati on Mac
* Improved analysis performance to take only 66% of the time
* Improved logging to alternate between 2 files of 1000 lines to decrease logfile sizes
* Improved painting of icons in graph to be smoother
* Added link to documentation to Help menu
* Fixed preferences not saved
##### 0.5.1.21
* Added project setup for Compilation Databases
* Improved analysis performance for large projects (10x as fast for 1.000.000 LoC)
* Improved project load and code view performance
* Added graph panning with WASD
* Added graph zooming with Shift + mouse wheel or Shift + WS
* Added file extension UI to advanced settings in project setup summary
* Added compiler flags UI to advanced settings in project setup summary
* Show fatal errors in UI that stopped analysis
* Fixed linux package creating ~/.config if not there
* Fixed project setup window sizes to adapt to content size
* Fixed project paths are now saved relative if defined relative
* Fixed crash when opening newer project with older version of Coati
* Removed high traffic log messages
* Show loader animation when loading project
* Fixed expanding file with errors showed all locations in red
* Fixed children on namespace activation were bundled
* Fixed interrupting of analysis to show message in status bar
* Disabled config file warnings
* Added delay for changing fontsize via mouse wheel
* Fixed Visual Studio plugin project loading
* Improved context detection for template parameters
* Fixed type references in headers saved multiple times
* Prevent network message handling without valid license
* Added font size limits
* Center windows on top of main window
* Fixed crash when accessing files without read permission
* Fixed file logger using wrong directory for first log file
* Fixed crash when accessing files without read permission
* Center windows on top of main window
* Added font size limits
* Prevent network message handling without valid license
* Fixed type references in headers saved multiple times
* Improved context detection for template parameters
* Fixed Visual Studio plugin project loading
* Added delay for changing fontsize via mouse wheel
* Disabled config file warnings
* Fixed interrupting of analysis to show message in status bar
* Fixed children on namespace activation were bundled
* Fixed expanding file with errors showed all locations in red
* Show loader animation when loading project
* Removed high traffic log messages
* Fixed crash when opening newer project with older version of Coati
* Fixed project paths are now saved relative if defined relative
* Fixed project setup window sizes to adapt to content size
* Fixed linux package creating ~/.config if not there
* Show fatal errors in UI that stopped analysis
* Added compiler flags UI to advanced settings in project setup summary
* Added file extension UI to advanced settings in project setup summary
* Added graph zooming with Shift + mouse wheel or Shift + WS
* Added graph panning with WASD
* Improved project load and code view performance
* Improved analysis performance for large projects (10x as fast for 1.000.000 LoC)
* Added project setup for Compilation Databases
#### 0.5.0.4
released 2016-02-25
* Fixed preferences not saved
* Added link to documentation to Help menu
* Improved painting of icons in graph to be smoother
* Improved logging to alternate between 2 files of 1000 lines to decrease logfile sizes
* Improved analysis performance to take only 66% of the time
* Save user data in ~/Library/Application Support/Coati on Mac
* Improved style of ui windows
* Added Visual Studio solution parsing via project wizard or VS plugin
* Added project setup wizard for step-by-step project setup
* Added overview and error keywords to search view
* Show overview on project open with node bundles per type
* Added application move protection to reenter license key
* Improved log file names to be sorted chronologically
* Improved graph view node bundeling to bundle more
* Display scope name at bottom of code snippet
* Added .coatiproject file associations with icon for Mac and Windows
* Return to last scroll position when going back in code view
* Improved back & forward in code view
* Update error count while analysis
* Improved code view annotation painting performance
* Added web documentation
* Added trial target without analysis
* Added license key window and license checker
* Refresh project editing settings
* Added C and C++ standard setting to project
* Fixed cursor changing for resize and text interactions
* Added commandline option for project file
* Improved performance of token name saving
* Fixed number postions in graph
* Added shortcuts for font size resetting to View menu
* Added C support
* Added option to hide widget window title bars to View menu
#### 0.4.0
released 2016-01-07
* navigate back via backspace key
* navigate back&forward via mouse buttons
* renamed undo&redo to back&forward
* Fixed tooltip colors in dark color scheme
* Fixed style of function or method nodes with children
* Improved lambda handling in analysis
* Added help texts to project setup and preferences window
* Removed 'close window' action from menu
* Fixed constructors and destructors using return type 'void' withou source location
* Parse errors will be displayed as they appear during analysis
* Redesigned the about window
* Installing prerequisits in Windows Installer
* Added installer for Windows
* Introduced file endings .coatiproject and .coatidb for Coati's project files
* Removed Coati directory from Linux package
* Fixed graph font size was too small for Windows and Linux
* Show function and method signature in tooltip when hovering the graph node
* Added analysis for template parameter packs
* Fixed syntax highlighting to correctly identify strings, comments and block comments
* Fixed source locations of many declarations
* Coati shows a template's general definition when an implicit specialization is activated
* Added new color scheme called "bad_rainbow"
* Extended color schemes to allow more extensive use in the graph
* Coati now handles anonymous symbols when parsing files
* Improved handling of template arguments in analysis
* Coati can now handle inclass initialization of members
* Network ports for IDE communication can be defined in the ApplicationSettings.xml
#### 0.3.0
released 2015-12-14
* Saving all template arguments type uses
* Added recent projects menu option
* Focus all overlapping source locations in the code view
* Improved code view auto scroll to center the first active line in the middle
* Fixed search query disappeared when not token was found for it
* Fixed cursor was jumping at end of query when editing a search query
* Reworked code view highlighting
* Save comment locations and display them when right next to active symbol
* Fixed old data was still in new project window when creating another project
* Save macro scopes
* Save errors to storage and reactivate them via button in the status bar
* Fixed horizontal scroll in code view not activated while scrolling vertically
* Improved source locations of template scopes
* Save Coati version to sqlite and reparse project whenever the version changes
* Increased autocompletion performance by caching and limiting results to 100
* Added plugin for Sublime Text (2 & 3)
* Added plugin for Visual Studio (2012, 2013, 2015)
* Added communication interface from and to Coati via TCP sockets
* Added Tutorial project
+4 -1
View File
@@ -35,12 +35,15 @@
</framework_search_paths>
<extensions>
<header_extensions><!-- STRING: extension for header/include e.g. .h --></header_extensions>
<source_extensions><!-- STRING: extension for source e.g. .cpp --></source_extensions>
</extensions>
<use_source_paths_for_header_search><!-- BOOL: If enabled all subfolder of the source paths will be used for header search --></use_source_paths_for_header_search>
<exclude_paths>
<exclude_path><!-- STRING: path to file or directory to exclude from analysis --></source_path>
</exclude_paths>
<build_file_path>
<vs_solution_path><!-- STRING: path to Visual Studio solution *.sln --></vs_solution_path>
<compilation_db_path><!-- STRING: path to Compilation Database --></compilation_db_path>
+48 -20
View File
@@ -13,7 +13,7 @@
</button>
<field>
<text>#3D3D3D</text>
<text>#FFFFFF</text>
<background>#808080</background>
<highlight>#B1B1B1</highlight>
</field>
@@ -27,17 +27,45 @@
<query>
<none>
<normal>#B1B1B1</normal>
<hover>#CCCCCC</hover>
<normal>
<fill>#B1B1B1</fill>
<text>#3D3D3D</text>
</normal>
<hover>
<fill>#CCCCCC</fill>
<text>#3D3D3D</text>
</hover>
</none>
<command>
<normal>#86BD40</normal>
<hover>#9EC769</hover>
<normal>
<fill>#86BD40</fill>
<text>#3D3D3D</text>
</normal>
<hover>
<fill>#9EC769</fill>
<text>#3D3D3D</text>
</hover>
</command>
<operator>
<normal>#7D2724</normal>
<hover>#8C2B29</hover>
<normal>
<fill>#7D2724</fill>
<text>#3D3D3D</text>
</normal>
<hover>
<fill>#8C2B29</fill>
<text>#3D3D3D</text>
</hover>
</operator>
<fulltext>
<normal>
<fill>#C2AFEF</fill>
<text>#3D3D3D</text>
</normal>
<hover>
<fill>#AB96EA</fill>
<text>#3D3D3D</text>
</hover>
</fulltext>
</query>
</search>
@@ -123,29 +151,23 @@
<border>transparent</border>
<fill>transparent</fill>
</normal>
<focus>
<border>transparent</border>
<fill>transparent</fill>
</focus>
<active>
<border>transparent</border>
<fill>transparent</fill>
</active>
</scope>
<error>
<normal>
<border>transparent</border>
<fill>#A0FF0000</fill>
<text>#000000</text>
</normal>
<focus>
<border>transparent</border>
<fill>#FFFF0000</fill>
</focus>
<active>
<border>transparent</border>
<fill>#FFFF0000</fill>
</active>
</error>
<fulltext>
<normal>
<fill>#C2AFEF</fill>
<text>#3D3D3D</text>
</normal>
</fulltext>
</selection>
</snippet>
</code>
@@ -260,6 +282,12 @@
<normal>#20FFFFFF</normal>
<focus>#FFFFFF</focus>
</border>
<text>
<normal>#FFFFFF</normal>
</text>
<icon>
<normal>#FFFFFF</normal>
</icon>
</file>
<macro>
<like>file</like>
+40 -21
View File
@@ -27,17 +27,45 @@
<query>
<none>
<normal>white</normal>
<hover>#F5F5F5</hover>
<normal>
<fill>white</fill>
<text>black</text>
</normal>
<hover>
<fill>#F5F5F5</fill>
<text>black</text>
</hover>
</none>
<command>
<normal>#8FBC92</normal>
<hover>#5EA071</hover>
<normal>
<fill>#8FBC92</fill>
<text>black</text>
</normal>
<hover>
<fill>#5EA071</fill>
<text>black</text>
</hover>
</command>
<operator>
<normal>#FCA47E</normal>
<hover>#F97A4E</hover>
<normal>
<fill>#FCA47E</fill>
<text>black</text>
</normal>
<hover>
<fill>#F97A4E</fill>
<text>black</text>
</hover>
</operator>
<fulltext>
<normal>
<fill>#C7C7E2</fill>
<text>black</text>
</normal>
<hover>
<fill>#ABABDD</fill>
<text>black</text>
</hover>
</fulltext>
</query>
</search>
@@ -121,14 +149,6 @@
<border>transparent</border>
<fill>transparent</fill>
</normal>
<focus>
<border>transparent</border>
<fill>transparent</fill>
</focus>
<active>
<border>transparent</border>
<fill>transparent</fill>
</active>
</scope>
<error>
<normal>
@@ -137,16 +157,15 @@
<text>#000000</text>
</normal>
<focus>
<border>transparent</border>
<fill>#FFFF0000</fill>
<text>#000000</text>
</focus>
<active>
<border>transparent</border>
<fill>#FFFF0000</fill>
<text>#000000</text>
</active>
</error>
<fulltext>
<normal>
<fill>#C7C7E2</fill>
<text>#000000</text>
</normal>
</fulltext>
</selection>
</snippet>
</code>
+60 -19
View File
@@ -27,17 +27,64 @@
<query>
<none>
<normal>#2F2F2F</normal>
<hover>black</hover>
<normal></normal>
<hover></hover>
</none>
<command>
<normal>#406D4D</normal>
<hover>#4E855E</hover>
<normal></normal>
<hover></hover>
</command>
<operator>
<normal>#7D2724</normal>
<hover>#8C2B29</hover>
<normal></normal>
<hover></hover>
</operator>
<fulltext>
<normal></normal>
<hover></hover>
</fulltext>
</query>
<query>
<none>
<normal>
<fill>#2F2F2F</fill>
<text>#F7F7F7</text>
</normal>
<hover>
<fill>black</fill>
<text>#F7F7F7</text>
</hover>
</none>
<command>
<normal>
<fill>#406D4D</fill>
<text>#F7F7F7</text>
</normal>
<hover>
<fill>#4E855E</fill>
<text>#F7F7F7</text>
</hover>
</command>
<operator>
<normal>
<fill>#7D2724</fill>
<text>#F7F7F7</text>
</normal>
<hover>
<fill>#8C2B29</fill>
<text>#F7F7F7</text>
</hover>
</operator>
<fulltext>
<normal>
<fill>#207EA8</fill>
<text>#F7F7F7</text>
</normal>
<hover>
<fill>#006D93</fill>
<text>#F7F7F7</text>
</hover>
</fulltext>
</query>
</search>
@@ -123,29 +170,23 @@
<border>transparent</border>
<fill>transparent</fill>
</normal>
<focus>
<border>transparent</border>
<fill>transparent</fill>
</focus>
<active>
<border>transparent</border>
<fill>transparent</fill>
</active>
</scope>
<error>
<normal>
<border>transparent</border>
<fill>#A0FF0000</fill>
<text>#000000</text>
</normal>
<focus>
<border>transparent</border>
<fill>#FFFF0000</fill>
</focus>
<active>
<border>transparent</border>
<fill>#FFFF0000</fill>
</active>
</error>
<fulltext>
<normal>
<fill>#207EA8</fill>
<text>#F7F7F7</text>
</normal>
</fulltext>
</selection>
</snippet>
</code>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1007 B

After

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 697 B

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 760 B

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 748 B

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 B

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 436 B

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 B

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 656 B

After

Width:  |  Height:  |  Size: 811 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 697 B

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 852 B

After

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 684 B

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 805 B

After

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 915 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 571 B

After

Width:  |  Height:  |  Size: 706 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 811 B

Executable → Regular
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 78 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 29 KiB

@@ -38,6 +38,17 @@
font-weight: bold;
}
#versionLabel {
color: black;
font-size: 12pt;
font-weight: bold;
}
#updateLabel {
color: black;
font-size: 12pt;
}
#welcomeLabel {
color: black;
font-size: 12pt;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

After

Width:  |  Height:  |  Size: 482 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

+10
View File
@@ -25,7 +25,17 @@
margin-left: 20px;
}
#description {
font-size: 12pt;
}
#label {
font-size: 12pt;
font-weight: bold;
}
#titleLabel {
font-size: 14pt;
font-weight: bold;
}
+1 -1
View File
@@ -1 +1 @@
%windir%\system32\msiexec.exe /I{A54890F6-A227-4BEC-8086-DF08B9B4D0D1}
%windir%\system32\msiexec.exe /I{8C114E1D-F40F-4197-9184-F6E91147E966}
+1 -1
View File
@@ -1 +1 @@
%windir%\system32\msiexec.exe /I{8732C041-A948-4D7F-BE08-FBCEF8BF4586}
%windir%\system32\msiexec.exe /I{173EB0F5-BABB-4C7A-AB43-B767FDC55810}
@@ -3,6 +3,7 @@
#include "player.h"
class HumanPlayer : public Player {
public:
HumanPlayer( Field::Token token, const char* name );
@@ -2,6 +2,19 @@
#define MAIN_H
#include "code_tutorial_1.h"
#include "code_tutorial_2.h"
#include "code_tutorial_3.h"
#include "graph_tutorial_1.h"
#include "graph_tutorial_2.h"
#include "graph_tutorial_3.h"
#include "graph_tutorial_4.h"
#include "search_tutorial_1.h"
#include "search_tutorial_2.h"
#include "search_tutorial_3.h"
#include "search_tutorial_4.h"
#include "search_tutorial_5.h"
#include "my_first_step.h"
//------------------------------------------------------------------------------
@@ -1,9 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<config>
<user>
<recent_projects>
<recent_project>./data/projects/tutorial/tutorial.coatiproject</recent_project>
<recent_project>./data/projects/tictactoe/tictactoe.coatiproject</recent_project>
</recent_projects>
</user>
<application>
<indexer_thread_count>4</indexer_thread_count>
<window_base_width>500</window_base_width>
<window_base_height>500</window_base_height>
</application>
<user>
<recent_projects>
<recent_project>./data/projects/tutorial/tutorial.coatiproject</recent_project>
<recent_project>./data/projects/tictactoe/tictactoe.coatiproject</recent_project>
</recent_projects>
</user>
</config>
@@ -29,6 +29,9 @@
<font_size_max><!-- INTEGER: maximum font size in pt --></font_size_max>
<font_size_min><!-- INTEGER: minimum font size in pt --></font_size_min>
<font_size_std><!-- INTEGER: standard font size in pt --></font_size_std>
<indexer_thread_count><!-- INTEGER: number of threads indexing the source code --></indexer_thread_count>
<window_base_width><!-- INTEGER: initial width of an overlay window --></window_base_width>
<window_base_height><!-- INTEGER: initial height of an overlay window --></window_base_height>
</application>
<code>
-14
View File
@@ -1,14 +0,0 @@
<?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>
+4 -2
View File
@@ -53,5 +53,7 @@ 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.
TokenLocationCollection.cpp ERROR: TokenLocation has wrong boundaries: file.c 2:3 2:1
TokenLocationCollection.cpp ERROR: TokenLocation has wrong boundaries: file.c 4:1 1:10
SolutionParserVisualStudio.cpp INFO: Found 24 additional include paths
SolutionParserVisualStudio.cpp INFO: Found 450 code files
+32 -20
View File
@@ -38,7 +38,6 @@ function(AddSharedToComponent componentName)
DESTINATION .
COMPONENT ${componentName}
PATTERN "log/*" EXCLUDE
PATTERN "projects/ignored" EXCLUDE
PATTERN "data/src" EXCLUDE
PATTERN "data/gui/installer" EXCLUDE
PATTERN "data/install" EXCLUDE
@@ -83,7 +82,13 @@ function(AddSharedToComponent componentName)
PATTERN "ApplicationSettings_for_package.xml" EXCLUDE
PATTERN "ProjectSettings_template.xml" EXCLUDE
PATTERN "ApplicationSettings_template.xml" EXCLUDE
PATTERN "window_settings.ini_for_package" EXCLUDE
PATTERN "window_settings_for_package.ini" EXCLUDE
)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/bin/app/user/window_settings_for_package.ini
DESTINATION user
COMPONENT ${componentName}
RENAME window_settings.ini
)
endfunction(AddSharedToComponent)
@@ -102,6 +107,12 @@ INSTALL(DIRECTORY
COMPONENT FULL
)
INSTALL(DIRECTORY
${CMAKE_SOURCE_DIR}/ide_plugins/vim
DESTINATION plugin
COMPONENT FULL
)
INSTALL(DIRECTORY
${CMAKE_SOURCE_DIR}/bin/app/data/projects
DESTINATION user
@@ -141,32 +152,32 @@ INSTALL(PROGRAMS
COMPONENT FULL
)
#INSTALL(PROGRAMS
#${CMAKE_SOURCE_DIR}/bin/app/Release/Coati_upx
#DESTINATION .
#COMPONENT FULL
#RENAME Coati
#)
#INSTALL(PROGRAMS
#${CMAKE_SOURCE_DIR}/bin/app/Release/Coati_trial_upx
#DESTINATION .
#COMPONENT TRIAL
#RENAME Coati_trial
#)
INSTALL(TARGETS
${APP_PROJECT_NAME}
INSTALL(PROGRAMS
${CMAKE_SOURCE_DIR}/bin/app/Release/Coati_upx
DESTINATION .
COMPONENT FULL
RENAME Coati
)
INSTALL(TARGETS
${TRIAL_PROJECT_NAME}
INSTALL(PROGRAMS
${CMAKE_SOURCE_DIR}/bin/app/Release/Coati_trial_upx
DESTINATION .
COMPONENT TRIAL
RENAME Coati_trial
)
#INSTALL(TARGETS
#${APP_PROJECT_NAME}
#DESTINATION .
#COMPONENT FULL
#)
#INSTALL(TARGETS
#${TRIAL_PROJECT_NAME}
#DESTINATION .
#COMPONENT TRIAL
#)
# SET(CPACK_GENERATOR "DEB;TGZ")
SET(CPACK_GENERATOR "TGZ")
SET(CPACK_ARCHIVE_COMPONENT_INSTALL "ON")
@@ -186,6 +197,7 @@ endif()
SET(CPACK_PACKAGE_NAME "Coati")
SET(CPACK_PACKAGING_INSTALL_PREFIX "")
SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 1)
SET(CPACK_PACKAGING_INSTALL_DIRECTORY "Coati")
SET(CPACK_PACKAGE_VERSION ${VERSION_NUMBER})
SET(CPACK_PACKAGE_VENDOR "Coati Software")
+13 -13
View File
@@ -11,19 +11,19 @@
# )
#
macro(add_files var_name)
file (RELATIVE_PATH _relPath "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
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()
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()
if (_relPath)
set(${var_name} ${${var_name}} PARENT_SCOPE)
else()
set(${var_name} ${${var_name}})
endif()
endmacro()
+8 -4
View File
@@ -2,12 +2,16 @@
find_package(PythonInterp REQUIRED)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_SOURCE_DIR}/script/getSystemString.py"
OUTPUT_VARIABLE SYSSTRING
OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_SOURCE_DIR}/script/getSystemString.py"
OUTPUT_VARIABLE SYSSTRING
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(EXTERNAL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../Coati_External")
set(EXTERNAL_SRC "${EXTERNAL_ROOT}/src")
set(EXTERNAL_BUILD "${EXTERNAL_ROOT}/${SYSSTRING}/${CMAKE_BUILD_TYPE}")
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(EXTERNAL_BUILD "${EXTERNAL_ROOT}/${SYSSTRING}/Debug")
else()
set(EXTERNAL_BUILD "${EXTERNAL_ROOT}/${SYSSTRING}/Release")
endif()
+4
View File
@@ -1,6 +1,7 @@
# upx
set(upxPath ${CMAKE_CURRENT_LIST_DIR}/../bin/app/Release)
message(STATUS "upx the app")
execute_process(
COMMAND rm ${upxPath}/Coati_upx
@@ -13,6 +14,9 @@ execute_process(
COMMAND upx --brute ${upxPath}/Coati_trial -o ${upxPath}/Coati_trial_upx
)
execute_process(
COMMAND ${upxPath}/Coati -z /home/vagrant/dev/license.txt
)
execute_process(
COMMAND ${upxPath}/Coati -f -d ${upxPath}/../data/projects/tictactoe/tictactoe.coatiproject
@@ -862,7 +862,7 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_C84BE68F0D9E42D3B9BD9C8A53DF049A"
"OwnerKey" = "8:_FB29EAD658C3497D9AC46ADE92D33C83"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@@ -874,7 +874,7 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_FB29EAD658C3497D9AC46ADE92D33C83"
"OwnerKey" = "8:_C84BE68F0D9E42D3B9BD9C8A53DF049A"
"MsmSig" = "8:_UNDEFINED"
}
}
@@ -4284,15 +4284,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Coati"
"ProductCode" = "8:{A54890F6-A227-4BEC-8086-DF08B9B4D0D1}"
"PackageCode" = "8:{1EFFC244-8CCC-46E4-B6AC-F789BF1F7F18}"
"ProductCode" = "8:{8C114E1D-F40F-4197-9184-F6E91147E966}"
"PackageCode" = "8:{AD79B9D4-D47B-4576-82F8-685D112E06A2}"
"UpgradeCode" = "8:{CFF09D53-87AF-4241-960D-98C21ED9D358}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:0.6.0000"
"ProductVersion" = "8:0.7.0000"
"Manufacturer" = "8:Coati Software"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:www.coati.io/support"
@@ -5253,7 +5253,7 @@
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_3460FAB707F8431E87168499A7F51556"
{
"SourcePath" = "8:..\\SetupApplicationSettingsLib\\obj\\Release\\SetupApplicationSettingsLib.dll"
"SourcePath" = "8:..\\SetupApplicationSettingsLib\\obj\\Debug\\SetupApplicationSettingsLib.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_A96454F2CE0E4C55B59EDE1094D40E56"
@@ -5281,7 +5281,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_C84BE68F0D9E42D3B9BD9C8A53DF049A"
{
"SourcePath" = "8:..\\SetupCreateStartMenuShortcutLib\\obj\\Release\\SetupCreateStartMenuShortcutLib.dll"
"SourcePath" = "8:..\\SetupCreateStartMenuShortcutLib\\obj\\Debug\\SetupCreateStartMenuShortcutLib.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_A96454F2CE0E4C55B59EDE1094D40E56"
@@ -5309,7 +5309,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_F81B906E39E44A5DAC37B3D70BC8A8CE"
{
"SourcePath" = "8:..\\SetupCreateDesktopShortcutLib\\obj\\Release\\SetupCreateDesktopShortcutLib.dll"
"SourcePath" = "8:..\\SetupCreateDesktopShortcutLib\\obj\\Debug\\SetupCreateDesktopShortcutLib.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_A96454F2CE0E4C55B59EDE1094D40E56"
@@ -5337,7 +5337,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_FB29EAD658C3497D9AC46ADE92D33C83"
{
"SourcePath" = "8:..\\SetupRemoveCacheFiles\\obj\\Release\\SetupRemoveCacheFiles.dll"
"SourcePath" = "8:..\\SetupRemoveCacheFiles\\obj\\Debug\\SetupRemoveCacheFiles.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_A96454F2CE0E4C55B59EDE1094D40E56"
@@ -874,7 +874,7 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_FB29EAD658C3497D9AC46ADE92D33C83"
"OwnerKey" = "8:_C84BE68F0D9E42D3B9BD9C8A53DF049A"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@@ -886,7 +886,7 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_C84BE68F0D9E42D3B9BD9C8A53DF049A"
"OwnerKey" = "8:_FB29EAD658C3497D9AC46ADE92D33C83"
"MsmSig" = "8:_UNDEFINED"
}
}
@@ -4313,15 +4313,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Coati Trial"
"ProductCode" = "8:{8732C041-A948-4D7F-BE08-FBCEF8BF4586}"
"PackageCode" = "8:{11F55D62-3346-49A5-AD7B-FCA50F3C1D98}"
"ProductCode" = "8:{173EB0F5-BABB-4C7A-AB43-B767FDC55810}"
"PackageCode" = "8:{146FC1DF-7415-48DB-89C9-78CF834552C7}"
"UpgradeCode" = "8:{00D35BB8-F11C-4179-9962-47B3D55E412C}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:0.6.0000"
"ProductVersion" = "8:0.7.0000"
"Manufacturer" = "8:Coati Software"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:www.coati.io/support"
@@ -5282,7 +5282,7 @@
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_3460FAB707F8431E87168499A7F51556"
{
"SourcePath" = "8:..\\SetupApplicationSettingsLib\\obj\\Release\\SetupApplicationSettingsLib.dll"
"SourcePath" = "8:..\\SetupApplicationSettingsLib\\obj\\Debug\\SetupApplicationSettingsLib.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_A96454F2CE0E4C55B59EDE1094D40E56"
@@ -5310,7 +5310,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_C84BE68F0D9E42D3B9BD9C8A53DF049A"
{
"SourcePath" = "8:..\\SetupCreateStartMenuShortcutLib\\obj\\Release\\SetupCreateStartMenuShortcutLib.dll"
"SourcePath" = "8:..\\SetupCreateStartMenuShortcutLib\\obj\\Debug\\SetupCreateStartMenuShortcutLib.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_A96454F2CE0E4C55B59EDE1094D40E56"
@@ -5338,7 +5338,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_F81B906E39E44A5DAC37B3D70BC8A8CE"
{
"SourcePath" = "8:..\\SetupCreateDesktopShortcutLib\\obj\\Release\\SetupCreateDesktopShortcutLib.dll"
"SourcePath" = "8:..\\SetupCreateDesktopShortcutLib\\obj\\Debug\\SetupCreateDesktopShortcutLib.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_A96454F2CE0E4C55B59EDE1094D40E56"
@@ -5366,7 +5366,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_FB29EAD658C3497D9AC46ADE92D33C83"
{
"SourcePath" = "8:..\\SetupRemoveCacheFiles\\obj\\Release\\SetupRemoveCacheFiles.dll"
"SourcePath" = "8:..\\SetupRemoveCacheFiles\\obj\\Debug\\SetupRemoveCacheFiles.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_A96454F2CE0E4C55B59EDE1094D40E56"
@@ -3,6 +3,7 @@ import sublime_plugin
import threading
import socket
import os.path
import encodings.idna
try: # use this for Sublime Text 2
import SocketServer
+5
View File
@@ -0,0 +1,5 @@
#vim-coati
The vim plugin is hosted at Github.
Link to the repository: [vim-coati](https://github.com/CoatiSoftware/vim-coati).
+4 -2
View File
@@ -129,10 +129,12 @@ mkdir -p $APP_PACKAGE_DIR
cp -u -r deployment/windows/CoatiAppSetup/CoatiSetup/Release/Coati.msi $APP_PACKAGE_DIR/
cp -u -r deployment/windows/CoatiAppSetup/CoatiSetup/Release/setup.exe $APP_PACKAGE_DIR/
mkdir -p $APP_PACKAGE_DIR/plugins/visual_studio/
cp -u -r ide_plugins/vs/coati_plugin_vs.vsix $APP_PACKAGE_DIR/plugins/visual_studio/
mkdir -p $APP_PACKAGE_DIR/plugins/sublime_text/
cp -u -r ide_plugins/sublime_text/* $APP_PACKAGE_DIR/plugins/sublime_text/
mkdir -p $APP_PACKAGE_DIR/plugins/vim/
cp -u -r ide_plugins/vim/* $APP_PACKAGE_DIR/plugins/vim/
mkdir -p $APP_PACKAGE_DIR/plugins/visual_studio/
cp -u -r ide_plugins/vs/coati_plugin_vs.vsix $APP_PACKAGE_DIR/plugins/visual_studio/
# PACKAGING COATI (APP)
+1 -1
View File
@@ -82,7 +82,7 @@ if [ $PLATFORM == "Linux" ] || [ $PLATFORM == "MacOS" ]; then
cd build/Debug && cmake -G Ninja -DCMAKE_BUILD_TYPE="Debug" ../..
echo -e $INFO "run cmake with Release configuration"
cd ../Release && cmake -G Xcode -DCMAKE_BUILD_TYPE="Release" ../..
cd ../Release && cmake -G Ninja -DCMAKE_BUILD_TYPE="Release" ../..
fi
echo -e $SUCCESS "setup complete"
+8 -7
View File
@@ -3,20 +3,21 @@
# get the current directory
SOURCE="${0}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
COATI_PATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
#setup data folder
if [ ! -d "${HOME}/.config/coati" ]; then
# Control will enter here if $DIRECTORY doesn't exist.
mkdir -p ${HOME}/.config/coati
cp $COATI_PATH/user/* ${HOME}/.config/coati/
echo "First start of Coati from this user, copy default configfiles to ~/.config/coati"
# Control will enter here if $DIRECTORY doesn't exist.
mkdir -p ${HOME}/.config/coati
echo "First start of Coati from this user, copy default configfiles to ~/.config/coati"
fi
cp -rn $COATI_PATH/user/* ${HOME}/.config/coati/
export LD_LIBRARY_PATH="$COATI_PATH/lib:LD_LIBRARY_PATH"
export QT_XKB_CONFIG_ROOT="/usr/share/X11/xkb:$QT_XKB_CONFIG_ROOT"
export QT_QPA_FONTDIR="$COATI_PATH/data/fonts:$QT_QPA_FONTDIR"
+8 -7
View File
@@ -3,21 +3,22 @@
# get the current directory
SOURCE="${0}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
COATI_PATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
#setup data folder
echo $COATI_PATH
if [ ! -d "${HOME}/.config/coatitrial" ]; then
# Control will enter here if $DIRECTORY doesn't exist.
mkdir -p ${HOME}/.config/coatitrial
cp $COATI_PATH/user/* ${HOME}/.config/coatitrial/
echo "First start of Coati from this user, copy default configfiles to ~/.config/coati"
# Control will enter here if $DIRECTORY doesn't exist.
mkdir -p ${HOME}/.config/coatitrial
echo "First start of Coati from this user, copy default configfiles to ~/.config/coati"
fi
cp -nr $COATI_PATH/user/* ${HOME}/.config/coatitrial/
export LD_LIBRARY_PATH="$COATI_PATH/lib:LD_LIBRARY_PATH"
export QT_XKB_CONFIG_ROOT="/usr/share/X11/xkb:$QT_XKB_CONFIG_ROOT"
export QT_QPA_FONTDIR="$COATI_PATH/data/fonts:$QT_QPA_FONTDIR"
+22 -16
View File
@@ -54,7 +54,7 @@ fi
BUNDLE_PATH=$PACKAGE_DIR/$BUNDLE_NAME.app
BIN_DIR=$BUNDLE_PATH/Contents/MacOS
DYNLIB_DIR=$BUNDLE_PATH/Contents/lib
PLUGIN_DIR=$BUNDLE_PATH/Contents/PlugIns/platforms
PLUGIN_DIR=$BUNDLE_PATH/Contents/PlugIns
FRAMEWORK_DIR=$BUNDLE_PATH/Contents/Frameworks
RES_DIR=$BUNDLE_PATH/Contents/Resources
APP_PATH=$BIN_DIR/$APP_NAME
@@ -68,11 +68,9 @@ mkdir -p $RES_DIR
echo -e $INFO "Copying top level contents."
mkdir -p $PACKAGE_DIR/plugins/visual_studio/
cp -r ../../../ide_plugins/vs/coati_plugin_vs_2012.vsix $PACKAGE_DIR/plugins/visual_studio/
cp -r ../../../ide_plugins/vs/coati_plugin_vs_2013.vsix $PACKAGE_DIR/plugins/visual_studio/
cp -r ../../../ide_plugins/vs/coati_plugin_vs_2015.vsix $PACKAGE_DIR/plugins/visual_studio/
cp -r ../../../ide_plugins/vs/coati_plugin_vs.vsix $PACKAGE_DIR/plugins/visual_studio/
cp -R ../../../ide_plugins/sublime_text $PACKAGE_DIR/plugins/sublime_text/
cp -R ../../../ide_plugins/vim $PACKAGE_DIR/plugins/vim/
cp ../data/gui/installer/EULA.rtf $PACKAGE_DIR/EULA.rtf
@@ -128,7 +126,11 @@ done
echo -e $INFO "Copying Plugins"
cp $QT_DIR/plugins/platforms/libqcocoa.dylib $PLUGIN_DIR/libqcocoa.dylib
mkdir -p $PLUGIN_DIR/platforms
mkdir -p $PLUGIN_DIR/imageformats
cp $QT_DIR/plugins/platforms/libqcocoa.dylib $PLUGIN_DIR/platforms/libqcocoa.dylib
cp $QT_DIR/plugins/imageformats/libqgif.dylib $PLUGIN_DIR/imageformats/libqgif.dylib
echo -e $INFO "Copying frameworks."
@@ -156,11 +158,14 @@ install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_
install_name_tool -change @rpath/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui $FRAMEWORK_DIR/QtPrintSupport.framework/Versions/5/QtPrintSupport
install_name_tool -change @rpath/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets $FRAMEWORK_DIR/QtPrintSupport.framework/Versions/5/QtPrintSupport
install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change @rpath/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change @rpath/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change @rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport @executable_path/../Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change @rpath/QtDBus.framework/Versions/5/QtDBus @executable_path/../Frameworks/QtDBus.framework/Versions/5/QtDBus $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $PLUGIN_DIR/platforms/libqcocoa.dylib
install_name_tool -change @rpath/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui $PLUGIN_DIR/platforms/libqcocoa.dylib
install_name_tool -change @rpath/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets $PLUGIN_DIR/platforms/libqcocoa.dylib
install_name_tool -change @rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport @executable_path/../Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport $PLUGIN_DIR/platforms/libqcocoa.dylib
install_name_tool -change @rpath/QtDBus.framework/Versions/5/QtDBus @executable_path/../Frameworks/QtDBus.framework/Versions/5/QtDBus $PLUGIN_DIR/platforms/libqcocoa.dylib
install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $PLUGIN_DIR/imageformats/libqgif.dylib
install_name_tool -change @rpath/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui $PLUGIN_DIR/imageformats/libqgif.dylib
install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $FRAMEWORK_DIR/QtDBus.framework/Versions/5/QtDBus
@@ -173,7 +178,8 @@ otool -L $FRAMEWORK_DIR/QtWidgets.framework/Versions/5/QtWidgets
otool -L $FRAMEWORK_DIR/QtPrintSupport.framework/Versions/5/QtPrintSupport
otool -L $FRAMEWORK_DIR/QtDBus.framework/Versions/5/QtDBus
otool -L $FRAMEWORK_DIR/QtNetwork.framework/Versions/5/QtNetwork
otool -L $PLUGIN_DIR/libqcocoa.dylib
otool -L $PLUGIN_DIR/platforms/libqcocoa.dylib
otool -L $PLUGIN_DIR/imageformats/libqgif.dylib
echo -e $INFO "App dependencies"
@@ -217,11 +223,11 @@ convert $ICON -resize 1024x1024 $ICON_SET/icon_512x512@2x.png
iconutil -c icns -o $RES_DIR/project.icns $ICON_SET
# echo -e $INFO "Obfuscate binary"
echo -e $INFO "Obfuscate binary"
# upx -1 $APP_PATH
# upx --best $APP_PATH
upx --best $APP_PATH
# echo -e $INFO "create DMG"
# hdiutil create ${PACKAGE_DIR}.dmg -volname ${PACKAGE_DIR} -srcfolder ${PACKAGE_DIR}
echo -e $INFO "create DMG"
hdiutil create ${PACKAGE_DIR}.dmg -volname ${PACKAGE_DIR} -srcfolder ${PACKAGE_DIR}
echo -e $SUCCESS "Installed bundle successfully!"
+10
View File
@@ -20,6 +20,13 @@ elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
PLATFORM='Windows'
fi
function fallback {
FALLBACK_BRANCH=${BRANCH_NAME:3}
FALLBACK_BRANCH="${FALLBACK_BRANCH%?}"
git checkout ${FALLBACK_BRANCH}
git branch -D ${BRANCH_NAME}
}
function build {
echo -e $INFO Building $1 \($2\)
cmake --build build/$2 --target $1 > /dev/null
@@ -30,6 +37,7 @@ function build {
echo -e $PASS Building $1 \($2\) passed
else
echo -e $FAIL Building $1 \($2\) failed
fallback
exit 1
fi
}
@@ -43,6 +51,7 @@ function build_type {
if [ $? -ne 0 ]
then
echo -e $FAIL At least one build or test failed, no push to $branch
fallback
exit 1
fi
else
@@ -65,6 +74,7 @@ function run_tests {
echo -e $PASS $1 Tests passed
else
echo -e $FAIL $1 Tests failed
fallback
exit 1
fi
cd $ROOTDIR
+1
View File
@@ -2,6 +2,7 @@ add_files(
APP_FILES
data/parser/cxx/TaskParseCxx.cpp
data/parser/cxx/TaskParseWrapper.cpp
utility/commandline/CommandLineParser.cpp
utility/commandline/CommandLineParser.h
+32 -70
View File
@@ -5,31 +5,12 @@
#include "clang/Tooling/JSONCompilationDatabase.h"
#include "data/parser/cxx/CxxParser.h"
#include "data/Storage.h"
#include "data/PersistentStorage.h"
#include "utility/file/FileRegister.h"
#include "utility/messaging/type/MessageFinishedParsing.h"
#include "utility/messaging/type/MessageStatus.h"
#include "utility/utility.h"
TaskParseCxx::TaskParseCxx(
Storage* storage,
const FileManager* fileManager,
const Parser::Arguments& arguments,
const std::vector<FilePath>& files
)
: m_storage(storage)
, m_arguments(arguments)
, m_files(files)
, m_isCDB(false)
{
if (arguments.compilationDatabasePath.exists())
{
m_isCDB = true;
}
m_parserClient = std::make_shared<ParserClientImpl>();
m_parser = std::make_shared<CxxParser>(m_parserClient.get(), fileManager);
}
std::vector<FilePath> TaskParseCxx::getSourceFilesFromCDB(const FilePath& compilationDatabasePath)
{
std::string error;
@@ -45,52 +26,46 @@ std::vector<FilePath> TaskParseCxx::getSourceFilesFromCDB(const FilePath& compil
return filePaths;
}
TaskParseCxx::TaskParseCxx(
PersistentStorage* storage,
std::shared_ptr<std::mutex> storageMutex,
std::shared_ptr<FileRegister> fileRegister,
const Parser::Arguments& arguments
)
: m_storage(storage)
, m_storageMutex(storageMutex)
, m_arguments(arguments)
, m_isCDB(false)
{
if (arguments.compilationDatabasePath.exists())
{
m_isCDB = true;
}
m_parserClient = std::make_shared<ParserClientImpl>(); // todo: create one parserclient per file
m_parser = std::make_shared<CxxParser>(m_parserClient.get(), fileRegister);
}
void TaskParseCxx::enter()
{
m_start = utility::durationStart();
if (m_isCDB)
{
std::string error;
m_cdb = std::shared_ptr<clang::tooling::JSONCompilationDatabase>
(clang::tooling::JSONCompilationDatabase::loadFromFile(m_arguments.compilationDatabasePath.str(), error));
m_parser->setupParsingCDB(m_files, m_arguments);
m_parser->setupParsingCDB(m_arguments);
}
else
{
m_parser->setupParsing(m_files, m_arguments);
m_parser->setupParsing(m_arguments);
}
for (const FilePath& path : m_parser->getFileRegister()->getUnparsedSourceFilePaths())
{
m_sourcePaths.push_back(path.absolute());
}
m_storage->startParsing();
}
Task::TaskState TaskParseCxx::update()
{
FilePath sourcePath;
bool isSource = false;
FileRegister* fileRegister = m_parser->getFileRegister();
if (m_sourcePaths.size())
{
sourcePath = m_sourcePaths.front();
m_sourcePaths.pop_front();
isSource = true;
}
else if (!m_isCDB)
{
std::vector<FilePath> unparsedHeaders = fileRegister->getUnparsedIncludeFilePaths();
if (unparsedHeaders.size())
{
sourcePath = unparsedHeaders[0];
}
}
FilePath sourcePath = fileRegister->consumeSourceFile();
if (sourcePath.empty())
{
@@ -98,17 +73,16 @@ Task::TaskState TaskParseCxx::update()
}
std::stringstream ss;
ss << "analyzing files (ESC to quit): [";
ss << (m_isCDB ? fileRegister->getParsedSourceFilesCount() : fileRegister->getParsedFilesCount()) + 1 << "/";
ss << (m_isCDB ? fileRegister->getSourceFilesCount() : fileRegister->getFilesCount()) << "] ";
ss << "indexing files (ESC to quit): [";
ss << fileRegister->getParsedSourceFilesCount() << "/";
ss << fileRegister->getSourceFilesCount() << "] ";
ss << sourcePath.str();
MessageStatus(ss.str(), false, true).dispatch();
std::shared_ptr<IntermediateStorage> intermediateStorage = std::make_shared<IntermediateStorage>();
m_parserClient->setStorage(intermediateStorage);
m_parserClient->startParsingFile(sourcePath);
m_parserClient->startParsingFile();
if (m_isCDB)
{
@@ -123,37 +97,25 @@ Task::TaskState TaskParseCxx::update()
m_parser->runTool(std::vector<std::string>(1, sourcePath.str()));
}
m_parserClient->finishParsingFile(sourcePath);
m_parserClient->finishParsingFile();
m_parserClient->resetStorage();
m_storage->injectData(intermediateStorage);
if (isSource)
{
fileRegister->markSourceFileParsed(sourcePath.str());
std::lock_guard<std::mutex> lock(*(m_storageMutex.get()));
m_storage->inject(intermediateStorage.get());
}
fileRegister->markThreadFilesParsed();
return Task::STATE_RUNNING;
}
void TaskParseCxx::exit()
{
MessageStatus("building search index", false, true).dispatch();
m_storage->finishParsing();
FileRegister* fileRegister = m_parser->getFileRegister();
MessageFinishedParsing(
(m_isCDB ? fileRegister->getParsedSourceFilesCount() : fileRegister->getParsedFilesCount()),
(m_isCDB ? fileRegister->getSourceFilesCount() : fileRegister->getFilesCount()),
utility::duration(m_start)
).dispatch();
}
void TaskParseCxx::interrupt()
{
MessageStatus("analyzing files interrupted", false, true).dispatch();
}
void TaskParseCxx::revert()
@@ -0,0 +1,61 @@
#include "data/parser/cxx/TaskParseWrapper.h"
#include "data/PersistentStorage.h"
#include "utility/file/FileRegister.h"
#include "utility/messaging/type/MessageFinishedParsing.h"
#include "utility/messaging/type/MessageStatus.h"
#include "utility/utility.h"
TaskParseWrapper::TaskParseWrapper(
std::shared_ptr<Task> child,
PersistentStorage* storage,
std::shared_ptr<FileRegister> fileRegister
)
: m_child(child)
, m_storage(storage)
, m_fileRegister(fileRegister)
{
}
void TaskParseWrapper::enter()
{
m_start = utility::durationStart();
m_storage->startParsing();
m_child->enter();
}
Task::TaskState TaskParseWrapper::update()
{
return m_child->update();
}
void TaskParseWrapper::exit()
{
m_child->exit();
MessageStatus("optimizing database", false, true).dispatch();
m_storage->optimizeMemory();
MessageStatus("building caches", false, true).dispatch();
m_storage->finishParsing();
MessageFinishedParsing(
m_fileRegister->getParsedSourceFilesCount(),
m_fileRegister->getSourceFilesCount(),
utility::duration(m_start)
).dispatch();
}
void TaskParseWrapper::interrupt()
{
MessageStatus("indexing files interrupted", false, true).dispatch();
m_child->interrupt();
}
void TaskParseWrapper::revert()
{
m_child->revert();
}
+29 -6
View File
@@ -19,6 +19,7 @@
#include "LicenseChecker.h"
#include "settings/ApplicationSettings.h"
#include "settings/ColorScheme.h"
#include "settings/ProjectSettings.h"
std::shared_ptr<Application> Application::create(
const Version& version, ViewFactory* viewFactory, NetworkFactory* networkFactory
@@ -116,6 +117,11 @@ void Application::createAndLoadProject(const FilePath& projectSettingsFilePath)
void Application::loadProject(const FilePath& projectSettingsFilePath)
{
if (m_hasGUI)
{
m_componentManager->clearComponents();
}
bool reparse = false;
Project::ProjectState state = m_project->load(projectSettingsFilePath);
@@ -127,8 +133,8 @@ void Application::loadProject(const FilePath& projectSettingsFilePath)
options.push_back("Yes");
options.push_back("No");
int result = m_mainView->confirm(
"The project file was changed after the last analysis. The project needs to get fully reanalysed to "
"reflect the current project state. Do you want to reanalyze the project?", options);
"The project file was changed after the last indexing. The project needs to get fully reindexed to "
"reflect the current project state. Do you want to reindex the project?", options);
reparse = (result == 0);
}
@@ -145,8 +151,8 @@ void Application::loadProject(const FilePath& projectSettingsFilePath)
options.push_back("Yes");
options.push_back("No");
int result = m_mainView->confirm(
"This project was analyzed with a different version of Coati. It needs to be fully reanalyzed to be used "
"with this version of Coati. Do you want to reanalyze the project?", options);
"This project was indexed with a different version of Coati. It needs to be fully reindexed to be used "
"with this version of Coati. Do you want to reindex the project?", options);
reparse = (result == 0);
}
@@ -163,6 +169,23 @@ void Application::refreshProject()
{
MessageStatus("Refreshing Project").dispatch();
FilePath cdbPath = ProjectSettings::getInstance()->getCompilationDatabasePath();
if (!cdbPath.empty() && !cdbPath.exists())
{
MessageStatus("Can't refresh project").dispatch();
if (m_hasGUI)
{
std::vector<std::string> options;
options.push_back("Ok");
m_mainView->confirm(
"Can't refresh. The compilation database of the project does not exist anymore: " + cdbPath.str(),
options);
}
return;
}
m_storageCache->clear();
if (m_hasGUI)
{
@@ -226,8 +249,8 @@ void Application::handleMessage(MessageLoadProject* message)
options.push_back("Yes");
options.push_back("No");
int result = m_mainView->confirm(
"Some settings were changed, the project needs to be fully reanalyzed. "
"Do you want to reanalyze the project?", options);
"Some settings were changed, the project needs to be fully reindexed. "
"Do you want to reindex the project?", options);
if (result == 1)
{
+13 -8
View File
@@ -2,8 +2,6 @@
add_files(
LIB_FILES
component/controller/helper/ActivationTranslator.cpp
component/controller/helper/ActivationTranslator.h
component/controller/helper/BucketGrid.cpp
component/controller/helper/BucketGrid.h
component/controller/helper/DummyEdge.h
@@ -81,6 +79,11 @@ add_files(
data/access/StorageAccessProxy.cpp
data/access/StorageAccessProxy.h
data/fulltextsearch/FullTextSearchIndex.cpp
data/fulltextsearch/FullTextSearchIndex.h
data/fulltextsearch/SuffixArray.cpp
data/fulltextsearch/SuffixArray.h
data/graph/token_component/TokenComponent.cpp
data/graph/token_component/TokenComponent.h
data/graph/token_component/TokenComponentAbstraction.cpp
@@ -124,6 +127,7 @@ add_files(
data/name/NameHierarchy.h
data/parser/cxx/TaskParseCxx.h
data/parser/cxx/TaskParseWrapper.h
data/parser/ParseLocation.cpp
data/parser/ParseLocation.h
@@ -161,6 +165,8 @@ add_files(
data/HierarchyCache.h
data/IntermediateStorage.cpp
data/IntermediateStorage.h
data/PersistentStorage.cpp
data/PersistentStorage.h
data/SqliteIndex.cpp
data/SqliteIndex.h
data/SqliteStorage.cpp
@@ -252,6 +258,7 @@ add_files(
utility/messaging/type/MessageScrollCode.h
utility/messaging/type/MessageSearch.h
utility/messaging/type/MessageSearchAutocomplete.h
utility/messaging/type/MessageSearchFullText.h
utility/messaging/type/MessageShowErrors.h
utility/messaging/type/MessageShowScope.h
utility/messaging/type/MessageShowStartScreen.h
@@ -269,16 +276,16 @@ add_files(
utility/messaging/MessageQueue.cpp
utility/messaging/MessageQueue.h
utility/scheduling/LambdaTask.cpp
utility/scheduling/LambdaTask.h
utility/scheduling/SimpleTask.cpp
utility/scheduling/SimpleTask.h
utility/scheduling/Task.cpp
utility/scheduling/Task.h
utility/scheduling/TaskGroup.cpp
utility/scheduling/TaskGroup.h
utility/scheduling/TaskGroupParallel.cpp
utility/scheduling/TaskGroupParallel.h
utility/scheduling/TaskGroupSequential.cpp
utility/scheduling/TaskGroupSequential.h
utility/scheduling/TaskLambda.cpp
utility/scheduling/TaskLambda.h
utility/scheduling/TaskScheduler.cpp
utility/scheduling/TaskScheduler.h
@@ -295,8 +302,6 @@ add_files(
utility/solution/SolutionParserVisualStudio.cpp
utility/solution/SolutionParserVisualStudio.h
utility/text/Dictionary.cpp
utility/text/Dictionary.h
utility/text/TextAccess.cpp
utility/text/TextAccess.h
+54 -26
View File
@@ -1,20 +1,23 @@
#include "Project.h"
#include "utility/file/FileSystem.h"
#include "utility/logging/logging.h"
#include "utility/messaging/type/MessageFinishedParsing.h"
#include "utility/scheduling/TaskGroupSequential.h"
#include "utility/utility.h"
#include "utility/Version.h"
#include "data/access/StorageAccessProxy.h"
#include "data/graph/Token.h"
#include "data/parser/cxx/TaskParseCxx.h"
#include "data/Storage.h"
#include "data/parser/cxx/TaskParseWrapper.h"
#include "data/PersistentStorage.h"
#include "data/TaskCleanStorage.h"
#include "settings/ApplicationSettings.h"
#include "settings/ProjectSettings.h"
#include "utility/file/FileRegister.h"
#include "utility/file/FileSystem.h"
#include "utility/logging/logging.h"
#include "utility/messaging/type/MessageFinishedParsing.h"
#include "utility/scheduling/TaskGroupSequential.h"
#include "utility/scheduling/TaskGroupParallel.h"
#include "utility/utility.h"
#include "utility/Version.h"
std::shared_ptr<Project> Project::create(StorageAccessProxy* storageAccessProxy)
{
std::shared_ptr<Project> ptr(new Project(storageAccessProxy));
@@ -139,8 +142,6 @@ void Project::parseCode()
return;
}
std::shared_ptr<ProjectSettings> projSettings = ProjectSettings::getInstance();
m_fileManager.fetchFilePaths(m_storage->getInfoOnAllFiles());
std::set<FilePath> addedFilePaths = m_fileManager.getAddedFilePaths();
std::set<FilePath> updatedFilePaths = m_fileManager.getUpdatedFilePaths();
@@ -149,28 +150,51 @@ void Project::parseCode()
utility::append(updatedFilePaths, m_storage->getDependingFilePaths(updatedFilePaths));
utility::append(updatedFilePaths, m_storage->getDependingFilePaths(removedFilePaths));
std::shared_ptr<TaskGroupSequential> taskGroup = std::make_shared<TaskGroupSequential>();
std::vector<FilePath> filesToClean;
filesToClean.insert(filesToClean.end(), removedFilePaths.begin(), removedFilePaths.end());
filesToClean.insert(filesToClean.end(), updatedFilePaths.begin(), updatedFilePaths.end());
taskGroup->addTask(std::make_shared<TaskCleanStorage>(m_storage.get(), filesToClean));
std::vector<FilePath> filesToParse;
filesToParse.insert(filesToParse.end(), addedFilePaths.begin(), addedFilePaths.end());
filesToParse.insert(filesToParse.end(), updatedFilePaths.begin(), updatedFilePaths.end());
taskGroup->addTask(std::make_shared<TaskParseCxx>(
m_state = PROJECT_LOADED;
if (!filesToClean.size() && !filesToParse.size())
{
MessageFinishedParsing(0, 0, 0, true).dispatch();
return;
}
std::shared_ptr<TaskGroupSequential> taskSequential = std::make_shared<TaskGroupSequential>();
taskSequential->addTask(std::make_shared<TaskCleanStorage>(m_storage.get(), filesToClean));
int indexerThreadCount = ApplicationSettings::getInstance()->getIndexerThreadCount();
std::shared_ptr<FileRegister> fileRegister = std::make_shared<FileRegister>(&m_fileManager, indexerThreadCount > 1);
fileRegister->setFilePaths(filesToParse);
std::shared_ptr<TaskGroupParallel> taskParallel = std::make_shared<TaskGroupParallel>();
taskSequential->addTask(std::make_shared<TaskParseWrapper>(
taskParallel,
m_storage.get(),
&m_fileManager,
getParserArguments(),
filesToParse
fileRegister
));
Task::dispatch(taskGroup);
std::shared_ptr<std::mutex> storageMutex = std::make_shared<std::mutex>();
m_state = PROJECT_LOADED;
for (int i = 0; i < indexerThreadCount; i++)
{
taskParallel->addTask(std::make_shared<TaskParseCxx>(
m_storage.get(),
storageMutex,
fileRegister,
getParserArguments()
));
}
Task::dispatch(taskSequential);
}
void Project::logStats() const
@@ -219,7 +243,7 @@ void Project::loadStorage(const FilePath& path)
FilePath dbPath = FilePath(path).replaceExtension("coatidb");
if (!m_storage || path != m_projectSettingsFilepath || !dbPath.exists())
{
m_storage = std::make_shared<Storage>(dbPath);
m_storage = std::make_shared<PersistentStorage>(dbPath);
}
}
@@ -228,18 +252,22 @@ void Project::updateFileManager()
std::shared_ptr<ProjectSettings> projSettings = ProjectSettings::getInstance();
std::vector<FilePath> sourcePaths = projSettings->getAbsoluteSourcePaths();
std::vector<FilePath> headerPaths;
std::vector<FilePath> headerPaths = sourcePaths;
std::vector<std::string> sourceExtensions;
if (projSettings->getCompilationDatabasePath().exists())
{
headerPaths = sourcePaths;
sourcePaths = TaskParseCxx::getSourceFilesFromCDB(projSettings->getCompilationDatabasePath());
}
else
{
sourceExtensions = projSettings->getSourceExtensions();
}
std::vector<std::string> sourceExtensions = projSettings->getSourceExtensions();
std::vector<std::string> includeExtensions = projSettings->getHeaderExtensions();
std::vector<FilePath> excludePaths = projSettings->getAbsoluteExcludePaths();
m_fileManager.setPaths(sourcePaths, headerPaths, sourceExtensions, includeExtensions);
m_fileManager.setPaths(sourcePaths, headerPaths, excludePaths, sourceExtensions);
}
Parser::Arguments Project::getParserArguments() const
+2 -2
View File
@@ -7,7 +7,7 @@
#include "data/parser/Parser.h"
class Storage;
class PersistentStorage;
class StorageAccessProxy;
class Project
@@ -57,7 +57,7 @@ private:
FilePath m_projectSettingsFilepath;
FileManager m_fileManager;
std::shared_ptr<Storage> m_storage;
std::shared_ptr<PersistentStorage> m_storage;
};
#endif // PROJECT_H
+14
View File
@@ -2,6 +2,7 @@
#include "component/controller/NetworkFactory.h"
#include "component/controller/Controller.h"
#include "component/view/CodeView.h"
#include "component/view/CompositeView.h"
#include "component/view/GraphView.h"
@@ -51,6 +52,19 @@ void ComponentManager::setup(ViewLayout* viewLayout)
m_components.push_back(featureComponent);
}
void ComponentManager::clearComponents()
{
for (std::shared_ptr<Component> component : m_components)
{
Controller* controller = component->getController<Controller>();
if (controller)
{
controller->clear();
}
}
}
void ComponentManager::refreshViews()
{
for (std::shared_ptr<Component> component : m_components)
+1
View File
@@ -23,6 +23,7 @@ public:
void setup(ViewLayout* viewLayout);
void clearComponents();
void refreshViews();
private:
+163 -103
View File
@@ -29,7 +29,8 @@ const uint CodeController::s_lineRadius = 2;
void CodeController::handleMessage(MessageActivateAll* message)
{
std::vector<ErrorInfo> errors;
std::vector<CodeSnippetParams> snippets = getSnippetsForErrorLocations(&errors);
m_collection = m_storageAccess->getErrorTokenLocations(&errors);
std::vector<CodeSnippetParams> snippets = getSnippetsForCollection(m_collection);
StorageStats stats = m_storageAccess->getStorageStats();
CodeSnippetParams statsSnippet;
@@ -69,7 +70,7 @@ void CodeController::handleMessage(MessageActivateAll* message)
if (stats.errorCount.total > 0)
{
ss << "\tWarning: The analysis may be incomplete as long as it yields fatal errors.\n";
ss << "\tWarning: Indexing may be incomplete as long as it yields fatal errors.\n";
ss << "\tTry resolving them and refresh the project.\n";
ss << "\n";
}
@@ -79,6 +80,7 @@ void CodeController::handleMessage(MessageActivateAll* message)
snippets.insert(snippets.begin(), statsSnippet);
CodeView* view = getView();
view->clear();
view->setErrorInfos(errors);
view->showCodeSnippets(snippets, std::vector<Id>());
@@ -94,19 +96,21 @@ void CodeController::handleMessage(MessageActivateLocalSymbols* message)
void CodeController::handleMessage(MessageActivateTokens* message)
{
CodeView* view = getView();
view->setErrorInfos(std::vector<ErrorInfo>());
if (!message->keepContent())
{
view->clear();
}
std::vector<Id> activeTokenIds = message->tokenIds;
Id declarationId = 0; // 0 means that no token is found.
if (!activeTokenIds.size())
{
return;
}
Id declarationId = 0; // 0 means that no token is found.
if (!message->isAggregation)
{
if (activeTokenIds.size() != 1)
{
view->clear();
return;
}
activeTokenIds = m_storageAccess->getActiveTokenIdsForId(activeTokenIds[0], &declarationId);
}
@@ -114,18 +118,17 @@ void CodeController::handleMessage(MessageActivateTokens* message)
{
view->showFirstActiveSnippet(activeTokenIds, message->isLast());
}
if (message->keepContent())
else if (message->keepContent())
{
view->showActiveTokenIds(activeTokenIds);
}
else
{
std::shared_ptr<TokenLocationCollection> collection = m_storageAccess->getTokenLocationsForTokenIds(activeTokenIds);
view->showCodeSnippets(getSnippetsForActiveTokenLocations(collection.get(), declarationId), activeTokenIds);
m_collection = m_storageAccess->getTokenLocationsForTokenIds(activeTokenIds);
view->showCodeSnippets(getSnippetsForActiveTokenLocations(m_collection.get(), declarationId), activeTokenIds);
size_t fileCount = collection->getTokenLocationFileCount();
size_t referenceCount = collection->getTokenLocationCount();
size_t fileCount = m_collection->getTokenLocationFileCount();
size_t referenceCount = m_collection->getTokenLocationCount();
std::stringstream ss;
ss << message->tokenIds.size() << ' ';
@@ -158,14 +161,8 @@ void CodeController::handleMessage(MessageChangeFileView* message)
case MessageChangeFileView::FILE_SNIPPETS:
if (message->needsData)
{
if (message->showErrors)
{
view->addCodeSnippets(getSnippetsForFile(message->locationFile), false);
}
else
{
view->addCodeSnippets(getSnippetsForActiveTokenLocationsInFile(message->locationFile), false);
}
view->addCodeSnippets(getSnippetsForFile(
m_collection->getTokenLocationFileByPath(message->filePath), !message->showErrors), false);
}
view->setFileState(message->filePath, CodeView::FILE_SNIPPETS);
break;
@@ -184,14 +181,26 @@ void CodeController::handleMessage(MessageChangeFileView* message)
if (message->showErrors)
{
std::vector<ErrorInfo> errors;
TokenLocationCollection errorCollection = m_storageAccess->getErrorTokenLocations(&errors);
params.locationFile = std::make_shared<TokenLocationFile>(*errorCollection.findTokenLocationFileByPath(message->filePath));
params.locationFile = m_collection->getTokenLocationFileByPath(message->filePath);
params.locationFile->isWholeCopy = true;
}
else
{
params.locationFile = m_storageAccess->getTokenLocationsForFile(message->filePath.str());
std::shared_ptr<TokenLocationFile> file =
m_storageAccess->getTokenLocationsForFile(message->filePath.str());
TokenLocationFile* activeLocations = m_collection->findTokenLocationFileByPath(message->filePath);
if (activeLocations)
{
activeLocations->forEachTokenLocation(
[&file](TokenLocation* location)
{
file->addTokenLocationAsPlainCopy(location);
}
);
}
params.locationFile = file;
}
getView()->showCodeFile(params);
@@ -229,15 +238,28 @@ void CodeController::handleMessage(MessageScrollCode* message)
void CodeController::handleMessage(MessageShowErrors* message)
{
std::vector<ErrorInfo> errors;
std::vector<CodeSnippetParams> snippets = getSnippetsForErrorLocations(&errors);
m_collection = m_storageAccess->getErrorTokenLocations(&errors);
std::vector<CodeSnippetParams> snippets = getSnippetsForCollection(m_collection);
CodeView* view = getView();
view->clear();
view->setErrorInfos(errors);
view->showCodeSnippets(snippets, std::vector<Id>());
showContents(message);
}
void CodeController::handleMessage(MessageSearchFullText* message)
{
CodeView* view = getView();
view->clear();
m_collection = m_storageAccess->getFullTextSearchLocations(message->searchTerm, message->caseSensitive);
view->showCodeSnippets(getSnippetsForCollection(m_collection, true), std::vector<Id>());
showContents(message);
}
void CodeController::handleMessage(MessageShowScope* message)
{
std::shared_ptr<TokenLocationCollection> collection =
@@ -250,7 +272,8 @@ void CodeController::handleMessage(MessageShowScope* message)
return;
}
std::vector<CodeSnippetParams> snippets = getSnippetsForActiveTokenLocations(collection.get(), 0);
std::vector<CodeSnippetParams> snippets =
getSnippetsForFile(collection->getTokenLocationFiles().begin()->second, true);
if (snippets.size() != 1)
{
LOG_ERROR("MessageShowScope didn't result in one single snippet to be created");
@@ -259,15 +282,21 @@ void CodeController::handleMessage(MessageShowScope* message)
if (message->showErrors)
{
std::vector<ErrorInfo> errors;
std::vector<CodeSnippetParams> errorSnippets = getSnippetsForErrorLocations(&errors);
for (const CodeSnippetParams& error : errorSnippets)
snippets[0].locationFile = m_collection->getTokenLocationFileByPath(snippets[0].locationFile->getFilePath());
}
else
{
TokenLocationFile* activeLocations =
m_collection->findTokenLocationFileByPath(snippets[0].locationFile->getFilePath());
if (activeLocations)
{
if (error.locationFile->getFilePath() == snippets[0].locationFile->getFilePath())
{
snippets[0].locationFile = error.locationFile;
}
std::shared_ptr<TokenLocationFile> file = snippets[0].locationFile;
activeLocations->forEachTokenLocation(
[&file](TokenLocation* location)
{
file->addTokenLocationAsPlainCopy(location);
}
);
}
}
@@ -281,6 +310,13 @@ CodeView* CodeController::getView()
return Controller::getView<CodeView>();
}
void CodeController::clear()
{
getView()->clear();
m_collection.reset();
}
void CodeController::showContents(MessageBase* message)
{
if (!message->isReplayed())
@@ -293,29 +329,39 @@ std::vector<CodeSnippetParams> CodeController::getSnippetsForActiveTokenLocation
const TokenLocationCollection* collection, Id declarationId
) const {
std::vector<CodeSnippetParams> snippets;
size_t definitionFileCount = 0;
size_t declarationFileCount = 0;
collection->forEachTokenLocationFile(
[&](std::shared_ptr<TokenLocationFile> file) -> void
{
bool isDeclarationFile = false;
bool isDefinitionFile = false;
file->forEachTokenLocation(
[&](TokenLocation* location)
{
if (location->getTokenId() == declarationId)
{
isDeclarationFile = true;
if (location->getType() == LOCATION_SCOPE)
{
isDefinitionFile = true;
}
}
}
);
if (declarationFileCount < 5 && (isDeclarationFile || collection->getTokenLocationFileCount() < 5 || file->isWholeCopy))
if (collection->getTokenLocationFileCount() < 5 || file->isWholeCopy ||
(isDefinitionFile && definitionFileCount < 3) ||
(!isDefinitionFile && isDeclarationFile && declarationFileCount < 3))
{
std::vector<CodeSnippetParams> fileSnippets = getSnippetsForActiveTokenLocationsInFile(file);
std::vector<CodeSnippetParams> fileSnippets = getSnippetsForFile(file, true);
for (CodeSnippetParams& snippet : fileSnippets)
{
snippet.isDeclaration = isDeclarationFile;
snippet.isDefinition = isDefinitionFile;
}
utility::append(snippets, fileSnippets);
@@ -330,7 +376,11 @@ std::vector<CodeSnippetParams> CodeController::getSnippetsForActiveTokenLocation
snippets.push_back(params);
}
if (isDeclarationFile)
if (isDefinitionFile)
{
definitionFileCount++;
}
else if (isDeclarationFile)
{
declarationFileCount++;
}
@@ -344,33 +394,48 @@ std::vector<CodeSnippetParams> CodeController::getSnippetsForActiveTokenLocation
return snippets;
}
std::vector<CodeSnippetParams> CodeController::getSnippetsForActiveTokenLocationsInFile(
std::shared_ptr<TokenLocationFile> activeTokenLocations
) const {
std::shared_ptr<TokenLocationFile> fileLocations = m_storageAccess->getTokenLocationsForFile(activeTokenLocations->getFilePath().str());
std::vector<CodeSnippetParams> fileSnippets = getSnippetsForFile(activeTokenLocations, fileLocations);
if (!activeTokenLocations->isWholeCopy)
{
for (CodeSnippetParams& params : fileSnippets)
{
params.locationFile = fileLocations->getFilteredByLines(params.startLineNumber, params.endLineNumber);
}
}
return fileSnippets;
}
std::vector<CodeSnippetParams> CodeController::getSnippetsForFile(std::shared_ptr<TokenLocationFile> activeTokenLocations) const
std::vector<CodeSnippetParams> CodeController::getSnippetsForCollection(
std::shared_ptr<TokenLocationCollection> collection, bool addTokenLocations
) const
{
return getSnippetsForFile(activeTokenLocations, m_storageAccess->getTokenLocationsForFile(activeTokenLocations->getFilePath().str()));
std::vector<CodeSnippetParams> snippets;
collection->forEachTokenLocationFile(
[&](std::shared_ptr<TokenLocationFile> file) -> void
{
if (snippets.size() < 10)
{
std::vector<CodeSnippetParams> fileSnippets = getSnippetsForFile(file, addTokenLocations);
snippets.insert(snippets.end(), fileSnippets.begin(), fileSnippets.end());
}
else
{
CodeSnippetParams params;
params.locationFile = file;
params.refCount = file->getUnscopedStartTokenLocationCount();
params.isCollapsed = true;
snippets.push_back(params);
}
}
);
addModificationTimes(snippets);
return snippets;
}
std::vector<CodeSnippetParams> CodeController::getSnippetsForFile(std::shared_ptr<TokenLocationFile> activeTokenLocations, const std::shared_ptr<TokenLocationFile> fileLocations) const
std::vector<CodeSnippetParams> CodeController::getSnippetsForFile(
std::shared_ptr<TokenLocationFile> activeTokenLocations, bool addTokenLocations
) const
{
std::shared_ptr<TextAccess> textAccess = m_storageAccess->getFileContent(activeTokenLocations->getFilePath());
std::shared_ptr<TokenLocationFile> scopeLocations = std::make_shared<TokenLocationFile>(activeTokenLocations->getFilePath().str());
std::shared_ptr<TokenLocationFile> scopeLocations
= std::make_shared<TokenLocationFile>(activeTokenLocations->getFilePath().str());
std::shared_ptr<TokenLocationFile> fileLocations =
m_storageAccess->getTokenLocationsForFile(activeTokenLocations->getFilePath().str());
fileLocations->forEachStartTokenLocation(
[&](TokenLocation* startLoc) -> void
{
@@ -423,19 +488,21 @@ std::vector<CodeSnippetParams> CodeController::getSnippetsForFile(std::shared_pt
ranges = fileScopedMerger.merge(atomicRanges);
}
const int snippetExpandRange = ApplicationSettings::getInstance()->getCodeSnippetExpandRange();
std::vector<CodeSnippetParams> snippets;
std::shared_ptr<TokenLocationFile> file =
m_storageAccess->getTokenLocationsForFile(activeTokenLocations->getFilePath().str());
for (const SnippetMerger::Range& range: ranges)
{
CodeSnippetParams params;
params.locationFile = activeTokenLocations;
params.refCount = activeTokenLocations->getUnscopedStartTokenLocationCount();
params.startLineNumber = std::max<int>(1, range.start.row - (range.start.strong ? 0 : snippetExpandRange));
params.endLineNumber = std::min<int>(textAccess->getLineCount(), range.end.row + (range.end.strong ? 0 : snippetExpandRange));
params.endLineNumber =
std::min<int>(textAccess->getLineCount(), range.end.row + (range.end.strong ? 0 : snippetExpandRange));
std::shared_ptr<TokenLocationFile> tempFile =
m_storageAccess->getTokenLocationsForLinesInFile(activeTokenLocations->getFilePath().str(), params.startLineNumber, params.endLineNumber);
std::shared_ptr<TokenLocationFile> tempFile = file->getFilteredByLines(params.startLineNumber, params.endLineNumber);
TokenLocationLine* firstUsedLine = nullptr;
for (size_t i = params.startLineNumber; i <= params.endLineNumber && firstUsedLine == nullptr; i++)
{
@@ -461,7 +528,6 @@ std::vector<CodeSnippetParams> CodeController::getSnippetsForFile(std::shared_pt
params.title = activeTokenLocations->getFilePath().str();
}
TokenLocationLine* lastUsedLine = nullptr;
for (size_t i = params.endLineNumber; i >= params.startLineNumber && lastUsedLine == nullptr; i--)
{
@@ -491,11 +557,33 @@ std::vector<CodeSnippetParams> CodeController::getSnippetsForFile(std::shared_pt
snippets.push_back(params);
}
if (addTokenLocations && !activeTokenLocations->isWholeCopy)
{
for (CodeSnippetParams& params : snippets)
{
std::shared_ptr<TokenLocationFile> lines =
fileLocations->getFilteredByLines(params.startLineNumber, params.endLineNumber);
params.locationFile->forEachTokenLocation(
[&lines](TokenLocation* location)
{
lines->addTokenLocationAsPlainCopy(location);
}
);
params.locationFile = lines;
}
}
return snippets;
}
std::shared_ptr<SnippetMerger> CodeController::buildMergerHierarchy(
TokenLocation* location, std::shared_ptr<TokenLocationFile> scopeLocations, SnippetMerger& fileScopedMerger, std::map<int, std::shared_ptr<SnippetMerger>>& mergers) const
TokenLocation* location,
std::shared_ptr<TokenLocationFile> scopeLocations,
SnippetMerger& fileScopedMerger,
std::map<int, std::shared_ptr<SnippetMerger>>& mergers
) const
{
const TokenLocation* currentLocation = location;
std::shared_ptr<SnippetMerger> currentMerger = std::make_shared<SnippetMerger>(
@@ -530,7 +618,10 @@ std::shared_ptr<SnippetMerger> CodeController::buildMergerHierarchy(
return currentMerger;
}
std::shared_ptr<TokenLocationFile> CodeController::getTokenLocationOfParentScope(const TokenLocation* location, std::shared_ptr<TokenLocationFile> scopeLocations) const
std::shared_ptr<TokenLocationFile> CodeController::getTokenLocationOfParentScope(
const TokenLocation* location,
std::shared_ptr<TokenLocationFile> scopeLocations
) const
{
const TokenLocation* parent = location;
const FilePath filePath = location->getFilePath();
@@ -545,7 +636,8 @@ std::shared_ptr<TokenLocationFile> CodeController::getTokenLocationOfParentScope
{
parent = tokenLocation;
}
// since tokenLocation is a start location the > location indicates the scope that is closer to the child.
// since tokenLocation is a start location the > location indicates the scope
// that is closer to the child.
else if ((*tokenLocation) > *parent)
{
parent = tokenLocation;
@@ -563,38 +655,6 @@ std::shared_ptr<TokenLocationFile> CodeController::getTokenLocationOfParentScope
return file;
}
std::vector<CodeSnippetParams> CodeController::getSnippetsForErrorLocations(
std::vector<ErrorInfo>* errors) const
{
TokenLocationCollection errorCollection = m_storageAccess->getErrorTokenLocations(errors);
std::vector<CodeSnippetParams> snippets;
errorCollection.forEachTokenLocationFile(
[&](std::shared_ptr<TokenLocationFile> file) -> void
{
if (snippets.size() < 10)
{
std::vector<CodeSnippetParams> fileSnippets = getSnippetsForFile(file);
snippets.insert(snippets.end(), fileSnippets.begin(), fileSnippets.end());
}
else
{
CodeSnippetParams params;
params.locationFile = file;
params.refCount = file->getUnscopedStartTokenLocationCount();
params.isCollapsed = true;
snippets.push_back(params);
}
}
);
addModificationTimes(snippets);
return snippets;
}
std::vector<std::string> CodeController::getProjectDescription(TokenLocationFile* locationFile) const
{
std::string description = ProjectSettings::getInstance()->getDescription();
+16 -8
View File
@@ -13,6 +13,7 @@
#include "utility/messaging/type/MessageFocusIn.h"
#include "utility/messaging/type/MessageFocusOut.h"
#include "utility/messaging/type/MessageScrollCode.h"
#include "utility/messaging/type/MessageSearchFullText.h"
#include "utility/messaging/type/MessageShowErrors.h"
#include "utility/messaging/type/MessageShowScope.h"
#include "utility/types.h"
@@ -22,6 +23,7 @@
#include "component/view/CodeView.h"
class StorageAccess;
class TokenLocation;
class TokenLocationCollection;
class TokenLocationFile;
@@ -35,6 +37,7 @@ class CodeController
, public MessageListener<MessageFocusIn>
, public MessageListener<MessageFocusOut>
, public MessageListener<MessageScrollCode>
, public MessageListener<MessageSearchFullText>
, public MessageListener<MessageShowErrors>
, public MessageListener<MessageShowScope>
{
@@ -53,30 +56,35 @@ private:
virtual void handleMessage(MessageFocusIn* message);
virtual void handleMessage(MessageFocusOut* message);
virtual void handleMessage(MessageScrollCode* message);
virtual void handleMessage(MessageSearchFullText* message);
virtual void handleMessage(MessageShowErrors* message);
virtual void handleMessage(MessageShowScope* message);
CodeView* getView();
virtual void clear();
void showContents(MessageBase* message);
std::vector<CodeSnippetParams> getSnippetsForActiveTokenLocations(
const TokenLocationCollection* collection, Id declarationId) const;
std::vector<CodeSnippetParams> getSnippetsForActiveTokenLocationsInFile(
std::shared_ptr<TokenLocationFile>) const;
std::vector<CodeSnippetParams> getSnippetsForCollection(
std::shared_ptr<TokenLocationCollection> collection, bool addTokenLocations = false) const;
std::vector<CodeSnippetParams> getSnippetsForFile(
std::shared_ptr<TokenLocationFile> activeTokenLocations, std::shared_ptr<TokenLocationFile> fileLocations) const;
std::vector<CodeSnippetParams> getSnippetsForFile(std::shared_ptr<TokenLocationFile> file) const;
std::shared_ptr<SnippetMerger> buildMergerHierarchy(
TokenLocation* location, std::shared_ptr<TokenLocationFile> context, SnippetMerger& fileScopedMerger, std::map<int, std::shared_ptr<SnippetMerger>>& mergers) const;
std::shared_ptr<TokenLocationFile> getTokenLocationOfParentScope(const TokenLocation* location, std::shared_ptr<TokenLocationFile> context) const;
std::shared_ptr<TokenLocationFile> file, bool addTokenLocations = false) const;
std::vector<CodeSnippetParams> getSnippetsForErrorLocations(std::vector<ErrorInfo>* errors) const;
std::shared_ptr<SnippetMerger> buildMergerHierarchy(
TokenLocation* location, std::shared_ptr<TokenLocationFile> context, SnippetMerger& fileScopedMerger,
std::map<int, std::shared_ptr<SnippetMerger>>& mergers) const;
std::shared_ptr<TokenLocationFile> getTokenLocationOfParentScope(
const TokenLocation* location, std::shared_ptr<TokenLocationFile> context) const;
std::vector<std::string> getProjectDescription(TokenLocationFile* locationFile) const;
void addModificationTimes(std::vector<CodeSnippetParams>& snippets) const;
StorageAccess* m_storageAccess;
mutable std::shared_ptr<TokenLocationCollection> m_collection;
};
#endif // CODE_CONTROLLER_H
+7 -3
View File
@@ -11,13 +11,14 @@ public:
void setComponent(Component* component);
virtual void clear() = 0;
protected:
template <typename ViewType>
ViewType* getView() const;
ViewType* getView() const;
private:
Component* m_component;
};
@@ -25,8 +26,11 @@ template <typename ViewType>
ViewType* Controller::getView() const
{
if (m_component)
{
return m_component->getView<ViewType>();
return NULL;
}
return nullptr;
}
#endif // CONTROLLER_H
@@ -3,13 +3,15 @@
#include "data/access/StorageAccess.h"
#include "settings/ApplicationSettings.h"
#include "utility/messaging/type/MessageActivateAll.h"
#include "utility/messaging/type/MessageActivateTokens.h"
#include "utility/messaging/type/MessageChangeFileView.h"
#include "utility/messaging/type/MessageRefresh.h"
#include "utility/messaging/type/MessageShowErrors.h"
#include "utility/messaging/type/MessageStatus.h"
FeatureController::FeatureController(StorageAccess* storageAccess)
: m_storageAccess(storageAccess)
, m_activationTranslator(storageAccess)
{
}
@@ -17,49 +19,136 @@ FeatureController::~FeatureController()
{
}
void FeatureController::clear()
{
}
void FeatureController::handleMessage(MessageActivateEdge* message)
{
std::shared_ptr<MessageActivateTokens> m = m_activationTranslator.translateMessage(message);
if (m)
if (message->isAggregation())
{
m->dispatchImmediately();
// TODO: validate aggregationIds
MessageActivateTokens m(message, message->aggregationIds);
m.setKeepContent(false);
m.isAggregation = true;
m.dispatchImmediately();
}
else
{
Id edgeId = message->tokenId;
if (message->isReplayed())
{
edgeId = m_storageAccess->getIdForEdge(message->type, message->fromNameHierarchy, message->toNameHierarchy);
}
std::vector<Id> ids;
if (edgeId)
{
ids.push_back(edgeId);
}
MessageActivateTokens m(message, ids);
m.isEdge = true;
m.unknownNames = std::vector<std::string>(1, message->getFullName());
m.dispatchImmediately();
}
}
void FeatureController::handleMessage(MessageActivateFile* message)
{
std::shared_ptr<MessageActivateTokens> m = m_activationTranslator.translateMessage(message);
if (m)
Id fileId = m_storageAccess->getTokenIdForFileNode(message->filePath);
if (fileId)
{
m->dispatchImmediately();
MessageActivateTokens(message, std::vector<Id>(1, fileId)).dispatchImmediately();
}
else
{
MessageChangeFileView msg(
message->filePath,
MessageChangeFileView::FILE_MAXIMIZED,
true,
true
);
msg.setIsReplayed(message->isReplayed());
msg.setKeepContent(message->keepContent());
msg.dispatchImmediately();
}
}
void FeatureController::handleMessage(MessageActivateNodes* message)
{
std::shared_ptr<MessageActivateTokens> m = m_activationTranslator.translateMessage(message);
if (m)
std::vector<Id> nodeIds;
if (!message->isReplayed())
{
m->dispatchImmediately();
for (const MessageActivateNodes::ActiveNode& node : message->nodes)
{
nodeIds.push_back(node.nodeId);
}
}
else
{
for (const MessageActivateNodes::ActiveNode& node : message->nodes)
{
Id nodeId = m_storageAccess->getIdForNodeWithNameHierarchy(node.nameHierarchy);
if (nodeId > 0)
{
nodeIds.push_back(nodeId);
}
}
}
MessageActivateTokens m(message, nodeIds);
for (const MessageActivateNodes::ActiveNode& node : message->nodes)
{
m.unknownNames.push_back(node.nameHierarchy.getQualifiedName());
}
m.dispatchImmediately();
}
void FeatureController::handleMessage(MessageSearch* message)
{
std::shared_ptr<MessageActivateTokens> m = m_activationTranslator.translateMessage(message);
if (m)
const std::vector<SearchMatch>& matches = message->getMatches();
for (const SearchMatch& match : matches)
{
m->dispatchImmediately();
if (match.searchType == SearchMatch::SEARCH_COMMAND &&
match.getFullName() == SearchMatch::getCommandName(SearchMatch::COMMAND_ALL))
{
MessageActivateAll msg;
msg.setIsReplayed(message->isReplayed());
msg.dispatchImmediately();
return;
}
else if (match.searchType == SearchMatch::SEARCH_COMMAND &&
match.getFullName() == SearchMatch::getCommandName(SearchMatch::COMMAND_ERROR))
{
MessageShowErrors msg(ErrorCountInfo(-1, 0));
msg.setIsReplayed(message->isReplayed());
msg.dispatchImmediately();
return;
}
}
std::vector<Id> tokenIds = m_storageAccess->getTokenIdsForMatches(matches);
MessageActivateTokens m(message, tokenIds);
for (const SearchMatch& match : matches)
{
m.unknownNames.push_back(match.text);
}
if (!message->isReplayed())
{
m.isFromSearch = true;
}
m.dispatchImmediately();
}
void FeatureController::handleMessage(MessageActivateTokenIds* message)
{
std::shared_ptr<MessageActivateTokens> m = m_activationTranslator.translateMessage(message);
if (m)
{
m->dispatchImmediately();
}
MessageActivateTokens(message, message->tokenIds).dispatchImmediately();
}
void FeatureController::handleMessage(MessageActivateTokenLocations* message)
@@ -119,8 +208,7 @@ void FeatureController::handleMessage(MessageZoom* message)
return;
}
// settings->setFontSize(std::max(settings->getFontSize() + (message->zoomIn ? 1 : -1), 5));
settings->setFontSize((settings->getFontSize() + (message->zoomIn ? 1 : -1)));
settings->setFontSize(fontSize + (message->zoomIn ? 1 : -1));
settings->save();
fontSize = settings->getFontSize();
@@ -3,7 +3,6 @@
#include <memory>
#include "component/controller/helper/ActivationTranslator.h"
#include "component/controller/Controller.h"
#include "utility/messaging/MessageListener.h"
@@ -35,6 +34,8 @@ public:
FeatureController(StorageAccess* storageAccess);
~FeatureController();
virtual void clear();
private:
virtual void handleMessage(MessageActivateEdge* message);
virtual void handleMessage(MessageActivateFile* message);
@@ -47,7 +48,6 @@ private:
virtual void handleMessage(MessageZoom* message);
StorageAccess* m_storageAccess;
ActivationTranslator m_activationTranslator;
};
#endif // FEATURE_CONTROLLER_H
File diff suppressed because it is too large Load Diff
+26 -23
View File
@@ -13,15 +13,16 @@
#include "utility/messaging/type/MessageGraphNodeBundleSplit.h"
#include "utility/messaging/type/MessageGraphNodeExpand.h"
#include "utility/messaging/type/MessageGraphNodeMove.h"
#include "utility/messaging/type/MessageSearchFullText.h"
#include "utility/messaging/type/MessageShowErrors.h"
#include "component/controller/Controller.h"
#include "component/controller/helper/DummyEdge.h"
#include "component/controller/helper/DummyNode.h"
#include "component/view/GraphView.h"
#include "data/graph/token_component/TokenComponentAccess.h"
#include "data/graph/token_component/TokenComponentAggregation.h"
struct DummyNode;
struct DummyEdge;
class Graph;
class Node;
class StorageAccess;
@@ -36,6 +37,7 @@ class GraphController
, public MessageListener<MessageGraphNodeBundleSplit>
, public MessageListener<MessageGraphNodeExpand>
, public MessageListener<MessageGraphNodeMove>
, public MessageListener<MessageSearchFullText>
, public MessageListener<MessageShowErrors>
{
public:
@@ -51,49 +53,50 @@ private:
virtual void handleMessage(MessageGraphNodeBundleSplit* message);
virtual void handleMessage(MessageGraphNodeExpand* message);
virtual void handleMessage(MessageGraphNodeMove* message);
virtual void handleMessage(MessageSearchFullText* message);
virtual void handleMessage(MessageShowErrors* message);
GraphView* getView() const;
void clear();
virtual void clear();
void createDummyGraphForTokenIds(const std::vector<Id>& tokenIds, const std::shared_ptr<Graph> graph);
DummyNode createDummyNodeTopDown(Node* node);
std::shared_ptr<DummyNode> createDummyNodeTopDown(Node* node, Id parentId);
std::vector<Id> getExpandedNodeIds() const;
void setExpandedNodeIds(const std::vector<Id>& nodeIds);
void autoExpandActiveNode(const std::vector<Id>& activeTokenIds);
bool setActive(const std::vector<Id>& activeTokenIds);
void setVisibility(bool noActive);
void setActiveAndVisibility(const std::vector<Id>& activeTokenIds);
void setNodeActiveRecursive(DummyNode& node, const std::vector<Id>& activeTokenIds, bool* noActive) const;
void removeImplicitChildrenRecursive(DummyNode& node);
bool setNodeVisibilityRecursiveBottomUp(DummyNode& node, bool noActive) const;
void setNodeVisibilityRecursiveTopDown(DummyNode& node, bool parentExpanded) const;
void setNodeActiveRecursive(DummyNode* node, const std::vector<Id>& activeTokenIds, bool* noActive) const;
void removeImplicitChildrenRecursive(DummyNode* node);
bool setNodeVisibilityRecursiveBottomUp(DummyNode* node, bool noActive) const;
void setNodeVisibilityRecursiveTopDown(DummyNode* node, bool parentExpanded) const;
void bundleNodes();
void bundleNodesAndEdgesMatching(std::function<bool(const DummyNode&)> matcher, size_t count, const std::string& name);
void bundleNodesMatching(std::list<DummyNode*>& nodes, std::function<bool(const DummyNode&)> matcher, const std::string& name);
bool isTypeNodeWithSingleAggregation(const DummyNode& node, TokenComponentAggregation::Direction direction) const;
bool isTypeNodeWithSingleInheritance(const DummyNode& node, bool isBase) const;
bool isUndefinedNode(const DummyNode& node, bool isUsed) const;
bool isTypeUserNode(const DummyNode& node) const;
void bundleNodesAndEdgesMatching(std::function<bool(const DummyNode::BundleInfo&)> matcher, size_t count, const std::string& name);
void bundleNodesMatching(std::list<std::shared_ptr<DummyNode>>& nodes, std::function<bool(const DummyNode*)> matcher, const std::string& name);
void bundleNodesByType();
void layoutNesting();
void layoutNestingRecursive(DummyNode& node) const;
void addExpandToggleNode(DummyNode& node) const;
void layoutToGrid(DummyNode& node) const;
void layoutNestingRecursive(DummyNode* node) const;
void addExpandToggleNode(DummyNode* node) const;
void layoutToGrid(DummyNode* node) const;
void layoutGraph();
void layoutGraph(bool sort = false);
DummyNode* findDummyNodeRecursive(std::vector<DummyNode>& nodes, Id tokenId) const;
DummyNode* findTopLevelDummyNodeRecursive(std::vector<DummyNode>& nodes, Id tokenId) const;
DummyNode* findDummyNodeAccessRecursive(std::vector<DummyNode>& nodes, Id parentId, TokenComponentAccess::AccessType type) const;
DummyNode* getDummyGraphNodeById(Id tokenId) const;
void buildGraph(MessageBase* message);
StorageAccess* m_storageAccess;
std::vector<DummyNode> m_dummyNodes;
std::vector<DummyEdge> m_dummyEdges;
std::vector<std::shared_ptr<DummyNode>> m_dummyNodes;
std::vector<std::shared_ptr<DummyEdge>> m_dummyEdges;
std::map<Id, std::shared_ptr<DummyNode>> m_dummyGraphNodes;
std::vector<Id> m_activeNodeIds;
std::vector<Id> m_activeEdgeIds;
@@ -24,6 +24,10 @@ IDECommunicationController::~IDECommunicationController()
{
}
void IDECommunicationController::clear()
{
}
void IDECommunicationController::handleIncomingMessage(const std::string& message)
{
if (m_enabled == false)

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