Compare commits

..
Author SHA1 Message Date
Eberhard Graether 9550ea1fdc delta time for loader 2016-07-08 14:37:49 +02:00
Eberhard Graether cad473c097 started with delay 2016-07-08 14:37:49 +02:00
Eberhard Graether 89264d97bb in code view 2016-07-08 14:37:49 +02:00
Eberhard Graether 096291a6c4 fixed animation 2016-07-08 14:37:49 +02:00
Eberhard Graether 1fcb241189 View interface 2016-07-08 14:37:49 +02:00
Eberhard Graether 996b33b1fb overlay for code view 2016-07-08 14:37:49 +02:00
Eberhard Graether fea26bfc60 animated loader with circles 2016-07-08 14:37:49 +02:00
Eberhard Graether 6a3717b8c1 basic overlay for graph view 2016-07-08 14:37:49 +02:00
1239 changed files with 26356 additions and 108909 deletions
+25 -13
View File
@@ -5,7 +5,6 @@
/bin/app/Debug/
/bin/app/Release/
/bin/app/data/projects/ignored/
/bin/app/data/java/
/bin/app/user/log/
/bin/app/user/ApplicationSettings.xml
/bin/app/user/window_settings.ini
@@ -24,16 +23,13 @@
/bin/test/data/temp.xml
/bin/test/data/TestSettings.xml
/java_indexer/bin/
/java_indexer/lib/
/setup/Linux/lib/
/setup/Linux/lib/*
.DS_Store
.idea
/ide_plugins/vs/vs2015/CoatiPlugin/CoatiPlugin/bin
/ide_plugins/vs/vs2015/CoatiPlugin/CoatiPlugin/obj
/ide_plugins/vs/vs2012/CoatiPlugin/CoatiPlugin/bin
/ide_plugins/vs/vs2012/CoatiPlugin/CoatiPlugin/obj
*.coatidb
*.suo
@@ -49,9 +45,25 @@ compile_commands.json
Makefile
/__pycache__/
/deployment/windows/wixSetup/bin
/deployment/windows/wixSetup/build
/deployment/windows/wixSetup/CustomActions/SetupAppSettings/obj/x86/Release
/deployment/windows/wixSetup/CustomActions/UninstallRemoveLogFolder/obj/x86/Release
/deployment/windows/wixSetup/Setup/build/Setup/Release
/deployment/windows/wixSetup/Setup/build/Setup.VC.db
/deployment/windows/CoatiAppSetup/CoatiSetup/Debug
/deployment/windows/CoatiAppSetup/CoatiSetup/Release
/deployment/windows/CoatiAppSetup/SetupApplicationSettingsLib/bin/
/deployment/windows/CoatiAppSetup/SetupApplicationSettingsLib/obj/
/deployment/windows/CoatiAppSetup/SetupCreateDesktopShortcutLib/bin/
/deployment/windows/CoatiAppSetup/SetupCreateDesktopShortcutLib/obj/
/deployment/windows/CoatiAppSetup/SetupCreateStartMenuShortcutLib/bin/
/deployment/windows/CoatiAppSetup/SetupCreateStartMenuShortcutLib/obj/
/deployment/windows/CoatiAppSetup/SetupRemoveCacheFiles/bin/
/deployment/windows/CoatiAppSetup/SetupRemoveCacheFiles/obj/
/deployment/windows/CoatiTrialSetup/CoatiSetup/Debug
/deployment/windows/CoatiTrialSetup/CoatiSetup/Release
/deployment/windows/CoatiTrialSetup/SetupApplicationSettingsLib/bin/
/deployment/windows/CoatiTrialSetup/SetupApplicationSettingsLib/obj/
/deployment/windows/CoatiTrialSetup/SetupCreateDesktopShortcutLib/bin/
/deployment/windows/CoatiTrialSetup/SetupCreateDesktopShortcutLib/obj/
/deployment/windows/CoatiTrialSetup/SetupCreateStartMenuShortcutLib/bin/
/deployment/windows/CoatiTrialSetup/SetupCreateStartMenuShortcutLib/obj/
/deployment/windows/CoatiTrialSetup/SetupRemoveCacheFiles/bin/
/deployment/windows/CoatiTrialSetup/SetupRemoveCacheFiles/obj/
-31
View File
@@ -1,31 +0,0 @@
Linux64:
image: st4ll1/coati_linux_64
stage: deploy
only:
- master
script:
- ./script/setup.sh
- ./script/buildonly.sh all
- ./script/buildonly.sh package
artifacts:
paths:
- distr
expire_in: 3 days
Linux32:
image: st4ll1/coati_linux_32
stage: deploy
only:
- master
script:
- ./script/setup.sh
- ./script/buildonly.sh all
- ./bin/app/Release/Coati --licenseFile ./setup/license.txt
- cd ./bin/test
- ./Release/Coati_test
- cd ../..
- ./script/buildonly.sh package
artifacts:
paths:
- distr/Coati*.tar.gz
expire_in: 3 days
+169 -86
View File
@@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.1)
#set (CMAKE_VERBOSE_MAKEFILE ON)
include(cmake/add_files.cmake)
include(cmake/create_source_groups.cmake)
include(cmake/version.cmake)
@@ -14,10 +12,10 @@ include(cmake/licenses.cmake)
set(PROJECT_NAME Coati)
set(APP_PROJECT_NAME "${PROJECT_NAME}")
set(TRIAL_PROJECT_NAME "${PROJECT_NAME}_trial")
set(LIB_LICENSE_PROJECT_NAME "${PROJECT_NAME}_lib_license")
set(LIB_GUI_PROJECT_NAME "${PROJECT_NAME}_lib_gui")
set(LIB_CXX_PROJECT_NAME "${PROJECT_NAME}_lib_cxx")
set(LIB_JAVA_PROJECT_NAME "${PROJECT_NAME}_lib_java")
set(LIB_PARSER_PROJECT_NAME "${PROJECT_NAME}_lib_parser")
set(LIB_PROJECT_NAME "${PROJECT_NAME}_lib")
set(LICENSE_GENERATOR_PROJECT_NAME "${PROJECT_NAME}_license_generator")
set(TEST_PROJECT_NAME "${PROJECT_NAME}_test")
@@ -35,12 +33,13 @@ endif ()
project(${PROJECT_NAME})
# set Standard build type to Release
# set Standerd build type to Release
set(CMAKE_BUILD_TYPE_INIT "Release")
#RPATH
if(UNIX AND NOT APPLE)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib/:$$ORIGIN/lib/")
include(cmake/external.cmake)
@@ -55,10 +54,10 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-warning-option -fcolor-diagnostics")
endif()
# For debugging the release build on linux
#if (UNIX AND "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
#add_definitions(-fno-omit-frame-pointer)
#endif ()
if (UNIX)
#add_definitions(-std=c++11 -Wno-unknown-warning-option -fcolor-diagnostics -DQT_COMPILING_QSTRING_COMPAT_CPP )
add_definitions(-fno-omit-frame-pointer -DQT_COMPILING_QSTRING_COMPAT_CPP )
endif ()
# Clang ------------------------------------------------------------------------
@@ -69,7 +68,7 @@ if (UNIX AND APPLE)
find_package(LLVM REQUIRED PATHS "$ENV{CLANG_DIR}/build_debug/share/llvm/cmake" NO_DEFAULT_PATH)
endif()
elseif(UNIX)
find_package(LLVM REQUIRED PATHS "$ENV{LLVM_DIR}/lib/cmake" )
find_package(LLVM REQUIRED PATHS "${EXTERNAL_BUILD}/llvm/share/llvm/cmake" NO_DEFAULT_PATH)
else()
find_package(LLVM REQUIRED PATHS "$ENV{CLANG_DIR}/build/share/llvm/cmake")
endif()
@@ -81,54 +80,56 @@ add_definitions(${CLANG_DEFINITIONS})
# Boost ------------------------------------------------------------------------
if(UNIX AND NOT APPLE)
set(BOOST_ROOT $ENV{BOOST_DIR})
set(BOOST_ROOT ${EXTERNAL_BUILD}/boost)
else()
set(BOOST_ROOT $ENV{BOOST_159_DIR})
set(Boost_NO_SYSTEM_PATHS ON)
endif()
set(Boost_USE_MULTITHREAD ON)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME OFF)
Set(Boost_NO_SYSTEM_PATHS ON)
set(BOOST_LIBRARYDIR $ENV{BOOST_159_DIR})
find_package(Boost 1.59 COMPONENTS system program_options filesystem date_time REQUIRED)
# Eigen ------------------------------------------------------------------------
add_definitions(-DEIGEN_MPL2_ONLY)
if(UNIX AND NOT APPLE)
set(EIGEN_ROOT ${EXTERNAL_SRC}/eigen)
else()
set(EIGEN_ROOT $ENV{EIGEN_DIR})
endif()
# Botan -------------------------------------------------------------------------
set(BOTAN_VERSION "botan-1.11")
if(APPLE)
if(UNIX AND APPLE)
find_library(BOTAN ${BOTAN_VERSION} $ENV{BOTAN_DIR}/release NO_DEFAULT_PATH)
find_library(BOTAN_D ${BOTAN_VERSION} $ENV{BOTAN_DIR}/debug NO_DEFAULT_PATH)
elseif(UNIX)
find_library(BOTAN ${BOTAN_VERSION} "${BOTAN_DIR}")
find_library(BOTAN ${BOTAN_VERSION} "${EXTERNAL_BUILD}/botan" NO_DEFAULT_PATH)
else()
find_library(BOTAN botan "$ENV{BOTAN_DIR}/release")
find_library(BOTAN_D botan "$ENV{BOTAN_DIR}/debug")
endif()
message(STATUS "botanversion: ${BOTAN}")
if(${BOTAN} STREQUAL "BOTAN-NOTFOUND")
message(FATAL_ERROR "Botan not found")
else()
message(STATUS "Botan found")
endif()
if(UNIX AND NOT APPLE)
find_path(BOTAN_INCLUDE_DIR NAMES botan/botan.h
PATH_SUFFIXES ${BOTAN_VERSION}
DOC "The Botan include directory")
set(BOTAN_INCLUDE_DIR "${EXTERNAL_BUILD}/botan")
else()
set(BOTAN_INCLUDE_DIR "$ENV{BOTAN_DIR}/build/include")
set(BOTAN_INCLUDE_DIR "$ENV{BOTAN_DIR}")
endif()
if(NOT BOTAN_INCLUDE_DIR)
message(FATAL_ERROR "Botan include dir not found")
endif()
# Lib License -------------------------------------------------------------------
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib_license)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib_license)
add_subdirectory(src/lib_license)
add_library(${LIB_LICENSE_PROJECT_NAME} ${LIB_LICENSE_FILES})
@@ -141,12 +142,23 @@ set_property(
"${CMAKE_SOURCE_DIR}/src/lib_license"
)
set_target_properties(
${LIB_LICENSE_PROJECT_NAME}
PROPERTIES
DEBUG_OUTPUT_NAME ${LIB_LICENSE_PROJECT_NAME}_d
RELEASE_OUTPUT_NAME ${LIB_LICENSE_PROJECT_NAME}
)
target_include_directories(${LIB_LICENSE_PROJECT_NAME} SYSTEM
PUBLIC
${Boost_INCLUDE_DIRS}
${LIB_LICENSE_PROJECT_NAME}
${BOTAN_INCLUDE_DIR}
)
# target_include_directories(${LIB_LICENSE_PROJECT_NAME} optimized "$ENV{BOTAN_DIR}/release")
# target_include_directories(${LIB_LICENSE_PROJECT_NAME} debug "$ENV{BOTAN_DIR}/debug")
if(UNIX)
target_link_libraries(${LIB_LICENSE_PROJECT_NAME} ${BOTAN})
else()
@@ -157,9 +169,11 @@ else()
target_link_libraries(${LIB_LICENSE_PROJECT_NAME} optimized ${BOTAN})
endif()
# Lib --------------------------------------------------------------------------
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib)
add_subdirectory(src/lib)
add_subdirectory(src/external)
@@ -172,44 +186,59 @@ create_source_groups(${LIB_FILES})
create_source_groups(${EXTERNAL_FILES})
create_source_groups(${EXTERNAL_C_FILES})
set_target_properties(
${LIB_PROJECT_NAME}
PROPERTIES
DEBUG_OUTPUT_NAME ${PROJECT_NAME}_d
RELEASE_OUTPUT_NAME ${PROJECT_NAME}
)
set_property(
TARGET ${LIB_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/lib"
"${CMAKE_SOURCE_DIR}/src/external"
"${CMAKE_SOURCE_DIR}/src/lib_license"
"${CMAKE_SOURCE_DIR}/src/lib_cxx"
"${CMAKE_SOURCE_DIR}/src/lib_java"
"${CMAKE_SOURCE_DIR}/build/src/lib_license"
)
target_include_directories(${LIB_PROJECT_NAME} SYSTEM
PUBLIC ${Boost_INCLUDE_DIR}
PUBLIC ${LLVM_INCLUDE_DIRS}
${CLANG_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${EIGEN_ROOT}
"${CMAKE_SOURCE_DIR}/src/external"
)
target_link_libraries(${LIB_PROJECT_NAME} ${Boost_LIBRARIES} ${LIB_LICENSE_PROJECT_NAME})
# Lib Parser -------------------------------------------------------------------
# Lib Cxx -------------------------------------------------------------------
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib_parser)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib_parser)
add_subdirectory(src/lib_cxx)
add_subdirectory(src/lib_parser)
set_source_files_properties(${CLANG_FILES} PROPERTIES COMPILE_FLAGS "-fno-rtti")
add_library(${LIB_CXX_PROJECT_NAME} ${CLANG_FILES} ${LIB_CXX_FILES})
add_library(${LIB_PARSER_PROJECT_NAME} ${CLANG_FILES})
create_source_groups(${CLANG_FILES})
create_source_groups(${LIB_CXX_FILES})
set_property(
TARGET ${LIB_CXX_PROJECT_NAME}
TARGET ${LIB_PARSER_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/lib_cxx"
"${CMAKE_SOURCE_DIR}/src/lib_parser"
"${CMAKE_SOURCE_DIR}/src/lib"
)
target_include_directories(${LIB_CXX_PROJECT_NAME} SYSTEM
set_target_properties(
${LIB_PARSER_PROJECT_NAME}
PROPERTIES
DEBUG_OUTPUT_NAME ${LIB_PARSER_PROJECT_NAME}_d
RELEASE_OUTPUT_NAME ${LIB_PARSER_PROJECT_NAME}
)
target_include_directories(${LIB_PARSER_PROJECT_NAME} SYSTEM
PUBLIC ${LLVM_INCLUDE_DIRS}
${CLANG_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
@@ -218,43 +247,13 @@ target_include_directories(${LIB_CXX_PROJECT_NAME} SYSTEM
link_directories(${LLVM_LIBRARY_DIRS} ${CLANG_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS})
llvm_map_components_to_libnames(REQ_LLVM_LIBS support core libdriver)
target_link_libraries(${LIB_CXX_PROJECT_NAME} ${CLANG_LIBRARIES} ${REQ_LLVM_LIBS})
# Lib Java -------------------------------------------------------------------
find_package(JNI)
add_subdirectory(src/lib_java)
add_library(${LIB_JAVA_PROJECT_NAME} ${LIB_JAVA_FILES})
create_source_groups(${LIB_JAVA_FILES})
set_property(
TARGET ${LIB_JAVA_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/lib_java"
"${CMAKE_SOURCE_DIR}/src/lib"
)
target_include_directories(${LIB_JAVA_PROJECT_NAME} SYSTEM
PUBLIC ${JNI_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
link_directories(${Boost_LIBRARY_DIRS})
add_custom_command(
TARGET ${LIB_JAVA_PROJECT_NAME}
PRE_BUILD
COMMAND ${PROJECT_SOURCE_DIR}/script/update_java_indexer.sh
COMMENT "updating java indexer jars"
)
target_link_libraries(${LIB_PARSER_PROJECT_NAME} ${CLANG_LIBRARIES} ${REQ_LLVM_LIBS})
# Lib Gui ----------------------------------------------------------------------
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib_gui)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib_gui)
add_subdirectory(src/lib_gui)
# Find includes in corresponding build directories
@@ -263,7 +262,11 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
# Find the QtWidgets library
set(CMAKE_PREFIX_PATH "$ENV{QT_DIR}/")
if(UNIX AND NOT APPLE)
set(CMAKE_PREFIX_PATH ${EXTERNAL_BUILD}/qt)
else()
set(CMAKE_PREFIX_PATH "$ENV{QT_DIR}/")
endif()
if(UNIX AND APPLE)
set(Qt5Widgets_DIR "$ENV{QT_DIR}/cmake/Qt5Widgets/")
@@ -307,17 +310,24 @@ create_source_groups(${LIB_GUI_FILES})
set_property(
TARGET ${LIB_GUI_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/lib_gui"
"${CMAKE_SOURCE_DIR}/build/src/lib_gui"
"${CMAKE_SOURCE_DIR}/src/lib"
"${CMAKE_SOURCE_DIR}/src/lib_cxx"
"${CMAKE_SOURCE_DIR}/src/lib_gui"
"${CMAKE_SOURCE_DIR}/src/lib_license"
"${CMAKE_SOURCE_DIR}/build/src/lib_license"
)
set_target_properties(
${LIB_GUI_PROJECT_NAME}
PROPERTIES
DEBUG_OUTPUT_NAME ${LIB_GUI_PROJECT_NAME}_d
RELEASE_OUTPUT_NAME ${LIB_GUI_PROJECT_NAME}
)
# include external header without warnings
target_include_directories(${LIB_GUI_PROJECT_NAME} SYSTEM
PUBLIC "${CMAKE_SOURCE_DIR}/src/external"
PUBLIC ${BOTAN_INCLUDE_DIR}
PUBLIC ${Boost_INCLUDE_DIRS}
)
@@ -362,7 +372,7 @@ if (WIN32)
"IDI_ICON1 ICON \"${CMAKE_SOURCE_DIR}/build/coati.ico\"\n"
)
add_executable(${APP_PROJECT_NAME} ${APP_FILES} ${CMAKE_SOURCE_DIR}/build/Coati.rc)
add_executable(${APP_PROJECT_NAME} ${APP_FILES} ${CLANG_FILES} ${GEN_FILES} ${CMAKE_SOURCE_DIR}/build/Coati.rc)
# hide the console when running a release build.
set_target_properties(${APP_PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
@@ -372,12 +382,12 @@ if (WIN32)
set_target_properties(${APP_PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/ENTRY:\"mainCRTStartup\" /SUBSYSTEM:WINDOWS")
set_target_properties(${APP_PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
else ()
add_executable(${APP_PROJECT_NAME} ${APP_FILES})
add_executable(${APP_PROJECT_NAME} ${APP_FILES} ${GEN_FILES})
endif ()
create_source_groups(${APP_FILES})
target_link_libraries(${APP_PROJECT_NAME} ${LIB_GUI_PROJECT_NAME} ${LIB_CXX_PROJECT_NAME} ${LIB_JAVA_PROJECT_NAME} ${LIB_PROJECT_NAME} ${LIB_LICENSE_PROJECT_NAME})
target_link_libraries(${APP_PROJECT_NAME} ${LIB_GUI_PROJECT_NAME} ${LIB_PARSER_PROJECT_NAME} ${LIB_PROJECT_NAME} ${LIB_LICENSE_PROJECT_NAME})
set_property(
TARGET ${APP_PROJECT_NAME}
@@ -386,11 +396,10 @@ set_property(
"${CMAKE_SOURCE_DIR}/src/lib"
"${CMAKE_SOURCE_DIR}/src/lib_gui"
"${CMAKE_SOURCE_DIR}/src/lib_license"
"${CMAKE_SOURCE_DIR}/src/lib_cxx"
"${CMAKE_SOURCE_DIR}/src/lib_java"
"${CMAKE_SOURCE_DIR}/src/lib_parser"
"${CMAKE_SOURCE_DIR}/build/src/lib_gui"
"${CMAKE_SOURCE_DIR}/build/src/lib_license"
#"${CMAKE_SOURCE_DIR}/build/src/app"
"${CMAKE_SOURCE_DIR}/build/src/app"
)
target_include_directories(${APP_PROJECT_NAME} SYSTEM
@@ -408,6 +417,71 @@ if (APPLE)
target_link_libraries(${APP_PROJECT_NAME} ${CORE_FOUNDATION})
endif ()
# Trial ---------------------------------------------------------------------
if (UNIX)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/${CMAKE_BUILD_TYPE})
else ()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/)
endif ()
add_subdirectory(src/trial)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
if (WIN32)
file(WRITE ${CMAKE_SOURCE_DIR}/build/Coati.rc
"// Icon with lowest ID value placed first to ensure application icon\n"
"// remains consistent on all systems.\n"
"IDI_ICON1 ICON \"${CMAKE_SOURCE_DIR}/build/coati.ico\"\n"
)
add_executable(${TRIAL_PROJECT_NAME} ${TRIAL_FILES} ${CMAKE_SOURCE_DIR}/build/Coati.rc)
# hide the console when running a release build.
set_target_properties(${TRIAL_PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
set_target_properties(${TRIAL_PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE")
set_target_properties(${TRIAL_PROJECT_NAME} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")
set_target_properties(${TRIAL_PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE")
set_target_properties(${TRIAL_PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/ENTRY:\"mainCRTStartup\" /SUBSYSTEM:WINDOWS")
set_target_properties(${TRIAL_PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
else ()
add_executable(${TRIAL_PROJECT_NAME} ${TRIAL_FILES} ${GEN_FILES})
endif ()
create_source_groups(${TRIAL_FILES})
target_link_libraries(${TRIAL_PROJECT_NAME} ${LIB_GUI_PROJECT_NAME} ${LIB_PROJECT_NAME} ${LIB_LICENSE_PROJECT_NAME} )
if(UNIX AND NOT APPLE)
target_link_libraries(${TRIAL_PROJECT_NAME} pthread dl rt)
endif()
set_property(
TARGET ${TRIAL_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/trial"
"${CMAKE_SOURCE_DIR}/src/lib"
"${CMAKE_SOURCE_DIR}/src/lib_gui"
"${CMAKE_SOURCE_DIR}/build/src/lib_gui"
"${CMAKE_SOURCE_DIR}/build/src/lib_license"
)
target_include_directories(${TRIAL_PROJECT_NAME} SYSTEM
PUBLIC "${CMAKE_SOURCE_DIR}/src/external"
PUBLIC ${Boost_INCLUDE_DIRS}
)
# Use the Widgets module from Qt 5.
qt5_use_modules(${TRIAL_PROJECT_NAME} Widgets)
qt5_use_modules(${TRIAL_PROJECT_NAME} Network)
# add platform specific libraries
if (APPLE)
find_library(CORE_FOUNDATION CoreFoundation)
target_link_libraries(${TRIAL_PROJECT_NAME} ${CORE_FOUNDATION})
endif ()
# MacOSX Bundle ----------------------------------------------------------------
@@ -451,6 +525,12 @@ if (APPLE)
@ONLY
)
configure_file(
${PROJECT_SOURCE_DIR}/setup/MacOSX/Info_trial.plist.in
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/bundle_info_trial.plist
@ONLY
)
endif ()
# License Generator --------------------------------------------------------
@@ -493,7 +573,11 @@ endif ()
add_subdirectory(src/test)
set(CXXTEST_INCLUDE_DIR $ENV{CXX_TEST_DIR})
if(UNIX AND NOT APPLE)
set(CXXTEST_INCLUDE_DIR ${EXTERNAL_SRC}/cxxtest)
else()
set(CXXTEST_INCLUDE_DIR $ENV{CXX_TEST_DIR})
endif()
set(CXXTEST_PYTHON_TESTGEN_EXECUTABLE ${CXXTEST_INCLUDE_DIR}/bin/cxxtestgen)
set(TESTGEN_FILE ${CMAKE_CURRENT_BINARY_DIR}/test_main.cpp)
@@ -503,7 +587,7 @@ add_executable (${TEST_PROJECT_NAME} ${TESTGEN_FILE} ${TEST_FILES} )
create_source_groups(${TEST_FILES})
target_link_libraries(${TEST_PROJECT_NAME} ${LIB_CXX_PROJECT_NAME} ${LIB_JAVA_PROJECT_NAME} ${LIB_PROJECT_NAME} ${LIB_LICENSE_PROJECT_NAME})
target_link_libraries(${TEST_PROJECT_NAME} ${LIB_PARSER_PROJECT_NAME} ${LIB_PROJECT_NAME} ${LIB_LICENSE_PROJECT_NAME})
find_package(CxxTest)
if (CXXTEST_FOUND)
@@ -512,11 +596,10 @@ if (CXXTEST_FOUND)
PROPERTY INCLUDE_DIRECTORIES
"${CXXTEST_INCLUDE_DIR}"
"${CMAKE_SOURCE_DIR}/src/lib"
"${CMAKE_SOURCE_DIR}/src/lib_cxx"
"${CMAKE_SOURCE_DIR}/src/lib_java"
"${CMAKE_SOURCE_DIR}/src/lib_parser"
"${CMAKE_SOURCE_DIR}/src/external"
"${CMAKE_SOURCE_DIR}/src/lib_license"
"${Boost_INCLUDE_DIRS}"
${Boost_INCLUDE_DIRS}
)
endif (CXXTEST_FOUND)
+10 -151
View File
@@ -1,18 +1,16 @@
## Coati
## Masterproject
### Setup
#### External Software
* JDK 1.8
* QT 5.6
* CxxTest 4.3
* Valgrind 3.9.0 (linux)
* Clang & LLVM 3.8 (doesnt quite work for windows, use unix setup below and skip all the ninja stuff)(installation guide http://clang.llvm.org/docs/LibASTMatchersTutorial.html)
* Boost 1.59
* Botan 1.11.34
also something about java, but who knows...
* Eigen 3.2.6
* Botan 1.11.24
#### Environment Variables
@@ -20,13 +18,12 @@ also something about java, but who knows...
* CXX_TEST_DIR - .../cxxtest-4.3
* CLANG_DIR - .../clang-llvm
* BOOST_159_DIR - .../boost_1_59_0
* BOTAN_DIR - .../Botan-1.11.34
* EIGEN_DIR - .../eigen
* BOTAN_DIR - .../Botan-1.11.24
For Win32:
* VLD_DIR - .../Visual Leak Detector
* path
- apped path to git.exe
- apped path to jdk/bin
* path - apped path to git.exe
##### Botan setup
@@ -34,16 +31,13 @@ Build release lib in ${BOTAN_DIR}/release
Build debug lib in ${BOTAN_DIR}/debug
for Windows release build:
$ python configure.py --cc=msvc --cpu=x86_32 --disable-shared
$ python configure.py --cc=msvc --cpu=x86_32 --via-amalgamation --disable-shared
for Windows debug build:
python configure.py --cc=msvc --cpu=x86_32 --disable-shared --no-optimizations --with-debug-info
python configure.py --cc=msvc --cpu=x86_32 --via-amalgamation --disable-shared --no-optimizations --with-debug-info
for Mac:
$ python configure.py --disable-shared --disable-modules=darwin_secrandom
for Linux:
$ python configure.py --disable-shared
for other:
$ python configure.py --via-amalgamation --disable-shared
#### Settings
@@ -98,143 +92,8 @@ $ ninja -j4 check-all
$ git tag -a VERSION_NUMBER -m "DESCRIPTION"
$ git push --tags
### Loader gif creation from png sequence
// from png sequence
convert -delay 3 -loop 0 coati_*.png coati.gif
// less colors
gifsicle --colors 255 coati.gif > color.gif
// crop size
gifsicle --crop 0,5+0x-5 color.gif > crop.gif
// add transparency
gifsicle --unoptimize --disposal=previous --transparent="#FFFFFF" crop.gif > trans.gif
// resize
gifsicle --resize-height 18 trans.gif > loader.gif
### Changelog
#### 0.9.22
released 2016-10-27
* Windows: Added logging and exception handling to VS plugin
* Windows: Added VC++ runtime dlls for windows installer
* Windows: Added missing VC++ runtime dlls (issue #231)
* Added setting for default graph zoom on mouse wheel to preferences (issue #237)
* Scroll errors table to newest error during indexing
* Fixed best scoring for search autocompletions skipped some combinations
* Fixed flickering of errors table when indexing
* Don't show error snippets in overview screen anymore
* Fixed crash when Project Paths contain files and lazy include search in enabled (issue #201)
* Fixed edge cases that caused deadlocks in indexing
* Added language specific project icons to start screen
* Fixed application couldn't be quit when start screen was showing (issue #227)
* Graph: Fixed missing image file ending when exporting graph for Linux
* Log Coati version when logging gets enabled
* Fixed non-indexed errors filter in errors table
#### 0.9.0
released 2016-10-14
* Extended Visual Studio Plugin to export clang Compilation Databases
* Implemented new installer for Windows
* Run System Header Include Paths and Java Path detection when starting application
* Added Log Window with Errors tab showing a table of all errors
* Added filters to bottom of error table to define which errors are displayed
* Removed ring logging and use one log file again instead
* Smaller indexing progress dialog with bar in the middle instead of golden ratio
* Code: Set default code snippet expand range to 3 lines for more context
* Graph: Fixed undoing of aggregation edge activation caused crash
* Graph: Move aggregation and inheritance edges to front when hovered or active
* Graph: Push parent nodes of active nodes to back to make all incoming and outgoing edges visible
* Properly quit application when window is closed while confirm box is open
* Properly quit application when window is closed while indexing (issue #121)
* Graph: Count only top level nodes in bundle nodes of graph
* Search: Improved scoring of autocompletion matches to use best score for match
* App will go into trial mode without valid license
* Java: Auto detect java root source directories
* Fixed refresh crash (issue #220)
* Java: improved indexer reliability a lot
* Java: Changed name of generic type to use name of declaration
* Fixed project refresh does not recognize removed source paths
* Java: Define maximum allocated jvm memory in preferences
* Follow symbolic directory links within source paths (issue #205)
* Use white size grip in blue dialogs
* Graph: Use type node colors for undefined nodes
* Java: Show import not found as error
* Code: Select and copy source code in code view with SHIFT + mouse drag (issue #7)
* Code: Added markers next to line numbers in code view showing active locations and scopes
* Merged app and trial to one build
#### 0.8.21
released 2016-09-16
* Added options for checking multiple paths in Indexed Header Paths dialog during project setup from Compilation Database #190
* Added all C/C++ standards supported by clang
* Fixed C language setting in empty project setup not propagated to indexer #177
* Added Sublime plugin to Sublime Text Package Control
* Improved indexer parallelization for faster indexing
* Changed all font-sizes to px for similar look on all platforms
* Added font face dropdown to Preferences showing all available monospace fonts #172
* Smoother font rendering on Windows by setting font engine to FreeType via qt.conf file #137
* Interrupt indexing while AST visiting for C/C++ for shorter waiting time
* Save graph as PNG image via context menu in graph view #180
* Added base folder to Linux package #181
* Use inverted golden ratio in indexing progress dialog
#### 0.8.0
released 2016-09-01
* Improved titles and help texts in project setup UI
* Fixed error locations not saved with absolute file paths in Compilation Database projects
* Added missing source files extensions setting to the Edit Project dialog #132
* Changed default text colors to black in project setup UI #140
* Added plugin ports settings to Preferences #145
* Improved project state handling on refreshing
* Added Java sample project JavaParser: http://javaparser.org/
* Fixed regex for system includes used wrongly in syntax highlighter
* Added setting to disable file and console logging, default is off #157
* Added migrations between different ApplicationSettings versions
* Added auto detection for Java library to Preferences
* Removed auto refresh option from Search view
* Added progress dialogs for indexing and block UI #143
* Hide name qualifiers for graph nodes in Java projects
* Added handling when java library not found
* Added plain text editing dialog to path list boxes
* Use language dependent symbol name delimiter in UI
* Added scroll speed setting to preferences #112
* Added Java project setup UI
* Record start and end locations of scopes in Java
* Display unresolved types names in Java as 'unresolved-type'
* Cache stats for overview to speed up display
* Fixed graph nodes to restore their expand state when going back #118
* Added shortcuts for navigating to next and previous reference in code view
* Pressing Tab in search completes up to next ::, Delete erases to last :: #133
* Bundle anonymous namespaces separately in graph overview #126
* Added 'Show Data Folder' and 'Show Log Folder' items to Help menu
* Added new status bar loader gif with higher resolution
* Record type aliases in C++
* Added Java indexer
* Changed public icon in graph and added default icon
* Scroll to file location when finding no symbol at specified location from plugin message
* Added shortcut for Preferences on Windows/Linux
* Leave code view at original line when expanding scopes
* Pan graph view to center on name of active symbol after activation
* Moved color scheme selection to Preferences
* Moved Preferences menu item to Edit menu on Windows/Linux #113
* Added setting for hiding non-fatal errors in unindexed files to preferences, turned on by default
* Fixed file out-of-date asterisk disappearing when showing snippets after minimize state
* Implemented Atom plugin: https://github.com/CoatiSoftware/atom-coati
* Implemented CLion/IntelliJ plugin: https://github.com/CoatiSoftware/idea-coati
* Implemented Eclipse plugin: https://github.com/CoatiSoftware/eCoati
* Implemented emacs plugin: https://github.com/CoatiSoftware/emacs-coati
* Improved code view rendering times
* Don't show implicit nodes in search auto completion list
#### 0.7.0.22
released 2016-07-07
@@ -7,8 +7,6 @@
<!-- COLOR: int int int int - rgba e.g. 125 125 125 255 -->
<config>
<version><!-- INTEGER: Version number --></version>
<info>
<description><!-- STRING: optional description shown in overview. Symbols can be linked with syntax [main] --></description>
</info>
-4
View File
@@ -173,14 +173,11 @@
<!-- OPTIONAL: type specific node colors can be overriden by using the TEMPLATE within a type tag below -->
<type></type>
<builtin_type></builtin_type>
<class></class>
<interface></interface>
<struct></struct>
<enum></enum>
<typedef></typedef>
<template_parameter_type></template_parameter_type>
<type_parameter></type_parameter>
<function></function>
<method></method>
@@ -191,7 +188,6 @@
<undefined></undefined>
<namespace></namespace>
<package></package>
<file></file>
<macro></macro>
+12 -76
View File
@@ -20,10 +20,9 @@
<popup>
<text>#3D3D3D</text>
<by_text>#808080</by_text>
<by_text>#A0A0A0</by_text>
<background>#CCCCCC</background>
<highlight>#FFFFFF</highlight>
<line>#B1B1B1</line>
</popup>
<query>
@@ -101,9 +100,7 @@
<line_number>
<text>#C4C4C4</text>
<inactive_text>#A0A0A0</inactive_text>
<background>#494949</background>
<marker>#C4C4C4</marker>
</line_number>
<syntax>
@@ -118,11 +115,6 @@
</syntax>
<selection>
<text>black</text>
<background>#CCCCCC</background>
</selection>
<annotation>
<token>
<normal>
<border>transparent</border>
@@ -175,11 +167,8 @@
<fill>#C2AFEF</fill>
<text>#3D3D3D</text>
</normal>
<focus>
<fill>#987CEA</fill>
</focus>
</fulltext>
</annotation>
</selection>
</snippet>
</code>
@@ -217,15 +206,9 @@
<normal>#FFFFFF</normal>
</icon>
</type>
<builtin_type>
<like>type</like>
</builtin_type>
<class>
<like>type</like>
</class>
<interface>
<like>type</like>
</interface>
<struct>
<like>type</like>
</struct>
@@ -238,9 +221,6 @@
<template_parameter_type>
<like>type</like>
</template_parameter_type>
<type_parameter>
<like>type</like>
</type_parameter>
<function>
<fill>
@@ -280,26 +260,18 @@
</enum_constant>
<undefined>
<like>type</like>
</undefined>
<namespace>
<fill>
<normal>#873E3E</normal>
<normal>#EE7326</normal>
<focus>#EE8A4C</focus>
</fill>
<border>
<normal>#80FFFFFF</normal>
<focus>#FFFFFF</focus>
</border>
<text>
<normal>#FFFFFF</normal>
</text>
<icon>
<normal>#FFFFFF</normal>
</icon>
</undefined>
<namespace>
<like>undefined</like>
</namespace>
<package>
<like>namespace</like>
</package>
<file>
<fill>
@@ -352,17 +324,6 @@
<normal>#CCCCCC</normal>
</text>
</count_number>
<qualifier>
<fill>
<normal>#873E3E</normal>
</fill>
<border>
<normal>#FFFFFF</normal>
</border>
<text>
<normal>#FFFFFF</normal>
</text>
</qualifier>
</node>
<edge>
<default>
@@ -381,21 +342,18 @@
<normal>#2A6484</normal>
</use>
<template_parameter>
<normal>#C1305D</normal>
</template_parameter>
<template_argument>
<normal>#C1305D</normal>
</template_argument>
<type_argument>
<like>template_argument</like>
</type_argument>
<template_default_argument>
<like>template_argument</like>
<normal>#C1305D</normal>
</template_default_argument>
<template_specialization>
<like>template_argument</like>
<normal>#C1305D</normal>
</template_specialization>
<template_member_specialization>
<like>template_argument</like>
</template_member_specialization>
<include>
<normal>#4E82F6</normal>
@@ -410,26 +368,4 @@
</aggregation>
</edge>
</graph>
<table>
<background>#494949</background>
<table>#C4C4C4</table>
<text>
<normal>#C4C4C4</normal>
<active>black</active>
</text>
<table_line_1>
<normal>#494949</normal>
<active>#7B7B7B</active>
</table_line_1>
<table_line_2>
<normal>#383838</normal>
<active>#7B7B7B</active>
</table_line_2>
</table>
<tab>
<background>#494949</background>
<active>#C4C4C4</active>
<hover>#878787</hover>
<text>#878787</text>
</tab>
</config>
+16 -78
View File
@@ -20,10 +20,9 @@
<popup>
<text>black</text>
<by_text>#626262</by_text>
<by_text>#A0A0A0</by_text>
<background>white</background>
<highlight>#D0D0D0</highlight>
<line>#E0E0E0</line>
<highlight>#B2B2B2</highlight>
</popup>
<query>
@@ -101,9 +100,7 @@
<line_number>
<text>black</text>
<inactive_text>#A0A0A0</inactive_text>
<background>white</background>
<marker>#A0A0A0</marker>
</line_number>
<syntax>
@@ -118,11 +115,6 @@
</syntax>
<selection>
<text>black</text>
<background>#E0E0E0</background>
</selection>
<annotation>
<token>
<normal>
<border>transparent</border>
@@ -173,11 +165,8 @@
<fill>#C7C7E2</fill>
<text>#000000</text>
</normal>
<focus>
<fill>#ABABDD</fill>
</focus>
</fulltext>
</annotation>
</selection>
</snippet>
</code>
@@ -209,15 +198,9 @@
<focus>#3C3C3C</focus>
</border>
</type>
<builtin_type>
<like>type</like>
</builtin_type>
<class>
<like>type</like>
</class>
<interface>
<like>type</like>
</interface>
<struct>
<like>type</like>
</struct>
@@ -230,9 +213,6 @@
<template_parameter_type>
<like>type</like>
</template_parameter_type>
<type_parameter>
<like>type</like>
</type_parameter>
<function>
<fill>
@@ -266,23 +246,17 @@
</enum_constant>
<undefined>
<like>type</like>
</undefined>
<namespace>
<fill>
<normal>#EFC5C5</normal>
<normal>#CC8D91</normal>
</fill>
<border>
<normal>#3D3D3D</normal>
<focus>black</focus>
<normal>#803C3C3C</normal>
<focus>#3C3C3C</focus>
</border>
<icon>
<normal>#3D3D3D</normal>
</icon>
</undefined>
<namespace>
<like>undefined</like>
</namespace>
<package>
<like>namespace</like>
</package>
<file>
<fill>
@@ -323,17 +297,6 @@
<normal>#5C5C5C</normal>
</text>
</count_number>
<qualifier>
<fill>
<normal>#EFC5C5</normal>
</fill>
<border>
<normal>#3D3D3D</normal>
</border>
<text>
<normal>black</normal>
</text>
</qualifier>
</node>
<edge>
<default>
@@ -352,20 +315,20 @@
<normal>#3190BA</normal>
</use>
<template_argument>
<template_parameter>
<normal>#C1305D</normal>
</template_parameter>
<template_argument>
<like>template_parameter</like>
</template_argument>
<type_argument>
<like>template_argument</like>
</type_argument>
<template_default_argument>
<like>template_argument</like>
<like>template_parameter</like>
</template_default_argument>
<template_specialization>
<like>template_argument</like>
<like>template_parameter</like>
</template_specialization>
<template_member_specialization>
<like>template_argument</like>
<like>template_parameter</like>
</template_member_specialization>
<aggregation>
@@ -374,29 +337,4 @@
</aggregation>
</edge>
</graph>
<error>
<background>white</background>
</error>
<tab>
<background>white</background>
<active>black</active>
<hover>#878787</hover>
<text>#878787</text>
</tab>
<table>
<background>white</background>
<table>#aaa</table>
<text>
<normal>black</normal>
<active>white</active>
</text>
<table_line_1>
<normal>white</normal>
<active>grey</active>
</table_line_1>
<table_line_2>
<normal>#F1F1F1</normal>
<active>grey</active>
</table_line_2>
</table>
</config>
+50 -76
View File
@@ -22,10 +22,28 @@
<text>#F7F7F7</text>
<by_text>#A0A0A0</by_text>
<background>#272728</background>
<highlight>#333333</highlight>
<line>#444444</line>
<highlight>#555555</highlight>
</popup>
<query>
<none>
<normal></normal>
<hover></hover>
</none>
<command>
<normal></normal>
<hover></hover>
</command>
<operator>
<normal></normal>
<hover></hover>
</operator>
<fulltext>
<normal></normal>
<hover></hover>
</fulltext>
</query>
<query>
<none>
<normal>
@@ -101,9 +119,7 @@
<line_number>
<text>#F7F7F7</text>
<inactive_text>#A0A0A0</inactive_text>
<background>#272728</background>
<marker>#969696</marker>
</line_number>
<syntax>
@@ -118,11 +134,6 @@
</syntax>
<selection>
<text>white</text>
<background>#777777</background>
</selection>
<annotation>
<token>
<normal>
<border>transparent</border>
@@ -175,12 +186,8 @@
<fill>#207EA8</fill>
<text>#F7F7F7</text>
</normal>
<focus>
<border>#006D93</border>
<fill>#134B63</fill>
</focus>
</fulltext>
</annotation>
</selection>
</snippet>
</code>
@@ -212,30 +219,36 @@
<focus>#C3C3C3</focus>
</border>
</type>
<builtin_type>
<like>type</like>
</builtin_type>
<class>
<like>type</like>
<border>
<normal>#20C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
</class>
<interface>
<like>type</like>
</interface>
<struct>
<like>type</like>
<border>
<normal>#20C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
</struct>
<enum>
<like>type</like>
<border>
<normal>#20C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
</enum>
<typedef>
<like>type</like>
<border>
<normal>#20C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
</typedef>
<template_parameter_type>
<like>type</like>
<border>
<normal>#20C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
</template_parameter_type>
<type_parameter>
<like>type</like>
</type_parameter>
<function>
<fill>
@@ -269,9 +282,6 @@
</enum_constant>
<undefined>
<like>type</like>
</undefined>
<namespace>
<fill>
<normal>#78282D</normal>
</fill>
@@ -279,13 +289,10 @@
<normal>#80C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
<icon>
<normal>#C3C3C3</normal>
</icon>
</undefined>
<namespace>
<like>undefined</like>
</namespace>
<package>
<like>namespace</like>
</package>
<file>
<fill>
@@ -326,17 +333,6 @@
<normal>#F7F7F7</normal>
</text>
</count_number>
<qualifier>
<fill>
<normal>#78282D</normal>
</fill>
<border>
<normal>#C3C3C3</normal>
</border>
<text>
<normal>#F7F7F7</normal>
</text>
</qualifier>
</node>
<edge>
<default>
@@ -355,20 +351,20 @@
<normal>#2A6484</normal>
</use>
<template_parameter>
<normal>#C1305D</normal>
</template_parameter>
<template_argument>
<normal>#C1305D</normal>
</template_argument>
<type_argument>
<like>template_argument</like>
</type_argument>
<template_default_argument>
<like>template_argument</like>
<normal>#C1305D</normal>
</template_default_argument>
<template_specialization>
<like>template_argument</like>
<normal>#C1305D</normal>
</template_specialization>
<template_member_specialization>
<like>template_argument</like>
<normal>#C1305D</normal>
</template_member_specialization>
<include>
@@ -384,26 +380,4 @@
</aggregation>
</edge>
</graph>
<table>
<background>#272728</background>
<table>white</table>
<text>
<normal>white</normal>
<active>black</active>
</text>
<table_line_1>
<normal>darkgrey</normal>
<active>#969696</active>
</table_line_1>
<table_line_2>
<normal>#343434</normal>
<active>#969696</active>
</table_line_2>
</table>
<tab>
<background>#272728</background>
<active>white</active>
<hover>#878787</hover>
<text>#878787</text>
</tab>
</config>
@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<config>
<application>
<window_base_width>500</window_base_width>
<window_base_height>500</window_base_height>
</application>
<indexing>
<indexer_thread_count>4</indexer_thread_count>
</indexing>
<user>
<recent_projects>
<recent_project>./projects/tutorial/tutorial.coatiproject</recent_project>
<recent_project>./projects/tictactoe/tictactoe.coatiproject</recent_project>
<recent_project>./projects/javaparser/javaparser.coatiproject</recent_project>
</recent_projects>
</user>
<version>1</version>
</config>
@@ -1,8 +0,0 @@
[General]
DOCK_LOCATIONS=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x1\0\0\0\x2\0\0\a\x80\0\0\x3\xcd\xfc\x1\0\0\0\x2\xfc\0\0\0\0\0\0\x4\x90\0\0\0\0\0\xff\xff\xff\xfc\x2\0\0\0\x1\xfb\0\0\0\xe\0\x44\0o\0\x63\0k\0L\0o\0g\0\0\0\x2\xc6\0\0\0\xc1\0\0\0\0\0\0\0\0\xfc\0\0\0\0\0\0\a\x80\0\0\x1\xf5\0\xff\xff\xff\xfc\x2\0\0\0\x2\xfc\0\0\0\x16\0\0\x2\xfe\0\0\0\xa5\0\xff\xff\xff\xfc\x1\0\0\0\x2\xfc\0\0\0\0\0\0\x3\xd6\0\0\x1\"\0\xff\xff\xff\xfc\x2\0\0\0\x2\xfb\0\0\0\x14\0\x44\0o\0\x63\0k\0S\0\x65\0\x61\0r\0\x63\0h\x1\0\0\0\x16\0\0\0\x44\0\0\0\x44\0\xff\xff\xff\xfb\0\0\0\x12\0\x44\0o\0\x63\0k\0G\0r\0\x61\0p\0h\x1\0\0\0^\0\0\x2\xb6\0\0\0]\0\xff\xff\xff\xfb\0\0\0\x10\0\x44\0o\0\x63\0k\0\x43\0o\0\x64\0\x65\x1\0\0\x3\xda\0\0\x3\xa6\0\0\0P\0\xff\xff\xff\xfb\0\0\0\x14\0\x44\0o\0\x63\0k\0S\0t\0\x61\0t\0u\0s\x1\0\0\x3\x18\0\0\0\xcb\0\0\0\xcb\0\xff\xff\xff\0\0\a\x80\0\0\0\0\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0)
[MainWindow]
maximized=true
size=@Size(1287 811)
position=@Point(259 117)
showTitleBars=true
+1 -1
View File
@@ -8,7 +8,7 @@
background: transparent;
border: none;
color: white;
font-size: 14px;
font-size: 14pt;
height: 24px;
width: 24px;
}
+10 -12
View File
@@ -1,4 +1,4 @@
#code_container, #code_file_list {
#code_file_list_base, #code_file_list {
background-color: <color:code/background>;
}
@@ -8,7 +8,7 @@
border-radius: 12px;
border-top-left-radius: 14px;
border-top-right-radius: 14px;
font-size: <setting:font_size>px;
font-size: <setting:font_size>pt;
padding-bottom: 7px;
}
@@ -16,7 +16,7 @@
background-color: <color:code/file/background>;
border-top-left-radius: 7px;
border-top-right-radius: 7px;
font-size: <setting:font_size>px;
font-size: <setting:font_size>pt;
padding-right: 5px;
}
@@ -25,7 +25,7 @@
border: none;
border-radius: 3px;
color: <color:code/file/title/text>;
font-size: <setting:font_size>px;
font-size: <setting:font_size>pt;
padding: 2px 4px;
margin: 1px 8px 3px;
}
@@ -43,7 +43,7 @@
border: none;
border-radius: 10px;
color: <color:code/file/ref_count/text>;
font-size: <setting:font_size-2>px;
font-size: <setting:font_size-2>pt;
padding: 0px 3px;
margin: 4px 0px 4px;
}
@@ -51,7 +51,7 @@
#code_file #code_snippet {
background-color: <color:code/snippet/background>;
border-top: 2px solid <color:code/file/background>;
font-size: <setting:font_size>px;
font-size: <setting:font_size>pt;
}
#code_file #code_snippet[isFirst=true] {
@@ -64,7 +64,7 @@
border: none;
color: <color:code/snippet/title/text>;
font-family: "<setting:font_name>";
font-size: <setting:font_size>px;
font-size: <setting:font_size>pt;
}
#code_file #code_snippet #scope_name:hover {
@@ -73,7 +73,7 @@
#code_file #code_snippet #dots {
background-color: <color:code/snippet/line_number/background>;
padding-right: 16px;
padding-right: 13px;
text-align: right;
}
@@ -87,16 +87,14 @@
border: none;
color: <color:code/snippet/line_number/text>;
font-family: "<setting:font_name>";
font-size: <setting:font_size>px;
font-size: <setting:font_size>pt;
}
#code_area {
background-color: transparent;
color: <color:code/snippet/syntax/normal>;
font-family: "<setting:font_name>";
font-size: <setting:font_size>px;
selection-color: <color:code/snippet/selection/text>;
selection-background-color: <color:code/snippet/selection/background>;
font-size: <setting:font_size>pt;
}
#code_file #maximize_button, #code_file #snippet_button, #code_file #minimize_button {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 909 B

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 811 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

@@ -1,57 +0,0 @@
QLabel, QCheckBox {
color: white;
}
#topHalf {
background: #007AC2;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
}
#title {
color: white;
font-size: 22px;
font-weight: bold;
}
#percent {
font-size: 22px;
font-weight: bold;
}
#message {
font-size: 14px;
font-weight: bold;
}
#filePath {
font-size: 11px;
}
#errorCount {
border: none;
background: transparent;
color: white;
font-size: 14px;
}
#windowButton {
background: transparent;
border: 1px solid white;
color: white;
}
#windowButton:hover {
background: transparent;
border: 1px solid white;
color: white;
}
#windowButton:hover {
color: #2E3C86;
background: white;
}
#windowButton:default {
border: 2px solid white;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

+2 -3
View File
@@ -1,11 +1,10 @@
QLabel {
font-size: 12px;
color: black;
font-size: 12pt;
}
#licenseField {
font-family: "<setting:font_name>";
font-size: 11px;
font-size: 10pt;
height: 200px;
padding: 5px;
width: 470px;
+4 -1
View File
@@ -1,6 +1,9 @@
QToolTip {
background-color: #E0E0E0;
color: black;
font-size: <setting:font_size>px;
font-size: <setting:font_size>pt;
}
* {
font-family: "Roboto";
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

@@ -22,7 +22,12 @@ QPushButton:pressed {
}
#refresh_button {
/*border-bottom-left-radius: 12px;*/
/*border-top-left-radius: 12px;*/
border-radius: 12px;
border-bottom-left-radius: 12px;
border-top-left-radius: 12px;
margin-right: 2px;
}
#auto_refresh_button {
border-bottom-right-radius: 12px;
border-top-right-radius: 12px;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 491 B

