Compare commits

..
17 Commits
Author SHA1 Message Date
Eberhard Graether 9f684ad9f5 data: saving errors to Storage
* saving errors in separate sqlite table
* use MessageShowErrors to show the errors in the UI
* show error count permanently in the right side of the status bar with click to show
* fixed clicking of error locations
* fixed expanding of files with errors
2015-11-04 12:00:28 +01:00
malte_langkabel 78259c7123 src: refactoring TimePoint
* removed typedef utility::TimePoint and replaced all its usages by using the class TimePoint instead.
2015-11-03 16:48:55 +01:00
Manuel Dobusch 7d03166282 logic: VS plugin fixes
Fixed some vs plugin issues and added plugin project to repo
2015-11-03 15:26:47 +01:00
malte_langkabel 006e73ef4c ui: horizontal scroll fix
* prevented the mouse wheel from scrolling a horizontal scrollbar when the mouse happens to enter the scrollbar's area.
2015-11-03 12:40:03 +01:00
malte_langkabel 11147e982f test: template scope fixes
* changed expected scope locations of template classes in tests to include template parameters.
2015-11-03 11:11:20 +01:00
malte_langkabel 9c4dc7b71f src: Sublime Text 3 compatibility. 2015-11-03 10:53:14 +01:00
malte_langkabel a524a7a71c ui: file not up to date display
* the codeview now displays a hatched background for a filename when the file's content has changed or the file does not exist anymore.
* added TimePoint class to encapsulate boost.
2015-11-03 10:29:29 +01:00
Eberhard Graether 42ab36fbad data: Saving application version to storage and refresh when version changes
The version string of the application is stored on every parse. The utility class Version is used to parse the version
string and compare application and stored string. The third number in the version string is now the storage refresh
number, the project will be refreshed when it changes. (0.2.1 -> 0.2.2)
2015-11-02 10:14:03 +01:00
malte_langkabel 1ad2dbe86e ui: status messages for IDE communication
* added status messages that are displayed when sending commands to the IDE.
* added status messages that are displayed when receiving commands from the IDE.
2015-10-30 11:34:28 +01:00
malte_langkabel e8c8a4ca50 logic: sublime plugin fix
* implemted checking if file really exists before letting sublime jump there.
2015-10-30 10:54:56 +01:00
Andreas Stallinger 58daa633c9 data: check for nullptr in searchindex 2015-10-29 13:33:12 +01:00
malte_langkabel a7ad0a60f3 ui: coati plugin for sublime
* Added first version of the CoatiCommunicator for Sublime.
* This version has only been tested with Sublime Text 2.
2015-10-28 15:10:47 +01:00
Eberhard Graether c7a2533dc4 data: increased autocomplete performance by caching and limiting results to 100 2015-10-27 14:22:45 +01:00
Andreas Stallinger cbb6fcd8e2 test: fixed settingstestsuite
changed settings.xml to new/refactored xml tags
2015-10-27 10:13:29 +01:00
malte_langkabel c704b4f65c ui: IDE communication integration
* handled communication from VS to Coati and vice versa.
* one bug still remains: Coati regards a tab as a single character while VS regards it as multiple characters. This causes offsets in communicated positions.
2015-10-23 13:25:15 +02:00
malte_langkabel c06beb21cb data: template class/function scope locations
* Added source locations of template parameters to the scope of template classes and functions to improve context availability in the code view.
2015-10-21 19:56:47 +02:00
Eberhard Graether 1382356a39 build: added release instructions to README 2015-10-21 10:34:11 +02:00
104 changed files with 2760 additions and 418 deletions
+2
View File
@@ -22,3 +22,5 @@
.DS_Store
.idea
bin
obj
+18
View File
@@ -28,6 +28,24 @@ For Win32:
Run setup script:
$ ./script/setup.sh
#### Release
##### App
* create release build
* make sure it uses the Coati icon
* obfuscate the executable using upx
##### 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
* add app
* add web/coati_manual.pdf to package
##### Updating Clang on UNIX
$ cd .../clang_llvm
Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