+2 -2
View File
@@ -1,10 +1,10 @@
* {
font-size: <setting:font_size>px;
font-size: <setting:font_size>pt;
}
#search_box, #search_box * {
font-family: "<setting:font_name>";
font-size: <setting:font_size+2>px;
font-size: <setting:font_size+2>pt;
}
#search_bar {
+10 -7
View File
@@ -4,7 +4,7 @@
border-radius: 8px;
color: black;
padding: 3px 5px 2px;
font-size: 14px;
font-size: 14pt;
min-width: 6em;
}
@@ -13,15 +13,18 @@
background: #2D3F85;
}
#recentButton, #recentButtonMissing {
#recentButton {
background: none;
border: none;
color: black;
font-size: 12px;
font-size: 12pt;
}
#recentButtonMissing {
background: none;
border: none;
color: grey;
font-size: 12pt;
}
#recentButton:hover, #recentButtonMissing:hover {
@@ -31,23 +34,23 @@
#recentLabel {
color: black;
font-size: 16px;
font-size: 16pt;
font-weight: bold;
margin-left: 6px;
}
#versionLabel {
color: black;
font-size: 12px;
font-size: 12pt;
font-weight: bold;
}
#updateLabel {
color: black;
font-size: 12px;
font-size: 12pt;
}
#welcomeLabel {
color: black;
font-size: 12px;
font-size: 12pt;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

@@ -1,123 +0,0 @@
QTabWidget::tab-bar {
alignment: left;
}
QTabBar::tab {
background-color: <color:tab/background>;
color: <color:tab/text>;
padding: 12px 75px 5px 12px;
border: 0px;
border-bottom: 4px solid <color:tab/background>;
/*font-size: <setting:font_size>px;*/
/*font-weight: bold;*/
}
QTabBar::tab:hover {
border-bottom: 4px solid <color:tab/hover>;
}
QTabBar::tab:selected {
border-bottom: 4px solid <color:tab/active>;
color: <color:tab/active>;
}
QTabWidget::pane {
top: 0px;
background: <color:tab/background>;
color: <color:tab/text>;
border: 0px;
margin: 0px;
padding: 0px;
}
QTableView {
color: <color:table/text/normal>;
background-color: <color:table/table_line_1/normal>;
alternate-background-color: <color:table/table_line_2/normal>;
border-radius: 10px;
border: 1px solid <color:table/table>;
margin: 10px;
padding-right: 10px;
font-size: <setting:font_size>px;
}
QFrame {
background-color: <color:tab/background>;
}
QTableView::item {
border-left: 1px solid <color:table/table>;
}
QTableView::item:selected {
color: <color:table/text/active>;
background-color: <color:table/table_line_1/active>;
alternate-background-color: <color:table/table_line_2/active>;
}
QHeaderView {
background-color: transparent;
}
QHeaderView::section:horizontal {
background-color: transparent;
border: none;
border-bottom: 1px solid <color:table/table>;
border-left: 1px solid <color:table/table>;
color: <color:table/text/normal>;
font-size: <setting:font_size>px;
font-weight: bold;
padding: 1px 6px;
height: <setting:font_size+5>px;
}
QHeaderView::section:vertical {
background-color: transparent;
border: none;
color: <color:table/text/normal>;
font-size: <setting:font_size>px;
padding-right: 5px;
padding-left: 5px;
}
QCheckBox {
color: <color:table/text/normal>;
border-color: <color:table/table>;
/*background-color: <color:table/table>;*/
}
QScrollBar:vertical {
}
QScrollBar::handle:vertical {
min-height: 20px;
}
QScrollBar::add-line:vertical {
height: 20px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}
QScrollBar::sub-line:vertical {
height: 20px;
subcontrol-position: top;
subcontrol-origin: margin;
}
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
width: 3px;
height: 3px;
background: white;
}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background: none;
}
QTableView QTableCornerButton::section {
background-color: <color:table/background>;
border-bottom: 1px solid <color:table/table>;
border-top-left-radius: 10px;
}
+3 -13
View File
@@ -1,5 +1,5 @@
* {
font-size: 12px;
font-size: 12pt;
}
QtDirectoryListBox {
@@ -15,8 +15,8 @@ QListWidget {
}
QListWidget::item {
border-bottom: 1px solid lightgray;
height: 20px;
border-bottom: 1px solid lightgray;
}
QListWidget::item:selected {
@@ -26,7 +26,6 @@ QListWidget::item:selected {
QtListItemWidget #field {
background-color: transparent;
border: none;
color: black;
margin-top: 2px;
margin-left: 5px;
}
@@ -35,7 +34,7 @@ QtListItemWidget #field {
border-top: 1px solid lightgray;
}
#plusButton, #minusButton, #dotsButton, #editButton {
#plusButton, #minusButton, #dotsButton {
color: white;
height: 1em;
margin-right: 3px;
@@ -71,15 +70,6 @@ QtListItemWidget #field {
border-image: url(<setting:gui_path>window/dots_hover.png);
}
#editButton {
border-image: url(<setting:gui_path>code_view/images/edit.png);
margin-left: 6px;
}
#editButton:hover {
background-color: #EEE;
}
#dropInfo {
color: #999;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 849 B