+7 -7
View File
@@ -6,13 +6,13 @@
<String>Hello World!</String>
<source>
<SourcePaths>
<SourcePath>data</SourcePath>
</SourcePaths>
<HeaderSearchPaths>
<HeaderSearchPath>data/</HeaderSearchPath>
<HeaderSearchPath>src/</HeaderSearchPath>
</HeaderSearchPaths>
<source_paths>
<source_path>data</source_path>
</source_paths>
<header_search_paths>
<header_search_path>data/</header_search_path>
<header_search_path>src/</header_search_path>
</header_search_paths>
</source>
</config>
+308 -153
View File
@@ -1,310 +1,465 @@
ConfigManager.cpp WARNING: value path/to/nowhere is not present in config.
<<<<<<< HEAD
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
=======
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/HeaderSearchPaths/HeaderSearchPath is not present in config.
>>>>>>> updated protocol helper test suite
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Token.cpp ERROR: Location Id was not referenced by this Token.
Edge.cpp ERROR: Edge type_of can't go from Node undefined to Node undefined
Node.cpp WARNING: Cannot change NodeType after it was already set from namespace to class
@@ -0,0 +1,83 @@
import sublime
import sublime_plugin
import threading
import socket
import os.path
try: # use this for Sublime Text 2
import SocketServer
except ImportError: # use this for Sublime Text 3
import socketserver as SocketServer
MESSAGE_SPLIT_STRING = ">>"
# Handling Coati to Sublime communication
def setCursorPosition(filePath, row, col):
if (os.path.exists(filePath)):
sublime.active_window().open_file(filePath + ":" + str(row) + ":" + str(col), sublime.ENCODED_POSITION)
else:
sublime.error_message("Coati is trying to jump to a file that does not exist: " + filePath)
class ConnectionHandler(SocketServer.BaseRequestHandler): # This class is instantiated once per connection to the server
def handle(self):
data = self.request.recv(1024).strip()
text = data.decode('utf-8')
eom_index = text.find("<EOM>")
if (not eom_index == 0):
message_string = text[0:eom_index]
message_fields = message_string.split(MESSAGE_SPLIT_STRING)
if (message_fields[0] == "moveCursor"):
sublime.set_timeout(lambda: setCursorPosition(message_fields[1], int(message_fields[2]), int(message_fields[3]) + 1), 0)
class ServerThreadHandler(threading.Thread):
def __init__ (self, ip, port):
self.ip = ip
self.port = port
threading.Thread.__init__(self)
def run(self):
server = SocketServer.TCPServer((self.ip, self.port), ConnectionHandler)
server.serve_forever()
class ServerStartupListener(sublime_plugin.EventListener):
def __init__(self):
self.running = False
def on_activated(self, view):
if (not self.running):
self.running = True
settings = sublime.load_settings('CoatiCommunicator.sublime-settings')
host_ip = settings.get('host_ip')
coati_to_plugin_port = settings.get('coati_to_sublime_port')
networkListener = ServerThreadHandler(host_ip, coati_to_plugin_port)
networkListener.start()
# Handling Sublime to Coati communication
class SetActiveTokenCommand(sublime_plugin.TextCommand):
def run(self, edit):
filePath = self.view.file_name();
selectionPos = self.view.sel()[0].begin()
(row, col) = self.view.rowcol(selectionPos)
col += 1 # cols returned by rowcol() are 0-based.
row += 1 # rows returned by rowcol() are 0-based.
message = "setActiveToken" + MESSAGE_SPLIT_STRING + filePath + MESSAGE_SPLIT_STRING + str(row) + MESSAGE_SPLIT_STRING + str(col) + "<EOM>"
settings = sublime.load_settings('CoatiCommunicator.sublime-settings')
host_ip = settings.get('host_ip')
plugin_to_coati_port = settings.get('sublime_to_coati_port')
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host_ip, plugin_to_coati_port))
s.send(message)
s.close()
@@ -0,0 +1,5 @@
{
"host_ip": "localhost",
"coati_to_sublime_port": 6666,
"sublime_to_coati_port": 6667
}
@@ -0,0 +1,4 @@
[
{ "caption": "-", "id": "coati" },
{ "command": "set_active_token", "caption": "Coati - Set active Token" }
]
+5
View File
@@ -0,0 +1,5 @@
How to Install:
Just copy and past this "CoatiCommunicator" folder into your Packages folder of Sublime Text. (You can find
that folder from within Sublime via the menu: Preferences -> Browse Packages...). Restart Sublime before
starting to use the plugin.
@@ -0,0 +1,20 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoatiPlugin", "CoatiPlugin\CoatiPlugin.csproj", "{A585A530-E120-4C74-934E-D57ED12A7DA9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A585A530-E120-4C74-934E-D57ED12A7DA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A585A530-E120-4C74-934E-D57ED12A7DA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A585A530-E120-4C74-934E-D57ED12A7DA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A585A530-E120-4C74-934E-D57ED12A7DA9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
@@ -0,0 +1,181 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A585A530-E120-4C74-934E-D57ED12A7DA9}</ProjectGuid>
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SnowForest.CoatiPlugin</RootNamespace>
<AssemblyName>CoatiPlugin</AssemblyName>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.VisualStudio.OLE.Interop" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.9.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.11.0">
<EmbedInteropTypes>true</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.VisualStudio.TextManager.Interop" />
<Reference Include="Microsoft.VisualStudio.Shell.11.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.10.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.11.0" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<COMReference Include="EnvDTE">
<Guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</Guid>
<VersionMajor>8</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="EnvDTE100">
<Guid>{26AD1324-4B7C-44BC-84F8-B86AED45729F}</Guid>
<VersionMajor>10</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="EnvDTE80">
<Guid>{1A31287A-4D7D-413E-8E32-3B374931BD89}</Guid>
<VersionMajor>8</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="EnvDTE90">
<Guid>{2CE2370E-D744-4936-A090-3FFFE667B0E1}</Guid>
<VersionMajor>9</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.VisualStudio.CommandBars">
<Guid>{1CBA492E-7263-47BB-87FE-639000619B15}</Guid>
<VersionMajor>8</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="stdole">
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup>
<Compile Include="FileUtility.cs" />
<Compile Include="Guids.cs" />
<Compile Include="NetworkProtocolUtility.cs" />
<Compile Include="NetworkUtility.cs" />
<Compile Include="Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="CoatiPluginPackage.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="PkgCmdID.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="VSPackage.resx">
<MergeWithCTO>true</MergeWithCTO>
<ManifestResourceName>VSPackage</ManifestResourceName>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="source.extension.vsixmanifest">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<None Include="Key.snk" />
</ItemGroup>
<ItemGroup>
<VSCTCompile Include="CoatiPlugin.vsct">
<ResourceName>Menus.ctmenu</ResourceName>
<SubType>Designer</SubType>
</VSCTCompile>
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\favicon_16x16.png" />
</ItemGroup>
<ItemGroup>
<Content Include="coati.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
</ItemGroup>
<PropertyGroup>
<UseCodebase>true</UseCodebase>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartAction>Program</StartAction>
<StartProgram>C:\Program Files %28x86%29\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe</StartProgram>
<StartArguments>/rootsuffix Exp</StartArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<StartAction>Program</StartAction>
<StartProgram>C:\Program Files %28x86%29\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe</StartProgram>
<StartArguments>/rootsuffix Exp</StartArguments>
</PropertyGroup>
</Project>
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This is the file that defines the actual layout and type of the commands.
It is divided in different sections (e.g. command definition, command
placement, ...), with each defining a specific set of properties.
See the comment before each section for more details about how to
use it. -->
<!-- The VSCT compiler (the tool that translates this file into the binary
format that VisualStudio will consume) has the ability to run a preprocessor
on the vsct file; this preprocessor is (usually) the C++ preprocessor, so
it is possible to define includes and macros with the same syntax used
in C++ files. Using this ability of the compiler here, we include some files
defining some of the constants that we will use inside the file. -->
<!--This is the file that defines the IDs for all the commands exposed by VisualStudio. -->
<Extern href="stdidcmd.h"/>
<!--This header contains the command ids for the menus provided by the shell. -->
<Extern href="vsshlids.h"/>
<!--The Commands section is where we the commands, menus and menu groups are defined.
This section uses a Guid to identify the package that provides the command defined inside it. -->
<Commands package="guidCoatiPluginPkg">
<Bitmaps>
<Bitmap guid="icon" href="Resources\favicon_16x16.png" usedList="icon0"/>
</Bitmaps>
<Groups>
<Group guid="guidCoatiPluginCmdSet" id="MyMenuGroup" priority="0x0600">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_CODEWIN"/>
</Group>
</Groups>
<!--Buttons section. -->
<!--This section defines the elements the user can interact with, like a menu command or a button
or combo box in a toolbar. -->
<Buttons>
<!--To define a menu group you have to specify its ID, the parent menu and its display priority.
The command is visible and enabled by default. If you need to change the visibility, status, etc, you can use
the CommandFlag node.
You can add more than one CommandFlag node e.g.:
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
If you do not want an image next to your command, remove the Icon node /> -->
<Button guid="guidCoatiPluginCmdSet" id="cmdidCoatiSetActiveToken" priority="0x0100" type="Button">
<Parent guid="guidCoatiPluginCmdSet" id="MyMenuGroup" />
<Icon guid="icon" id="icon0" />
<Strings>
<ButtonText>Set active Token</ButtonText>
</Strings>
</Button>
</Buttons>
</Commands>
<Symbols>
<!-- This is the package guid. -->
<GuidSymbol name="guidCoatiPluginPkg" value="{acf15780-03b5-440e-a41e-db79b7043fc2}" />
<!-- This is the guid used to group the menu commands together -->
<GuidSymbol name="guidCoatiPluginCmdSet" value="{0efb005b-715c-4a62-8a9b-1e5a870e6c34}">
<IDSymbol name="MyMenuGroup" value="0x1020" />
<IDSymbol name="cmdidCoatiPing" value="0x0100" />
<IDSymbol name="cmdidCoatiFile" value="0x0101"/>
<IDSymbol name="cmdidCoatiGetActiveFileName" value="0x0102"/>
<IDSymbol name="cmdidCoatiGetActiveLineNumber" value="0x0103"/>
<IDSymbol name="cmdidCoatiSetActiveToken" value="0x0104"/>
</GuidSymbol>
<GuidSymbol name="guidImages" value="{e447cfde-511d-4f75-80c1-a40b8a03152a}" >
<IDSymbol name="bmpPic1" value="1" />
<IDSymbol name="bmpPic2" value="2" />
<IDSymbol name="bmpPicSearch" value="3" />
<IDSymbol name="bmpPicX" value="4" />
<IDSymbol name="bmpPicArrows" value="5" />
<IDSymbol name="bmpPicStrikethrough" value="6" />
</GuidSymbol>
<GuidSymbol name="icon" value="{403BFDD2-B84C-4BCE-A1D1-B16F9F2B8230}" >
<IDSymbol name="icon0" value="1" />
</GuidSymbol>
</Symbols>
</CommandTable>
@@ -0,0 +1,123 @@
using System;
using System.Diagnostics;
using System.Globalization;
using System.Runtime.InteropServices;
using System.ComponentModel.Design;
using Microsoft.Win32;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.OLE.Interop;
using Microsoft.VisualStudio.Shell;
using System.Net.Sockets;
using System.Net;
using System.Text;
using System.Threading;
using EnvDTE;
using EnvDTE80;
namespace SnowForest.CoatiPlugin
{
[PackageRegistration(UseManagedResourcesOnly = true)]
[InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)]
[ProvideMenuResource("Menus.ctmenu", 1)]
[Guid(GuidList.guidCoatiPluginPkgString)]
[ProvideAutoLoad(Microsoft.VisualStudio.Shell.Interop.UIContextGuids80.NoSolution)]
public sealed class CoatiPluginPackage : Package
{
System.Threading.Thread _serverThread = null;
public CoatiPluginPackage()
{}
protected override void Initialize()
{
base.Initialize();
AsynchronousSocketListener server = new AsynchronousSocketListener();
AsynchronousSocketListener._onReadCallback = new AsynchronousSocketListener.OnReadCallback(OnNetworkReadCallback);
AsynchronousSocketListener._onErrorCallback = new AsynchronousSocketListener.OnReadCallback(OnNetworkErrorCallback);
_serverThread = new System.Threading.Thread(server.DoWork);
_serverThread.Start();
AsynchronousClient._onErrorCallback = new AsynchronousSocketListener.OnReadCallback(OnNetworkErrorCallback);
FileUtility._errorCallback = new FileUtility.ErrorCallback(OnFileUtilityError);
OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
if ( null != mcs )
{
CommandID setActiveTokenCommandID = new CommandID(GuidList.guidCoatiPluginCmdSet, (int)PkgCmdIDList.cmdidCoatiSetActiveToken);
MenuCommand menuItemSetActiveToken = new MenuCommand(MenuItemCallback, setActiveTokenCommandID);
mcs.AddCommand(menuItemSetActiveToken);
}
}
private void MenuItemCallback(object sender, EventArgs e)
{
MenuCommand menuCommand = sender as MenuCommand;
DTE dte = (DTE)GetService(typeof(DTE));
if (menuCommand != null)
{
if (menuCommand.CommandID.ID == (int)PkgCmdIDList.cmdidCoatiSetActiveToken)
{
string fileName = FileUtility.GetActiveDocumentName(dte);
string filePath = FileUtility.GetActiveDocumentPath(dte);
int lineNumber = FileUtility.GetActiveLineNumber(dte);
int columnNumber = FileUtility.GetActiveColumnNumber(dte);
string message = NetworkProtocolUtility.createOutMessage(filePath + fileName, lineNumber, columnNumber);
AsynchronousClient.Send(message);
}
}
}
private void OnNetworkReadCallback(string message)
{
NetworkProtocolUtility.CursorPosition cursorPosition = NetworkProtocolUtility.parseInMessage(message);
if (cursorPosition.Valid)
{
DTE dte = (DTE)GetService(typeof(DTE));
if (FileUtility.OpenSourceFile(dte, cursorPosition.FilePath))
{
FileUtility.GoToLine(dte, cursorPosition.LineNumber, cursorPosition.ColumnNumber);
}
}
}
private void OnNetworkErrorCallback(string message)
{
DisplayMessage("Coati Network Error", message);
}
private void OnFileUtilityError(string message)
{
DisplayMessage("Coati File Error", message);
}
private void DisplayMessage(string title, string message)
{
IVsUIShell uiShell = (IVsUIShell)GetService(typeof(SVsUIShell));
Guid clsid = Guid.Empty;
int result;
Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(uiShell.ShowMessageBox(
0,
ref clsid,
title,
message,
string.Empty,
0,
OLEMSGBUTTON.OLEMSGBUTTON_OK,
OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST,
OLEMSGICON.OLEMSGICON_INFO,
0, // false
out result));
}
}
}
@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EnvDTE;
namespace SnowForest.CoatiPlugin
{
class FileUtility
{
public delegate void ErrorCallback(string message);
public static ErrorCallback _errorCallback = null;
/**
* Returns true when file was found, false otherwise
*/
public static bool OpenSourceFile(DTE dte, string fileName)
{
try
{
dte.ItemOperations.OpenFile(fileName);
return true;
}
catch (Exception e)
{
if (_errorCallback != null)
{
_errorCallback("Failed to open file at " + fileName);
}
return false;
}
}
public static void GoToLine(DTE dte, int lineNumber, int columnNumber)
{
try
{
((EnvDTE.TextSelection)dte.ActiveDocument.Selection).MoveToLineAndOffset(lineNumber, columnNumber);
}
catch (Exception e)
{
if (_errorCallback != null)
{
_errorCallback("Failed to set cursor to position [" + lineNumber.ToString() + "," + columnNumber.ToString() + "]");
}
}
}
public static string GetActiveDocumentName(DTE dte)
{
return dte.ActiveDocument.Name;
}
public static string GetActiveDocumentPath(DTE dte)
{
return dte.ActiveDocument.Path;
}
public static int GetActiveLineNumber(DTE dte)
{
return ((EnvDTE.TextSelection)dte.ActiveDocument.Selection).ActivePoint.Line;
}
public static int GetActiveColumnNumber(DTE dte)
{
return ((EnvDTE.TextSelection)dte.ActiveDocument.Selection).ActivePoint.LineCharOffset;
}
}
}
@@ -0,0 +1,11 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project. Project-level
// suppressions either have no target or are given a specific target
// and scoped to a namespace, type, member, etc.
//
// To add a suppression to this file, right-click the message in the
// Error List, point to "Suppress Message(s)", and click "In Project
// Suppression File". You do not need to add suppressions to this
// file manually.
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1017:MarkAssembliesWithComVisible")]
@@ -0,0 +1,14 @@
// Guids.cs
// MUST match guids.h
using System;
namespace SnowForest.CoatiPlugin
{
static class GuidList
{
public const string guidCoatiPluginPkgString = "acf15780-03b5-440e-a41e-db79b7043fc2";
public const string guidCoatiPluginCmdSetString = "0efb005b-715c-4a62-8a9b-1e5a870e6c34";
public static readonly Guid guidCoatiPluginCmdSet = new Guid(guidCoatiPluginCmdSetString);
};
}
@@ -0,0 +1,132 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SnowForest.CoatiPlugin
{
class NetworkProtocolUtility
{
private static string s_divider = ">>";
private static string s_setActiveTokenPrefix = "setActiveToken";
private static string s_moveCursorPrefix = "moveCursor";
private static string s_endOfMessageToken = "<EOM>";
public class CursorPosition
{
private string _filePath = "";
private int _lineNumber = 0;
private int _columnNumber = 0;
private bool _valid = false;
public string FilePath
{
get { return _filePath; }
set { _filePath = value; }
}
public int LineNumber
{
get { return _lineNumber; }
set { _lineNumber = value; }
}
public int ColumnNumber
{
get { return _columnNumber; }
set { _columnNumber = value; }
}
public bool Valid
{
get { return _valid; }
set { _valid = value; }
}
}
public static string createOutMessage(string filePath, int lineNumber, int columnNumber)
{
string message = s_setActiveTokenPrefix;
message += s_divider;
message += filePath;
message += s_divider;
message += lineNumber.ToString();
message += s_divider;
message += columnNumber.ToString();
message += s_endOfMessageToken;
return message;
}
/**
* TODO: debug
*/
public static CursorPosition parseInMessage(string message)
{
CursorPosition result = new CursorPosition();
// remove eof token right away
if(message.IndexOf(s_endOfMessageToken) > -1)
{
message = message.Substring(0, message.IndexOf(s_endOfMessageToken));
}
int pos = message.IndexOf(s_moveCursorPrefix);
if (pos < 0)
{
return result;
}
message = message.Substring(pos + s_moveCursorPrefix.Length + s_divider.Length);
pos = message.IndexOf(s_divider);
if (pos < 0)
{
return result;
}
string filePath = message.Substring(0, pos);
result.FilePath = filePath;
message = message.Substring(pos+2);
pos = message.IndexOf(s_divider);
if (pos < 0)
{
return result;
}
string sLineNumber = message.Substring(0, pos);
int lineNumber = 0;
bool valid = int.TryParse(sLineNumber, out lineNumber);
if (valid)
{
result.LineNumber = lineNumber;
}
message = message.Substring(pos+2);
string sColumnNumber = message;
int columnNumber = 0;
valid = int.TryParse(sColumnNumber, out columnNumber);
if (valid)
{
result.ColumnNumber = columnNumber;
result.Valid = true;
}
return result;
}
}
}
@@ -0,0 +1,221 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Net.Sockets;
using System.Net;
namespace SnowForest.CoatiPlugin
{
public class StateObject
{
public Socket _workSocket = null;
public const int _bufferSize = 1024;
public byte[] _buffer = new byte[_bufferSize];
public StringBuilder _stringBuilder = new StringBuilder();
}
public class AsynchronousSocketListener
{
public static ManualResetEvent _allDone = new ManualResetEvent(false);
public delegate void OnReadCallback(string message);
public static OnReadCallback _onReadCallback = null;
public static OnReadCallback _onErrorCallback = null;
private static string _endOfMessageToken = "<EOM>";
public AsynchronousSocketListener()
{
}
public void DoWork()
{
StartListening();
}
public static void StartListening()
{
const int port = 6666;
const string ipAddressString = "127.0.0.1";
byte[] bytes = new Byte[1024];
IPAddress ipAddress = IPAddress.Parse(ipAddressString);
IPEndPoint localEndPoint = new IPEndPoint(ipAddress, port);
Socket listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
try
{
listener.Bind(localEndPoint);
listener.Listen(100);
while (true)
{
_allDone.Reset();
listener.BeginAccept(new AsyncCallback(AcceptCallback), listener);
_allDone.WaitOne();
}
}
catch (Exception e)
{
//if(_onErrorCallback != null)
//{
// _onErrorCallback(e.ToString());
//}
}
}
public static void AcceptCallback(IAsyncResult ar)
{
_allDone.Set();
Socket listener = (Socket)ar.AsyncState;
Socket handler = listener.EndAccept(ar);
StateObject state = new StateObject();
state._workSocket = handler;
handler.BeginReceive(state._buffer, 0, StateObject._bufferSize, 0, new AsyncCallback(ReadCallback), state);
}
public static void ReadCallback(IAsyncResult ar)
{
String content = String.Empty;
StateObject state = (StateObject)ar.AsyncState;
Socket handler = state._workSocket;
int bytesRead = handler.EndReceive(ar);
if (bytesRead > 0)
{
state._stringBuilder.Append(Encoding.ASCII.GetString(state._buffer, 0, bytesRead));
content = state._stringBuilder.ToString();
if (content.IndexOf(_endOfMessageToken) > -1)
{
if (_onReadCallback != null)
{
_onReadCallback(content);
}
}
else
{
handler.BeginReceive(state._buffer, 0, StateObject._bufferSize, 0, new AsyncCallback(ReadCallback), state);
}
}
}
private static void Send(Socket handler, String data)
{
byte[] byteData = Encoding.ASCII.GetBytes(data);
handler.BeginSend(byteData, 0, byteData.Length, 0, new AsyncCallback(SendCallback), handler);
}
private static void SendCallback(IAsyncResult ar)
{
try
{
Socket handler = (Socket)ar.AsyncState;
int bytesSent = handler.EndSend(ar);
Console.WriteLine("Sent {0} bytes to client.", bytesSent);
}
catch (Exception e)
{
if (_onErrorCallback != null)
{
_onErrorCallback(e.ToString());
}
}
}
}
public class AsynchronousClient
{
private const int _port = 6667;
private static ManualResetEvent connectDone = new ManualResetEvent(false);
private static ManualResetEvent sendDone = new ManualResetEvent(false);
private static String response = String.Empty;
public static AsynchronousSocketListener.OnReadCallback _onErrorCallback = null;
public static void Send(string message)
{
IPAddress ipAddress = IPAddress.Parse("127.0.0.1");
IPEndPoint remoteEP = new IPEndPoint(ipAddress, _port);
Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IAsyncResult ar = client.BeginConnect(remoteEP, new AsyncCallback(ConnectCallback), client);
if (!connectDone.WaitOne(1000))
{
client.EndConnect(ar);
}
Send(client, message);
sendDone.WaitOne();
client.Shutdown(SocketShutdown.Both);
client.Close();
}
private static void ConnectCallback(IAsyncResult ar)
{
try
{
Socket client = (Socket)ar.AsyncState;
if (client.Connected == false)
{
return;
}
client.EndConnect(ar);
connectDone.Set();
}
catch (Exception e)
{
if (_onErrorCallback != null)
{
_onErrorCallback(e.ToString());
}
}
}
private static void Send(Socket client, String data)
{
byte[] byteData = Encoding.ASCII.GetBytes(data);
client.BeginSend(byteData, 0, byteData.Length, 0, new AsyncCallback(SendCallback), client);
}
private static void SendCallback(IAsyncResult ar)
{
try
{
Socket client = (Socket)ar.AsyncState;
int bytesSent = client.EndSend(ar);
sendDone.Set();
}
catch (Exception e)
{
if (_onErrorCallback != null)
{
_onErrorCallback(e.ToString());
}
}
}
}
}
@@ -0,0 +1,11 @@
// PkgCmdID.cs
// MUST match PkgCmdID.h
using System;
namespace SnowForest.CoatiPlugin
{
static class PkgCmdIDList
{
public const uint cmdidCoatiSetActiveToken = 0x104;
};
}
@@ -0,0 +1,36 @@
using System;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CoatiPlugin")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Coati Software")]
[assembly: AssemblyProduct("CoatiPlugin")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
[assembly: NeutralResourcesLanguage("en-US")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SnowForest.CoatiPlugin {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SnowForest.CoatiPlugin.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
VS SDK Notes: This resx file contains the resources that will be consumed directly by your package.
For example, if you chose to create a tool window, there is a resource with ID 'CanNotCreateWindow'. This
is used in VsPkg.cs to determine the string to show the user if there is an error when attempting to create
the tool window.
Resources that are accessed directly from your package *by Visual Studio* are stored in the VSPackage.resx
file.
-->
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
VS SDK Notes: This resx file contains the resources that will be consumed from your package by Visual Studio.
For example, Visual Studio will attempt to load resource '400' from this resource stream when it needs to
load your package's icon. Because Visual Studio will always look in the VSPackage.resources stream first for
resources it needs, you should put additional resources that Visual Studio will load directly into this resx
file.
Resources that you would like to access directly from your package in a strong-typed fashion should be stored
in Resources.resx or another resx file.
-->
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="110" xml:space="preserve">
<value>CoatiPlugin</value>
</data>
<data name="112" xml:space="preserve">
<value>Coati plugin test</value>
</data>
</root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="acf15780-03b5-440e-a41e-db79b7043fc2" Version="0.1.2" Language="en-US" Publisher="Coati Software" />
<DisplayName>CoatiPlugin</DisplayName>
<Description xml:space="preserve">This package allows Coati to communicate with Visual Studio and vice versa.</Description>
<Icon>coati.ico</Icon>
</Metadata>
<Installation InstalledByMsi="false">
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="11.0" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="4.5" />
<Dependency Id="Microsoft.VisualStudio.MPF.11.0" DisplayName="Visual Studio MPF 11.0" d:Source="Installed" Version="11.0" />
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
</Assets>
</PackageManifest>
+1 -1
View File
@@ -11,7 +11,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>at.ac.fh-salzburg.masterproject</string>
<string>io.coati</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
+5 -2
View File
@@ -5,6 +5,7 @@
#include "utility/logging/ConsoleLogger.h"
#include "utility/logging/FileLogger.h"
#include "utility/logging/LogManager.h"
#include "utility/Version.h"
#include "Application.h"
#include "includes.h" // defines 'void setup(int argc, char *argv[])'
@@ -31,6 +32,8 @@ void init()
int main(int argc, char *argv[])
{
Version version = Version::fromString(GIT_VERSION_NUMBER);
setup(argc, argv);
QApplication qtApp(argc, argv);
@@ -41,7 +44,7 @@ int main(int argc, char *argv[])
QtSplashScreen* splash = new QtSplashScreen(whitePixmap, Qt::WindowStaysOnTopHint);
splash->setMessage("Loading UI");
splash->setVersion(GIT_VERSION_NUMBER);
splash->setVersion(version.toDisplayString().c_str());
splash->exec(qtApp);
init();
@@ -49,7 +52,7 @@ int main(int argc, char *argv[])
QtViewFactory viewFactory;
QtNetworkFactory networkFactory;
std::shared_ptr<Application> app = Application::create(&viewFactory, &networkFactory);
std::shared_ptr<Application> app = Application::create(version, &viewFactory, &networkFactory);
if (splash)
{
+62 -5
View File
@@ -1,5 +1,6 @@
#include "qt/element/QtCodeArea.h"
#include <qapplication.h>
#include <QFont>
#include <QHBoxLayout>
#include <QPainter>
@@ -11,6 +12,7 @@
#include "utility/messaging/type/MessageShowFile.h"
#include "utility/messaging/type/MessageFocusIn.h"
#include "utility/messaging/type/MessageFocusOut.h"
#include "utility/messaging/type/MessageMoveIDECursor.h"
#include "utility/utility.h"
#include "data/location/TokenLocation.h"
@@ -21,6 +23,31 @@
#include "settings/ApplicationSettings.h"
#include "settings/ColorScheme.h"
MouseWheelOverScrollbarFilter::MouseWheelOverScrollbarFilter(QObject* parent)
: QObject(parent)
{
}
bool MouseWheelOverScrollbarFilter::eventFilter(QObject* obj, QEvent* event)
{
QScrollBar* scrollbar = dynamic_cast<QScrollBar*>(obj);
if (event->type() == QEvent::Wheel && scrollbar)
{
QRect scrollbarArea(scrollbar->pos(), scrollbar->size());
QPoint globalMousePos = dynamic_cast<QWheelEvent*>(event)->globalPos();
QPoint localMousePos = scrollbar->mapFromGlobal(globalMousePos);
// instead of "scrollbar->underMouse()" we need this check implemented here because "underMouse()"
// does not work when the mouse enters the area without being moved
if (scrollbarArea.contains(localMousePos))
{
event->ignore();
return true;
}
}
return QObject::eventFilter(obj, event);
}
QtCodeArea::LineNumberArea::LineNumberArea(QtCodeArea *codeArea)
: QWidget(codeArea)
, m_codeArea(codeArea)
@@ -85,6 +112,9 @@ QtCodeArea::QtCodeArea(
connect(this, SIGNAL(selectionChanged()), this, SLOT(clearSelection()));
this->setMouseTracking(true);
// MouseWheelOverScrollbarFilter is deleted by parent.
horizontalScrollBar()->installEventFilter(new MouseWheelOverScrollbarFilter(this));
}
QtCodeArea::~QtCodeArea()
@@ -249,12 +279,20 @@ void QtCodeArea::mouseReleaseEvent(QMouseEvent* event)
if (event->button() == Qt::LeftButton)
{
m_panningValue = -1;
QTextCursor cursor = this->cursorForPosition(event->pos());
std::vector<Id> locationIds = findLocationIdsForPosition(cursor.position());
if (locationIds.size())
if (Qt::KeyboardModifier::ControlModifier && QApplication::keyboardModifiers())
{
MessageActivateTokenLocations(locationIds).dispatch();
std::pair<int, int> lineColumn = toLineColumn(this->cursorForPosition(event->pos()).position());
MessageMoveIDECursor(m_locationFile->getFilePath().str(), lineColumn.first, lineColumn.second).dispatch();
}
else
{
QTextCursor cursor = this->cursorForPosition(event->pos());
std::vector<Id> locationIds = findLocationIdsForPosition(cursor.position());
if (locationIds.size() && !m_fileWidget->getErrorMessages().size())
{
MessageActivateTokenLocations(locationIds).dispatch();
}
}
}
}
@@ -263,7 +301,7 @@ void QtCodeArea::mouseDoubleClickEvent(QMouseEvent* event)
{
if (event->button() == Qt::LeftButton)
{
MessageShowFile(m_fileWidget->getFilePath().str(), m_startLineNumber, m_startLineNumber + blockCount() - 1).dispatch();
MessageShowFile(m_fileWidget->getFilePath().str(), (m_fileWidget->getErrorMessages().size() > 0)).dispatch();
}
}
@@ -566,6 +604,25 @@ int QtCodeArea::toTextEditPosition(int lineNumber, int columnNumber) const
return position;
}
std::pair<int, int> QtCodeArea::toLineColumn(int textEditPosition) const
{
int lineNumber = m_startLineNumber;
for (int i = 0; i < document()->lineCount(); i++)
{
int nextTextEditPosition = textEditPosition - document()->findBlockByLineNumber(i).length();
if (nextTextEditPosition >= 0)
{
textEditPosition = nextTextEditPosition;
lineNumber++;
}
else
{
break;
}
}
return std::make_pair(lineNumber, textEditPosition);
}
int QtCodeArea::startTextEditPosition() const
{
return 0;
+13
View File
@@ -19,6 +19,18 @@ class QWidget;
class TokenLocation;
class TokenLocationFile;
class MouseWheelOverScrollbarFilter
: public QObject
{
Q_OBJECT
public:
MouseWheelOverScrollbarFilter(QObject* parent);
protected:
bool eventFilter(QObject*obj, QEvent* event);
};
class QtCodeArea
: public QPlainTextEdit
{
@@ -114,6 +126,7 @@ private:
bool locationBelongsToSnippet(TokenLocation* location) const;
int toTextEditPosition(int lineNumber, int columnNumber) const;
std::pair<int, int> toLineColumn(int textEditPosition) const;
int startTextEditPosition() const;
int endTextEditPosition() const;
+40 -7
View File
@@ -4,6 +4,8 @@
#include <QPushButton>
#include <QVBoxLayout>
#include "utility/file/FileSystem.h"
#include "utility/logging/logging.h"
#include "utility/messaging/type/MessageActivateFile.h"
#include "utility/messaging/type/MessageShowFile.h"
#include "utility/messaging/type/MessageShowSnippets.h"
@@ -19,6 +21,7 @@ QtCodeFile::QtCodeFile(const FilePath& filePath, QtCodeFileList* parent)
: QFrame(parent)
, m_parent(parent)
, m_filePath(filePath)
, m_updateTitleBarFunctor(std::bind(&QtCodeFile::doUpdateTitleBar, this))
{
setObjectName("code_file");
@@ -28,15 +31,15 @@ QtCodeFile::QtCodeFile(const FilePath& filePath, QtCodeFileList* parent)
layout->setAlignment(Qt::AlignTop);
setLayout(layout);
QPushButton* titleWidget = new QPushButton(this);
titleWidget->setObjectName("title_widget");
layout->addWidget(titleWidget);
m_titleBar = new QPushButton(this);
m_titleBar->setObjectName("title_widget");
layout->addWidget(m_titleBar);
QHBoxLayout* titleLayout = new QHBoxLayout();
titleLayout->setMargin(0);
titleLayout->setSpacing(0);
titleLayout->setAlignment(Qt::AlignLeft);
titleWidget->setLayout(titleLayout);
m_titleBar->setLayout(titleLayout);
m_title = new QPushButton(filePath.fileName().c_str(), this);
m_title->setObjectName("title_label");
@@ -54,7 +57,7 @@ QtCodeFile::QtCodeFile(const FilePath& filePath, QtCodeFileList* parent)
titleLayout->addWidget(m_title);
titleWidget->setMinimumHeight(m_title->height() + 4);
m_titleBar->setMinimumHeight(m_title->height() + 4);
m_referenceCount = new QLabel(this);
m_referenceCount->setObjectName("references_label");
@@ -85,7 +88,7 @@ QtCodeFile::QtCodeFile(const FilePath& filePath, QtCodeFileList* parent)
m_snippetButton->setEnabled(false);
m_maximizeButton->setEnabled(false);
connect(titleWidget, SIGNAL(clicked()), this, SLOT(clickedTitleBar()));
connect(m_titleBar, SIGNAL(clicked()), this, SLOT(clickedTitleBar()));
connect(m_title, SIGNAL(clicked()), this, SLOT(clickedTitle()));
connect(m_minimizeButton, SIGNAL(clicked()), this, SLOT(clickedMinimizeButton()));
connect(m_snippetButton, SIGNAL(clicked()), this, SLOT(clickedSnippetButton()));
@@ -105,6 +108,12 @@ QtCodeFile::~QtCodeFile()
{
}
void QtCodeFile::setModificationTime(TimePoint modificationTime)
{
m_modificationTime = modificationTime;
updateTitleBar();
}
const FilePath& QtCodeFile::getFilePath() const
{
return m_filePath;
@@ -373,7 +382,7 @@ void QtCodeFile::clickedMaximizeButton()
}
else
{
MessageShowFile(m_filePath, 0, 0).dispatch();
MessageShowFile(m_filePath, (getErrorMessages().size() > 0)).dispatch();
}
m_minimizeButton->setEnabled(true);
@@ -386,6 +395,11 @@ void QtCodeFile::clickedMaximizeButton()
m_minimizePlaceholder->hide();
}
void QtCodeFile::handleMessage(MessageWindowFocus* message)
{
updateTitleBar();
}
void QtCodeFile::updateSnippets()
{
int maxDigits = 1;
@@ -420,3 +434,22 @@ void QtCodeFile::updateRefCount(int refCount)
m_referenceCount->hide();
}
}
void QtCodeFile::updateTitleBar()
{
m_updateTitleBarFunctor();
}
void QtCodeFile::doUpdateTitleBar()
{
// cannot use m_filePath.exists() here since it is only checked when FilePath is constructed.
if ((!FileSystem::exists(m_filePath.str())) ||
(FileSystem::getLastWriteTime(m_filePath) > m_modificationTime))
{
m_title->setStyleSheet("background-image: url(data/gui/code_view/images/pattern.png);");
}
else
{
m_title->setStyleSheet("");
}
}
+15
View File
@@ -8,7 +8,11 @@
#include <QFrame>
#include "utility/file/FilePath.h"
#include "utility/TimePoint.h"
#include "utility/types.h"
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageWindowFocus.h"
#include "qt/utility/QtThreadedFunctor.h"
class QLabel;
class QPushButton;
@@ -19,6 +23,7 @@ class TokenLocationFile;
class QtCodeFile
: public QFrame
, MessageListener<MessageWindowFocus>
{
Q_OBJECT
@@ -26,6 +31,8 @@ public:
QtCodeFile(const FilePath& filePath, QtCodeFileList* parent);
virtual ~QtCodeFile();
void setModificationTime(TimePoint modificationTime);
const FilePath& getFilePath() const;
std::string getFileName() const;
Id getFocusedTokenId() const;
@@ -67,11 +74,18 @@ private slots:
void clickedMaximizeButton();
private:
virtual void handleMessage(MessageWindowFocus* message);
void updateSnippets();
void updateRefCount(int refCount);
void updateTitleBar();
void doUpdateTitleBar();
QtThreadedFunctor<> m_updateTitleBarFunctor;
QtCodeFileList* m_parent;
QPushButton* m_titleBar;
QPushButton* m_title;
QLabel* m_referenceCount;
@@ -85,6 +99,7 @@ private:
QWidget* m_minimizePlaceholder;
const FilePath m_filePath;
TimePoint m_modificationTime;
std::shared_ptr<TokenLocationFile> m_locationFile;
};
+4 -1
View File
@@ -47,6 +47,7 @@ void QtCodeFileList::addCodeSnippet(
const std::string& code,
std::shared_ptr<TokenLocationFile> locationFile,
int refCount,
TimePoint modificationTime,
bool insert
){
QtCodeFile* file = getFile(locationFile);
@@ -60,12 +61,14 @@ void QtCodeFileList::addCodeSnippet(
{
file->addCodeSnippet(startLineNumber, title, titleId, code, locationFile, refCount);
}
file->setModificationTime(modificationTime);
}
void QtCodeFileList::addFile(std::shared_ptr<TokenLocationFile> locationFile, int refCount)
void QtCodeFileList::addFile(std::shared_ptr<TokenLocationFile> locationFile, int refCount, TimePoint modificationTime)
{
QtCodeFile* file = getFile(locationFile);
file->setLocationFile(locationFile, refCount);
file->setModificationTime(modificationTime);
}
void QtCodeFileList::clearCodeSnippets()
+3 -1
View File
@@ -7,6 +7,7 @@
#include <QFrame>
#include <QScrollArea>
#include "utility/TimePoint.h"
#include "utility/types.h"
class QtCodeFile;
@@ -33,10 +34,11 @@ public:
const std::string& code,
std::shared_ptr<TokenLocationFile> locationFile,
int refCount,
TimePoint modificationTime,
bool insert = false
);
void addFile(std::shared_ptr<TokenLocationFile> locationFile, int refCount);
void addFile(std::shared_ptr<TokenLocationFile> locationFile, int refCount, TimePoint modificationTime);
void clearCodeSnippets();
+1 -1
View File
@@ -147,7 +147,7 @@ void QtCodeSnippet::clickedTitle()
}
else
{
MessageShowFile(FilePath(m_titleString), 0, 0).dispatch();
MessageShowFile(FilePath(m_titleString), (dynamic_cast<QtCodeFile*>(parent())->getErrorMessages().size() > 0)).dispatch();
}
}
+7 -2
View File
@@ -822,7 +822,7 @@ void QtSmartSearchBox::clearLineEdit()
void QtSmartSearchBox::requestAutoCompletions() const
{
MessageSearchAutocomplete("", text().toStdString()).dispatch();
MessageSearchAutocomplete(text().toStdString()).dispatch();
}
void QtSmartSearchBox::hideAutoCompletions()
@@ -832,5 +832,10 @@ void QtSmartSearchBox::hideAutoCompletions()
std::deque<SearchMatch> QtSmartSearchBox::getMatchesForInput(const std::string& text) const
{
return std::deque<SearchMatch>(1, SearchMatch(text));
std::deque<SearchMatch> matches;
if (text.size())
{
matches.push_back(SearchMatch(text));
}
return matches;
}
+33 -1
View File
@@ -2,6 +2,9 @@
#include <QMovie>
#include "qt/utility/utilityQt.h"
#include "utility/messaging/type/MessageShowErrors.h"
QtStatusBar::QtStatusBar()
: m_text(this)
{
@@ -19,6 +22,17 @@ QtStatusBar::QtStatusBar()
m_text.setText("");
addWidget(&m_text);
m_errorButton.hide();
m_errorButton.setFlat(true);
m_errorButton.setStyleSheet("QPushButton { color: #D00000; margin-right: 0; spacing: none; }");
m_errorButton.setIcon(utility::colorizePixmap(
QPixmap("data/gui/statusbar_view/octagon.png"),
"#D00000"
).scaledToHeight(10));
addPermanentWidget(&m_errorButton);
connect(&m_errorButton, SIGNAL(clicked()), this, SLOT(showErrors()));
}
QtStatusBar::~QtStatusBar()
@@ -29,7 +43,7 @@ void QtStatusBar::setText(const std::string& text, bool isError, bool showLoader
{
if (isError)
{
m_text.setStyleSheet("QLabel { color: #E00000 }");
m_text.setStyleSheet("QLabel { color: #D00000 }");
}
else
{
@@ -47,3 +61,21 @@ void QtStatusBar::setText(const std::string& text, bool isError, bool showLoader
m_text.setText(text.c_str());
}
void QtStatusBar::setErrorCount(size_t count)
{
if (count > 0)
{
m_errorButton.setText(QString::number(count) + " error(s)");
m_errorButton.show();
}
else
{
m_errorButton.hide();
}
}
void QtStatusBar::showErrors()
{
MessageShowErrors().dispatch();
}
+11 -2
View File
@@ -2,21 +2,30 @@
#define QT_STATUS_BAR_H
#include <string>
#include <QStatusBar>
#include <QPushButton>
#include <QLabel>
#include <QStatusBar>
class QtStatusBar
: public QStatusBar
{
Q_OBJECT
public:
QtStatusBar(void);
~QtStatusBar(void);
virtual ~QtStatusBar(void);
void setText(const std::string& text, bool isError, bool showLoader);
void setErrorCount(size_t count);
private slots:
void showErrors();
private:
QLabel m_text;
QLabel m_loader;
QPushButton m_errorButton;
};
#endif // QT_STATUS_BAR_H
@@ -2,8 +2,9 @@
#include <functional>
QtIDECommunicationController::QtIDECommunicationController(QObject* parent)
: m_tcpWrapper(parent)
QtIDECommunicationController::QtIDECommunicationController(QObject* parent, StorageAccess* storageAccess)
: IDECommunicationController(storageAccess)
, m_tcpWrapper(parent)
{
m_tcpWrapper.setReadCallback(std::bind(&QtIDECommunicationController::handleIncomingMessage, this, std::placeholders::_1));
}
@@ -7,11 +7,13 @@
#include "component/controller/IDECommunicationController.h"
class StorageAccess;
class QtIDECommunicationController
: public IDECommunicationController
{
public:
QtIDECommunicationController(QObject* parent);
QtIDECommunicationController(QObject* parent, StorageAccess* storageAccess);
~QtIDECommunicationController();
private:
+2 -2
View File
@@ -10,7 +10,7 @@ QtNetworkFactory::~QtNetworkFactory()
{
}
std::shared_ptr<IDECommunicationController> QtNetworkFactory::createIDECommunicationController() const
std::shared_ptr<IDECommunicationController> QtNetworkFactory::createIDECommunicationController(StorageAccess* storageAccess) const
{
return std::make_shared<QtIDECommunicationController>(nullptr);
return std::make_shared<QtIDECommunicationController>(nullptr, storageAccess);
}
+1 -1
View File
@@ -9,7 +9,7 @@ public:
QtNetworkFactory();
virtual ~QtNetworkFactory();
virtual std::shared_ptr<IDECommunicationController> createIDECommunicationController() const;
virtual std::shared_ptr<IDECommunicationController> createIDECommunicationController(StorageAccess* storageAccess) const;
};
#endif // QT_NETWORK_FACTORY_H
+1 -18
View File
@@ -2,23 +2,6 @@
#include "utility/logging/logging.h"
QtTcpWrapper::QtTcpWrapper(QObject* parent)
: QObject(parent)
, m_port(6667)
, m_ip("127.0.0.1")
{
QHostAddress address(m_ip.c_str());
m_tcpServer = new QTcpServer(this);
connect(m_tcpServer, SIGNAL(newConnection()), this, SLOT(acceptConnection()));
if (!m_tcpServer->listen(QHostAddress::LocalHost, m_port))
{
LOG_ERROR_STREAM(<< "TCP server failed to start. Unable to listen for IDE plugin messages.");
}
}
QtTcpWrapper::QtTcpWrapper(QObject* parent, const std::string& ip, const quint16 port)
: QObject(parent)
, m_port(port)
@@ -32,7 +15,7 @@ QtTcpWrapper::QtTcpWrapper(QObject* parent, const std::string& ip, const quint16
if (!m_tcpServer->listen(QHostAddress::LocalHost, m_port))
{
LOG_ERROR_STREAM(<< "TCP server failed to start. Unable to listen for IDE plugin messages.");
LOG_ERROR_STREAM(<< "TCP server failed to start with error: \"" + m_tcpServer->errorString().toStdString() + "\". Unable to listen for IDE plugin messages.");
}
}
+1 -2
View File
@@ -13,8 +13,7 @@ class QtTcpWrapper : public QObject
Q_OBJECT
public:
QtTcpWrapper(QObject* parent);
QtTcpWrapper(QObject* parent, const std::string& ip, const quint16 port);
QtTcpWrapper(QObject* parent, const std::string& ip = "127.0.0.1", const quint16 port = 6667);
~QtTcpWrapper();
void sendMessage(const std::string& message) const;
+12 -10
View File
@@ -96,7 +96,7 @@ void QtCodeView::doShowCodeSnippets(const std::vector<CodeSnippetParams>& snippe
{
if (params.isCollapsed)
{
m_widget->addFile(params.locationFile, params.refCount);
m_widget->addFile(params.locationFile, params.refCount, params.modificationTime);
}
else
{
@@ -106,7 +106,8 @@ void QtCodeView::doShowCodeSnippets(const std::vector<CodeSnippetParams>& snippe
params.titleId,
params.code,
params.locationFile,
params.refCount
params.refCount,
params.modificationTime
);
}
}
@@ -116,15 +117,16 @@ void QtCodeView::doShowCodeSnippets(const std::vector<CodeSnippetParams>& snippe
void QtCodeView::doAddCodeSnippets(const std::vector<CodeSnippetParams>& snippets)
{
for (const CodeSnippetParams& snippet : snippets)
for (const CodeSnippetParams& params : snippets)
{
m_widget->addCodeSnippet(
snippet.startLineNumber,
snippet.title,
snippet.titleId,
snippet.code,
snippet.locationFile,
snippet.refCount,
params.startLineNumber,
params.title,
params.titleId,
params.code,
params.locationFile,
params.refCount,
params.modificationTime,
true
);
}
@@ -134,7 +136,7 @@ void QtCodeView::doAddCodeSnippets(const std::vector<CodeSnippetParams>& snippet
void QtCodeView::doShowCodeFile(const CodeSnippetParams& params)
{
m_widget->addCodeSnippet(1, params.title, 0, params.code, params.locationFile, -1);
m_widget->addCodeSnippet(1, params.title, 0, params.code, params.locationFile, -1, params.modificationTime);
}
void QtCodeView::doShowFirstActiveSnippet()
+17 -4
View File
@@ -1,6 +1,7 @@
#include "qt/view/QtStatusBarView.h"
#include <QStatusBar>
#include "qt/view/QtMainView.h"
#include "qt/view/QtViewWidgetWrapper.h"
@@ -8,12 +9,14 @@ QtStatusBarView::QtStatusBarView(ViewLayout* viewLayout)
: StatusBarView(viewLayout)
, m_showMessageFunctor(std::bind(
&QtStatusBarView::doShowMessage, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3))
, m_setErrorCountFunctor(std::bind(&QtStatusBarView::doSetErrorCount, this, std::placeholders::_1))
{
QtMainView* mw = static_cast<QtMainView*>(viewLayout);
m_widget = std::make_shared<QtStatusBar>();
m_widget->show();
QtMainView* mw = static_cast<QtMainView*>(viewLayout);
QStatusBar* sb = static_cast<QStatusBar*>(m_widget.get());
mw->setStatusBar(sb);
m_widget->show();
}
QtStatusBarView::~QtStatusBarView()
@@ -32,12 +35,22 @@ void QtStatusBarView::refreshView()
{
}
void QtStatusBarView::showMessage(const std::string& message, bool isError, bool showLoader)
{
m_showMessageFunctor(message, isError, showLoader);
}
void QtStatusBarView::setErrorCount(size_t count)
{
m_setErrorCountFunctor(count);
}
void QtStatusBarView::doShowMessage(const std::string& message, bool isError, bool showLoader)
{
m_widget->setText(message, isError, showLoader);
}
void QtStatusBarView::showMessage(const std::string& message, bool isError, bool showLoader)
void QtStatusBarView::doSetErrorCount(size_t count)
{
m_showMessageFunctor(message, isError, showLoader);
m_widget->setErrorCount(count);
}
+7 -2
View File
@@ -8,7 +8,8 @@
#include "qt/element/QtStatusBar.h"
#include "qt/utility/QtThreadedFunctor.h"
class QtStatusBarView : public StatusBarView
class QtStatusBarView
: public StatusBarView
{
public:
QtStatusBarView(ViewLayout* viewLayout);
@@ -21,12 +22,16 @@ public:
// StatusBar view implementation
virtual void showMessage(const std::string& message, bool isError, bool showLoader);
virtual void setErrorCount(size_t count);
private:
void doShowMessage(const std::string& message, bool isError, bool showLoader);
std::shared_ptr<QtStatusBar> m_widget;
void doSetErrorCount(size_t count);
QtThreadedFunctor<const std::string&, bool, bool> m_showMessageFunctor;
QtThreadedFunctor<size_t> m_setErrorCountFunctor;
std::shared_ptr<QtStatusBar> m_widget;
};
#endif // !QT_STATUS_BAR_VIEW_H
+2 -2
View File
@@ -4,7 +4,7 @@
#include <QLineEdit>
#include <QLabel>
#include "version.h"
#include "utility/Version.h"
QtAbout::QtAbout(QWidget *parent)
: QtSettingsWindow(parent)
@@ -46,7 +46,7 @@ void QtAbout::populateForm(QFormLayout* layout)
acknowledgementsLabel->setAlignment(Qt::AlignTop);
layout->addRow(acknowledgementsName, acknowledgementsLabel);
layout->addRow(QString("Version:"), new QLabel(GIT_VERSION_NUMBER));
layout->addRow(QString("Version:"), new QLabel(Version::getApplicationVersion().toDisplayString().c_str()));
}
void QtAbout::handleCancelButtonPress()
+15 -4
View File
@@ -3,8 +3,10 @@
#include "utility/logging/logging.h"
#include "utility/messaging/MessageQueue.h"
#include "utility/messaging/type/MessageActivateNodes.h"
#include "utility/messaging/type/MessageShowErrors.h"
#include "utility/messaging/type/MessageStatus.h"
#include "utility/scheduling/TaskScheduler.h"
#include "utility/Version.h"
#include "component/view/GraphViewStyle.h"
#include "component/controller/NetworkFactory.h"
@@ -14,8 +16,11 @@
#include "settings/ApplicationSettings.h"
#include "settings/ColorScheme.h"
std::shared_ptr<Application> Application::create(ViewFactory* viewFactory, NetworkFactory* networkFactory)
{
std::shared_ptr<Application> Application::create(
const Version& version, ViewFactory* viewFactory, NetworkFactory* networkFactory
){
Version::setApplicationVersion(version);
loadSettings();
std::shared_ptr<Application> ptr(new Application());
@@ -39,7 +44,7 @@ std::shared_ptr<Application> Application::create(ViewFactory* viewFactory, Netwo
ptr->m_mainView->hideStartScreen();
}
ptr->m_ideCommunicationController = networkFactory->createIDECommunicationController();
ptr->m_ideCommunicationController = networkFactory->createIDECommunicationController(ptr->m_storageCache.get());
return ptr;
}
@@ -72,7 +77,9 @@ void Application::loadProject(const FilePath& projectSettingsFilePath)
updateRecentProjects(projectSettingsFilePath);
m_mainView->setTitle(projectSettingsFilePath.fileName());
m_mainView->setTitle(
projectSettingsFilePath.withoutExtension().fileName()
+ "[" + projectSettingsFilePath.fileName() + "]" + " - Coati");
m_storageCache->clear();
m_componentManager->refreshViews();
@@ -109,6 +116,10 @@ void Application::handleMessage(MessageFinishedParsing* message)
{
MessageRefresh().refreshUiOnly().dispatch();
}
else
{
MessageShowErrors().dispatch();
}
}
void Application::handleMessage(MessageLoadProject* message)
+2 -3
View File
@@ -16,6 +16,7 @@ class NetworkFactory;
class ViewFactory;
class MainView;
class StorageCache;
class Version;
class Application
: public MessageListener<MessageFinishedParsing>
@@ -24,7 +25,7 @@ class Application
, public MessageListener<MessageSaveProject>
{
public:
static std::shared_ptr<Application> create(ViewFactory* viewFactory, NetworkFactory* networkFactory);
static std::shared_ptr<Application> create(const Version& version, ViewFactory* viewFactory, NetworkFactory* networkFactory);
static void loadSettings();
~Application();
@@ -50,8 +51,6 @@ private:
std::shared_ptr<ComponentManager> m_componentManager;
std::shared_ptr<IDECommunicationController> m_ideCommunicationController;
bool m_isInitialParse;
};
#endif // APPLICATION_H
+6 -1
View File
@@ -58,7 +58,7 @@ add_files(
component/controller/FeatureController.h
component/controller/GraphController.cpp
component/controller/GraphController.h
component/controller/IDECommunicationController.cpp
component/controller/IDECommunicationController.h
component/controller/NetworkFactory.cpp
@@ -265,6 +265,7 @@ add_files(
utility/messaging/type/MessageSaveProject.h
utility/messaging/type/MessageSearch.h
utility/messaging/type/MessageSearchAutocomplete.h
utility/messaging/type/MessageShowErrors.h
utility/messaging/type/MessageShowFile.h
utility/messaging/type/MessageShowScope.h
utility/messaging/type/MessageShowSnippets.h
@@ -302,11 +303,15 @@ add_files(
utility/ConfigManager.cpp
utility/ConfigManager.h
utility/Property.h
utility/TimePoint.cpp
utility/TimePoint.h
utility/types.h
utility/utility.cpp
utility/utility.h
utility/utilityString.cpp
utility/utilityString.h
utility/Version.cpp
utility/Version.h
Application.cpp
Application.h
+10 -3
View File
@@ -1,8 +1,11 @@
#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"
@@ -11,8 +14,6 @@
#include "data/TaskCleanStorage.h"
#include "settings/ApplicationSettings.h"
#include "settings/ProjectSettings.h"
#include "utility/file/FileSystem.h"
#include "utility/scheduling/TaskGroupSequential.h"
std::shared_ptr<Project> Project::create(StorageAccessProxy* storageAccessProxy)
{
@@ -77,7 +78,7 @@ void Project::loadStorage()
{
m_storage->startParsing();
m_storage->finishParsing();
MessageFinishedParsing(0, 0, 0, 0).dispatch();
MessageFinishedParsing(0, 0, 0, m_storage->getErrorCount()).dispatch();
}
else
{
@@ -144,6 +145,12 @@ void Project::setProjectSettingsFilePath(const FilePath& path)
FilePath dbPath = FilePath(path).replaceExtension("sqlite");
m_storageWasLoaded = dbPath.exists();
m_storage = std::make_shared<Storage>(dbPath);
if (m_storageWasLoaded && m_storage->getVersion().isOlderStorageVersionThan(Version::getApplicationVersion()))
{
m_storage->clear();
m_storageWasLoaded = false;
}
}
m_storageAccessProxy->setSubject(m_storage.get());
+39 -27
View File
@@ -78,30 +78,6 @@ void CodeController::handleMessage(MessageActivateTokens* message)
}
}
void CodeController::handleMessage(MessageFinishedParsing* message)
{
if (message->errorCount > 0)
{
std::vector<std::string> errorMessages;
TokenLocationCollection errorCollection = m_storageAccess->getErrorTokenLocations(&errorMessages);
std::vector<CodeView::CodeSnippetParams> snippets;
errorCollection.forEachTokenLocationFile(
[&](std::shared_ptr<TokenLocationFile> file) -> void
{
std::vector<CodeView::CodeSnippetParams> fileSnippets = getSnippetsForFile(file);
snippets.insert(snippets.end(), fileSnippets.begin(), fileSnippets.end());
}
);
CodeView* view = getView();
view->setActiveTokenIds(std::vector<Id>());
view->setErrorMessages(errorMessages);
view->showCodeSnippets(snippets);
}
}
void CodeController::handleMessage(MessageFocusIn* message)
{
getView()->focusToken(message->tokenId);
@@ -112,16 +88,49 @@ void CodeController::handleMessage(MessageFocusOut* message)
getView()->defocusToken();
}
void CodeController::handleMessage(MessageShowErrors* message)
{
std::vector<std::string> errorMessages;
TokenLocationCollection errorCollection = m_storageAccess->getErrorTokenLocations(&errorMessages);
std::vector<CodeView::CodeSnippetParams> snippets;
errorCollection.forEachTokenLocationFile(
[&](std::shared_ptr<TokenLocationFile> file) -> void
{
std::vector<CodeView::CodeSnippetParams> fileSnippets = getSnippetsForFile(file);
snippets.insert(snippets.end(), fileSnippets.begin(), fileSnippets.end());
}
);
CodeView* view = getView();
view->setActiveTokenIds(std::vector<Id>());
view->setErrorMessages(errorMessages);
view->showCodeSnippets(snippets);
}
void CodeController::handleMessage(MessageShowFile* message)
{
CodeView::CodeSnippetParams params;
params.startLineNumber = message->startLineNumber;
params.endLineNumber = message->endLineNumber;
params.startLineNumber = 0;
params.endLineNumber = 0;
std::shared_ptr<TextAccess> textAccess = m_storageAccess->getFileContent(message->filePath);
params.code = textAccess->getText();
params.locationFile = m_storageAccess->getTokenLocationsForFile(message->filePath.str());
params.modificationTime = m_storageAccess->getFileModificationTime(message->filePath);
if (message->showErrors)
{
std::vector<std::string> errorMessages;
TokenLocationCollection errorCollection = m_storageAccess->getErrorTokenLocations(&errorMessages);
params.locationFile = std::make_shared<TokenLocationFile>(*errorCollection.findTokenLocationFileByPath(message->filePath));
params.locationFile->isWholeCopy = true;
}
else
{
params.locationFile = m_storageAccess->getTokenLocationsForFile(message->filePath.str());
}
getView()->showCodeFile(params);
}
@@ -194,6 +203,7 @@ std::vector<CodeView::CodeSnippetParams> CodeController::getSnippetsForActiveTok
CodeView::CodeSnippetParams params;
params.locationFile = file;
params.refCount = file->getUnscopedStartTokenLocationCount();
params.modificationTime = m_storageAccess->getFileModificationTime(file->getFilePath());
params.isCollapsed = true;
snippets.push_back(params);
@@ -259,6 +269,8 @@ std::vector<CodeView::CodeSnippetParams> CodeController::getSnippetsForFile(std:
params.refCount = file->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.modificationTime = m_storageAccess->getFileModificationTime(file->getFilePath());
std::shared_ptr<TokenLocationFile> tempFile =
m_storageAccess->getTokenLocationsForLinesInFile(file->getFilePath().str(), params.startLineNumber, params.endLineNumber);
@@ -6,9 +6,9 @@
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageActivateTokens.h"
#include "utility/messaging/type/MessageFinishedParsing.h"
#include "utility/messaging/type/MessageFocusIn.h"
#include "utility/messaging/type/MessageFocusOut.h"
#include "utility/messaging/type/MessageShowErrors.h"
#include "utility/messaging/type/MessageShowFile.h"
#include "utility/messaging/type/MessageShowScope.h"
#include "utility/messaging/type/MessageShowSnippets.h"
@@ -25,9 +25,9 @@ class TokenLocationFile;
class CodeController
: public Controller
, public MessageListener<MessageActivateTokens>
, public MessageListener<MessageFinishedParsing>
, public MessageListener<MessageFocusIn>
, public MessageListener<MessageFocusOut>
, public MessageListener<MessageShowErrors>
, public MessageListener<MessageShowFile>
, public MessageListener<MessageShowScope>
, public MessageListener<MessageShowSnippets>
@@ -40,9 +40,9 @@ private:
static const uint s_lineRadius;
virtual void handleMessage(MessageActivateTokens* message);
virtual void handleMessage(MessageFinishedParsing* message);
virtual void handleMessage(MessageFocusIn* message);
virtual void handleMessage(MessageFocusOut* message);
virtual void handleMessage(MessageShowErrors* message);
virtual void handleMessage(MessageShowFile* message);
virtual void handleMessage(MessageShowScope* message);
virtual void handleMessage(MessageShowSnippets* message);
@@ -1,11 +1,11 @@
#include "component/controller/FeatureController.h"
#include "utility/messaging/type/MessageActivateTokens.h"
#include "utility/messaging/type/MessageRefresh.h"
#include "data/access/StorageAccess.h"
#include "settings/ApplicationSettings.h"
#include "utility/messaging/type/MessageActivateTokens.h"
#include "utility/messaging/type/MessageRefresh.h"
FeatureController::FeatureController(StorageAccess* storageAccess)
: m_storageAccess(storageAccess)
, m_activationTranslator(storageAccess)
@@ -3,6 +3,9 @@
#include <memory>
#include "component/controller/helper/ActivationTranslator.h"
#include "component/controller/Controller.h"
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageActivateEdge.h"
#include "utility/messaging/type/MessageActivateFile.h"
@@ -12,9 +15,6 @@
#include "utility/messaging/type/MessageSwitchColorScheme.h"
#include "utility/messaging/type/MessageZoom.h"
#include "component/controller/Controller.h"
#include "component/controller/helper/ActivationTranslator.h"
class StorageAccess;
class FeatureController
@@ -134,6 +134,11 @@ void GraphController::handleMessage(MessageGraphNodeMove* message)
}
}
void GraphController::handleMessage(MessageShowErrors* message)
{
clear();
}
GraphView* GraphController::getView() const
{
return Controller::getView<GraphView>();
@@ -11,6 +11,7 @@
#include "utility/messaging/type/MessageGraphNodeBundleSplit.h"
#include "utility/messaging/type/MessageGraphNodeExpand.h"
#include "utility/messaging/type/MessageGraphNodeMove.h"
#include "utility/messaging/type/MessageShowErrors.h"
#include "component/controller/Controller.h"
#include "component/view/GraphView.h"
@@ -32,6 +33,7 @@ class GraphController
, public MessageListener<MessageGraphNodeBundleSplit>
, public MessageListener<MessageGraphNodeExpand>
, public MessageListener<MessageGraphNodeMove>
, public MessageListener<MessageShowErrors>
{
public:
GraphController(StorageAccess* storageAccess);
@@ -45,6 +47,7 @@ private:
virtual void handleMessage(MessageGraphNodeBundleSplit* message);
virtual void handleMessage(MessageGraphNodeExpand* message);
virtual void handleMessage(MessageGraphNodeMove* message);
virtual void handleMessage(MessageShowErrors* message);
GraphView* getView() const;
@@ -1,11 +1,16 @@
#include "IDECommunicationController.h"
#include "utility/messaging/type/MessageActivateTokens.h"
#include "component/controller/helper/NetworkProtocolHelper.h"
#include "data/access/StorageAccess.h"
#include "data/location/TokenLocationFile.h"
#include "data/location/TokenLocation.h"
#include "utility/messaging/type/MessageActivateTokenLocations.h"
#include "utility/messaging/type/MessageStatus.h"
#include "utility/logging/logging.h"
#include "component/controller/helper/NetworkProtocolHelper.h"
IDECommunicationController::IDECommunicationController()
IDECommunicationController::IDECommunicationController(StorageAccess* storageAccess)
: m_storageAccess(storageAccess)
{
}
@@ -21,13 +26,51 @@ void IDECommunicationController::handleIncomingMessage(const std::string& messag
if (parsedMessage.valid)
{
// TODO: set active token
const unsigned int cursorColumn = parsedMessage.column;
std::shared_ptr<TokenLocationFile> tokenLocationFile = m_storageAccess->getTokenLocationsForLinesInFile(
parsedMessage.fileLocation, parsedMessage.row, parsedMessage.row
);
std::vector<Id> selectedLocationIds;
tokenLocationFile->forEachStartTokenLocation(
[&](TokenLocation* startLocation)
{
if (startLocation->getColumnNumber() < cursorColumn)
{
TokenLocation* endLocation = startLocation->getOtherTokenLocation();
if (endLocation && endLocation->getColumnNumber() > cursorColumn)
{
selectedLocationIds.push_back(startLocation->getId());
}
}
}
);
if (selectedLocationIds.size() > 0)
{
MessageStatus("Activating a source location from external succeeded.").dispatch();
MessageActivateTokenLocations(selectedLocationIds).dispatch();
}
else
{
MessageStatus(
"Activating a source location from external failed. No symbol(s) have been found at the selected location."
).dispatch();
}
}
}
void IDECommunicationController::handleMessage(MessageMoveIDECursor* message)
{
std::string networkMessage = NetworkProtocolHelper::buildMessage(message->FilePosition, message->Row, message->Column);
std::string networkMessage = NetworkProtocolHelper::buildMessage(
message->FilePosition, message->Row, message->Column
);
MessageStatus(
"Jumping the external tool to the following location: " + message->FilePosition + ", row: " +
std::to_string(message->Row) + ", col: " + std::to_string(message->Column)
).dispatch();
sendMessage(networkMessage);
}
@@ -3,17 +3,19 @@
#include <string>
#include "component/controller/Controller.h"
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageMoveIDECursor.h"
#include "component/controller/Controller.h"
class StorageAccess;
class IDECommunicationController
: public Controller
, public MessageListener<MessageMoveIDECursor>
{
public:
IDECommunicationController();
IDECommunicationController(StorageAccess* storageAccess);
virtual ~IDECommunicationController();
void handleIncomingMessage(const std::string& message);
@@ -21,6 +23,8 @@ public:
private:
virtual void handleMessage(MessageMoveIDECursor* message);
virtual void sendMessage(const std::string& message) const = 0;
StorageAccess* m_storageAccess;
};
#endif // IDE_COMMUNICATION_CONTROLLER_H
@@ -4,6 +4,7 @@
#include <memory>
class IDECommunicationController;
class StorageAccess;
class NetworkFactory
{
@@ -11,7 +12,7 @@ public:
NetworkFactory();
virtual ~NetworkFactory();
virtual std::shared_ptr<IDECommunicationController> createIDECommunicationController() const = 0;
virtual std::shared_ptr<IDECommunicationController> createIDECommunicationController(StorageAccess* storageAccess) const = 0;
};
#endif // NETWORK_FACTORY_H
@@ -27,8 +27,13 @@ void SearchController::handleMessage(MessageFind* message)
void SearchController::handleMessage(MessageSearchAutocomplete* message)
{
LOG_INFO("autocomplete string: \"" + message->word + "\"");
getView()->setAutocompletionList(m_storageAccess->getAutocompletionMatches(message->query, message->word));
LOG_INFO("autocomplete string: \"" + message->query + "\"");
getView()->setAutocompletionList(m_storageAccess->getAutocompletionMatches(message->query));
}
void SearchController::handleMessage(MessageShowErrors* message)
{
getView()->setMatches(std::vector<SearchMatch>());
}
SearchView* SearchController::getView()
@@ -6,6 +6,7 @@
#include "utility/messaging/type/MessageActivateTokens.h"
#include "utility/messaging/type/MessageFind.h"
#include "utility/messaging/type/MessageSearchAutocomplete.h"
#include "utility/messaging/type/MessageShowErrors.h"
class StorageAccess;
class SearchView;
@@ -15,6 +16,7 @@ class SearchController
, public MessageListener<MessageActivateTokens>
, public MessageListener<MessageFind>
, public MessageListener<MessageSearchAutocomplete>
, public MessageListener<MessageShowErrors>
{
public:
SearchController(StorageAccess* storageAccess);
@@ -24,6 +26,7 @@ private:
virtual void handleMessage(MessageActivateTokens* message);
virtual void handleMessage(MessageFind* message);
virtual void handleMessage(MessageSearchAutocomplete* message);
virtual void handleMessage(MessageShowErrors* message);
SearchView* getView();
@@ -17,6 +17,11 @@ StatusBarView* StatusBarController::getView()
return Controller::getView<StatusBarView>();
}
void StatusBarController::handleMessage(MessageFinishedParsing* message)
{
getView()->setErrorCount(message->errorCount);
}
void StatusBarController::handleMessage(MessageStatus* message)
{
setStatus(message->status, message->isError, message->showLoader);
@@ -6,12 +6,14 @@
#include "component/controller/Controller.h"
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageFinishedParsing.h"
#include "utility/messaging/type/MessageStatus.h"
class StatusBarView;
class StatusBarController
: public Controller
, public MessageListener<MessageFinishedParsing>
, public MessageListener<MessageStatus>
{
public:
@@ -21,6 +23,7 @@ public:
StatusBarView* getView();
private:
virtual void handleMessage(MessageFinishedParsing* message);
virtual void handleMessage(MessageStatus* message);
void setStatus(const std::string& status, bool isError, bool showLoader);
@@ -196,6 +196,17 @@ void UndoRedoController::handleMessage(MessageSearch* message)
processCommand(command);
}
void UndoRedoController::handleMessage(MessageShowErrors* message)
{
if (m_lastCommand.message && m_lastCommand.message->getType() == message->getType())
{
return;
}
Command command(std::make_shared<MessageShowErrors>(*message), 0);
processCommand(command);
}
void UndoRedoController::handleMessage(MessageShowFile* message)
{
if (m_lastCommand.message && m_lastCommand.message->getType() == message->getType() &&
@@ -16,6 +16,7 @@
#include "utility/messaging/type/MessageRedo.h"
#include "utility/messaging/type/MessageRefresh.h"
#include "utility/messaging/type/MessageSearch.h"
#include "utility/messaging/type/MessageShowErrors.h"
#include "utility/messaging/type/MessageShowFile.h"
#include "utility/messaging/type/MessageShowScope.h"
#include "utility/messaging/type/MessageUndo.h"
@@ -39,6 +40,7 @@ class UndoRedoController
, public MessageListener<MessageRedo>
, public MessageListener<MessageRefresh>
, public MessageListener<MessageSearch>
, public MessageListener<MessageShowErrors>
, public MessageListener<MessageShowFile>
, public MessageListener<MessageShowScope>
, public MessageListener<MessageUndo>
@@ -69,6 +71,7 @@ private:
virtual void handleMessage(MessageRedo* message);
virtual void handleMessage(MessageRefresh* message);
virtual void handleMessage(MessageSearch* message);
virtual void handleMessage(MessageShowErrors* message);
virtual void handleMessage(MessageShowFile* message);
virtual void handleMessage(MessageShowScope* message);
virtual void handleMessage(MessageUndo* message);
@@ -12,29 +12,25 @@ NetworkProtocolHelper::NetworkMessage NetworkProtocolHelper::parseMessage(const
{
NetworkMessage networkMessage;
std::string tmpMessage = removeEndOfMessageToken(message);
size_t pos = tmpMessage.find(m_setActiveTokenPrefix);
size_t pos = message.find(m_setActiveTokenPrefix);
if(pos != std::string::npos)
{
tmpMessage = "";
std::string tmpMessage = "";
getSubstringAfterString(message, m_divider, tmpMessage); // just get rid of message type
tmpMessage = removeEndOfMessageToken(tmpMessage);
std::string fileLocation = getSubstringAfterString(tmpMessage, m_divider, tmpMessage);
std::string row = getSubstringAfterString(tmpMessage, m_divider, tmpMessage);
std::string column = tmpMessage; // getSubstringAfterString(tmpMessage, "", tmpMessage); // there should be nothing left in the message but the column number
std::string column = tmpMessage; // there should be nothing left in the message but the column number
if(fileLocation.length() <= 0
|| row.length() <= 0
|| column.length() <= 0
|| isDigits(row) == false
|| isDigits(column) == false)
{
return networkMessage;
}
else
{
if(
fileLocation.length() > 0
&& row.length() > 0
&& column.length() > 0
&& isDigits(row)
&& isDigits(column)
){
networkMessage.fileLocation = fileLocation;
networkMessage.row = std::stoi(row);
networkMessage.column = std::stoi(column);
+2
View File
@@ -5,6 +5,7 @@
#include "component/view/View.h"
#include "data/location/TokenLocationFile.h"
#include "utility/TimePoint.h"
#include "utility/types.h"
class CodeController;
@@ -26,6 +27,7 @@ public:
std::string code;
Id titleId;
TimePoint modificationTime;
std::shared_ptr<TokenLocationFile> locationFile;
+1
View File
@@ -13,6 +13,7 @@ public:
virtual std::string getName() const;
virtual void showMessage(const std::string& message, bool isError, bool showLoader) = 0;
virtual void setErrorCount(size_t count) = 0;
protected:
StatusBarController* getController();
+133
View File
@@ -6,6 +6,7 @@
#include "utility/text/TextAccess.h"
#include "utility/utility.h"
#include "utility/utilityString.h"
#include "utility/Version.h"
SqliteStorage::SqliteStorage(const std::string& dbFilePath)
{
@@ -47,6 +48,23 @@ void SqliteStorage::rollbackTransaction()
m_database.execDML("ROLLBACK TRANSACTION;");
}
Version SqliteStorage::getVersion() const
{
std::string versionStr = getMetaValue("version");
if (versionStr.size())
{
return Version::fromString(versionStr);
}
return Version();
}
void SqliteStorage::setVersion(const Version& version)
{
insertOrUpdateMetaValue("version", version.toString());
}
Id SqliteStorage::addEdge(int type, Id sourceNodeId, Id targetNodeId)
{
m_database.execDML(
@@ -146,6 +164,35 @@ Id SqliteStorage::addSignature(Id nodeId, const std::string& signature)
return m_database.lastRowId();
}
Id SqliteStorage::addError(const std::string& message, const std::string& filePath, uint lineNumber, uint columnNumber)
{
std::string sanitizedMessage = utility::replace(message, "'", "''");
// check for duplicate
CppSQLite3Query q = m_database.execQuery((
"SELECT * FROM error WHERE "
"message == '" + sanitizedMessage + "' AND "
"file_path == '" + filePath + "' AND "
"line_number == " + std::to_string(lineNumber) + " AND "
"column_number == " + std::to_string(columnNumber) + ";"
).c_str());
if (!q.eof())
{
return q.getIntField(0, -1);
}
std::cout << ("INSERT INTO error(message, file_path, line_number, column_number) "
"VALUES ('" + sanitizedMessage + "', '" + filePath + "', " + std::to_string(lineNumber) + ", " + std::to_string(columnNumber) + ");") << std::endl;
m_database.execDML((
"INSERT INTO error(message, file_path, line_number, column_number) "
"VALUES ('" + sanitizedMessage + "', '" + filePath + "', " + std::to_string(lineNumber) + ", " + std::to_string(columnNumber) + ");"
).c_str());
return m_database.lastRowId();
}
void SqliteStorage::removeElement(Id id)
{
m_database.execDML((
@@ -213,6 +260,13 @@ void SqliteStorage::removeUnusedNameHierarchyElements()
);
}
void SqliteStorage::removeErrorsInFiles(const std::vector<FilePath>& filePaths)
{
m_database.execDML((
"DELETE FROM error WHERE file_path IN ('" + utility::join(utility::toStrings(filePaths), "', '") + "');"
).c_str());
}
StorageNode SqliteStorage::getFirstNode() const
{
std::vector<StorageNode> nodes = getAllNodes("LIMIT 1");
@@ -673,6 +727,28 @@ Id SqliteStorage::getNodeIdBySignature(const std::string& signature) const
return 0;
}
std::vector<StorageError> SqliteStorage::getAllErrors() const
{
CppSQLite3Query q = m_database.execQuery(
"SELECT message, file_path, line_number, column_number FROM error;"
);
std::vector<StorageError> errors;
while (!q.eof())
{
const std::string message = q.getStringField(0, "");
const std::string filePath = q.getStringField(1, "");
const uint lineNumber = q.getIntField(2, 0);
const uint columnNumber = q.getIntField(3, 0);
errors.push_back(StorageError(message, filePath, lineNumber, columnNumber));
q.nextRow();
}
return errors;
}
int SqliteStorage::getNodeCount() const
{
return m_database.execScalar("SELECT COUNT(*) FROM node;");
@@ -700,6 +776,7 @@ int SqliteStorage::getSourceLocationCount() const
void SqliteStorage::clearTables()
{
m_database.execDML("DROP TABLE IF EXISTS main.error;");
m_database.execDML("DROP TABLE IF EXISTS main.function_signature;");
m_database.execDML("DROP TABLE IF EXISTS main.component_access;");
m_database.execDML("DROP TABLE IF EXISTS main.source_location;");
@@ -708,10 +785,19 @@ void SqliteStorage::clearTables()
m_database.execDML("DROP TABLE IF EXISTS main.node;");
m_database.execDML("DROP TABLE IF EXISTS main.edge;");
m_database.execDML("DROP TABLE IF EXISTS main.element;");
m_database.execDML("DROP TABLE IF EXISTS main.meta;");
}
void SqliteStorage::setupTables()
{
m_database.execDML(
"CREATE TABLE IF NOT EXISTS meta("
"id INTEGER, "
"key TEXT, "
"value TEXT, "
"PRIMARY KEY(id));"
);
m_database.execDML(
"CREATE TABLE IF NOT EXISTS element("
"id INTEGER, "
@@ -791,6 +877,53 @@ void SqliteStorage::setupTables()
"PRIMARY KEY(id), "
"FOREIGN KEY(id) REFERENCES node(id) ON DELETE CASCADE);"
);
m_database.execDML(
"CREATE TABLE IF NOT EXISTS error("
"id INTEGER NOT NULL, "
"message TEXT, "
"file_path TEXT, "
"line_number INTEGER, "
"column_number INTEGER, "
"PRIMARY KEY(id));"
);
}
bool SqliteStorage::hasTable(const std::string& tableName) const
{
CppSQLite3Query q = m_database.execQuery((
"SELECT name FROM sqlite_master WHERE type='table' AND name='" + tableName + "';"
).c_str());
if (!q.eof())
{
return q.getStringField(0, "") == tableName;
}
return false;
}
std::string SqliteStorage::getMetaValue(const std::string& key) const
{
if (hasTable("meta"))
{
CppSQLite3Query q = m_database.execQuery(("SELECT value FROM meta WHERE key = '" + key + "';").c_str());
if (!q.eof())
{
return q.getStringField(0, "");
}
}
return "";
}
void SqliteStorage::insertOrUpdateMetaValue(const std::string& key, const std::string& value)
{
m_database.execDML((
"INSERT OR REPLACE INTO meta(id, key, value) "
"VALUES( (SELECT id FROM meta WHERE key = '" + key + "'), '" + key + "', '" + value + "');"
).c_str());
}
StorageFile SqliteStorage::getFirstFile(const std::string& query) const
+15
View File
@@ -15,6 +15,7 @@
#include "data/StorageTypes.h"
class TextAccess;
class Version;
class SqliteStorage
{
@@ -29,6 +30,9 @@ public:
void commitTransaction();
void rollbackTransaction();
Version getVersion() const;
void setVersion(const Version& version);
Id addEdge(int type, Id sourceNodeId, Id targetNodeId);
Id addNode(int type, Id nameId, bool defined);
Id addFile(Id nameId, const std::string& filePath, const std::string& modificationTime);
@@ -38,6 +42,8 @@ public:
Id addComponentAccess(Id memberEdgeId, int type);
Id addSignature(Id nodeId, const std::string& signature);
Id addError(const std::string& message, const std::string& filePath, uint lineNumber, uint columnNumber);
void removeElement(Id id);
void removeNameHierarchyElement(Id id);
void removeElementsWithLocationInFiles(const std::vector<Id>& fileIds);
@@ -45,6 +51,8 @@ public:
void removeFiles(const std::vector<Id>& fileIds);
void removeUnusedNameHierarchyElements();
void removeErrorsInFiles(const std::vector<FilePath>& filePaths);
StorageNode getFirstNode() const;
std::vector<StorageNode> getAllNodes() const;
@@ -97,6 +105,8 @@ public:
std::vector<StorageComponentAccess> getComponentAccessByMemberEdgeIds(const std::vector<Id>& memberEdgeIds) const;
Id getNodeIdBySignature(const std::string& signature) const;
std::vector<StorageError> getAllErrors() const;
int getNodeCount() const;
int getEdgeCount() const;
int getFileCount() const;
@@ -107,6 +117,11 @@ private:
void clearTables();
void setupTables();
bool hasTable(const std::string& tableName) const;
std::string getMetaValue(const std::string& key) const;
void insertOrUpdateMetaValue(const std::string& key, const std::string& value);
StorageFile getFirstFile(const std::string& query) const;
std::vector<StorageFile> getAllFiles(const std::string& query) const;
StorageSourceLocation getFirstSourceLocation(const std::string& query) const;
+48 -41
View File
@@ -5,6 +5,7 @@
#include "utility/file/FileSystem.h"
#include "utility/logging/logging.h"
#include "utility/TimePoint.h"
#include "utility/utility.h"
#include "utility/utilityString.h"
@@ -19,6 +20,7 @@
#include "data/parser/ParseVariable.h"
#include "data/type/DataType.h"
#include "settings/ApplicationSettings.h"
#include "utility/Version.h"
Storage::Storage(const FilePath& dbPath)
: m_sqliteStorage(dbPath.str())
@@ -29,14 +31,16 @@ Storage::~Storage()
{
}
Version Storage::getVersion() const
{
return m_sqliteStorage.getVersion();
}
void Storage::clear()
{
m_sqliteStorage.clear();
clearCaches();
m_errorMessages.clear();
m_errorLocationCollection.clear();
}
void Storage::clearCaches()
@@ -89,6 +93,8 @@ void Storage::clearFileElements(const std::vector<FilePath>& filePaths)
{
m_sqliteStorage.removeElementsWithLocationInFiles(fileNodeIds);
m_sqliteStorage.removeFiles(fileNodeIds);
m_sqliteStorage.removeErrorsInFiles(filePaths);
}
}
@@ -148,6 +154,7 @@ void Storage::logStats() const
void Storage::startParsing()
{
m_sqliteStorage.setVersion(Version::getApplicationVersion());
}
void Storage::finishParsing()
@@ -175,41 +182,12 @@ void Storage::onError(const ParseLocation& location, const std::string& message)
return;
}
bool duplicate = false;
TokenLocationFile* file = m_errorLocationCollection.findTokenLocationFileByPath(location.filePath);
if (file)
{
file->forEachStartTokenLocation(
[&](TokenLocation* loc)
{
if (loc->getLineNumber() == location.startLineNumber &&
loc->getColumnNumber() == location.startColumnNumber &&
m_errorMessages[loc->getTokenId()] == message)
{
duplicate = true;
}
}
);
}
if (!duplicate)
{
Id errorId = m_errorMessages.size();
m_errorLocationCollection.addTokenLocation(
getErrorCount(), errorId, location.filePath,
location.startLineNumber, location.startColumnNumber,
location.endLineNumber, location.endColumnNumber
);
m_errorMessages.push_back(message);
}
m_sqliteStorage.addError(message, location.filePath.str(), location.startLineNumber, location.startColumnNumber);
}
size_t Storage::getErrorCount() const
{
return m_errorLocationCollection.getTokenLocationCount();
return m_sqliteStorage.getAllErrors().size();
}
Id Storage::onTypedefParsed(
@@ -635,7 +613,7 @@ Id Storage::onTemplateMemberFunctionSpecializationParsed(
Id specializedFunctionNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, specializedFunction, false);
Id edgeId = addEdge(instantiatedFunctionNodeId, specializedFunctionNodeId, Edge::EDGE_TEMPLATE_MEMBER_SPECIALIZATION_OF, location);
return edgeId;
}
@@ -770,12 +748,26 @@ Node::NodeType Storage::getNodeTypeForNodeWithId(Id nodeId) const
return Node::intToType(m_sqliteStorage.getNodeById(nodeId).type);
}
std::vector<SearchMatch> Storage::getAutocompletionMatches(const std::string& query, const std::string& word) const
std::vector<SearchMatch> Storage::getAutocompletionMatches(const std::string& query) const
{
SearchResults tokenResults = m_tokenIndex.runFuzzySearch(word);
if (query.size() == m_cachedQuery.size() + 1 && query.find(m_cachedQuery) == 0 && m_cachedResults.size())
{
m_cachedResults = m_tokenIndex.runFuzzySearchCached(query, m_cachedResults);
}
else
{
m_cachedResults = m_tokenIndex.runFuzzySearch(query);
}
std::vector<SearchMatch> matches = SearchIndex::getMatches(tokenResults, word);
SearchMatch::log(matches, word);
m_cachedQuery = query;
std::vector<SearchMatch> matches = SearchIndex::getMatches(m_cachedResults, query);
SearchMatch::log(matches, query);
if (matches.size() > 100)
{
matches.resize(100);
}
for (SearchMatch& match : matches)
{
@@ -1154,8 +1146,18 @@ std::shared_ptr<TokenLocationFile> Storage::getTokenLocationsForLinesInFile(
TokenLocationCollection Storage::getErrorTokenLocations(std::vector<std::string>* errorMessages) const
{
errorMessages->insert(errorMessages->begin(), m_errorMessages.begin(), m_errorMessages.end());
return m_errorLocationCollection;
TokenLocationCollection errorCollection;
std::vector<StorageError> errors = m_sqliteStorage.getAllErrors();
for (size_t i = 0; i < errors.size(); i++)
{
const StorageError& error = errors[i];
errorCollection.addTokenLocation(
i, i, error.filePath, error.lineNumber, error.columnNumber, error.lineNumber, error.columnNumber);
errorMessages->push_back(error.message);
}
return errorCollection;
}
std::shared_ptr<TokenLocationFile> Storage::getTokenLocationOfParentScope(const TokenLocation* child) const
@@ -1198,6 +1200,11 @@ std::shared_ptr<TextAccess> Storage::getFileContent(const FilePath& filePath) co
return m_sqliteStorage.getFileContentByPath(filePath.str());
}
TimePoint Storage::getFileModificationTime(const FilePath& filePath) const
{
return TimePoint(m_sqliteStorage.getFileByPath(filePath.str()).modificationTime);
}
Id Storage::addNodeHierarchy(Node::NodeType nodeType, NameHierarchy nameHierarchy, bool defined, bool distinct)
{
std::vector<Id> nameIds = addNameHierarchyElements(nameHierarchy);
+6 -6
View File
@@ -23,6 +23,8 @@ public:
Storage(const FilePath& dbPath);
virtual ~Storage();
Version getVersion() const;
void clear();
void clearCaches();
@@ -134,8 +136,7 @@ public:
virtual NameHierarchy getNameHierarchyForNodeWithId(Id nodeId) const;
virtual Node::NodeType getNodeTypeForNodeWithId(Id nodeId) const;
virtual std::vector<SearchMatch> getAutocompletionMatches(
const std::string& query, const std::string& word) const;
virtual std::vector<SearchMatch> getAutocompletionMatches(const std::string& query) const;
virtual std::vector<SearchMatch> getSearchMatchesForTokenIds(const std::vector<Id>& tokenIds) const;
virtual std::shared_ptr<Graph> getGraphForActiveTokenIds(const std::vector<Id>& tokenIds) const;
@@ -160,8 +161,7 @@ public:
virtual std::shared_ptr<TokenLocationFile> getTokenLocationOfParentScope(const TokenLocation* child) const;
virtual std::shared_ptr<TextAccess> getFileContent(const FilePath& filePath) const;
virtual TimePoint getFileModificationTime(const FilePath& filePath) const;
private:
Id addNodeHierarchy(Node::NodeType nodeType, NameHierarchy nameHierarchy, bool defined, bool distinct = false);
@@ -203,8 +203,8 @@ private:
mutable std::map <FilePath, Id> m_fileNodeIds;
HierarchyCache m_hierarchyCache;
TokenLocationCollection m_errorLocationCollection;
std::vector<std::string> m_errorMessages;
mutable SearchResults m_cachedResults;
mutable std::string m_cachedQuery;
};
#endif // STORAGE_H
+15
View File
@@ -80,4 +80,19 @@ struct StorageComponentAccess
int type;
};
struct StorageError
{
StorageError(const std::string& message, const std::string& filePath, uint lineNumber, uint columnNumber)
: message(message)
, filePath(filePath)
, lineNumber(lineNumber)
, columnNumber(columnNumber)
{}
std::string message;
std::string filePath;
uint lineNumber;
uint columnNumber;
};
#endif // STORAGE_TYPES_H
+1
View File
@@ -2,6 +2,7 @@
#include "data/Storage.h"
#include "utility/messaging/type/MessageStatus.h"
#include "utility/utility.h"
TaskCleanStorage::TaskCleanStorage(Storage* storage, const std::vector<FilePath>& filePaths)
: m_storage(storage)
+2 -2
View File
@@ -5,7 +5,7 @@
#include "utility/file/FilePath.h"
#include "utility/scheduling/Task.h"
#include "utility/utility.h"
#include "utility/TimePoint.h"
class Storage;
@@ -30,7 +30,7 @@ private:
std::vector<FilePath> m_filePaths;
const size_t m_fileCount;
utility::TimePoint m_start;
TimePoint m_start;
};
#endif // TASK_PARSE_CXX_H
+3 -2
View File
@@ -17,6 +17,7 @@ class TextAccess;
class TokenLocation;
class TokenLocationCollection;
class TokenLocationFile;
class TimePoint;
class StorageAccess
{
@@ -32,8 +33,7 @@ public:
virtual NameHierarchy getNameHierarchyForNodeWithId(Id id) const = 0;
virtual Node::NodeType getNodeTypeForNodeWithId(Id id) const = 0;
virtual std::vector<SearchMatch> getAutocompletionMatches(
const std::string& query, const std::string& word) const = 0;
virtual std::vector<SearchMatch> getAutocompletionMatches(const std::string& query) const = 0;
virtual std::vector<SearchMatch> getSearchMatchesForTokenIds(const std::vector<Id>& tokenIds) const = 0;
virtual std::shared_ptr<Graph> getGraphForActiveTokenIds(const std::vector<Id>& tokenIds) const = 0;
@@ -57,6 +57,7 @@ public:
virtual std::shared_ptr<TokenLocationFile> getTokenLocationOfParentScope(const TokenLocation* child) const = 0;
virtual std::shared_ptr<TextAccess> getFileContent(const FilePath& filePath) const = 0;
virtual TimePoint getFileModificationTime(const FilePath& filePath) const = 0;
};
#endif // STORAGE_ACCESS_H
+14 -5
View File
@@ -6,6 +6,7 @@
#include "utility/logging/logging.h"
#include "utility/file/FileInfo.h"
#include "utility/TimePoint.h"
StorageAccessProxy::StorageAccessProxy()
: m_subject(nullptr)
@@ -82,13 +83,11 @@ NameHierarchy StorageAccessProxy::getNameHierarchyForNodeWithId(Id id) const
return NameHierarchy();
}
std::vector<SearchMatch> StorageAccessProxy::getAutocompletionMatches(
const std::string& query,
const std::string& word
) const {
std::vector<SearchMatch> StorageAccessProxy::getAutocompletionMatches(const std::string& query) const
{
if (hasSubject())
{
return m_subject->getAutocompletionMatches(query, word);
return m_subject->getAutocompletionMatches(query);
}
return std::vector<SearchMatch>();
@@ -245,3 +244,13 @@ std::shared_ptr<TextAccess> StorageAccessProxy::getFileContent(const FilePath& f
return nullptr;
}
TimePoint StorageAccessProxy::getFileModificationTime(const FilePath& filePath) const
{
if (hasSubject())
{
return m_subject->getFileModificationTime(filePath);
}
return TimePoint(boost::posix_time::not_a_date_time);
}
+2 -1
View File
@@ -22,7 +22,7 @@ public:
virtual NameHierarchy getNameHierarchyForNodeWithId(Id id) const;
virtual Node::NodeType getNodeTypeForNodeWithId(Id id) const;
virtual std::vector<SearchMatch> getAutocompletionMatches(const std::string& query, const std::string& word) const;
virtual std::vector<SearchMatch> getAutocompletionMatches(const std::string& query) const;
virtual std::vector<SearchMatch> getSearchMatchesForTokenIds(const std::vector<Id>& tokenIds) const;
virtual std::shared_ptr<Graph> getGraphForActiveTokenIds(const std::vector<Id>& tokenIds) const;
@@ -47,6 +47,7 @@ public:
virtual std::shared_ptr<TokenLocationFile> getTokenLocationOfParentScope(const TokenLocation* child) const;
virtual std::shared_ptr<TextAccess> getFileContent(const FilePath& filePath) const;
virtual TimePoint getFileModificationTime(const FilePath& filePath) const;
private:
StorageAccess* m_subject;
+24 -2
View File
@@ -876,7 +876,18 @@ ParseLocation ASTVisitor::getParseLocationOfFunctionBody(const clang::FunctionDe
{
if (decl->hasBody() && decl->isThisDeclarationADefinition())
{
return getParseLocation(decl->getSourceRange());
clang::SourceRange range;
clang::FunctionTemplateDecl* templateDecl = decl->getDescribedFunctionTemplate();
if (templateDecl)
{
range = templateDecl->getSourceRange();
}
else
{
range = decl->getSourceRange();
}
return getParseLocation(range);
}
return ParseLocation();
@@ -886,7 +897,18 @@ ParseLocation ASTVisitor::getParseLocationOfRecordBody(clang::CXXRecordDecl* dec
{
if (decl->hasDefinition() && decl->isThisDeclarationADefinition())
{
return getParseLocation(decl->getDefinition()->getSourceRange());
clang::SourceRange range;
clang::ClassTemplateDecl* templateDecl = decl->getDescribedClassTemplate();
if (templateDecl)
{
range = templateDecl->getSourceRange();
}
else
{
range = decl->getDefinition()->getSourceRange();
}
return getParseLocation(range);
}
return ParseLocation();
+2 -2
View File
@@ -2,11 +2,11 @@
#include <sstream>
#include "data/parser/ParserClient.h"
#include "utility/file/FileRegister.h"
#include "utility/messaging/type/MessageFinishedParsing.h"
#include "utility/messaging/type/MessageStatus.h"
#include "data/parser/ParserClient.h"
#include "utility/utility.h"
TaskParseCxx::TaskParseCxx(
ParserClient* client,
+2 -2
View File
@@ -4,7 +4,7 @@
#include <queue>
#include "utility/scheduling/Task.h"
#include "utility/utility.h"
#include "utility/TimePoint.h"
#include "data/parser/cxx/CxxParser.h"
@@ -34,7 +34,7 @@ private:
std::queue<FilePath> m_sourcePaths;
utility::TimePoint m_start;
TimePoint m_start;
};
#endif // TASK_PARSE_CXX_H
+23 -1
View File
@@ -15,7 +15,7 @@ std::vector<SearchMatch> SearchIndex::getMatches(
for (SearchResultsIterator it = searchResults.begin(); it != searchResults.end(); it++)
{
SearchMatch match = it->node->fuzzyMatchData(query, it->parent);
SearchMatch match = it->node->fuzzyMatchData(query, it->parent->getParent());
result.push_back(match);
}
@@ -105,6 +105,10 @@ SearchNode* SearchIndex::getNode(const std::string& fullName) const
SearchNode* SearchIndex::getNode(const SearchNode* searchNode) const
{
if(searchNode == nullptr)
{
return nullptr;
}
std::deque<Id> nameIds = searchNode->getNameIdsRecursive();
if (nameIds.size())
@@ -117,6 +121,10 @@ SearchNode* SearchIndex::getNode(const SearchNode* searchNode) const
void SearchIndex::removeNode(SearchNode* searchNode)
{
if(searchNode == nullptr)
{
return;
}
SearchNode* parent = searchNode->getParent();
if (!parent)
@@ -130,6 +138,10 @@ void SearchIndex::removeNode(SearchNode* searchNode)
bool SearchIndex::removeNodeIfUnreferencedRecursive(SearchNode* searchNode)
{
if(searchNode == nullptr)
{
return false;
}
if (!searchNode->hasTokenIdsRecursive())
{
SearchNode* parent = searchNode->getParent();
@@ -149,6 +161,11 @@ bool SearchIndex::removeNodeIfUnreferencedRecursive(SearchNode* searchNode)
void SearchIndex::addTokenId(SearchNode* node, Id tokenId)
{
if(node == nullptr)
{
LOG_ERROR("Node points to nullptr: Can't add tokenid");
return;
}
node->addTokenId(tokenId);
m_tokenIds.emplace(tokenId, node);
}
@@ -171,6 +188,11 @@ SearchResults SearchIndex::runFuzzySearch(const std::string& query) const
return m_root.runFuzzySearch(query);
}
SearchResults SearchIndex::runFuzzySearchCached(const std::string& query, const SearchResults& searchResults) const
{
return m_root.runFuzzySearchCached(query, searchResults);
}
std::vector<SearchMatch> SearchIndex::runFuzzySearchAndGetMatches(const std::string& query) const
{
return getMatches(runFuzzySearch(query), query);
+1
View File
@@ -40,6 +40,7 @@ public:
NameHierarchy getNameHierarchyForTokenId(Id tokenId) const;
SearchResults runFuzzySearch(const std::string& query) const;
SearchResults runFuzzySearchCached(const std::string& query, const SearchResults& searchResults) const;
std::vector<SearchMatch> runFuzzySearchAndGetMatches(const std::string& query) const;
static const std::string DELIMITER;
+29 -15
View File
@@ -162,12 +162,32 @@ SearchResults SearchNode::runFuzzySearch(const std::string& query) const
FuzzyMap m = n->fuzzyMatchRecursive(query, 0, 0, 0);
for (const std::pair<size_t, const SearchNode*>& p : m)
{
addResultsRecursive(&result, p.first, p.second);
addResultsRecursive(&result, p.first, p.second, n.get());
}
}
return result;
}
SearchResults SearchNode::runFuzzySearchCached(const std::string& query, const SearchResults& searchResults) const
{
SearchResults result;
std::set<const SearchNode*> nodes;
for (const SearchResult& r : searchResults)
{
nodes.insert(r.parent);
}
for (const SearchNode* n : nodes)
{
FuzzyMap m = n->fuzzyMatchRecursive(query, 0, 0, 0);
for (const std::pair<size_t, const SearchNode*>& p : m)
{
addResultsRecursive(&result, p.first, p.second, n);
}
}
// TODO: Currently all matches are added to the ordered set and get compared by their fullName for alphabetical
// order. This could be improved by limiting the number of items to e.g. 100.
return result;
}
@@ -177,26 +197,20 @@ SearchResults SearchNode::runFuzzySearchOnSelf(const std::string& query) const
FuzzyMap m = fuzzyMatchRecursive(query, 0, 0, 0);
for (const std::pair<size_t, const SearchNode*>& p : m)
{
addResultsRecursive(&result, p.first, p.second);
addResultsRecursive(&result, p.first, p.second, this);
}
// TODO: Currently all matches are added to the ordered set and get compared by their fullName for alphabetical
// order. This could be improved by limiting the number of items to e.g. 100.
return result;
}
void SearchNode::addResults(SearchResults* results, size_t weight, const SearchNode* node) const
{
results->insert(SearchResult(weight, node, this));
}
void SearchNode::addResultsRecursive(SearchResults* results, size_t weight, const SearchNode* node) const
{
addResults(results, weight, node);
void SearchNode::addResultsRecursive(
SearchResults* results, size_t weight, const SearchNode* node, const SearchNode* parent
) const {
results->insert(SearchResult(weight, node, parent));
for (std::shared_ptr<SearchNode> n: node->m_nodes)
{
addResultsRecursive(results, weight, n.get());
addResultsRecursive(results, weight, n.get(), parent);
}
}
+2 -2
View File
@@ -45,10 +45,10 @@ public:
const std::set<std::shared_ptr<SearchNode>>& getChildren() const;
SearchResults runFuzzySearch(const std::string& query) const;
SearchResults runFuzzySearchCached(const std::string& query, const SearchResults& searchResults) const;
SearchResults runFuzzySearchOnSelf(const std::string& query) const;
void addResults(SearchResults* results, size_t weight, const SearchNode* node) const;
void addResultsRecursive(SearchResults* results, size_t weight, const SearchNode* node) const;
void addResultsRecursive(SearchResults* results, size_t weight, const SearchNode* node, const SearchNode* parent) const;
private:
typedef std::multimap<size_t, const SearchNode*> FuzzyMap;
+31
View File
@@ -0,0 +1,31 @@
#include "TimePoint.h"
TimePoint::TimePoint()
: m_time(boost::posix_time::not_a_date_time)
{
}
TimePoint::TimePoint(boost::posix_time::ptime t)
: m_time(t)
{
}
//TimePoint::TimePoint(time_t t)
//{
// needs an implementation
//}
TimePoint::TimePoint(std::string s)
{
m_time = boost::posix_time::time_from_string(s);
}
std::string TimePoint::toString() const
{
std::stringstream stream;
boost::posix_time::time_facet* facet = new boost::posix_time::time_facet();
facet->format("%Y-%m-%d %H:%M:%S");
stream.imbue(std::locale(std::locale::classic(), facet));
stream << m_time;
return stream.str();
}
+29
View File
@@ -0,0 +1,29 @@
#ifndef TIME_POINT_H
#define TIME_POINT_H
#include "boost/date_time/posix_time/posix_time.hpp"
class TimePoint
{
public:
TimePoint();
TimePoint(boost::posix_time::ptime t);
//TimePoint(time_t t);
TimePoint(std::string s);
std::string toString() const;
inline bool operator==(const TimePoint& rhs){ return m_time == rhs.m_time; }
inline bool operator!=(const TimePoint& rhs){ return m_time != rhs.m_time; }
inline bool operator<(const TimePoint& rhs){ return m_time < rhs.m_time; }
inline bool operator>(const TimePoint& rhs){ return m_time > rhs.m_time; }
inline bool operator<=(const TimePoint& rhs){ return m_time <= rhs.m_time; }
inline bool operator>=(const TimePoint& rhs){ return m_time >= rhs.m_time; }
inline float operator-(const TimePoint& rhs){ return (m_time - rhs.m_time).total_milliseconds() / 1000.0f; }
private:
boost::posix_time::ptime m_time;
};
#endif // TIME_POINT_H
+114
View File
@@ -0,0 +1,114 @@
#include "utility/Version.h"
#include "utility/utilityString.h"
#include "utility/logging/logging.h"
Version Version::s_version;
Version Version::fromString(const std::string& versionString)
{
Version version;
std::vector<std::string> components = utility::splitToVector(versionString, '-');
if (components.size() != 3)
{
LOG_ERROR("Version string is invalid: " + versionString);
return version;
}
std::vector<std::string> numbers = utility::splitToVector(components[0], '.');
if (numbers.size() > 0)
{
version.m_majorNumber = std::stoi(numbers[0]);
}
if (numbers.size() > 1)
{
version.m_minorNumber = std::stoi(numbers[1]);
}
if (numbers.size() > 2)
{
version.m_refreshNumber = std::stoi(numbers[2]);
}
version.m_commitNumber = std::stoi(components[1]);
version.m_commitHash = components[2];
return version;
}
void Version::setApplicationVersion(const Version& version)
{
s_version = version;
}
const Version& Version::getApplicationVersion()
{
return s_version;
}
Version::Version()
: m_majorNumber(0)
, m_minorNumber(0)
, m_refreshNumber(0)
, m_commitNumber(0)
{
}
bool Version::operator<(const Version& other)
{
if (m_majorNumber != other.m_majorNumber)
{
return m_majorNumber < other.m_majorNumber;
}
else if (m_minorNumber != other.m_minorNumber)
{
return m_minorNumber < other.m_minorNumber;
}
else if (m_refreshNumber != other.m_refreshNumber)
{
return m_refreshNumber < other.m_refreshNumber;
}
else if (m_commitNumber != other.m_commitNumber)
{
return m_commitNumber < other.m_commitNumber;
}
else
{
return false;
}
}
bool Version::isOlderStorageVersionThan(const Version& other)
{
if (m_majorNumber != other.m_majorNumber)
{
return m_majorNumber < other.m_majorNumber;
}
else if (m_minorNumber != other.m_minorNumber)
{
return m_minorNumber < other.m_minorNumber;
}
else if (m_refreshNumber != other.m_refreshNumber)
{
return m_refreshNumber < other.m_refreshNumber;
}
else
{
return false;
}
}
std::string Version::toString() const
{
std::stringstream ss;
ss << m_majorNumber << '.' << m_minorNumber << '.' << m_refreshNumber;
ss << '-' << m_commitNumber << '-' << m_commitHash;
return ss.str();
}
std::string Version::toDisplayString() const
{
std::stringstream ss;
ss << m_majorNumber << '.' << m_minorNumber << '.' << m_refreshNumber << '.' << m_commitNumber;
return ss.str();
}
+33
View File
@@ -0,0 +1,33 @@
#ifndef VERSION_H
#define VERSION_H
#include <string>
class Version
{
public:
static Version fromString(const std::string& versionString);
static void setApplicationVersion(const Version& version);
static const Version& getApplicationVersion();
Version();
bool operator<(const Version& other);
bool isOlderStorageVersionThan(const Version& other);
std::string toString() const;
std::string toDisplayString() const;
private:
static Version s_version;
int m_majorNumber;
int m_minorNumber;
int m_refreshNumber;
int m_commitNumber;
std::string m_commitHash;
};
#endif // VERSION_H
+11
View File
@@ -94,6 +94,17 @@ std::vector<FileInfo> FileSystem::getFileInfosFromPaths(
return files;
}
TimePoint FileSystem::getLastWriteTime(const FilePath& filePath)
{
boost::posix_time::ptime lastWriteTime;
if (FileSystem::exists(filePath.str()))
{
std::time_t t = boost::filesystem::last_write_time(filePath.path());
lastWriteTime = boost::posix_time::from_time_t(t);
}
return TimePoint(lastWriteTime);
}
std::string FileSystem::getTimeStringNow() // TODO: move to utility
{
return boost::posix_time::to_iso_string(boost::posix_time::second_clock::universal_time());
+2
View File
@@ -5,6 +5,7 @@
#include <vector>
#include "utility/file/FileInfo.h"
#include "utility/TimePoint.h"
class FileSystem
{
@@ -19,6 +20,7 @@ public:
static std::vector<FileInfo> getFileInfosFromPaths(
const std::vector<FilePath>& paths, const std::vector<std::string>& fileExtensions);
static TimePoint getLastWriteTime(const FilePath& filePath);
static std::string getTimeStringNow();
static std::vector<FilePath> getSubDirectories(const FilePath& path);
@@ -7,9 +7,8 @@
class MessageSearchAutocomplete: public Message<MessageSearchAutocomplete>
{
public:
MessageSearchAutocomplete(const std::string& query, const std::string& word)
MessageSearchAutocomplete(const std::string& query)
: query(query)
, word(word)
{
}
@@ -19,7 +18,6 @@ public:
}
const std::string query;
const std::string word;
};
#endif // MESSAGE_SEARCH_AUTOCOMPLETE_H
@@ -0,0 +1,20 @@
#ifndef MESSAGE_SHOW_ERRORS_H
#define MESSAGE_SHOW_ERRORS_H
#include "utility/messaging/Message.h"
class MessageShowErrors
: public Message<MessageShowErrors>
{
public:
MessageShowErrors()
{
}
static const std::string getStaticType()
{
return "MessageShowErrors";
}
};
#endif // MESSAGE_SHOW_ERRORS_H
@@ -9,10 +9,9 @@ class MessageShowFile
: public Message<MessageShowFile>
{
public:
MessageShowFile(const FilePath& filePath, uint startLineNumber, uint endLineNumber)
MessageShowFile(const FilePath& filePath, bool showErrors)
: filePath(filePath)
, startLineNumber(startLineNumber)
, endLineNumber(endLineNumber)
, showErrors(showErrors)
{
}
@@ -22,8 +21,7 @@ public:
}
const FilePath filePath;
const uint startLineNumber;
const uint endLineNumber;
const bool showErrors;
};
#endif // MESSAGE_SHOW_FILE_H

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