+18 -31
View File
@@ -1,18 +1,16 @@
* {
font-size: 12px;
}
QLabel, QCheckBox {
color: black;
font-size: 12pt;
}
#title {
font-size: 16px;
color: black;
font-size: 16pt;
font-weight: bold;
}
#projectTitle {
font-size: 14px;
#section, #projectTitle {
color: black;
font-size: 14pt;
font-weight: bold;
}
@@ -23,38 +21,38 @@ QLabel, QCheckBox {
}
#projectDescription {
font-size: 12px;
font-size: 12pt;
margin-left: 20px;
}
#description {
font-size: 12px;
font-size: 12pt;
}
#label {
font-size: 12px;
font-size: 12pt;
font-weight: bold;
}
#titleLabel {
font-size: 14px;
font-size: 14pt;
font-weight: bold;
}
#formArea {
background: transparent;
background: white;
border: none;
}
#scrollArea {
background: transparent;
background: white;
border: none;
border-top: 1px solid lightgrey;
border-bottom: 1px solid lightgrey;
}
#form {
background: transparent;
background: white;
}
#helpButton, #dotsButton, #refreshButton {
@@ -89,10 +87,8 @@ QLabel, QCheckBox {
}
#name, #picker {
background: white;
border-radius: 10px;
border: 1px solid lightgrey;
color: black;
padding: 2px 5px 0px;
}
@@ -100,7 +96,6 @@ QLabel, QCheckBox {
background: white;
border: none;
border-radius: 5px;
color: black;
margin-left: 5px;
margin-top: 2px;
}
@@ -115,7 +110,7 @@ QLabel, QCheckBox {
border-radius: 8px;
color: black;
padding: 3px 5px 2px;
font-size: 14px;
font-size: 14pt;
min-width: 5em;
}
@@ -125,8 +120,7 @@ QLabel, QCheckBox {
border-radius: 8px;
border-bottom-right-radius: 0px;
border-top-right-radius: 0px;
color: black;
font-size: 15px;
font-size: 15pt;
margin-right: 0px;
height: 25px;
width: 90px;
@@ -134,11 +128,7 @@ QLabel, QCheckBox {
#windowButton:hover {
color: white;
background: #2D3C86;
}
#windowButton:default {
border: 2px solid lightgray;
background: #2D3F85;
}
#menuButton:hover, #menuButton:checked {
@@ -160,8 +150,7 @@ QLabel, QCheckBox {
#projectButton {
background: white;
border-radius: 8px;
color: black;
font-size: 12px;
font-size: 12pt;
width: 7em;
height: 7em;
margin-top: 10px;
@@ -171,10 +160,8 @@ QLabel, QCheckBox {
background: #CFD2E0;
}
#textField, #pathList {
background: white;
#files {
border: 1px solid lightgray;
border-radius: 12px;
color: black;
padding: 6px;
}
+1
View File
@@ -0,0 +1 @@
%windir%\system32\msiexec.exe /I{E6E16577-C547-4A66-8202-AB30A02DDBC2}
+1
View File
@@ -0,0 +1 @@
%windir%\system32\msiexec.exe /I{225E11DF-20A0-4AE0-AD5C-00944A9E3D71}
-1
View File
@@ -1 +0,0 @@
%windir%\system32\msiexec.exe /x {F8BA9656-DE2E-4925-9CF4-C43285A2CA6E}
@@ -2,7 +2,7 @@
<config>
<language_settings>
<language>C++</language>
<standard>c++1z</standard>
<standard>11</standard>
</language_settings>
<source>
<extensions>
@@ -18,5 +18,4 @@
</source_paths>
<use_source_paths_for_header_search>0</use_source_paths_for_header_search>
</source>
<version>1</version>
</config>
@@ -2,7 +2,6 @@
#define CODE_TUTORIAL_1_H
#include "utility.h"
//------------------------------------------------------------------------------
@@ -30,6 +29,5 @@ public:
};
#endif // CODE_TUTORIAL_1_H
@@ -2,7 +2,6 @@
#define CODE_TUTORIAL_2_H
#include "code_tutorial_1.h"
//------------------------------------------------------------------------------
@@ -60,6 +59,5 @@ void deep_thought()
}
#endif // CODE_TUTORIAL_2_H
@@ -2,22 +2,21 @@
#define CODE_TUTORIAL_3_H
#include "the_central_hub.h"
#include "code_tutorial_2.h"
//------------------------------------------------------------------------------
//
// 6 - SNIPPETS AND FILES
// It looks like this function is called in two different places inside the
// same file. When two different snippets are located in the same file they
// share a single file box. The line numbers to the left indicate where each of
// It looks like this function is called in two different places inside the
// same file. When two different snippets are located in the same file they
// share a single file box. The line numbers to the left indicate where each of
// these snippets is located inside the file.
//
// 7 - MERGING SNIPPETS
// The top line of each snippet shows the name of its own parent's scope.
// If you want to show the lines in between the two snippets below you can
// either expand the upper snippet's scope to show the whole file or you can
// If you want to show the lines in between the two snippets below you can
// either expand the upper snippet's scope to show the whole file or you can
// tell the lower snippet to reveal its scope.
// Try one of these approaches now.
//
@@ -28,7 +27,6 @@ void function_with_snippets()
unrelated_but_very_important();
//------------------------------------------------------------------------------
//
// 8 - YOU FOUND THE HIDDEN COMMENT
@@ -47,8 +45,8 @@ void function_with_snippets()
// to the central hub.
//
// P.S.
// You can also click the file name above (i guess you need to scroll up a
// little bit) to activate the file's node in case you want to explore your
// You can also click the file name above (i guess you need to scroll up a
// little bit) to activate the file's node in case you want to explore your
// include hierarchy.
//
//------------------------------------------------------------------------------
@@ -62,6 +60,5 @@ void function_with_snippets()
};
#endif // CODE_TUTORIAL_3_H
@@ -2,7 +2,6 @@
#define GRAPH_TUTORIAL_1_H
#include "utility.h"
//------------------------------------------------------------------------------
@@ -34,6 +33,5 @@ public:
};
#endif // GRAPH_TUTORIAL_1_H
@@ -2,7 +2,6 @@
#define GRAPH_TUTORIAL_2_H
#include "graph_tutorial_1.h"
//------------------------------------------------------------------------------
@@ -63,6 +62,5 @@ public:
};
#endif // GRAPH_TUTORIAL_2_H
@@ -2,7 +2,6 @@
#define GRAPH_TUTORIAL_3_H
#include "graph_tutorial_2.h"
class ProducerOfTheLastMember
@@ -36,6 +35,5 @@ public:
};
#endif // GRAPH_TUTORIAL_3_H
@@ -2,7 +2,6 @@
#define GRAPH_TUTORIAL_4_H
#include "graph_tutorial_2.h"
#include "the_central_hub.h"
@@ -46,6 +45,5 @@ private:
};
#endif // GRAPH_TUTORIAL_4_H
@@ -2,7 +2,6 @@
#define MAIN_H
#include "code_tutorial_1.h"
#include "code_tutorial_2.h"
#include "code_tutorial_3.h"
@@ -38,6 +37,5 @@ int main()
}
#endif // MAIN_H
@@ -2,7 +2,6 @@
#define MY_FIRST_STEP_H
#include "my_next_step.h"
//------------------------------------------------------------------------------
@@ -31,6 +30,5 @@ void my_first_step()
}
#endif // MY_FIRST_STEP_H
@@ -2,7 +2,6 @@
#define MY_NEXT_STEP_H
#include "the_central_hub.h"
//------------------------------------------------------------------------------
@@ -36,6 +35,5 @@ int my_next_step(int foo)
}
#endif // MY_NEXT_STEP_H
@@ -2,7 +2,6 @@
#define SEARCH_TUTORIAL_1_H
#include "utility.h"
//------------------------------------------------------------------------------
@@ -27,6 +26,5 @@ public:
};
#endif // SEARCH_TUTORIAL_1_H
@@ -2,7 +2,6 @@
#define SEARCH_TUTORIAL_2_H
#include "utility.h"
//------------------------------------------------------------------------------
@@ -22,6 +21,5 @@ void find_me_if_you_can()
}
#endif // SEARCH_TUTORIAL_2_H
@@ -2,7 +2,6 @@
#define SEARCH_TUTORIAL_3_H
#include "utility.h"
//------------------------------------------------------------------------------
@@ -23,6 +22,5 @@ void autocompletion_example()
}
#endif // SEARCH_TUTORIAL_3_H
@@ -2,7 +2,6 @@
#define SEARCH_TUTORIAL_4_H
#include "utility.h"
//------------------------------------------------------------------------------
@@ -18,7 +17,8 @@
//
// 6 - REFRESH
// The next button allows you to refresh the project in case you changed some
// of your code.
// of your code. The second button toggels the auto-refresh option. When
// enabled Coati refreshes your project every time it's window gets focused.
//
// 7 - HOME
// This last button takes you back to the initial overview screen.
@@ -36,6 +36,5 @@ namespace a
}
#endif // SEARCH_TUTORIAL_4_H
@@ -2,7 +2,6 @@
#define SEARCH_TUTORIAL_5_H
#include "utility.h"
//------------------------------------------------------------------------------
@@ -24,6 +23,5 @@ namespace b
}
#endif // SEARCH_TUTORIAL_5_H
@@ -2,7 +2,6 @@
#define START_EXPLORING_H
#include "utility.h"
//------------------------------------------------------------------------------
@@ -30,6 +29,5 @@ public:
};
#endif // START_EXPLORING_H
@@ -2,7 +2,6 @@
#define THE_CENTRAL_HUB_H
#include "search_tutorial_1.h"
#include "graph_tutorial_1.h"
#include "code_tutorial_1.h"
@@ -29,6 +28,5 @@ void the_central_hub()
}
#endif // THE_CENTRAL_HUB_H
@@ -2,9 +2,7 @@
#define UTILITY_H
typedef unsigned int uint;
#endif // UTILITY_H
@@ -14,13 +14,9 @@
LET'S GET STARTED!\n
\tTo keep things simple just click the "main" symbol below to start the tour.\n
\n
[main\tsint\tp()](); // &lt;- start here\n\n
[main\tint\r()](); // &lt;- start here\n\n
</description>
</info>
<language_settings>
<language>C++</language>
<standard>c++1z</standard>
</language_settings>
<source>
<extensions>
<header_extensions>.h</header_extensions>
@@ -30,5 +26,4 @@
<source_path>./src</source_path>
</source_paths>
</source>
<version>1</version>
</config>
+23
View File
@@ -0,0 +1,23 @@
#include "io.h"
#include <iostream>
#include <sstream>
#include <string>
int io::numberIn() {
std::string input;
getline( std::cin, input );
std::stringstream stream( input );
int number;
stream >> number;
return number;
}
void io::numberOut(int num) {
std::cout << num;
}
void io::stringOut(const char* str) {
std::cout << str;
}
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<config>
<application>
<indexer_thread_count>4</indexer_thread_count>
<window_base_width>500</window_base_width>
<window_base_height>500</window_base_height>
</application>
<user>
<recent_projects>
<recent_project>./data/projects/tutorial/tutorial.coatiproject</recent_project>
<recent_project>./data/projects/tictactoe/tictactoe.coatiproject</recent_project>
</recent_projects>
</user>
</config>
+15 -33
View File
@@ -7,49 +7,33 @@
<!-- COLOR: int int int int - rgba e.g. 125 125 125 255 -->
<config>
<version><!-- INTEGER: Version number --></version>
<source>
<compiler_flags>
<compiler_flag><!-- STRING: compiler flag, including the dash e.g. -v --></compiler_flag>
</compiler_flags>
<header_search_paths>
<header_search_path><!-- STRING: header search path for each path a header_search_path element --></header_search_path>
</header_search_paths>
<!-- MAC ONLY -->
<framework_search_paths>
<framework_search_path><!-- STRING: framework search path --></framework_search_path>
</framework_search_paths>
</source>
<application>
<font_name><!-- STRING: font name --></font_name>
<font_size><!-- INTEGER: font size in pt --></font_size>
<color_scheme><!-- STRING: color scheme path --></color_scheme>
<font_size_max><!-- INTEGER: maximum font size in pt --></font_size_max>
<font_size_min><!-- INTEGER: minimum font size in pt --></font_size_min>
<font_size_std><!-- INTEGER: standard font size in pt --></font_size_std>
<indexer_thread_count><!-- INTEGER: number of threads indexing the source code --></indexer_thread_count>
<window_base_width><!-- INTEGER: initial width of an overlay window --></window_base_width>
<window_base_height><!-- INTEGER: initial height of an overlay window --></window_base_height>
<scroll_speed><!-- DECIMAL: multiplier for default scroll speed in views --></scroll_speed>
<logging_enabled><!-- BOOL: define if console and file logging is enabled --></logging_enabled>
</application>
<indexing>
<indexer_thread_count><!-- INTEGER: number of threads indexing the source code --></indexer_thread_count>
<cxx>
<compiler_flags>
<compiler_flag><!-- STRING: compiler flag, including the dash e.g. -v --></compiler_flag>
</compiler_flags>
<header_search_paths>
<header_search_path><!-- STRING: header search path for each path a header_search_path element --></header_search_path>
</header_search_paths>
<!-- MAC ONLY -->
<framework_search_paths>
<framework_search_path><!-- STRING: framework search path --></framework_search_path>
</framework_search_paths>
</cxx>
<java>
<java_path><!-- STRING: path java installation on Windows e.g. .../java/JDK/jre/bin --></java_path>
<java_maximum_memory><!-- INTEGER: memory in MB used by java indexer --></java_maximum_memory>
</java>
</indexing>
<code>
<tab_width><!-- INTEGER: number of spaces to represent a tab in code files --></tab_width>
@@ -63,7 +47,6 @@
<recent_projects>
<recent_project><!-- STRING: recent project path --></recent_project>
</recent_projects>
<license>
<check><!-- STRING: hashed path of the working directory used when entering the license key --></check>
<license><!-- STRING: the license key --></license>
@@ -78,6 +61,5 @@
<controls>
<mouse_back_button><!-- INTEGER: mouse button code of back button, default is 8 --></mouse_back_button>
<mouse_forward_button><!-- INTEGER: mouse button code of forward button, default is 16 --></mouse_forward_button>
<graph_zoom_on_mouse_wheel><!-- BOOL: set mouse wheel to zooming by default --></graph_zoom_on_mouse_wheel>
</controls>
</config>
@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<config>
<info>
<description>
WHAT IS THIS?\n
\tJavaParser is an open-source Java project for parsing Java code and\n
\tgenerating an Abstract Syntax Tree (AST). Additionally it supports a\n
\tvisitor pattern to traverse the generated AST. For more information on\n
\tthis project please visit javaparser.org\n
\n
LET'S GET STARTED!\n
\tHave you ever wondered what a parser for a real programming language\n
\tmay look like? Go ahead and find out!\n
\n
\tIf you ask yourself where to start, click the symbol linked below.\n
\n
[com\ts\tp\tngithub\ts\tp\tnjavaparser\ts\tp\tnast\ts\tp\tnbody\ts\tp\tnClassOrInterfaceDeclaration\ts\tp] // &lt;- start here!\n\n
</description>
</info>
<language_settings>
<language>Java</language>
<standard>8</standard>
</language_settings>
<source>
<extensions>
<source_extensions>.java</source_extensions>
</extensions>
<source_paths>
<source_path>./src/main/java</source_path>
<source_path>./target/generated-sources/javacc</source_path>
</source_paths>
</source>
</config>
@@ -1,232 +0,0 @@
/*
* Copyright (C) 2007-2010 Júlio Vilmar Gesser.
* Copyright (C) 2011, 2013-2016 The JavaParser Team.
*
* This file is part of JavaParser.
*
* JavaParser can be used either under the terms of
* a) the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* b) the terms of the Apache License
*
* You should have received a copy of both licenses in LICENCE.LGPL and
* LICENCE.APACHE. Please refer to those files for details.
*
* JavaParser is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*/
package com.github.javaparser;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.Node;
import com.github.javaparser.ast.comments.Comment;
import com.github.javaparser.ast.comments.CommentsCollection;
import com.github.javaparser.ast.comments.CommentsParser;
import com.github.javaparser.ast.comments.LineComment;
import com.github.javaparser.utils.PositionUtils;
import java.io.IOException;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* Assigns comments to nodes of the AST.
*
* @author Sebastian Kuerten
* @author Júlio Vilmar Gesser
*/
class CommentsInserter {
private boolean doNotAssignCommentsPreceedingEmptyLines = true;
private boolean doNotConsiderAnnotationsAsNodeStartForCodeAttribution = false;
CommentsInserter() {
}
/**
* Adds the comments found in the source code of a compilation unit to that compilation unit.
* @param cu an already created compilation unit
* @param cuSourceCode the source code of the compilation unit. It will be parsed to find comments.
*/
public void insertComments(CompilationUnit cu, String cuSourceCode) throws IOException {
CommentsParser commentsParser = new CommentsParser();
CommentsCollection allComments = commentsParser.parse(cuSourceCode);
insertCommentsInCu(cu, allComments);
}
public boolean getDoNotConsiderAnnotationsAsNodeStartForCodeAttribution() {
return doNotConsiderAnnotationsAsNodeStartForCodeAttribution;
}
public void setDoNotConsiderAnnotationsAsNodeStartForCodeAttribution(boolean newValue) {
this.doNotConsiderAnnotationsAsNodeStartForCodeAttribution = newValue;
}
public boolean getDoNotAssignCommentsPreceedingEmptyLines() {
return doNotAssignCommentsPreceedingEmptyLines;
}
public void setDoNotAssignCommentsPreceedingEmptyLines(boolean newValue) {
this.doNotAssignCommentsPreceedingEmptyLines = newValue;
}
/**
* Comments are attributed to the thing the comment and are removed from
* allComments.
*/
private void insertCommentsInCu(CompilationUnit cu,
CommentsCollection commentsCollection) {
if (commentsCollection.size() == 0)
return;
// I should sort all the direct children and the comments, if a comment
// is the first thing then it
// a comment to the CompilationUnit
// FIXME if there is no package it could be also a comment to the
// following class...
// so I could use some heuristics in these cases to distinguish the two
// cases
List<Comment> comments = commentsCollection.getAll();
PositionUtils.sortByBeginPosition(comments);
List<Node> children = cu.getChildrenNodes();
PositionUtils.sortByBeginPosition(children);
if (cu.getPackage() != null
&& (children.isEmpty() || PositionUtils.areInOrder(
comments.get(0), children.get(0)))) {
cu.setComment(comments.get(0));
comments.remove(0);
}
insertCommentsInNode(cu, comments);
}
/**
* This method try to attributes the nodes received to child of the node. It
* returns the node that were not attributed.
*/
private void insertCommentsInNode(Node node,
List<Comment> commentsToAttribute) {
if (commentsToAttribute.isEmpty())
return;
// the comments can:
// 1) Inside one of the child, then it is the child that have to
// associate them
// 2) If they are not inside a child they could be preceeding nothing, a
// comment or a child
// if they preceed a child they are assigned to it, otherweise they
// remain "orphans"
List<Node> children = node.getChildrenNodes();
PositionUtils.sortByBeginPosition(children);
for (Node child : children) {
List<Comment> commentsInsideChild = new LinkedList<Comment>();
for (Comment c : commentsToAttribute) {
if (PositionUtils.nodeContains(child, c,
doNotConsiderAnnotationsAsNodeStartForCodeAttribution)) {
commentsInsideChild.add(c);
}
}
commentsToAttribute.removeAll(commentsInsideChild);
insertCommentsInNode(child, commentsInsideChild);
}
// I can attribute in line comments to elements preceeding them, if
// there
// is something contained in their line
List<Comment> attributedComments = new LinkedList<Comment>();
for (Comment comment : commentsToAttribute) {
if (comment.isLineComment()) {
for (Node child : children) {
if (child.getEnd().line == comment.getBegin().line
&& attributeLineCommentToNodeOrChild(child,
comment.asLineComment())) {
attributedComments.add(comment);
}
}
}
}
// at this point I create an ordered list of all remaining comments and
// children
Comment previousComment = null;
attributedComments = new LinkedList<Comment>();
List<Node> childrenAndComments = new LinkedList<Node>();
childrenAndComments.addAll(children);
childrenAndComments.addAll(commentsToAttribute);
PositionUtils.sortByBeginPosition(childrenAndComments,
doNotConsiderAnnotationsAsNodeStartForCodeAttribution);
for (Node thing : childrenAndComments) {
if (thing instanceof Comment) {
previousComment = (Comment) thing;
if (!previousComment.isOrphan()) {
previousComment = null;
}
} else {
if (previousComment != null && !thing.hasComment()) {
if (!doNotAssignCommentsPreceedingEmptyLines
|| !thereAreLinesBetween(previousComment, thing)) {
thing.setComment(previousComment);
attributedComments.add(previousComment);
previousComment = null;
}
}
}
}
commentsToAttribute.removeAll(attributedComments);
// all the remaining are orphan nodes
for (Comment c : commentsToAttribute) {
if (c.isOrphan()) {
node.addOrphanComment(c);
}
}
}
private boolean attributeLineCommentToNodeOrChild(Node node,
LineComment lineComment) {
// The node start and end at the same line as the comment,
// let's give to it the comment
if (node.getBegin().line == lineComment.getBegin().line
&& !node.hasComment()) {
if(!(node instanceof Comment)) {
node.setComment(lineComment);
}
return true;
} else {
// try with all the children, sorted by reverse position (so the
// first one is the nearest to the comment
List<Node> children = new LinkedList<Node>();
children.addAll(node.getChildrenNodes());
PositionUtils.sortByBeginPosition(children);
Collections.reverse(children);
for (Node child : children) {
if (attributeLineCommentToNodeOrChild(child, lineComment)) {
return true;
}
}
return false;
}
}
private boolean thereAreLinesBetween(Node a, Node b) {
if (!PositionUtils.areInOrder(a, b)) {
return thereAreLinesBetween(b, a);
}
int endOfA = a.getEnd().line;
return b.getBegin().line > (endOfA + 1);
}
}
@@ -1,563 +0,0 @@
/*
* Copyright (C) 2007-2010 Júlio Vilmar Gesser.
* Copyright (C) 2011, 2013-2016 The JavaParser Team.
*
* This file is part of JavaParser.
*
* JavaParser can be used either under the terms of
* a) the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* b) the terms of the Apache License
*
* You should have received a copy of both licenses in LICENCE.LGPL and
* LICENCE.APACHE. Please refer to those files for details.
*
* JavaParser is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*/
package com.github.javaparser;
import java.io.*;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.ImportDeclaration;
import com.github.javaparser.ast.body.BodyDeclaration;
import com.github.javaparser.ast.expr.AnnotationExpr;
import com.github.javaparser.ast.expr.Expression;
import com.github.javaparser.ast.stmt.BlockStmt;
import com.github.javaparser.ast.stmt.Statement;
import java.nio.charset.Charset;
import java.util.List;
import static com.github.javaparser.utils.Utils.readerToString;
/**
* Parse Java source code and creates Abstract Syntax Tree classes.
*
* @author Júlio Vilmar Gesser
*/
public final class JavaParser {
private static final CommentsInserter commentsInserter = new CommentsInserter();
private static final Charset UTF8 = Charset.forName("utf-8");
private ASTParser astParser = null;
private Provider provider = null;
/**
* Instantiate the parser. Note that parsing can also be done with the static methods on this class.
* Creating an instance will reduce setup time between parsing files.
*/
public JavaParser() {
// No specific constructors for this class.
}
public JavaParser setSource(Provider provider) {
this.provider=provider;
if(astParser==null) {
astParser = new ASTParser(provider);
}else{
astParser.ReInit(provider);
}
return this;
}
public JavaParser setSource(Reader reader) {
return setSource(new StreamProvider(reader));
}
public JavaParser setSource(InputStream input) throws IOException {
return setSource(new StreamProvider(input));
}
public JavaParser setSource(InputStream input, Charset encoding) throws IOException {
return setSource(new StreamProvider(input, encoding.name()));
}
public JavaParser setSource(File file) throws IOException {
return setSource(new FileInputStream(file));
}
public JavaParser setSource(File file, Charset encoding) throws IOException {
return setSource(new FileInputStream(file), encoding);
}
public JavaParser setSource(String source) {
return setSource(new StringReader(source));
}
/**
* Return the list of tokens that have been encountered while parsing code
* using this parser.
*
* @return a list of tokens
*/
public List<Token> getTokens() {
checkSourceSet();
return astParser.getTokens();
}
private void checkSourceSet() {
if (astParser == null || provider == null) {
throw new IllegalStateException("Please setSource() before doing any parsing.");
}
}
/**
* Parses the Java code and returns a {@link CompilationUnit} that
* represents it.
*
* @return CompilationUnit representing the Java source code
* @throws ParseException
* if the source code has parser errors
*/
public CompilationUnit parse() throws ParseException {
try {
checkSourceSet();
return astParser.CompilationUnit();
} finally {
closeProvider();
}
}
private void closeProvider() {
try {
checkSourceSet();
provider.close();
} catch (IOException e) {
// Since we're done parsing and have our result, we don't care about any errors.
}
}
/**
* Parses the Java block and returns a {@link BlockStmt} that represents it.
*
* @return BlockStmt representing the Java block
* @throws ParseException
* if the source code has parser errors
*/
public BlockStmt parseBlock() throws ParseException {
try{
checkSourceSet();
return astParser.Block();
} finally {
closeProvider();
}
}
/**
* Parses the Java block and returns a {@link List} of {@link Statement}s
* that represents it.
*
* @return Statement representing the Java statement
* @throws ParseException
* if the source code has parser errors
*/
public List<Statement> parseStatements() throws ParseException {
try {
checkSourceSet();
return astParser.Statements();
} finally {
closeProvider();
}
}
/**
* Parses the Java statement and returns a {@link Statement} that represents
* it.
*
* @return Statement representing the Java statement
* @throws ParseException
* if the source code has parser errors
*/
public Statement parseStatement() throws ParseException {
try {
checkSourceSet();
return astParser.Statement();
} finally {
closeProvider();
}
}
/**
* Parses the Java import and returns a {@link ImportDeclaration} that
* represents it.
*
* @return ImportDeclaration representing the Java import declaration
* @throws ParseException
* if the source code has parser errors
*/
public ImportDeclaration parseImport() throws ParseException {
try {
checkSourceSet();
return astParser.ImportDeclaration();
} finally {
closeProvider();
}
}
/**
* Parses the Java expression and returns a {@link Expression} that
* represents it.
*
* @return Expression representing the Java expression
* @throws ParseException
* if the source code has parser errors
*/
public Expression parseExpression() throws ParseException {
try {
checkSourceSet();
return astParser.Expression();
} finally {
closeProvider();
}
}
/**
* Parses the Java annotation and returns a {@link AnnotationExpr} that
* represents it.
*
* @return AnnotationExpr representing the Java annotation
* @throws ParseException
* if the source code has parser errors
*/
public AnnotationExpr parseAnnotation() throws ParseException {
try {
checkSourceSet();
return astParser.Annotation();
} finally {
closeProvider();
}
}
/**
* Parses the Java body declaration(e.g fields or methods) and returns a
* {@link BodyDeclaration} that represents it.
*
* @return BodyDeclaration representing the Java body
* @throws ParseException
* if the source code has parser errors
*/
public BodyDeclaration<?> parseBodyDeclaration() throws ParseException {
try {
checkSourceSet();
return astParser.AnnotationBodyDeclaration();
} finally {
closeProvider();
}
}
/**
* Parses a Java class body declaration(e.g fields or methods) and returns a
* {@link BodyDeclaration} that represents it.
*
* @return BodyDeclaration representing the Java class body
* @throws ParseException
* if the source code has parser errors
*/
public BodyDeclaration<?> parseClassBodyDeclaration() throws ParseException {
try {
checkSourceSet();
return astParser.ClassOrInterfaceBodyDeclaration(false);
} finally {
closeProvider();
}
}
/**
* Parses a Java interface body declaration(e.g fields or methods) and returns a
* {@link BodyDeclaration} that represents it.
*
* @return BodyDeclaration representing the Java interface body
* @throws ParseException
* if the source code has parser errors
*/
public BodyDeclaration<?> parseInterfaceBodyDeclaration() throws ParseException {
try {
checkSourceSet();
return astParser.ClassOrInterfaceBodyDeclaration(true);
} finally {
closeProvider();
}
}
public static boolean getDoNotConsiderAnnotationsAsNodeStartForCodeAttribution() {
return commentsInserter.getDoNotConsiderAnnotationsAsNodeStartForCodeAttribution();
}
public static void setDoNotConsiderAnnotationsAsNodeStartForCodeAttribution(boolean newValue) {
commentsInserter.setDoNotConsiderAnnotationsAsNodeStartForCodeAttribution(newValue);
}
public static boolean getDoNotAssignCommentsPreceedingEmptyLines() {
return commentsInserter.getDoNotAssignCommentsPreceedingEmptyLines();
}
public static void setDoNotAssignCommentsPreceedingEmptyLines(boolean newValue) {
commentsInserter.setDoNotAssignCommentsPreceedingEmptyLines(newValue);
}
public static CompilationUnit parse(final InputStream in,
final Charset encoding) throws ParseException {
return parse(in,encoding,true);
}
/**
* Parses the Java code contained in the {@link InputStream} and returns a
* {@link CompilationUnit} that represents it.
*
* @param in
* {@link InputStream} containing Java source code
* @param encoding
* encoding of the source code
* @return CompilationUnit representing the Java source code
* @throws ParseException
* if the source code has parser errors
*/
public static CompilationUnit parse(final InputStream in,
Charset encoding,
boolean considerComments) throws ParseException {
try {
try (InputStreamReader inputStreamReader = new InputStreamReader(in, encoding)) {
return parse(inputStreamReader, considerComments);
}
} catch (IOException ioe) {
throw new ParseException(ioe.getMessage());
}
}
/**
* Parses the Java code contained in the {@link InputStream} and returns a
* {@link CompilationUnit} that represents it.<br>
* Note: Uses UTF-8 encoding
*
* @param in
* {@link InputStream} containing Java source code
* @return CompilationUnit representing the Java source code
* @throws ParseException
* if the source code has parser errors
*/
public static CompilationUnit parse(final InputStream in)
throws ParseException {
return parse(in, UTF8, true);
}
public static CompilationUnit parse(final File file, final Charset encoding)
throws ParseException, IOException {
return parse(file,encoding,true);
}
/**
* Parses the Java code contained in a {@link File} and returns a
* {@link CompilationUnit} that represents it.
*
* @param file
* {@link File} containing Java source code
* @param encoding
* encoding of the source code
* @return CompilationUnit representing the Java source code
* @throws ParseException
* if the source code has parser errors
*/
public static CompilationUnit parse(final File file, final Charset encoding, boolean considerComments)
throws ParseException {
try {
try (FileInputStream in = new FileInputStream(file)) {
return parse(in, encoding, considerComments);
}
} catch (IOException ioe) {
throw new ParseException(ioe.getMessage());
}
}
/**
* Parses the Java code contained in a {@link File} and returns a
* {@link CompilationUnit} that represents it.<br>
* Note: Uses UTF-8 encoding
*
*
* @param file
* {@link File} containing Java source code
* @return CompilationUnit representing the Java source code
* @throws ParseException
* if the source code has parser errors
* @throws IOException
*/
public static CompilationUnit parse(final File file) throws ParseException,
IOException {
return parse(file, UTF8, true);
}
public static CompilationUnit parse(final Reader reader)
throws ParseException {
return parse(reader, true);
}
public static CompilationUnit parse(final Reader reader, boolean considerComments)
throws ParseException {
try {
String comments = readerToString(reader);
CompilationUnit cu = new JavaParser().setSource(comments).parse();
if (considerComments){
commentsInserter.insertComments(cu, comments);
}
return cu;
} catch (IOException ioe){
throw new ParseException(ioe.getMessage());
}
}
/**
* Parses the Java code contained in code and returns a
* {@link CompilationUnit} that represents it.
*
* @param code Java source code
* @param considerComments parse or ignore comments
* @return CompilationUnit representing the Java source code
* @throws ParseException if the source code has parser errors
*/
public static CompilationUnit parse(String code, boolean considerComments) throws ParseException {
return parse(new StringReader(code), considerComments);
}
/**
* Parses the Java code contained in code and returns a
* {@link CompilationUnit} that represents it.
*
* @param code Java source code
* @return CompilationUnit representing the Java source code
* @throws ParseException if the source code has parser errors
*/
public static CompilationUnit parse(String code) throws ParseException {
return parse(code, true);
}
/**
* Parses the Java block contained in a {@link String} and returns a
* {@link BlockStmt} that represents it.
*
* @param blockStatement
* {@link String} containing Java block code
* @return BlockStmt representing the Java block
* @throws ParseException
* if the source code has parser errors
*/
public static BlockStmt parseBlock(final String blockStatement)
throws ParseException {
return new JavaParser().setSource(blockStatement).parseBlock();
}
/**
* Parses the Java statement contained in a {@link String} and returns a
* {@link Statement} that represents it.
*
* @param statement
* {@link String} containing Java statement code
* @return Statement representing the Java statement
* @throws ParseException
* if the source code has parser errors
*/
public static Statement parseStatement(final String statement) throws ParseException {
return new JavaParser().setSource(statement).parseStatement();
}
/**
* Parses the Java statements contained in a {@link String} and returns a
* list of {@link Statement} that represents it.
*
* @param statements
* {@link String} containing Java statements
* @return list of Statement representing the Java statement
* @throws ParseException
* if the source code has parser errors
*/
public static List<Statement> parseStatements(final String statements) throws ParseException {
return new JavaParser().setSource(statements).parseStatements();
}
/**
* Parses the Java import contained in a {@link String} and returns a
* {@link ImportDeclaration} that represents it.
*
* @param importDeclaration
* {@link String} containing Java import code
* @return ImportDeclaration representing the Java import declaration
* @throws ParseException
* if the source code has parser errors
*/
public static ImportDeclaration parseImport(final String importDeclaration) throws ParseException {
return new JavaParser().setSource(importDeclaration).parseImport();
}
/**
* Parses the Java expression contained in a {@link String} and returns a
* {@link Expression} that represents it.
*
* @param expression
* {@link String} containing Java expression
* @return Expression representing the Java expression
* @throws ParseException
* if the source code has parser errors
*/
public static Expression parseExpression(final String expression) throws ParseException {
return new JavaParser().setSource(expression).parseExpression();
}
/**
* Parses the Java annotation contained in a {@link String} and returns a
* {@link AnnotationExpr} that represents it.
*
* @param annotation
* {@link String} containing Java annotation
* @return AnnotationExpr representing the Java annotation
* @throws ParseException
* if the source code has parser errors
*/
public static AnnotationExpr parseAnnotation(final String annotation) throws ParseException {
return new JavaParser().setSource(annotation).parseAnnotation();
}
/**
* Parses the Java body declaration(e.g fields or methods) contained in a
* {@link String} and returns a {@link BodyDeclaration} that represents it.
*
* @param body
* {@link String} containing Java body declaration
* @return BodyDeclaration representing the Java annotation
* @throws ParseException
* if the source code has parser errors
*/
public static BodyDeclaration<?> parseBodyDeclaration(final String body) throws ParseException {
return new JavaParser().setSource(body).parseBodyDeclaration();
}
/**
* Parses a Java class body declaration(e.g fields or methods) and returns a
* {@link BodyDeclaration} that represents it.
*
* @param body the body of a class
* @return BodyDeclaration representing the Java class body
* @throws ParseException
* if the source code has parser errors
*/
public static BodyDeclaration<?> parseClassBodyDeclaration(String body) throws ParseException {
return new JavaParser().setSource(body).parseClassBodyDeclaration();
}
/**
* Parses a Java interface body declaration(e.g fields or methods) and returns a
* {@link BodyDeclaration} that represents it.
*
* @param body the body of an interface
* @return BodyDeclaration representing the Java interface body
* @throws ParseException
* if the source code has parser errors
*/
public static BodyDeclaration parseInterfaceBodyDeclaration(String body) throws ParseException {
return new JavaParser().setSource(body).parseInterfaceBodyDeclaration();
}
}
@@ -1,137 +0,0 @@
/*
* Copyright (C) 2007-2010 Júlio Vilmar Gesser.
* Copyright (C) 2011, 2013-2016 The JavaParser Team.
*
* This file is part of JavaParser.
*
* JavaParser can be used either under the terms of
* a) the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* b) the terms of the Apache License
*
* You should have received a copy of both licenses in LICENCE.LGPL and
* LICENCE.APACHE. Please refer to those files for details.
*
* JavaParser is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*/
package com.github.javaparser;
import com.github.javaparser.ast.Node;
/**
* A position in a source file. Lines and columns start counting at 1.
*/
public class Position implements Comparable<Position> {
public final int line;
public final int column;
public static final Position ABSOLUTE_START = new Position(Node.ABSOLUTE_BEGIN_LINE, -1);
public static final Position ABSOLUTE_END = new Position(Node.ABSOLUTE_END_LINE, -1);
/**
* The first position in the file
*/
public static final Position HOME = new Position(1, 1);
public static final Position UNKNOWN = new Position(0, 0);
public Position(int line, int column) {
if (line < Node.ABSOLUTE_END_LINE) {
throw new IllegalArgumentException("Can't position at line " + line);
}
if (column < -1) {
throw new IllegalArgumentException("Can't position at column " + column);
}
this.line = line;
this.column = column;
}
/**
* Convenient factory method.
*/
public static Position pos(int line, int column) {
return new Position(line, column);
}
public Position withColumn(int column) {
return new Position(this.line, column);
}
public Position withLine(int line) {
return new Position(line, this.column);
}
/**
* Check if the position is usable. Does not know what it is pointing at, so it can't check if the position is after the end of the source.
*/
public boolean valid() {
return line > 0 && column > 0;
}
public boolean invalid() {
return !valid();
}
public Position orIfInvalid(Position anotherPosition) {
if (valid()) {
return this;
}
return anotherPosition;
}
public boolean isAfter(Position position) {
if (position.line == Node.ABSOLUTE_BEGIN_LINE) return true;
if (line > position.line) {
return true;
} else if (line == position.line) {
return column > position.column;
}
return false;
}
public boolean isBefore(Position position) {
if (position.line == Node.ABSOLUTE_END_LINE) return true;
if (line < position.line) {
return true;
} else if (line == position.line) {
return column < position.column;
}
return false;
}
@Override
public int compareTo(Position o) {
if (isBefore(o)) {
return -1;
}
if (isAfter(o)) {
return 1;
}
return 0;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Position position = (Position) o;
return line == position.line && column == position.column;
}
@Override
public int hashCode() {
return 31 * line + column;
}
@Override
public String toString() {
return "(line " + line + ",col " + column + ")";
}
}
@@ -1,89 +0,0 @@
package com.github.javaparser;
import static com.github.javaparser.Position.pos;
/**
* A range of characters in a source file, from "begin" to "end", including the characters at "begin" and "end".
*/
public class Range {
public static final Range UNKNOWN = range(Position.UNKNOWN, Position.UNKNOWN);
public final Position begin;
public final Position end;
public Range(Position begin, Position end) {
if (begin == null) {
throw new IllegalArgumentException("begin can't be null");
}
if (end == null) {
throw new IllegalArgumentException("end can't be null");
}
this.begin = begin;
this.end = end;
}
public static Range range(Position begin, Position end) {
return new Range(begin, end);
}
public static Range range(int beginLine, int beginColumn, int endLine, int endColumn) {
return new Range(pos(beginLine, beginColumn), pos(endLine, endColumn));
}
public Range withBeginColumn(int column) {
return range(begin.withColumn(column), end);
}
public Range withBeginLine(int line) {
return range(begin.withLine(line), end);
}
public Range withEndColumn(int column) {
return range(begin, end.withColumn(column));
}
public Range withEndLine(int line) {
return range(begin, end.withLine(line));
}
public Range withBegin(Position begin) {
return range(begin, this.end);
}
public Range withEnd(Position end) {
return range(this.begin, end);
}
public boolean contains(Range other) {
return begin.isBefore(other.begin) && end.isAfter(other.end);
}
public boolean isBefore(Position position) {
return end.isBefore(position);
}
public boolean isAfter(Position position) {
return begin.isAfter(position);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Range range = (Range) o;
return begin.equals(range.begin) && end.equals(range.end);
}
@Override
public int hashCode() {
return 31 * begin.hashCode() + end.hashCode();
}
@Override
public String toString() {
return begin+"-"+end;
}
}

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