diff --git a/CMake/FindAnt.cmake b/CMake/FindAnt.cmake deleted file mode 100644 index b96ef5e74e..0000000000 --- a/CMake/FindAnt.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# - Find Ant (a java build tool) -# This module defines -# ANT_VERSION version string of ant if found -# ANT_FOUND, If false, do not try to use ant - -exec_program(ant ARGS -version OUTPUT_VARIABLE ANT_VERSION - RETURN_VALUE ANT_RETURN) - -if(ANT_RETURN STREQUAL "0") - set(ANT_FOUND TRUE) - if(NOT ANT_FIND_QUIETLY) - message(STATUS "Found Ant: ${ANT_VERSION}") - endif(NOT ANT_FIND_QUIETLY) -else(ANT_RETURN STREQUAL "0") - set(ANT_FOUND FALSE) -endif(ANT_RETURN STREQUAL "0") \ No newline at end of file diff --git a/CMake/mitkFunctionConvertXPSchema.cmake b/CMake/mitkFunctionConvertXPSchema.cmake deleted file mode 100644 index 681e31bee5..0000000000 --- a/CMake/mitkFunctionConvertXPSchema.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# mitkFunctionConvertXPSchema(INPUT plugin.xml ... -# OUTPUT_DIR output_dir -# TARGET_NAME target_name -# [DEPENDS depends] -# [WORKING_DIR working_dir] -# ) -function(mitkFunctionConvertXPSchema) - - set(_macro_options - ) - - set(_macro_params - OUTPUT_DIR - TARGET_NAME - WORKING_DIR - ) - - set(_macro_multiparams - INPUT - DEPENDS - ) - - cmake_parse_arguments(_SCHEMA "${_macro_options}" "${_macro_params}" "${_macro_multiparams}" ${ARGN}) - - set(XP_ANT_TASKS) - foreach(_file ${_SCHEMA_INPUT}) - set(XP_ANT_TASKS "${XP_ANT_TASKS} - " - ) - endforeach() - - set(XP_DOC_DESTINATION "${_SCHEMA_OUTPUT_DIR}") - - if(NOT _SCHEMA_WORKING_DIR) - set(_SCHEMA_WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR}) - endif() - - configure_file("${CMAKE_CURRENT_LIST_DIR}/buildExtPointDoc.xml.in" - "${_SCHEMA_WORKING_DIR}/buildExtPointDoc.xml" @ONLY) - - add_custom_target(${_SCHEMA_TARGET_NAME} - ant -f ${_SCHEMA_WORKING_DIR}/buildExtPointDoc.xml - DEPENDS ${_SCHEMA_DEPENDS} - WORKING_DIRECTORY ${_SCHEMA_WORKING_DIR} - VERBATIM) - -endfunction() diff --git a/CMakeLists.txt b/CMakeLists.txt index 007d516d5f..9b48f04793 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,1414 +1,1413 @@ set(MITK_CMAKE_MINIMUM_REQUIRED_VERSION 3.14.5) cmake_minimum_required(VERSION ${MITK_CMAKE_MINIMUM_REQUIRED_VERSION}) #----------------------------------------------------------------------------- # See https://cmake.org/cmake/help/v3.14/manual/cmake-policies.7.html for details #----------------------------------------------------------------------------- set(project_policies ) foreach(policy ${project_policies}) if(POLICY ${policy}) cmake_policy(SET ${policy} NEW) endif() endforeach() #----------------------------------------------------------------------------- # Superbuild Option - Enabled by default #----------------------------------------------------------------------------- option(MITK_USE_SUPERBUILD "Build MITK and the projects it depends on via SuperBuild.cmake." ON) if(MITK_USE_SUPERBUILD) project(MITK-superbuild) set(MITK_SOURCE_DIR ${PROJECT_SOURCE_DIR}) set(MITK_BINARY_DIR ${PROJECT_BINARY_DIR}) else() project(MITK VERSION 2018.04.99) include_directories(SYSTEM ${MITK_SUPERBUILD_BINARY_DIR}) endif() #----------------------------------------------------------------------------- # MITK Extension Feature #----------------------------------------------------------------------------- set(MITK_EXTENSION_DIRS "" CACHE STRING "") unset(MITK_ABSOLUTE_EXTENSION_DIRS) foreach(MITK_EXTENSION_DIR ${MITK_EXTENSION_DIRS}) get_filename_component(MITK_ABSOLUTE_EXTENSION_DIR "${MITK_EXTENSION_DIR}" ABSOLUTE) list(APPEND MITK_ABSOLUTE_EXTENSION_DIRS "${MITK_ABSOLUTE_EXTENSION_DIR}") endforeach() set(MITK_DIR_PLUS_EXTENSION_DIRS "${MITK_SOURCE_DIR}" ${MITK_ABSOLUTE_EXTENSION_DIRS}) #----------------------------------------------------------------------------- # Update CMake module path #----------------------------------------------------------------------------- set(MITK_CMAKE_DIR ${MITK_SOURCE_DIR}/CMake) set(CMAKE_MODULE_PATH ${MITK_CMAKE_DIR}) foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS}) set(MITK_CMAKE_EXTENSION_DIR "${MITK_EXTENSION_DIR}/CMake") if(EXISTS "${MITK_CMAKE_EXTENSION_DIR}") list(APPEND CMAKE_MODULE_PATH "${MITK_CMAKE_EXTENSION_DIR}") endif() endforeach() #----------------------------------------------------------------------------- # CMake function(s) and macro(s) #----------------------------------------------------------------------------- # Standard CMake macros include(FeatureSummary) include(CTest) include(CMakeParseArguments) include(FindPackageHandleStandardArgs) # MITK macros include(mitkFunctionGetGccVersion) include(mitkFunctionCheckCompilerFlags) include(mitkFunctionSuppressWarnings) # includes several functions include(mitkMacroEmptyExternalProject) include(mitkFunctionEnableBuildConfiguration) include(mitkFunctionWhitelists) include(mitkFunctionAddExternalProject) include(mitkFunctionAddLibrarySearchPaths) SUPPRESS_VC_DEPRECATED_WARNINGS() #----------------------------------------------------------------------------- # Set a default build type if none was specified #----------------------------------------------------------------------------- if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to 'Debug' as none was specified.") set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) # Set the possible values of build type for cmake-gui set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") endif() #----------------------------------------------------------------------------- # Check miminum macOS version #----------------------------------------------------------------------------- # The minimum supported macOS version is 10.13. If you use a version less than 10.13, there is no guarantee that the build still works. if(APPLE) exec_program(sw_vers ARGS -productVersion OUTPUT_VARIABLE macos_version) if (macos_version VERSION_LESS "10.13") message(WARNING "Detected macOS version \"${macos_version}\" is not supported anymore. Minimum required macOS version is at least 10.13.") endif() if (CMAKE_OSX_DEPLOYMENT_TARGET AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.13) message(WARNING "Detected macOS deployment target \"${CMAKE_OSX_DEPLOYMENT_TARGET}\" is not supported anymore. Minimum required macOS version is at least 10.13.") endif() endif() #----------------------------------------------------------------------------- # Check miminum compiler versions #----------------------------------------------------------------------------- if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # require at least gcc 4.9 as provided by ppa:ubuntu-toolchain-r/test for Ubuntu 14.04 if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) message(FATAL_ERROR "GCC version must be at least 4.9 If you are using Ubuntu 14.04, you can easily install gcc and g++ 4.9 (or any later version available) in addition to your version ${CMAKE_CXX_COMPILER_VERSION}: sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.9 g++-4.9 Make sure to explicitly specify these compilers when configuring MITK: CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-4.9 CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-4.9 For more information on the proposed PPA see the Toolchain Updates section of https://wiki.ubuntu.com/ToolChain.") endif() elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # require at least clang 3.4 if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4) message(FATAL_ERROR "Clang version must be at least 3.4") endif() elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") # require at least clang 5.0 if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) message(FATAL_ERROR "Apple Clang version must be at least 5.0") endif() elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") # require at least Visual Studio 2017 if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10) message(FATAL_ERROR "Microsoft Visual Studio 2017 or newer required") endif() else() message(WARNING "You are using an unsupported compiler! Compilation has only been tested with Clang (Linux or Apple), GCC and MSVC.") endif() if(CMAKE_COMPILER_IS_GNUCXX) mitkFunctionGetGccVersion(${CMAKE_CXX_COMPILER} GCC_VERSION) else() set(GCC_VERSION 0) endif() set(MITK_CXX_STANDARD 14) set(CMAKE_CXX_EXTENSIONS 0) set(CMAKE_CXX_STANDARD ${MITK_CXX_STANDARD}) set(CMAKE_CXX_STANDARD_REQUIRED 1) # This is necessary to avoid problems with compile feature checks. # CMAKE_CXX_STANDARD seems to only set the -std=c++14 flag for targets. # However, compile flag checks also need to be done with -std=c++14. # The MITK_CXX14_FLAG variable is also used for external projects # build during the MITK super-build. mitkFunctionCheckCompilerFlags("-std=c++14" MITK_CXX14_FLAG) #----------------------------------------------------------------------------- # Warn if source or build path is too long #----------------------------------------------------------------------------- if(WIN32) set(_src_dir_length_max 50) set(_bin_dir_length_max 50) if(MITK_USE_SUPERBUILD) set(_src_dir_length_max 34) # _src_dir_length_max - strlen(ep/src/ITK-build) set(_bin_dir_length_max 40) # _bin_dir_length_max - strlen(MITK-build) endif() string(LENGTH "${MITK_SOURCE_DIR}" _src_n) string(LENGTH "${MITK_BINARY_DIR}" _bin_n) # The warnings should be converted to errors if(_src_n GREATER _src_dir_length_max) message(WARNING "MITK source code directory path length is too long (${_src_n} > ${_src_dir_length_max})." "Please move the MITK source code directory to a directory with a shorter path." ) endif() if(_bin_n GREATER _bin_dir_length_max) message(WARNING "MITK build directory path length is too long (${_bin_n} > ${_bin_dir_length_max})." "Please move the MITK build directory to a directory with a shorter path." ) endif() endif() #----------------------------------------------------------------------------- # Additional MITK Options (also shown during superbuild) #----------------------------------------------------------------------------- # ----------------------------------------- # General build options option(BUILD_SHARED_LIBS "Build MITK with shared libraries" ON) option(WITH_COVERAGE "Enable/Disable coverage" OFF) option(BUILD_TESTING "Test the project" ON) option(MITK_FAST_TESTING "Disable long-running tests like packaging" OFF) option(MITK_XVFB_TESTING "Execute test drivers through xvfb-run" OFF) option(MITK_BUILD_ALL_APPS "Build all MITK applications" OFF) option(MITK_BUILD_EXAMPLES "Build the MITK Examples" OFF) option(MITK_ENABLE_PIC_READER "Enable support for reading the DKFZ pic file format." ON) mark_as_advanced( MITK_XVFB_TESTING MITK_FAST_TESTING MITK_BUILD_ALL_APPS MITK_ENABLE_PIC_READER ) #----------------------------------------------------------------------------- # Set UI testing flags #----------------------------------------------------------------------------- if(MITK_XVFB_TESTING) set(MITK_XVFB_TESTING_COMMAND "xvfb-run" "--auto-servernum" CACHE STRING "Command and options to test through Xvfb") mark_as_advanced(MITK_XVFB_TESTING_COMMAND) endif(MITK_XVFB_TESTING) # ----------------------------------------- # Other options set(MITK_CUSTOM_REVISION_DESC "" CACHE STRING "Override MITK revision description") mark_as_advanced(MITK_CUSTOM_REVISION_DESC) set_property(GLOBAL PROPERTY MITK_EXTERNAL_PROJECTS "") include(CMakeExternals/ExternalProjectList.cmake) foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS}) set(MITK_CMAKE_EXTERNALS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/CMakeExternals") if(EXISTS "${MITK_CMAKE_EXTERNALS_EXTENSION_DIR}/ExternalProjectList.cmake") include("${MITK_CMAKE_EXTERNALS_EXTENSION_DIR}/ExternalProjectList.cmake") endif() endforeach() # ----------------------------------------- # Other MITK_USE_* options not related to # external projects build via the # MITK superbuild option(MITK_USE_BLUEBERRY "Build the BlueBerry platform" ON) option(MITK_USE_OpenCL "Use OpenCL GPU-Computing library" OFF) option(MITK_USE_OpenMP "Use OpenMP" OFF) option(MITK_USE_Python3 "Use Python 3" OFF) #----------------------------------------------------------------------------- # Build configurations #----------------------------------------------------------------------------- set(_buildConfigs "Custom") file(GLOB _buildConfigFiles CMake/BuildConfigurations/*.cmake) foreach(_buildConfigFile ${_buildConfigFiles}) get_filename_component(_buildConfigFile ${_buildConfigFile} NAME_WE) list(APPEND _buildConfigs ${_buildConfigFile}) endforeach() foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS}) file(GLOB _extBuildConfigFiles "${MITK_EXTENSION_DIR}/CMake/BuildConfigurations/*.cmake") foreach(_extBuildConfigFile ${_extBuildConfigFiles}) get_filename_component(_extBuildConfigFile "${_extBuildConfigFile}" NAME_WE) list(APPEND _buildConfigs "${_extBuildConfigFile}") endforeach() list(REMOVE_DUPLICATES _buildConfigs) endforeach() set(MITK_BUILD_CONFIGURATION "Custom" CACHE STRING "Use pre-defined MITK configurations") set_property(CACHE MITK_BUILD_CONFIGURATION PROPERTY STRINGS ${_buildConfigs}) mitkFunctionEnableBuildConfiguration() mitkFunctionCreateWhitelistPaths(MITK) mitkFunctionFindWhitelists(MITK) # ----------------------------------------- # Qt version related variables option(MITK_USE_Qt5 "Use Qt 5 library" ON) if(MITK_USE_Qt5) set(MITK_QT5_MINIMUM_VERSION 5.12) set(MITK_QT5_COMPONENTS Concurrent OpenGL PrintSupport Script Sql Svg Widgets Xml XmlPatterns WebEngineWidgets UiTools Help LinguistTools) if(APPLE) list(APPEND MITK_QT5_COMPONENTS DBus) elseif(UNIX) list(APPEND MITK_QT5_COMPONENTS X11Extras) endif() # Hint at default install locations of Qt if(NOT Qt5_DIR) if(MSVC) set(_dir_candidates "C:/Qt") if(CMAKE_GENERATOR MATCHES "^Visual Studio [0-9]+ ([0-9]+)") set(_compilers "msvc${CMAKE_MATCH_1}") elseif(CMAKE_GENERATOR MATCHES "Ninja") include(mitkFunctionGetMSVCVersion) mitkFunctionGetMSVCVersion() if(VISUAL_STUDIO_PRODUCT_NAME MATCHES "^Visual Studio ([0-9]+)") set(_compilers "msvc${CMAKE_MATCH_1}") endif() endif() if(_compilers MATCHES "[0-9]+") if (CMAKE_MATCH_0 EQUAL 2019) list(APPEND _compilers "msvc2017") # Binary compatible to 2019 endif() endif() else() set(_dir_candidates ~/Qt) if(APPLE) set(_compilers clang) else() list(APPEND _dir_candidates /opt/Qt) set(_compilers gcc) endif() endif() if(CMAKE_SIZEOF_VOID_P EQUAL 8) foreach(_compiler ${_compilers}) list(APPEND _compilers64 "${_compiler}_64") endforeach() set(_compilers ${_compilers64}) endif() foreach(_dir_candidate ${_dir_candidates}) get_filename_component(_dir_candidate ${_dir_candidate} REALPATH) foreach(_compiler ${_compilers}) set(_glob_expression "${_dir_candidate}/5.*/${_compiler}") file(GLOB _hints ${_glob_expression}) list(SORT _hints) list(APPEND MITK_QT5_HINTS ${_hints}) endforeach() endforeach() endif() find_package(Qt5 ${MITK_QT5_MINIMUM_VERSION} COMPONENTS ${MITK_QT5_COMPONENTS} REQUIRED HINTS ${MITK_QT5_HINTS}) if(${Qt5_VERSION} VERSION_GREATER_EQUAL 5.13) message(WARNING "Qt version ${Qt5_VERSION_MAJOR}.${Qt5_VERSION_MINOR} is not yet supported. We recommend using version 5.12.x.") endif() endif() # ----------------------------------------- # Custom dependency logic option(MITK_USE_SYSTEM_Boost "Use the system Boost" OFF) set(MITK_USE_Boost_LIBRARIES "" CACHE STRING "A semi-colon separated list of required Boost libraries") if(MITK_USE_cpprestsdk) find_package(OpenSSL QUIET) if(NOT OpenSSL_FOUND) set(openssl_message "Could not find OpenSSL (dependency of C++ REST SDK).\n") if(UNIX) if(APPLE) set(openssl_message "${openssl_message}Please install it using your favorite package management " "system (i.e. Homebrew or MacPorts).\n") else() set(openssl_message "${openssl_message}Please install the dev package of OpenSSL (i.e. libssl-dev).\n") endif() else() set(openssl_message "${openssl_message}Please install Win32 OpenSSL:\n" " https://slproweb.com/products/Win32OpenSSL.html\n") endif() set(openssl_message "${openssl_message}If it still cannot be found, you can hint CMake to find OpenSSL by " "adding/setting the OPENSSL_ROOT_DIR variable to the root directory of an " "OpenSSL installation. Make sure to clear variables of partly found " "versions of OpenSSL before, or they will be mixed up.") message(FATAL_ERROR ${openssl_message}) endif() list(APPEND MITK_USE_Boost_LIBRARIES date_time regex system) if(UNIX) list(APPEND MITK_USE_Boost_LIBRARIES atomic chrono filesystem random thread) endif() list(REMOVE_DUPLICATES MITK_USE_Boost_LIBRARIES) set(MITK_USE_Boost_LIBRARIES ${MITK_USE_Boost_LIBRARIES} CACHE STRING "A semi-colon separated list of required Boost libraries" FORCE) endif() if(MITK_USE_Python3) set(MITK_USE_ZLIB ON CACHE BOOL "" FORCE) if(APPLE AND CMAKE_FRAMEWORK_PATH AND CMAKE_FRAMEWORK_PATH MATCHES "python3\\.?([0-9]+)") find_package(Python3 3.${CMAKE_MATCH_1} EXACT REQUIRED COMPONENTS Interpreter Development NumPy) else() find_package(Python3 REQUIRED COMPONENTS Interpreter Development NumPy) endif() if(WIN32) string(REPLACE "\\" "/" Python3_STDARCH "${Python3_STDARCH}") string(REPLACE "\\" "/" Python3_STDLIB "${Python3_STDLIB}") string(REPLACE "\\" "/" Python3_SITELIB "${Python3_SITELIB}") endif() endif() if(BUILD_TESTING AND NOT MITK_USE_CppUnit) message("> Forcing MITK_USE_CppUnit to ON because BUILD_TESTING=ON") set(MITK_USE_CppUnit ON CACHE BOOL "Use CppUnit for unit tests" FORCE) endif() if(MITK_USE_BLUEBERRY) option(MITK_BUILD_ALL_PLUGINS "Build all MITK plugins" OFF) mark_as_advanced(MITK_BUILD_ALL_PLUGINS) if(NOT MITK_USE_CTK) message("> Forcing MITK_USE_CTK to ON because of MITK_USE_BLUEBERRY") set(MITK_USE_CTK ON CACHE BOOL "Use CTK in MITK" FORCE) endif() endif() #----------------------------------------------------------------------------- # Pixel type multiplexing #----------------------------------------------------------------------------- # Customize the default pixel types for multiplex macros set(MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES "int, unsigned int, short, unsigned short, char, unsigned char" CACHE STRING "List of integral pixel types used in AccessByItk and InstantiateAccessFunction macros") set(MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES "double, float" CACHE STRING "List of floating pixel types used in AccessByItk and InstantiateAccessFunction macros") set(MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES "itk::RGBPixel, itk::RGBAPixel" CACHE STRING "List of composite pixel types used in AccessByItk and InstantiateAccessFunction macros") set(MITK_ACCESSBYITK_DIMENSIONS "2,3" CACHE STRING "List of dimensions used in AccessByItk and InstantiateAccessFunction macros") mark_as_advanced(MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES MITK_ACCESSBYITK_DIMENSIONS ) # consistency checks if(NOT MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES) set(MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES "int, unsigned int, short, unsigned short, char, unsigned char" CACHE STRING "List of integral pixel types used in AccessByItk and InstantiateAccessFunction macros" FORCE) endif() if(NOT MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES) set(MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES "double, float" CACHE STRING "List of floating pixel types used in AccessByItk and InstantiateAccessFunction macros" FORCE) endif() if(NOT MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES) set(MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES "itk::RGBPixel, itk::RGBAPixel" CACHE STRING "List of composite pixel types used in AccessByItk and InstantiateAccessFunction macros" FORCE) endif() if(NOT MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES) string(REPLACE "," ";" _integral_types ${MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES}) string(REPLACE "," ";" _floating_types ${MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES}) foreach(_scalar_type ${_integral_types} ${_floating_types}) set(MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES "${MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES}itk::VariableLengthVector<${_scalar_type}>,") endforeach() string(LENGTH "${MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES}" _length) math(EXPR _length "${_length} - 1") string(SUBSTRING "${MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES}" 0 ${_length} MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES) set(MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES ${MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES} CACHE STRING "List of vector pixel types used in AccessByItk and InstantiateAccessFunction macros for itk::VectorImage types" FORCE) endif() if(NOT MITK_ACCESSBYITK_DIMENSIONS) set(MITK_ACCESSBYITK_DIMENSIONS "2,3" CACHE STRING "List of dimensions used in AccessByItk and InstantiateAccessFunction macros") endif() find_package(Git REQUIRED) #----------------------------------------------------------------------------- # Superbuild script #----------------------------------------------------------------------------- if(MITK_USE_SUPERBUILD) include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake") # Print configuration summary message("\n\n") feature_summary( DESCRIPTION "------- FEATURE SUMMARY FOR ${PROJECT_NAME} -------" WHAT ALL) return() endif() #***************************************************************************** #**************************** END OF SUPERBUILD **************************** #***************************************************************************** #----------------------------------------------------------------------------- # Organize MITK targets in folders #----------------------------------------------------------------------------- set_property(GLOBAL PROPERTY USE_FOLDERS ON) set(MITK_ROOT_FOLDER "MITK" CACHE STRING "") mark_as_advanced(MITK_ROOT_FOLDER) #----------------------------------------------------------------------------- # CMake function(s) and macro(s) #----------------------------------------------------------------------------- include(WriteBasicConfigVersionFile) include(CheckCXXSourceCompiles) include(GenerateExportHeader) include(mitkFunctionAddCustomModuleTest) include(mitkFunctionCheckModuleDependencies) include(mitkFunctionCompileSnippets) include(mitkFunctionConfigureVisualStudioUserProjectFile) -include(mitkFunctionConvertXPSchema) include(mitkFunctionCreateBlueBerryApplication) include(mitkFunctionCreateCommandLineApp) include(mitkFunctionCreateModule) include(mitkFunctionCreatePlugin) include(mitkFunctionCreateProvisioningFile) include(mitkFunctionGetLibrarySearchPaths) include(mitkFunctionGetVersion) include(mitkFunctionGetVersionDescription) include(mitkFunctionInstallAutoLoadModules) include(mitkFunctionInstallCTKPlugin) include(mitkFunctionInstallProvisioningFiles) include(mitkFunctionInstallThirdPartyCTKPlugins) include(mitkFunctionOrganizeSources) include(mitkFunctionUseModules) if( ${MITK_USE_MatchPoint} ) include(mitkFunctionCreateMatchPointDeployedAlgorithm) endif() include(mitkMacroConfigureItkPixelTypes) include(mitkMacroCreateExecutable) include(mitkMacroCreateModuleTests) include(mitkMacroGenerateToolsLibrary) include(mitkMacroGetLinuxDistribution) include(mitkMacroGetPMDPlatformString) include(mitkMacroInstall) include(mitkMacroInstallHelperApp) include(mitkMacroInstallTargets) include(mitkMacroMultiplexPicType) # Deprecated include(mitkMacroCreateCTKPlugin) #----------------------------------------------------------------------------- # Global CMake variables #----------------------------------------------------------------------------- # Required and enabled C++14 features for all MITK code. # These are added as PUBLIC compile features to all MITK modules. set(MITK_CXX_FEATURES cxx_auto_type cxx_decltype cxx_enum_forward_declarations cxx_extended_friend_declarations cxx_extern_templates cxx_final cxx_lambdas cxx_local_type_template_args cxx_long_long_type cxx_nullptr cxx_override cxx_range_for cxx_right_angle_brackets cxx_rvalue_references cxx_static_assert cxx_strong_enums cxx_template_template_parameters cxx_trailing_return_types cxx_variadic_macros ) if(NOT DEFINED CMAKE_DEBUG_POSTFIX) # We can't do this yet because the CTK Plugin Framework # cannot cope with a postfix yet. #set(CMAKE_DEBUG_POSTFIX d) endif() #----------------------------------------------------------------------------- # Output directories. #----------------------------------------------------------------------------- set(_default_LIBRARY_output_dir lib) set(_default_RUNTIME_output_dir bin) set(_default_ARCHIVE_output_dir lib) foreach(type LIBRARY RUNTIME ARCHIVE) # Make sure the directory exists if(MITK_CMAKE_${type}_OUTPUT_DIRECTORY AND NOT EXISTS ${MITK_CMAKE_${type}_OUTPUT_DIRECTORY}) message("Creating directory MITK_CMAKE_${type}_OUTPUT_DIRECTORY: ${MITK_CMAKE_${type}_OUTPUT_DIRECTORY}") file(MAKE_DIRECTORY "${MITK_CMAKE_${type}_OUTPUT_DIRECTORY}") endif() if(MITK_CMAKE_${type}_OUTPUT_DIRECTORY) set(CMAKE_${type}_OUTPUT_DIRECTORY ${MITK_CMAKE_${type}_OUTPUT_DIRECTORY}) else() set(CMAKE_${type}_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${_default_${type}_output_dir}) set(MITK_CMAKE_${type}_OUTPUT_DIRECTORY ${CMAKE_${type}_OUTPUT_DIRECTORY}) endif() set(CMAKE_${type}_OUTPUT_DIRECTORY ${CMAKE_${type}_OUTPUT_DIRECTORY} CACHE INTERNAL "Output directory for ${type} files.") mark_as_advanced(CMAKE_${type}_OUTPUT_DIRECTORY) endforeach() #----------------------------------------------------------------------------- # Set MITK specific options and variables (NOT available during superbuild) #----------------------------------------------------------------------------- # Look for optional Doxygen package find_package(Doxygen) option(BLUEBERRY_DEBUG_SMARTPOINTER "Enable code for debugging smart pointers" OFF) mark_as_advanced(BLUEBERRY_DEBUG_SMARTPOINTER) # Ask the user to show the console window for applications option(MITK_SHOW_CONSOLE_WINDOW "Use this to enable or disable the console window when starting MITK GUI Applications" ON) mark_as_advanced(MITK_SHOW_CONSOLE_WINDOW) # TODO: check if necessary option(USE_ITKZLIB "Use the ITK zlib for pic compression." ON) mark_as_advanced(USE_ITKZLIB) if(NOT MITK_FAST_TESTING) if(MITK_CTEST_SCRIPT_MODE STREQUAL "Continuous" OR MITK_CTEST_SCRIPT_MODE STREQUAL "Experimental") set(MITK_FAST_TESTING ON) endif() endif() if(NOT UNIX) set(MITK_WIN32_FORCE_STATIC "STATIC" CACHE INTERNAL "Use this variable to always build static libraries on non-unix platforms") endif() if(MITK_BUILD_ALL_PLUGINS) set(MITK_BUILD_ALL_PLUGINS_OPTION "FORCE_BUILD_ALL") endif() # Configure pixel types used for ITK image access multiplexing mitkMacroConfigureItkPixelTypes() # Configure module naming conventions set(MITK_MODULE_NAME_REGEX_MATCH "^[A-Z].*$") set(MITK_MODULE_NAME_REGEX_NOT_MATCH "^[Mm][Ii][Tt][Kk].*$") set(MITK_DEFAULT_MODULE_NAME_PREFIX "Mitk") set(MITK_MODULE_NAME_PREFIX ${MITK_DEFAULT_MODULE_NAME_PREFIX}) set(MITK_MODULE_NAME_DEFAULTS_TO_DIRECTORY_NAME 1) #----------------------------------------------------------------------------- # Get MITK version info #----------------------------------------------------------------------------- mitkFunctionGetVersion(${MITK_SOURCE_DIR} MITK) mitkFunctionGetVersionDescription(${MITK_SOURCE_DIR} MITK) # MITK_VERSION set(MITK_VERSION_STRING "${MITK_VERSION_MAJOR}.${MITK_VERSION_MINOR}.${MITK_VERSION_PATCH}") if(MITK_VERSION_PATCH STREQUAL "99") set(MITK_VERSION_STRING "${MITK_VERSION_STRING}-${MITK_REVISION_SHORTID}") endif() #----------------------------------------------------------------------------- # Installation preparation # # These should be set before any MITK install macros are used #----------------------------------------------------------------------------- # on macOS all BlueBerry plugins get copied into every # application bundle (.app directory) specified here if(MITK_USE_BLUEBERRY AND APPLE) foreach(MITK_EXTENSION_DIR ${MITK_DIR_PLUS_EXTENSION_DIRS}) set(MITK_APPLICATIONS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/Applications") if(EXISTS "${MITK_APPLICATIONS_EXTENSION_DIR}/AppList.cmake") set(MITK_APPS "") include("${MITK_APPLICATIONS_EXTENSION_DIR}/AppList.cmake") foreach(mitk_app ${MITK_APPS}) # extract option_name string(REPLACE "^^" "\\;" target_info ${mitk_app}) set(target_info_list ${target_info}) list(GET target_info_list 1 option_name) list(GET target_info_list 0 app_name) # check if the application is enabled if(${option_name} OR MITK_BUILD_ALL_APPS) set(MACOSX_BUNDLE_NAMES ${MACOSX_BUNDLE_NAMES} Mitk${app_name}) endif() endforeach() endif() endforeach() endif() #----------------------------------------------------------------------------- # Set coverage Flags #----------------------------------------------------------------------------- if(WITH_COVERAGE) if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(coverage_flags "-g -fprofile-arcs -ftest-coverage -O0 -DNDEBUG") set(COVERAGE_CXX_FLAGS ${coverage_flags}) set(COVERAGE_C_FLAGS ${coverage_flags}) endif() endif() #----------------------------------------------------------------------------- # MITK C/CXX Flags #----------------------------------------------------------------------------- set(MITK_C_FLAGS "${COVERAGE_C_FLAGS}") set(MITK_C_FLAGS_DEBUG ) set(MITK_C_FLAGS_RELEASE ) set(MITK_CXX_FLAGS "${COVERAGE_CXX_FLAGS} ${MITK_CXX14_FLAG}") set(MITK_CXX_FLAGS_DEBUG ) set(MITK_CXX_FLAGS_RELEASE ) set(MITK_EXE_LINKER_FLAGS ) set(MITK_SHARED_LINKER_FLAGS ) if(WIN32) set(MITK_CXX_FLAGS "${MITK_CXX_FLAGS} -DPOCO_NO_UNWINDOWS -DWIN32_LEAN_AND_MEAN -DNOMINMAX") mitkFunctionCheckCompilerFlags("/wd4005" MITK_CXX_FLAGS) # warning C4005: macro redefinition mitkFunctionCheckCompilerFlags("/wd4231" MITK_CXX_FLAGS) # warning C4231: nonstandard extension used : 'extern' before template explicit instantiation # the following line should be removed after fixing bug 17637 mitkFunctionCheckCompilerFlags("/wd4316" MITK_CXX_FLAGS) # warning C4316: object alignment on heap mitkFunctionCheckCompilerFlags("/wd4180" MITK_CXX_FLAGS) # warning C4180: qualifier applied to function type has no meaning mitkFunctionCheckCompilerFlags("/wd4251" MITK_CXX_FLAGS) # warning C4251: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' endif() if(APPLE) set(MITK_CXX_FLAGS "${MITK_CXX_FLAGS} -DGL_SILENCE_DEPRECATION") # Apple deprecated OpenGL in macOS 10.14 endif() if(NOT MSVC_VERSION) foreach(_flag -Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align -Wwrite-strings -Wno-error=gnu -Wno-error=unknown-pragmas # The strict-overflow warning is generated by ITK template code -Wno-error=strict-overflow -Woverloaded-virtual -Wstrict-null-sentinel #-Wold-style-cast #-Wsign-promo -Wno-error=deprecated-copy -Wno-array-bounds -fdiagnostics-show-option ) mitkFunctionCheckCAndCXXCompilerFlags(${_flag} MITK_C_FLAGS MITK_CXX_FLAGS) endforeach() endif() if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE) mitkFunctionCheckCompilerFlags("-Wl,--no-undefined" MITK_SHARED_LINKER_FLAGS) mitkFunctionCheckCompilerFlags("-Wl,--as-needed" MITK_SHARED_LINKER_FLAGS) endif() if(CMAKE_COMPILER_IS_GNUCXX) mitkFunctionCheckCAndCXXCompilerFlags("-fstack-protector-all" MITK_C_FLAGS MITK_CXX_FLAGS) set(MITK_CXX_FLAGS_RELEASE "-U_FORTIFY_SOURCES -D_FORTIFY_SOURCE=2 ${MITK_CXX_FLAGS_RELEASE}") endif() set(MITK_MODULE_LINKER_FLAGS ${MITK_SHARED_LINKER_FLAGS}) set(MITK_EXE_LINKER_FLAGS ${MITK_SHARED_LINKER_FLAGS}) #----------------------------------------------------------------------------- # MITK Packages #----------------------------------------------------------------------------- set(MITK_MODULES_PACKAGE_DEPENDS_DIR ${MITK_SOURCE_DIR}/CMake/PackageDepends) set(MODULES_PACKAGE_DEPENDS_DIRS ${MITK_MODULES_PACKAGE_DEPENDS_DIR}) foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS}) set(MITK_PACKAGE_DEPENDS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/CMake/PackageDepends") if(EXISTS "${MITK_PACKAGE_DEPENDS_EXTENSION_DIR}") list(APPEND MODULES_PACKAGE_DEPENDS_DIRS "${MITK_PACKAGE_DEPENDS_EXTENSION_DIR}") endif() endforeach() if(NOT MITK_USE_SYSTEM_Boost) set(Boost_NO_SYSTEM_PATHS 1) endif() set(Boost_USE_MULTITHREADED 1) set(Boost_USE_STATIC_LIBS 0) set(Boost_USE_STATIC_RUNTIME 0) set(Boost_ADDITIONAL_VERSIONS 1.68 1.68.0) # We need this later for a DCMTK workaround set(_dcmtk_dir_orig ${DCMTK_DIR}) # This property is populated at the top half of this file get_property(MITK_EXTERNAL_PROJECTS GLOBAL PROPERTY MITK_EXTERNAL_PROJECTS) foreach(ep ${MITK_EXTERNAL_PROJECTS}) get_property(_package GLOBAL PROPERTY MITK_${ep}_PACKAGE) get_property(_components GLOBAL PROPERTY MITK_${ep}_COMPONENTS) if(MITK_USE_${ep} AND _package) if(_components) find_package(${_package} COMPONENTS ${_components} REQUIRED CONFIG) else() # Prefer config mode first because it finds external # Config.cmake files pointed at by _DIR variables. # Otherwise, existing Find.cmake files could fail. if(DEFINED ${_package}_DIR) #we store the information because it will be overwritten by find_package #and would get lost for all EPs that use on Find.cmake instead of config #files. set(_temp_EP_${_package}_dir ${${_package}_DIR}) endif(DEFINED ${_package}_DIR) find_package(${_package} QUIET CONFIG) string(TOUPPER "${_package}" _package_uc) if(NOT (${_package}_FOUND OR ${_package_uc}_FOUND)) if(DEFINED _temp_EP_${_package}_dir) set(${_package}_DIR ${_temp_EP_${_package}_dir} CACHE PATH "externaly set dir of the package ${_package}" FORCE) endif(DEFINED _temp_EP_${_package}_dir) find_package(${_package} REQUIRED) endif() endif() endif() endforeach() # Ensure that the MITK CMake module path comes first set(CMAKE_MODULE_PATH ${MITK_CMAKE_DIR} ${CMAKE_MODULE_PATH} ) if(MITK_USE_DCMTK) # Due to the preferred CONFIG mode in find_package calls above, # the DCMTKConfig.cmake file is read, which does not provide useful # package information. We explictly need MODULE mode to find DCMTK. if(${_dcmtk_dir_orig} MATCHES "${MITK_EXTERNAL_PROJECT_PREFIX}.*") # Help our FindDCMTK.cmake script find our super-build DCMTK set(DCMTK_DIR ${MITK_EXTERNAL_PROJECT_PREFIX}) else() # Use the original value set(DCMTK_DIR ${_dcmtk_dir_orig}) endif() find_package(DCMTK REQUIRED MODULE) endif() if(MITK_USE_DCMQI) # Due to the preferred CONFIG mode in find_package calls above, # the DCMQIConfig.cmake file is read, which does not provide useful # package information. We explictly need MODULE mode to find DCMQI. # Help our FindDCMQI.cmake script find our super-build DCMQI set(DCMQI_DIR ${MITK_EXTERNAL_PROJECT_PREFIX}) find_package(DCMQI REQUIRED) endif() link_directories(${Boost_LIBRARY_DIRS}) if(MITK_USE_OpenIGTLink) link_directories(${OpenIGTLink_LIBRARY_DIRS}) endif() if(MITK_USE_OpenCL) find_package(OpenCL REQUIRED) endif() if(MITK_USE_OpenMP) find_package(OpenMP REQUIRED COMPONENTS CXX) else() find_package(OpenMP QUIET COMPONENTS CXX) if(OpenMP_FOUND) set(MITK_USE_OpenMP ON CACHE BOOL "" FORCE) elseif(APPLE AND OpenMP_libomp_LIBRARY AND NOT OpenMP_CXX_LIB_NAMES) set(OpenMP_CXX_LIB_NAMES libomp CACHE STRING "" FORCE) get_filename_component(openmp_lib_dir "${OpenMP_libomp_LIBRARY}" DIRECTORY) set(openmp_include_dir "${openmp_lib_dir}/../include") if(EXISTS "${openmp_include_dir}") get_filename_component(openmp_include_dir "${openmp_include_dir}" REALPATH) set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I${openmp_include_dir}" CACHE STRING "" FORCE) find_package(OpenMP QUIET COMPONENTS CXX) if(OpenMP_FOUND) set(MITK_USE_OpenMP ON CACHE BOOL "" FORCE) endif() endif() endif() endif() # Qt support if(MITK_USE_Qt5) find_package(Qt5Core ${MITK_QT5_MINIMUM_VERSION} REQUIRED) # at least Core required get_target_property(_qmake_exec Qt5::qmake LOCATION) execute_process(COMMAND ${_qmake_exec} -query QT_INSTALL_BINS RESULT_VARIABLE _result OUTPUT_VARIABLE QT_BINARY_DIR ERROR_VARIABLE _error ) string(STRIP "${QT_BINARY_DIR}" QT_BINARY_DIR) if(_result OR NOT EXISTS "${QT_BINARY_DIR}") message(FATAL_ERROR "Could not determine Qt binary directory: ${_result} ${QT_BINARY_DIR} ${_error}") endif() find_program(QT_HELPGENERATOR_EXECUTABLE NAMES qhelpgenerator qhelpgenerator-qt5 qhelpgenerator5 PATHS ${QT_BINARY_DIR} NO_DEFAULT_PATH ) find_program(QT_COLLECTIONGENERATOR_EXECUTABLE NAMES qcollectiongenerator qcollectiongenerator-qt5 qcollectiongenerator5 PATHS ${QT_BINARY_DIR} NO_DEFAULT_PATH ) find_program(QT_ASSISTANT_EXECUTABLE NAMES assistant assistant-qt5 assistant5 PATHS ${QT_BINARY_DIR} NO_DEFAULT_PATH ) find_program(QT_XMLPATTERNS_EXECUTABLE NAMES xmlpatterns PATHS ${QT_BINARY_DIR} NO_DEFAULT_PATH ) mark_as_advanced(QT_HELPGENERATOR_EXECUTABLE QT_COLLECTIONGENERATOR_EXECUTABLE QT_ASSISTANT_EXECUTABLE QT_XMLPATTERNS_EXECUTABLE ) if(MITK_USE_BLUEBERRY) option(BLUEBERRY_USE_QT_HELP "Enable support for integrating plugin documentation into Qt Help" ${DOXYGEN_FOUND}) mark_as_advanced(BLUEBERRY_USE_QT_HELP) # Sanity checks for in-application BlueBerry plug-in help generation if(BLUEBERRY_USE_QT_HELP) set(_force_blueberry_use_qt_help_to_off 0) if(NOT DOXYGEN_FOUND) message("> Forcing BLUEBERRY_USE_QT_HELP to OFF because Doxygen was not found.") set(_force_blueberry_use_qt_help_to_off 1) endif() if(DOXYGEN_FOUND AND DOXYGEN_VERSION VERSION_LESS 1.8.7) message("> Forcing BLUEBERRY_USE_QT_HELP to OFF because Doxygen version 1.8.7 or newer not found.") set(_force_blueberry_use_qt_help_to_off 1) endif() if(NOT QT_HELPGENERATOR_EXECUTABLE) message("> Forcing BLUEBERRY_USE_QT_HELP to OFF because QT_HELPGENERATOR_EXECUTABLE is empty.") set(_force_blueberry_use_qt_help_to_off 1) endif() if(NOT MITK_USE_Qt5) message("> Forcing BLUEBERRY_USE_QT_HELP to OFF because MITK_USE_Qt5 is OFF.") set(_force_blueberry_use_qt_help_to_off 1) endif() if(NOT QT_XMLPATTERNS_EXECUTABLE) message("You have enabled Qt Help support, but QT_XMLPATTERNS_EXECUTABLE is empty") set(_force_blueberry_use_qt_help_to_off 1) endif() if(_force_blueberry_use_qt_help_to_off) set(BLUEBERRY_USE_QT_HELP OFF CACHE BOOL "Enable support for integrating plugin documentation into Qt Help" FORCE) endif() endif() if(BLUEBERRY_QT_HELP_REQUIRED AND NOT BLUEBERRY_USE_QT_HELP) message(FATAL_ERROR "BLUEBERRY_USE_QT_HELP is required to be set to ON") endif() endif() endif() #----------------------------------------------------------------------------- # Testing #----------------------------------------------------------------------------- if(BUILD_TESTING) #[[ See T27701 # Initial cache for ProjectTemplate and PluginGenerator tests configure_file( CMake/mitkTestInitialCache.txt.in ${MITK_BINARY_DIR}/mitkTestInitialCache.txt @ONLY )]] # Configuration for the CMake-generated test driver set(CMAKE_TESTDRIVER_EXTRA_INCLUDES "#include ") set(CMAKE_TESTDRIVER_BEFORE_TESTMAIN " try {") set(CMAKE_TESTDRIVER_AFTER_TESTMAIN " } catch (const std::exception& e) { fprintf(stderr, \"%s\\n\", e.what()); return EXIT_FAILURE; } catch (...) { printf(\"Exception caught in the test driver\\n\"); return EXIT_FAILURE; }") set(MITK_TEST_OUTPUT_DIR "${MITK_BINARY_DIR}/test_output") if(NOT EXISTS ${MITK_TEST_OUTPUT_DIR}) file(MAKE_DIRECTORY ${MITK_TEST_OUTPUT_DIR}) endif() # Test the package target include(mitkPackageTest) endif() configure_file(mitkTestingConfig.h.in ${MITK_BINARY_DIR}/mitkTestingConfig.h) #----------------------------------------------------------------------------- # MITK_SUPERBUILD_BINARY_DIR #----------------------------------------------------------------------------- # If MITK_SUPERBUILD_BINARY_DIR isn't defined, it means MITK is *NOT* build using Superbuild. # In that specific case, MITK_SUPERBUILD_BINARY_DIR should default to MITK_BINARY_DIR if(NOT DEFINED MITK_SUPERBUILD_BINARY_DIR) set(MITK_SUPERBUILD_BINARY_DIR ${MITK_BINARY_DIR}) endif() #----------------------------------------------------------------------------- # Set C/CXX and linker flags for MITK code #----------------------------------------------------------------------------- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MITK_CXX_FLAGS}") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${MITK_CXX_FLAGS_DEBUG}") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MITK_CXX_FLAGS_RELEASE}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MITK_C_FLAGS}") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${MITK_C_FLAGS_DEBUG}") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${MITK_C_FLAGS_RELEASE}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MITK_EXE_LINKER_FLAGS}") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${MITK_SHARED_LINKER_FLAGS}") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${MITK_MODULE_LINKER_FLAGS}") #----------------------------------------------------------------------------- # Add subdirectories #----------------------------------------------------------------------------- add_subdirectory(Utilities) add_subdirectory(Modules) include("${CMAKE_CURRENT_SOURCE_DIR}/Modules/ModuleList.cmake") mitkFunctionWhitelistModules(MITK MITK_MODULES) set(MITK_ROOT_FOLDER_BACKUP "${MITK_ROOT_FOLDER}") foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS}) get_filename_component(MITK_ROOT_FOLDER "${MITK_EXTENSION_DIR}" NAME) set(MITK_MODULES_EXTENSION_DIR "${MITK_EXTENSION_DIR}/Modules") if(EXISTS "${MITK_MODULES_EXTENSION_DIR}/ModuleList.cmake") set(MITK_MODULES "") include("${MITK_MODULES_EXTENSION_DIR}/ModuleList.cmake") foreach(mitk_module ${MITK_MODULES}) add_subdirectory("${MITK_MODULES_EXTENSION_DIR}/${mitk_module}" "Modules/${mitk_module}") endforeach() endif() set(MITK_MODULE_NAME_PREFIX ${MITK_DEFAULT_MODULE_NAME_PREFIX}) endforeach() set(MITK_ROOT_FOLDER "${MITK_ROOT_FOLDER_BACKUP}") add_subdirectory(Wrapping) set(MITK_DOXYGEN_OUTPUT_DIR "${PROJECT_BINARY_DIR}/Documentation/Doxygen" CACHE PATH "Output directory for doxygen generated documentation.") if(MITK_USE_BLUEBERRY) set(BLUEBERRY_XPDOC_OUTPUT_DIR "${MITK_DOXYGEN_OUTPUT_DIR}/html/extension-points/html/") execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${BLUEBERRY_XPDOC_OUTPUT_DIR}) include("${CMAKE_CURRENT_SOURCE_DIR}/Plugins/PluginList.cmake") mitkFunctionWhitelistPlugins(MITK MITK_PLUGINS) set(mitk_plugins_fullpath "") foreach(mitk_plugin ${MITK_PLUGINS}) list(APPEND mitk_plugins_fullpath Plugins/${mitk_plugin}) endforeach() set(MITK_PLUGIN_REGEX_LIST "") foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS}) set(MITK_PLUGINS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/Plugins") if(EXISTS "${MITK_PLUGINS_EXTENSION_DIR}/PluginList.cmake") set(MITK_PLUGINS "") include("${MITK_PLUGINS_EXTENSION_DIR}/PluginList.cmake") foreach(mitk_plugin ${MITK_PLUGINS}) list(APPEND mitk_plugins_fullpath "${MITK_PLUGINS_EXTENSION_DIR}/${mitk_plugin}") endforeach() endif() endforeach() if(EXISTS ${MITK_PRIVATE_MODULES}/PluginList.cmake) include(${MITK_PRIVATE_MODULES}/PluginList.cmake) foreach(mitk_plugin ${MITK_PRIVATE_PLUGINS}) list(APPEND mitk_plugins_fullpath ${MITK_PRIVATE_MODULES}/${mitk_plugin}) endforeach() endif() if(MITK_BUILD_EXAMPLES) include("${CMAKE_CURRENT_SOURCE_DIR}/Examples/Plugins/PluginList.cmake") set(mitk_example_plugins_fullpath ) foreach(mitk_example_plugin ${MITK_EXAMPLE_PLUGINS}) list(APPEND mitk_example_plugins_fullpath Examples/Plugins/${mitk_example_plugin}) list(APPEND mitk_plugins_fullpath Examples/Plugins/${mitk_example_plugin}) endforeach() endif() # Specify which plug-ins belong to this project macro(GetMyTargetLibraries all_target_libraries varname) set(re_ctkplugin_mitk "^org_mitk_[a-zA-Z0-9_]+$") set(re_ctkplugin_bb "^org_blueberry_[a-zA-Z0-9_]+$") set(_tmp_list) list(APPEND _tmp_list ${all_target_libraries}) ctkMacroListFilter(_tmp_list re_ctkplugin_mitk re_ctkplugin_bb MITK_PLUGIN_REGEX_LIST OUTPUT_VARIABLE ${varname}) endmacro() # Get infos about application directories and build options set(mitk_apps_fullpath "") foreach(MITK_EXTENSION_DIR ${MITK_DIR_PLUS_EXTENSION_DIRS}) set(MITK_APPLICATIONS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/Applications") if(EXISTS "${MITK_APPLICATIONS_EXTENSION_DIR}/AppList.cmake") set(MITK_APPS "") include("${MITK_APPLICATIONS_EXTENSION_DIR}/AppList.cmake") foreach(mitk_app ${MITK_APPS}) # extract option_name string(REPLACE "^^" "\\;" target_info ${mitk_app}) set(target_info_list ${target_info}) list(GET target_info_list 0 directory_name) list(GET target_info_list 1 option_name) if(${option_name}) list(APPEND mitk_apps_fullpath "${MITK_APPLICATIONS_EXTENSION_DIR}/${directory_name}^^${option_name}") endif() endforeach() endif() endforeach() if (mitk_plugins_fullpath) ctkMacroSetupPlugins(${mitk_plugins_fullpath} BUILD_OPTION_PREFIX MITK_BUILD_ APPS ${mitk_apps_fullpath} BUILD_ALL ${MITK_BUILD_ALL_PLUGINS} COMPACT_OPTIONS) endif() set(MITK_PLUGIN_USE_FILE "${MITK_BINARY_DIR}/MitkPluginUseFile.cmake") if(${PROJECT_NAME}_PLUGIN_LIBRARIES) ctkFunctionGeneratePluginUseFile(${MITK_PLUGIN_USE_FILE}) else() file(REMOVE ${MITK_PLUGIN_USE_FILE}) set(MITK_PLUGIN_USE_FILE ) endif() endif() #----------------------------------------------------------------------------- # Documentation #----------------------------------------------------------------------------- if(DOXYGEN_FOUND) add_subdirectory(Documentation) endif() #----------------------------------------------------------------------------- # Installation #----------------------------------------------------------------------------- # set MITK cpack variables # These are the default variables, which can be overwritten ( see below ) include(mitkSetupCPack) set(use_default_config ON) set(ALL_MITK_APPS "") set(activated_apps_no 0) foreach(MITK_EXTENSION_DIR ${MITK_DIR_PLUS_EXTENSION_DIRS}) set(MITK_APPLICATIONS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/Applications") if(EXISTS "${MITK_APPLICATIONS_EXTENSION_DIR}/AppList.cmake") set(MITK_APPS "") include("${MITK_APPLICATIONS_EXTENSION_DIR}/AppList.cmake") foreach(mitk_app ${MITK_APPS}) string(REPLACE "^^" "\\;" target_info ${mitk_app}) set(target_info_list ${target_info}) list(GET target_info_list 0 directory_name) list(GET target_info_list 1 option_name) list(GET target_info_list 2 executable_name) list(APPEND ALL_MITK_APPS "${MITK_EXTENSION_DIR}/Applications/${directory_name}^^${option_name}^^${executable_name}") if(${option_name} OR MITK_BUILD_ALL_APPS) MATH(EXPR activated_apps_no "${activated_apps_no} + 1") endif() endforeach() endif() endforeach() list(LENGTH ALL_MITK_APPS app_count) if(app_count EQUAL 1 AND (activated_apps_no EQUAL 1 OR MITK_BUILD_ALL_APPS)) # Corner case if there is only one app in total set(use_project_cpack ON) elseif(activated_apps_no EQUAL 1 AND NOT MITK_BUILD_ALL_APPS) # Only one app is enabled (no "build all" flag set) set(use_project_cpack ON) else() # Less or more then one app is enabled set(use_project_cpack OFF) endif() foreach(mitk_app ${ALL_MITK_APPS}) # extract target_dir and option_name string(REPLACE "^^" "\\;" target_info ${mitk_app}) set(target_info_list ${target_info}) list(GET target_info_list 0 target_dir) list(GET target_info_list 1 option_name) list(GET target_info_list 2 executable_name) # check if the application is enabled if(${option_name} OR MITK_BUILD_ALL_APPS) # check whether application specific configuration files will be used if(use_project_cpack) # use files if they exist if(EXISTS "${target_dir}/CPackOptions.cmake") include("${target_dir}/CPackOptions.cmake") endif() if(EXISTS "${target_dir}/CPackConfig.cmake.in") set(CPACK_PROJECT_CONFIG_FILE "${target_dir}/CPackConfig.cmake") configure_file(${target_dir}/CPackConfig.cmake.in ${CPACK_PROJECT_CONFIG_FILE} @ONLY) set(use_default_config OFF) endif() endif() # add link to the list list(APPEND CPACK_CREATE_DESKTOP_LINKS "${executable_name}") endif() endforeach() # if no application specific configuration file was used, use default if(use_default_config) configure_file(${MITK_SOURCE_DIR}/MITKCPackOptions.cmake.in ${MITK_BINARY_DIR}/MITKCPackOptions.cmake @ONLY) set(CPACK_PROJECT_CONFIG_FILE "${MITK_BINARY_DIR}/MITKCPackOptions.cmake") endif() # include CPack model once all variables are set include(CPack) # Additional installation rules include(mitkInstallRules) #----------------------------------------------------------------------------- # Last configuration steps #----------------------------------------------------------------------------- # ---------------- Export targets ----------------- set(MITK_EXPORTS_FILE "${MITK_BINARY_DIR}/MitkExports.cmake") file(REMOVE ${MITK_EXPORTS_FILE}) set(targets_to_export) get_property(module_targets GLOBAL PROPERTY MITK_MODULE_TARGETS) if(module_targets) list(APPEND targets_to_export ${module_targets}) endif() if(MITK_USE_BLUEBERRY) if(MITK_PLUGIN_LIBRARIES) list(APPEND targets_to_export ${MITK_PLUGIN_LIBRARIES}) endif() endif() export(TARGETS ${targets_to_export} APPEND FILE ${MITK_EXPORTS_FILE}) set(MITK_EXPORTED_TARGET_PROPERTIES ) foreach(target_to_export ${targets_to_export}) get_target_property(autoload_targets ${target_to_export} MITK_AUTOLOAD_TARGETS) if(autoload_targets) set(MITK_EXPORTED_TARGET_PROPERTIES "${MITK_EXPORTED_TARGET_PROPERTIES} set_target_properties(${target_to_export} PROPERTIES MITK_AUTOLOAD_TARGETS \"${autoload_targets}\")") endif() get_target_property(autoload_dir ${target_to_export} MITK_AUTOLOAD_DIRECTORY) if(autoload_dir) set(MITK_EXPORTED_TARGET_PROPERTIES "${MITK_EXPORTED_TARGET_PROPERTIES} set_target_properties(${target_to_export} PROPERTIES MITK_AUTOLOAD_DIRECTORY \"${autoload_dir}\")") endif() get_target_property(deprecated_module ${target_to_export} MITK_MODULE_DEPRECATED_SINCE) if(deprecated_module) set(MITK_EXPORTED_TARGET_PROPERTIES "${MITK_EXPORTED_TARGET_PROPERTIES} set_target_properties(${target_to_export} PROPERTIES MITK_MODULE_DEPRECATED_SINCE \"${deprecated_module}\")") endif() endforeach() # ---------------- External projects ----------------- get_property(MITK_ADDITIONAL_LIBRARY_SEARCH_PATHS_CONFIG GLOBAL PROPERTY MITK_ADDITIONAL_LIBRARY_SEARCH_PATHS) set(MITK_CONFIG_EXTERNAL_PROJECTS ) #string(REPLACE "^^" ";" _mitk_external_projects ${MITK_EXTERNAL_PROJECTS}) foreach(ep ${MITK_EXTERNAL_PROJECTS}) get_property(_components GLOBAL PROPERTY MITK_${ep}_COMPONENTS) set(MITK_CONFIG_EXTERNAL_PROJECTS "${MITK_CONFIG_EXTERNAL_PROJECTS} set(MITK_USE_${ep} ${MITK_USE_${ep}}) set(MITK_${ep}_DIR \"${${ep}_DIR}\") set(MITK_${ep}_COMPONENTS ${_components}) ") endforeach() foreach(ep ${MITK_EXTERNAL_PROJECTS}) get_property(_package GLOBAL PROPERTY MITK_${ep}_PACKAGE) get_property(_components GLOBAL PROPERTY MITK_${ep}_COMPONENTS) if(_components) set(_components_arg COMPONENTS \${_components}) else() set(_components_arg) endif() if(_package) set(MITK_CONFIG_EXTERNAL_PROJECTS "${MITK_CONFIG_EXTERNAL_PROJECTS} if(MITK_USE_${ep}) set(${ep}_DIR \${MITK_${ep}_DIR}) if(MITK_${ep}_COMPONENTS) mitkMacroFindDependency(${_package} COMPONENTS \${MITK_${ep}_COMPONENTS}) else() mitkMacroFindDependency(${_package}) endif() endif()") endif() endforeach() # ---------------- Tools ----------------- configure_file(${MITK_SOURCE_DIR}/CMake/ToolExtensionITKFactory.cpp.in ${MITK_BINARY_DIR}/ToolExtensionITKFactory.cpp.in COPYONLY) configure_file(${MITK_SOURCE_DIR}/CMake/ToolExtensionITKFactoryLoader.cpp.in ${MITK_BINARY_DIR}/ToolExtensionITKFactoryLoader.cpp.in COPYONLY) configure_file(${MITK_SOURCE_DIR}/CMake/ToolGUIExtensionITKFactory.cpp.in ${MITK_BINARY_DIR}/ToolGUIExtensionITKFactory.cpp.in COPYONLY) # ---------------- Configure files ----------------- configure_file(mitkVersion.h.in ${MITK_BINARY_DIR}/mitkVersion.h) configure_file(mitkConfig.h.in ${MITK_BINARY_DIR}/mitkConfig.h) set(IPFUNC_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/ipFunc) set(UTILITIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities) configure_file(mitkConfig.h.in ${MITK_BINARY_DIR}/mitkConfig.h) configure_file(MITKConfig.cmake.in ${MITK_BINARY_DIR}/MITKConfig.cmake @ONLY) write_basic_config_version_file(${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake VERSION ${MITK_VERSION_STRING} COMPATIBILITY AnyNewerVersion) #----------------------------------------------------------------------------- # MITK Applications #----------------------------------------------------------------------------- # This must come after MITKConfig.h was generated, since applications # might do a find_package(MITK REQUIRED). add_subdirectory(Applications) if(MSVC AND TARGET MitkWorkbench) set_directory_properties(PROPERTIES VS_STARTUP_PROJECT MitkWorkbench) endif() foreach(MITK_EXTENSION_DIR ${MITK_ABSOLUTE_EXTENSION_DIRS}) set(MITK_APPLICATIONS_EXTENSION_DIR "${MITK_EXTENSION_DIR}/Applications") if(EXISTS "${MITK_APPLICATIONS_EXTENSION_DIR}/CMakeLists.txt") add_subdirectory("${MITK_APPLICATIONS_EXTENSION_DIR}" "Applications") endif() endforeach() #----------------------------------------------------------------------------- # MITK Examples #----------------------------------------------------------------------------- if(MITK_BUILD_EXAMPLES) # This must come after MITKConfig.h was generated, since applications # might do a find_package(MITK REQUIRED). add_subdirectory(Examples) endif() #----------------------------------------------------------------------------- # Print configuration summary #----------------------------------------------------------------------------- message("\n\n") feature_summary( DESCRIPTION "------- FEATURE SUMMARY FOR ${PROJECT_NAME} -------" WHAT ALL ) diff --git a/Documentation/CMakeLists.txt b/Documentation/CMakeLists.txt index d68002a508..9a25867947 100644 --- a/Documentation/CMakeLists.txt +++ b/Documentation/CMakeLists.txt @@ -1,202 +1,166 @@ # Different doxygen versions produce significantly different behaviour in the MITK documentation # especially in regards to the MITK Qt assistant help files and markdown files. # The HTML documentation is supposed to be build with Doxygen 1.8.7 or newer, the # Qt assistant QCH files are supposed to be generated with Doxygen 1.8.7 or newer. # So we check for 1.8.7 here and QCH generation support is checked in # BlueBerry/CMakeLists.txt set(supported_doxygen_version "1.8.7") if(DOXYGEN_VERSION VERSION_LESS ${supported_doxygen_version}) MESSAGE(WARNING "Unsupported doxygen version ${DOXYGEN_VERSION}. The MITK HTML documentation has been tested to work with doxygen ${supported_doxygen_version} or newer.") endif() option(USE_DOT "Use dot program for generating graphical class diagrams with doxygen, if available" ON) option(MITK_DOXYGEN_BUILD_ALWAYS "Always build the MITK documentation when building the default target" OFF) option(MITK_DOXYGEN_GENERATE_QCH_FILES "Use doxygen to generate Qt compressed help files for MITK docs" OFF) mark_as_advanced(USE_DOT MITK_DOXYGEN_BUILD_ALWAYS MITK_DOXYGEN_GENERATE_QCH_FILES) if (MITK_DOXYGEN_GENERATE_QCH_FILES AND DOXYGEN_VERSION VERSION_LESS "1.8.7") message(WARNING "> Forcing MITK_DOXYGEN_GENERATE_QCH_FILES to OFF because Doxygen version 1.8.7 or newer not found.") set(MITK_DOXYGEN_GENERATE_QCH_FILES OFF CACHE BOOL "Use doxygen to generate Qt compressed help files for MITK docs" FORCE) endif() set(HAVE_DOT "NO") if(DOXYGEN_DOT_EXECUTABLE AND USE_DOT) set(HAVE_DOT "YES") endif() set(MITK_DOXYGEN_TAGFILE_NAME ${MITK_DOXYGEN_OUTPUT_DIR}/MITK.tag CACHE INTERNAL "MITK Doxygen tag file") # This is relative to the working directory of the doxygen command set(MITK_DOXYGEN_STYLESHEET mitk_doxygen_extra.css) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${MITK_DOXYGEN_STYLESHEET} ${CMAKE_CURRENT_BINARY_DIR}/${MITK_DOXYGEN_STYLESHEET} COPYONLY) # Create QCH files for MITK and external projects set(MITK_DOXYGEN_GENERATE_QHP "NO") if(MITK_DOXYGEN_GENERATE_QCH_FILES) find_program(QT_HELPGENERATOR_EXECUTABLE NAMES qhelpgenerator qhelpgenerator-qt5 qhelpgenerator5 PATHS ${QT_BINARY_DIR} DOC "The location of the the Qt help generator executable" NO_DEFAULT_PATH ) mark_as_advanced(QT_HELPGENERATOR_EXECUTABLE) if(NOT QT_HELPGENERATOR_EXECUTABLE) message(SEND_ERROR "The Qt help generator could not be found. Disabling qch generation") else() set(MITK_DOXYGEN_GENERATE_QHP "YES") endif() # The name of the generated MITK qch file, relative to the # Doxygen HTML output folder set(MITK_DOXYGEN_QCH_FILE "${MITK_BINARY_DIR}/MITK-${MITK_REVISION_ID}.qch") # Generating ITK and VTK docs it not done yet #option(MITK_DOXYGEN_GENERATE_VTK_QCH_FILE "Use doxygen to generate a Qt compressed help file for VTK docs" OFF) #option(MITK_DOXYGEN_GENERATE_ITK_QCH_FILE "Use doxygen to generate a Qt compressed help file for ITK docs" OFF) #mark_as_advanced(MITK_DOXYGEN_GENERATE_VTK_QCH_FILE MITK_DOXYGEN_GENERATE_ITK_QCH_FILE) endif() # Compile a doxygen input filter for processing CMake scripts include(mitkFunctionCMakeDoxygenFilterCompile) mitkFunctionCMakeDoxygenFilterCompile(NAMESPACE "CMake") # Configure some doxygen options if(NOT MITK_DOXYGEN_INTERNAL_DOCS) set(MITK_DOXYGEN_INTERNAL_DOCS "NO") set(MITK_DOXYGEN_HIDE_FRIEND_COMPOUNDS "YES") set(MITK_DOXYGEN_EXCLUDE_PATTERNS "*_p.* *Private.h */internal/*") else() set(MITK_DOXYGEN_HIDE_FRIEND_COMPOUNDS "NO") set(MITK_DOXYGEN_EXCLUDE_PATTERNS "") endif() if(NOT MITK_DOXYGEN_GENERATE_TODOLIST) set(MITK_DOXYGEN_GENERATE_TODOLIST "NO") endif() if(NOT MITK_DOXYGEN_GENERATE_BUGLIST) set(MITK_DOXYGEN_GENERATE_BUGLIST "NO") endif() if(NOT MITK_DOXYGEN_HTML_DYNAMIC_SECTIONS) set(MITK_DOXYGEN_HTML_DYNAMIC_SECTIONS "NO") endif() if(NOT MITK_DOXYGEN_UML_LOOK) set(MITK_DOXYGEN_UML_LOOK "NO") endif() if(NOT MITK_DOXYGEN_GENERATE_DEPRECATEDLIST) set(MITK_DOXYGEN_GENERATE_DEPRECATEDLIST "YES") endif() if(NOT DEFINED MITK_DOXYGEN_DOT_NUM_THREADS) set(MITK_DOXYGEN_DOT_NUM_THREADS 0) endif() if(NOT DEFINED US_PLATFORM) if(UNIX) if(APPLE) set(US_PLATFORM "US_PLATFORM_APPLE=1") else() set(US_PLATFORM "US_PLATFORM_LINUX=1") endif() set(US_PLATFORM "${US_PLATFORM} \\\nUS_PLATFORM_POSIX=1") else() set(US_PLATFORM "US_PLATFORM_WINDOWS=1") endif() endif() # parse which plug-in documentation to activate set(USERS_GUIDE_INPUT "${MITK_SOURCE_DIR}/Documentation/Doxygen/UserManual/") if(MITK_USE_BLUEBERRY) if(MITK_BUILD_ALL_PLUGINS) set(USERS_GUIDE_INPUT "${USERS_GUIDE_INPUT} \\ ${MITK_SOURCE_DIR}/Plugins/") else() foreach(mitk_plugin ${${CMAKE_PROJECT_NAME}_PLUGIN_LIBRARIES}) # we want each line to end in " \" and each directory be on a separate line set(USERS_GUIDE_INPUT "${USERS_GUIDE_INPUT} \\ ${${mitk_plugin}_SOURCE_DIR}/") endforeach() endif() if(MITK_BUILD_EXAMPLES) set(USERS_GUIDE_INPUT "${USERS_GUIDE_INPUT} \\ ${MITK_SOURCE_DIR}/Examples/Plugins/") endif() endif() # create output directories for the guides file(MAKE_DIRECTORY ${MITK_DOXYGEN_OUTPUT_DIR}/Guides/Users_Guide/) file(MAKE_DIRECTORY ${MITK_DOXYGEN_OUTPUT_DIR}/Guides/Developers_Guide/) configure_file(doxygen.conf.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf) configure_file(doxygen_users_guide.conf.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen_users_guide.conf) configure_file(doxygen_developers_guide.conf.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen_developers_guide.conf) if(MITK_DOXYGEN_BUILD_ALWAYS) set(_doc_in_all "ALL") else() set(_doc_in_all "") endif() add_custom_target(doc ${_doc_in_all} ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) add_custom_target(doc_usersguide ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/doxygen_users_guide.conf WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) add_custom_target(doc_developersguide ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/doxygen_developers_guide.conf WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) set_property(TARGET doc doc_usersguide doc_developersguide PROPERTY FOLDER "${MITK_ROOT_FOLDER}/Documentation") - -if(MITK_USE_BLUEBERRY) - # convert the extension points schema files into html - find_package(Ant) - set(BLUEBERRY_DOC_TOOLS_DIR "" CACHE PATH "Directory containing additional tools needed for generating the documentation") - if(ANT_FOUND AND BLUEBERRY_DOC_TOOLS_DIR) - - list(APPEND MITK_XP_GLOB_EXPRESSIONS - ${MITK_SOURCE_DIR}/Plugins/plugin.xml) - - file(GLOB_RECURSE _plugin_xmls ${MITK_XP_GLOB_EXPRESSIONS}) - - mitkFunctionConvertXPSchema(INPUT ${_plugin_xmls} - OUTPUT_DIR "${MITK_DOXYGEN_OUTPUT_DIR}/html/extension-points/html" - TARGET_NAME mitkXPDoc - ) - - add_dependencies(doc mitkXPDoc) - else() - message(STATUS "Extension-point schema documentation generation disabled due to missing Ant and / or missing BlueBerry doc tools.") - endif() -endif(MITK_USE_BLUEBERRY) - -#if(MITK_DOXYGEN_GENERATE_ITK_QCH_FILE) -# # add the command to generate the ITK documentation -# add_custom_target(doc-itk -# COMMAND ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.itk.conf) -# add_dependencies(doc doc-itk) -#endif() - -#if(MITK_DOXYGEN_GENERATE_VTK_QCH_FILE) -# # add the command to generate the VTK documentation -# add_custom_target(doc-vtk -# COMMAND ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.vtk.conf) -# add_dependencies(doc doc-vtk) -#endif() diff --git a/Documentation/buildExtPointDoc.xml.in b/Documentation/buildExtPointDoc.xml.in deleted file mode 100644 index 5dfd6517db..0000000000 --- a/Documentation/buildExtPointDoc.xml.in +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @XP_ANT_TASKS@ - - - - - - - - \ No newline at end of file diff --git a/Documentation/mitk_doxygen_extra.css b/Documentation/mitk_doxygen_extra.css index dd1235b00c..2e2cef5271 100644 --- a/Documentation/mitk_doxygen_extra.css +++ b/Documentation/mitk_doxygen_extra.css @@ -1,203 +1,140 @@ /* Main Doxygen CSS overrides */ @import url(http://fonts.googleapis.com/css?family=Open+Sans); body, table, div, p, dl { font-family: 'Open Sans', Lucida Grande, Verdana, Geneva, Arial, sans-serif; } a { color: #2d5c88; } #top { border-bottom: 1px solid #e1e1e1; } .navpath ul { background-image:none; color:#dddddd; } .navpath li.navelem a { color: inherit; font-family: inherit; text-shadow: none; } #projectname { visibility: hidden; height: 70px; margin-left: -520px; } #projectbrief { display: none; } #projectnumber { font: inherit; visibility: visible; font-size: 12px; position: relative; top: 17px; left: 80px; } #titlearea table tbody>tr:first-child>td:first-child { background: url(mitkLogo.jpg) 0 0 no-repeat; padding-right: 15px; } /* Doxygen navtree.css overrides */ #nav-tree .label { font: inherit; } #nav-tree { background-color: inherit; } #nav-tree { background-image:none; background-color: inherit; } /* Doxygen tabs.css overrides */ .tabs, .tabs2, .tabs3 { background-image: none; font-family: inherit; } .tabs2 { font-size: 12px; } .tablist { margin: 0 auto; } .tablist li { background-image: none; } .tablist a { background-image:none; color: #808080; transition:all .3s ease-out; border-bottom:2px solid transparent; } .tablist a:hover { background-image:none; text-shadow: none; color: #333333; border-bottom: 2px solid #2d5c88; } .tablist li.current a { background-image:none; text-shadow: none; color: #333333; border-bottom: 2px solid #2d5c88; } /* Search field */ #MSearchBox .left { border-style: solid none solid solid; border-width: 1px; background: none; border-color: #000000; } #MSearchField { margin-top: -1px; border-style: solid none; border-width: 1px; border-color: #000000; background: none; padding-top: 0px; padding-bottom: 0px; } #MSearchBox .right { border-style: solid solid solid none; border-width: 1px; background: none; border-color: #000000; } #MSearchResultsWindow { background-color: #ffffff; } #MSearchSelectWindow { border-color: #000000; background-color: #ffffff; } - -/* CSS for the generated extension point documentation, copied from schema.css */ - -H6.SchemaHeader { - font-size:16px; - display:inline -} - -P.SchemaCopyright { - font-size: smaller; - font-style: normal; - color: #336699; - display:inline; - margin-top: 3.000000pt; - margin-bottom: 11.000000pt; - margin-right: 0.000000pt; - margin-left: 0.000000pt; -} - -P.SchemaDtd { - color: #800000; - margin-top: 0.000000pt; - margin-bottom: 0.000000pt; - margin-right: 0.000000pt; - margin-left: 10.000000pt; -} - -P.SchemaDtdAttlist { - color: #800000; - margin-top: 0.000000pt; - margin-bottom: 0.000000pt; - margin-right: 0.000000pt; - margin-left: 20.000000pt; -} - -span.SchemaTag { - color: #000080; -} - -span.SchemaCstring { - color: #008000; -} - -pre.Example { - margin-top: 0.000000pt; -} - -.ConfigMarkupElementDesc { - color: black; - margin-top: 0.000000pt; - margin-bottom: 0.000000pt; - margin-right: 0.000000pt; - margin-left: 10.000000pt; -} - -.ConfigMarkupAttlistDesc { - color: black; - margin-top: 0.000000pt; - margin-bottom: 0.000000pt; - margin-right: 0.000000pt; - margin-left: 32.000000pt; -} - diff --git a/Documentation/schema.css b/Documentation/schema.css deleted file mode 100644 index fb2028d7b6..0000000000 --- a/Documentation/schema.css +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -H6.SchemaHeader { - font-size:16px; - display:inline -} - -P.SchemaCopyright { - font-size: smaller; - font-style: normal; - color: #336699; - display:inline; - margin-top: 3.000000pt; - margin-bottom: 11.000000pt; - margin-right: 0.000000pt; - margin-left: 0.000000pt; -} - -P.SchemaDtd { - color: #800000; - margin-top: 0.000000pt; - margin-bottom: 0.000000pt; - margin-right: 0.000000pt; - margin-left: 10.000000pt; -} - -P.SchemaDtdAttlist { - color: #800000; - margin-top: 0.000000pt; - margin-bottom: 0.000000pt; - margin-right: 0.000000pt; - margin-left: 20.000000pt; -} - -span.SchemaTag { - color: #000080; -} - -span.SchemaCstring { - color: #008000; -} - -pre.Example { - margin-top: 0.000000pt; -} - -.ConfigMarkupElementDesc { - color: black; - margin-top: 0.000000pt; - margin-bottom: 0.000000pt; - margin-right: 0.000000pt; - margin-left: 10.000000pt; -} - -.ConfigMarkupAttlistDesc { - color: black; - margin-top: 0.000000pt; - margin-bottom: 0.000000pt; - margin-right: 0.000000pt; - margin-left: 32.000000pt; -} - diff --git a/Plugins/org.blueberry.core.expressions/plugin.xml b/Plugins/org.blueberry.core.expressions/plugin.xml index 3509a3e70b..7e2896abbf 100644 --- a/Plugins/org.blueberry.core.expressions/plugin.xml +++ b/Plugins/org.blueberry.core.expressions/plugin.xml @@ -1,18 +1,14 @@ - - - - diff --git a/Plugins/org.blueberry.core.expressions/schema/definitions.exsd b/Plugins/org.blueberry.core.expressions/schema/definitions.exsd deleted file mode 100755 index ad07cdb214..0000000000 --- a/Plugins/org.blueberry.core.expressions/schema/definitions.exsd +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - <p> -This extension point allows you to create reusable extensions. They can then be used in other core expression constructs. -</p> -<p> -The reference element in a core expression will evaluated the expression definition with the evaluation context that is active for the reference element. -</p> - - - - - - - - - - - - - - - a fully qualified identifier of the target extension point - - - - - - - an optional identifier of the extension instance - - - - - - - an optional name of the extension instance - - - - - - - - - - - - - Provides a global definition of an expression to be used with the &lt;reference/&gt; expression element. This helps to reuse common expressions. - - - - - - - - - - - - - - - - - - - - - A globally unique identifier for the expression definition. - - - - - - - - - - - - You can define and the use core expressions: - -<p> -<pre> -&lt;extension point="org.blueberry.core.expressions.definitions"&gt; - &lt;definition id="com.example.parts.activeProblemsView"&gt; - &lt;with variable="activePartId"&gt; - &lt;equals value="org.blueberry.ui.views.ProblemsView"/&gt; - &lt;/with&gt; - &lt;/definition&gt; - &lt;definition id="com.example.markers.markerSelection"&gt; - &lt;iterate&gt; - &lt;instanceof value="org.blueberry.core.resources.IMarker"/&gt; - &lt;/with&gt; - &lt;/definition&gt; -&lt;/extension&gt; -</pre> -</p> -<p> -Then this expression definition can be used when composing other expressions. -</p> -<p> -<pre> -&lt;enabledWhen&gt; - &lt;reference definitionId="com.example.parts.activeProblemsView"&gt; -&lt;/enabledWhen&gt; -</pre> -<pre> -&lt;visibleWhen&gt; - &lt;and&gt; - &lt;reference definitionId="com.example.parts.activeProblemsView"/&gt; - &lt;reference definitionId="com.example.markers.markerSelection"/&gt; - &lt;/and&gt; -&lt;/visibleWhen&gt; -</pre> -</p> - - - - - - - - - - 3.3 - - - - - - - - - - - - - - - - - - - - - - - - - - - Copyright (c) 2007 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.core.expressions/schema/expressionLanguage.exsd b/Plugins/org.blueberry.core.expressions/schema/expressionLanguage.exsd deleted file mode 100755 index 400743a1d2..0000000000 --- a/Plugins/org.blueberry.core.expressions/schema/expressionLanguage.exsd +++ /dev/null @@ -1,535 +0,0 @@ - - - - - - - - - - - - - - - - A generic root element. The element can be used inside an extension point to define its enablement expression. - The children of an enablement expression are combined using the and operator. - - - - - - - - - - - - - - - - - - - - - - - - - This element represent a NOT operation on the result of evaluating it's sub-element expression. - - - - - - - - - - - - - - - - - - - - - - - - - This element represent an AND operation on the result of evaluating all it's sub-elements expressions. - - - - - - - - - - - - - - - - - - - - - - - - - This element represent an OR operation on the result of evaluating all it's sub-element expressions. - - - - - - - - - - - - - - - - - - - - - - - - - - - - This element is used to perform an instanceof check of the object in focus. The expression returns - EvaluationResult.TRUE if the object's type is a sub type of the type specified by the attribute value. - Otherwise EvaluationResult.FALSE is returned. - - - - - - - a fully qualified name of a class or interface. - - - - - - - - - - - - - - - - This element is used to evaluate the property state of the object in focus. The set of - testable properties can be extended using the propery tester extension point. The test - expression returns EvaluationResult.NOT_LOADED if the property tester doing the actual - testing isn't loaded yet and the attribute forcePluginActivation is set to false. - If forcePluginActivation is set to true and the evaluation context used to evaluate - this expression support plug-in activation then evaluating the property will result in - activating the plug-in defining the tester. - - - - - - - the name of an object's property to test. - - - - - - - additional arguments passed to the property tester. Multiple arguments are seperated - by commas. Each individual argument is converted into a Java base type using the same - rules as defined for the value attribute of the test expression. - - - - - - - the expected value of the property. Can be omitted if the property - is a boolean property. The test expression is supposed to return -EvaluationResult.TRUE if the property matches the value and EvaluationResult.FALSE -otherwise. The value attribute is converted into a Java base type using the following -rules: -<ul> - <li>the string &quot;true&quot; is converted into Boolean.TRUE</li> - <li>the string &quot;false&quot; is converted into Boolean.FALSE</li> - <li>if the string contains a dot then the interpreter tries to convert - the value into a Float object. If this fails the string is treated as a - java.lang.String</li> - <li>if the string only consists of numbers then the interpreter - converts the value in an Integer object.</li> - <li>in all other cases the string is treated as a java.lang.String</li> - <li>the conversion of the string into a Boolean, Float, or Integer can - be suppressed by surrounding the string with single quotes. For - example, the attribute value=&quot;'true'&quot; is converted into the - string &quot;true&quot;</li> -</ul> - - - - - - - a flag indicating whether the plug-in contributing the property tester - should be loaded if necessary. As such, this flag should be used judiciously, - in order to avoid unnecessary plug-in activations. Most clients should avoid - setting this flag to true. This flag is only honored if the evaluation context - used to evaluate this expression allows plug-in activation. Otherwise the flag - is ignored and no plug-in loading takes place. - - - - - - - - - - - - - Tests a system property by calling the System.getProperty method and compares the result - with the value specified through the value attribute. - - - - - - - the name of an system property to test. - - - - - - - the expected value of the property. The value is interpreted as a string value. - - - - - - - - - - - - - This element is used to perform an equals check of the object in focus. The expression returns - EvaluationResult.TRUE if the object is equal to the value provided by the attribute value. Otherwise - EvaluationResult.FALSE is returned. - - - - - - - the expected value. The value provided as a string is converted into - a Java base type using the same rules as for the value attribute of the test expression. - - - - - - - - - - This element is used to test the number of elements in a collection. - - - - - - - an expression to specify the number of elements in a list. Following wildcard - characters can be used: - <dl> - <dt>*</dt> <dd>any number of elements</dd> - <dt>?</dt> <dd>no elements or one element</dd> - <dt>+</dt> <dd>one or more elements</dd> - <dt>!</dt> <dd>no elements</dd> - <dt>integer value</dt> <dd>the list must contain the exact number of elements</dd> - </dl> - - - - - - - - - - - - - This element changes the object to be inspected for all its child element to the object - referenced by the given variable. If the variable can not be resolved then the expression - will throw a ExpressionException when evaluating it. The children of a with expression - are combined using the and operator. - - - - - - - - - - - - - - - - - - - - - - the name of the variable to be used for further inspection. It is up to the evaluator - of an extension point to provide the variable in the variable pool. - - - - - - - - - - - - - This element changes the object to be inspected for all its child element to the object - referenced by the given variable. If the variable can not be resolved then the expression - will throw a ExpressionException when evaluating it. The children of a with expression - are combined using the and operator. - - - - - - - - - - - - - - - - - - - - - - the name of the variable to be resolved. This variable is then used as the object in focus - for child element evaluation. It is up to the evaluator of an extension point to provide a - corresponding variable resolver (see IVariableResolver) through the evaluation context passed - to the root expression element when evaluating the expression. - - - - - - - additional arguments passed to the variable resolver. Multiple arguments are seperated - by commas. Each individual argument is converted into a Java base type using the same - rules as defined for the value attribute of the test expression. - - - - - - - - - - - - - This element is used to adapt the object in focus to the type specified by the attribute - type. The expression returns not loaded if either the adapter or the type referenced isn't - loaded yet. It throws a ExpressionException during evaluation if the type name doesn't exist - at all. The children of an adapt expression are combined using the and operator. - - - - - - - - - - - - - - - - - - - - - - the type to which the object in focus is to be adapted. - - - - - - - - - - - - - This element is used to iterate over a variable that is of type java.util.Collection. If - the object in focus is not of type java.util.Collection then an ExpressionException will - be thrown while evaluating the expression. - - - - - - - - - - - - - - - - - - - - - - either "and" or "or". The operator defines how the child - elements will be combined. If not specified, "and" will be used. - - - - - - - - - - - - - - - the value return from the iterate expression if the collection is empty. If - not specified then true is returned when the operator equals "and" - and false is return if the operator equals "or". - - - - - - - - - - - - - This element is used to reference an expression from the <b>org.blueberry.core.expressions.definitions</b> extension point. The expression definition will be evaluated within the current expression element using the current evaluation context. - - - - - - - The unique id of an expression from <b>org.blueberry.core.expressions.definitions</b>. - - - - - - - - - - - - Release 3.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Copyright (c) 2001, 2004 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.core.expressions/schema/propertyTesters.exsd b/Plugins/org.blueberry.core.expressions/schema/propertyTesters.exsd deleted file mode 100755 index 30f9b60ca4..0000000000 --- a/Plugins/org.blueberry.core.expressions/schema/propertyTesters.exsd +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - This extension point allows to add properties to an already existing type. Those - properties can then be used inside the expression language's test expression - element. - - - - - - - - - - - - a fully qualified identifier of the target extension point - - - - - - - an optional identifier of the extension instance - - - - - - - an optional name of the extension instance - - - - - - - - - - - - - - - unique identifier for the property tester - - - - - - - the type to be extended by this property tester - - - - - - - - - - a unique id determining the name space the properties are added to - - - - - - - a comma separated list of properties provided by this property tester - - - - - - - the name of the class that implements the testing methods. The class must be public and extend -<samp>org.blueberry.core.expressions.PropertyTester</samp> with a public 0-argument constructor. - - - - - - - - - - - - - - - 3.0 - - - - - - - - - The following is an example of a property tester contribution: - -<p> -<pre> - <extension point="org.eclipse.core.expressions.propertyTesters"> - <propertyTester - id="org.eclipse.jdt.ui.IResourceTester" - type="org.eclipse.core.resources.IResource" - namespace="org.eclipse.jdt.ui" - properties="canDelete" - class="org.eclipse.jdt.ui.internal.ResourceTester"> - </propertyTester> - </extension> -</pre> -</p> - - - - - - - - - The contributed class must extend <code>berry::PropertyTester</code> - - - - - - - - - - Copyright (c) 2001, 2004 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.core.runtime/plugin.xml b/Plugins/org.blueberry.core.runtime/plugin.xml index 4516950d8c..4e81473ab7 100644 --- a/Plugins/org.blueberry.core.runtime/plugin.xml +++ b/Plugins/org.blueberry.core.runtime/plugin.xml @@ -1,13 +1,11 @@ - - diff --git a/Plugins/org.blueberry.core.runtime/schema/applications.exsd b/Plugins/org.blueberry.core.runtime/schema/applications.exsd deleted file mode 100644 index 48350bda0e..0000000000 --- a/Plugins/org.blueberry.core.runtime/schema/applications.exsd +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - The applications extension point allows plugins to contribute applications to the BlueBerry Platform. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Following is an example of an application declaration. -<p> - <pre> - <extension id="sampleApplication" point="org.blueberry.osgi.applications"> - <application id="my.domain.application"> - <run class="xyz::SampleApp"/> - </application> - </extension> - </pre> -</p> - - - - - - - - - Application classes must subclass <code>berry::IApplication</code>. - - - - - - diff --git a/Plugins/org.blueberry.core.runtime/schema/products.exsd b/Plugins/org.blueberry.core.runtime/schema/products.exsd deleted file mode 100644 index 39956abccc..0000000000 --- a/Plugins/org.blueberry.core.runtime/schema/products.exsd +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - Products are the BlueBerry unit of branding. Product extensions are supplied by plug-ins wishing to define one or more products. There must be one product per extension as the extension id is used in processing and identifying the product. -<p> -There are two possible forms of product extension, static and dynamic. Static product extensions directly contain all relevant information about the product. Dynamic product extensions identify a class (an <code>IProductProvider</code>) which is capable of defining one or more products when queried. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - the default application to run when running this product - - - - - - - the human-readable name of this product - - - - - - - - - - the human-readable description of this product - - - - - - - - - - - - - - - - - - - - the key under which this property is stored - - - - - - - the value of this property - - - - - - - - - - details of a product provider - - - - - - - - - - - - - - - the fully-qualified name of a class which implements -<samp>berry::IProductProvider</samp>. - - - - - - - - - - - - next_release - - - - - - - - - Following is an example of static product declaration: -<p> -<pre> - <extension id="coolProduct" point="org.blueberry.core.runtime.products"> - <product name="%coolName" application="coolApplication" description="%coolDescription"> - <property name="windowImages" value="window.gif"/> - <property name="aboutImage" value="image.gif"/> - <property name="aboutText" value="%aboutText"/> - <property name="appName" value="CoolApp"/> - <property name="welcomePage" value="$nl$/welcome.xml"/> - <property name="preferenceCustomization" value="plugin_customization.ini"/> - </product> - </extension> -</pre> -</p> - -The following is an example of a dynamic product (product provider) declaration: -Following is an example of an application declaration: -<p> -<pre> - <extension id="coolProvider" point="org.blueberry.core.runtime.products"> - <provider> - <run class="me::CoolProvider"/> - </provider> - </extension> -</pre> -</p> - - - - - - - - - Static product extensions provided here are represented at runtime by instances of <code>IProduct</code>. Dynamic product extensions must identify an implementor of <code>IProductProvider</code>. See <code>IProductConstants</code> -for details of the branding related product properties defined by the Eclipse UI. - - - - - - - - - No implementations of <code>IProductProvider</code> are supplied. - - - - - - - - - Copyright (c) 2004, 2005 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made -available under the terms of the Eclipse Public License v1.0 which -accompanies -this distribution, and is available at -<a -href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.ui.qt/plugin.xml b/Plugins/org.blueberry.ui.qt/plugin.xml index 561a9ec8a7..4da5fa1273 100644 --- a/Plugins/org.blueberry.ui.qt/plugin.xml +++ b/Plugins/org.blueberry.ui.qt/plugin.xml @@ -1,465 +1,451 @@ - - - - - - - - - - - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/commands.exsd b/Plugins/org.blueberry.ui.qt/schema/commands.exsd deleted file mode 100755 index 84ddaf81da..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/commands.exsd +++ /dev/null @@ -1,466 +0,0 @@ - - - - - - - - - <p> -The <code>org.blueberry.ui.commands</code> extension point is used to declare commands and command categories, using the <code>command</code> and <code>category</code> elements. A command is an abstract representation of some semantic behaviour, but not it's actual implementation. This allows different developers to contribute specific behaviour for their individual parts. For example, there might be a "paste" command with one implementation in an editor and a different implementation in an explorer widget. These implementations are called handlers. Commands can also be viewed as declarative function pointers, or signal handlers. -</p> - - - - - - - - - - - - - - - - - - - An optional identifier of the extension instance. - - - - - - - An optional name of the extension instance. - - - - - - - - - - A fully qualified identifier of the target extension point. - - - - - - - - - - <p> -This element is used to define commands. A command represents an request from the user that can be handled by an action, and should be semantically unique among other commands. Do not define a command if there is already one defined with the same meaning. If more than one of these elements exist with the same <code>id</code> attribute, only the last declared element (in order of reading the plugin registry) is considered valid. See the extension points <a href="org_blueberry_ui_actionSets.html">org.blueberry.ui.actionSets</a> and <a href="org_blueberry_ui_editorActions.html">org.blueberry.ui.editorActions</a> to understand how actions are connected to commands. -</p> - - - - - - - - - - - - A translatable short description of this command for display in the UI. - - - - - - - - - - The unique identifier of this command. - - - - - - - The translatable name of this command for display in the UI. Commands are typically named in the form of an imperative verb. - - - - - - - - - - The unique id of the category for this command. If this command does not specify a category it will be placed in an global "Uncategorized" category. - - - - - - - The default handler for this command (see the <a href="org_blueberry_ui_handlers.html">org.blueberry.ui.handlers</a> extension point). If no other handler is active, this handler will be active. This handler will conflict with other handler definitions that specify no <code>activeWhen</code> conditions. If you are creating an <code>IExecutableExtension</code>, you can use the <code>defaultHandler</code> element instead. - - - - - - - - - - The id of a <code>commandParameterType</code> indicating the type of value returned by this command. Specifying a <code>returnTypeId</code> allows clients executing the command to associate the value returned with a type and to convert the value to a QString form that may be stored and/or passed to another command that accepts parameters of the same type. - - - - - - - The identifier of the help context that relates to this command in general. Handlers can override this context identifier to provide help that is more specific to their particular behaviours. -<p><em>Not used yet</em></p> - - - - - - - - - - <p> -In the UI, commands are often organized by category to make them more manageable. This element is used to define these categories. Commands can add themselves to at most one category. If more than one of these elements exist with the same <code>id</code> attribute, only the last declared element (in order of reading the plugin registry) is considered valid. -</p> - - - - - - - A translatable short description of this category for display in the UI. - - - - - - - - - - The unique identifier of this category. - - - - - - - The translatable name of this category for display in the UI. - - - - - - - - - - - - - - - - <p> -Defines a parameter that a command should understand. A parameter is a way to provide more information to a handler at execution time. For example, a "show view" command might take a view as a parameter. Handlers should be able to understand these parameters, so they should be treated like API. -</p> - - - - - - - - - - The unique identifier for this parameter. - - - - - - - The name for the parameter. This is the name as it will be displayed to an end-user. As such, it should be translatable. The name should be short -- preferrably one word. - - - - - - - - - - The class providing a list of parameter values for the user to select. This class should implement <code>org.blueberry.core.commands.IParameterValues</code>. If this class is not specified, you must specify the more verbose <code>values</code> element. Please see <code>org.blueberry.osgi.IExecutableExtension</code>. - - - - - - - - - - The id of a commandParameterType for this commandParameter. Specifying a typeId allows handlers of a command to convert string parameter values to objects in a consistent way and it allows potential callers of a command to look for commands that take objects of various types for their parameters. - - - - - - - Whether this parameter is optional. If a parameter is optional, the handler should be able to handle the absence of the parameter. By default, all parameters are optional. - - - - - - - - - - <p> -Defines the object type of a commandParameter and may specify an <code>org.blueberry.core.commands.AbstractParameterValueConverter</code> subclass to convert between string parameter values and objects. -</p> - - - - - - - The unique identifier for this commandParameterType. - - - - - - - The fully qualified name of a class to use as the type of this command parameter. This attribute is optional, however if omitted, <code>org.blueberry.osgi.Object</code> will be used as the parameter type. - - - - - - - - - - The class for converting between objects and string representations of objects for command parameter values. This class should extend <code>org.blueberry.core.commands.AbstractParameterValueConverter</code>. The converter should produce and consume objects of the type indicated in the <code>type</code> attribute. If this class is not specified, this facility to convert between string and object values for this parameter type will not be available (the <code>GetValueConverter()</code> on class <code>ParameterType</code> will return <code>null</code>). - - - - - - - - - - - - - - - - <p> -The more verbose version of the <code>values</code> attribute on the <code>commandParameter</code>. -</p> - - - - - - - - - - The class providing a list of parameter values for the user to select. This class should implement <code>org.blueberry.core.commands.IParameterValues</code>. If this class is not specified, you must specify the more verbose <code>values</code> element. Please see <code>org.blueberry.osgi.IExecutableExtension</code>. - - - - - - - - - - - - - - - - <p> -A possible value for a parameter. -</p> - - - - - - - The name of the parameter to pass to the <code>IExecutableExtension</code>. - - - - - - - The value of the parameter to pass to the <code>IExecutableExtension</code>. - - - - - - - - - - - - - <p> -The default handler for this command. If no other handler is active, this handler will be active. This handler will conflict with other handler definitions that specify no <code>activeWhen</code> conditions. If you are not creating an <code>IExecutableExtension</code>, you can use the <code>defaultHandler</code> attribute instead. -</p> - - - - - - - - - - The class which implements <code>org.blueberry.core.commands.IHandler</code>. - - - - - - - - - - - - - - - - <p> -State information shared between all handlers, and potentially persisted between sessions.The state is simply a class that is loaded to look after the state. See the API Information for more details. This is not used for UI attributes like a menu contribution check box state or label. -</p> - - - - - - - - - - The class that can be loaded to store the state of this command. State is shared amongst handlers, and can be persisted between sessions. This class must implement <code>org.blueberry.core.commands.State</code>. Please see API Information. - - - - - - - - - - A unique identifier for this state. This is used for persisting the state between sessions (if the state is an instance of <code>org.blueberry.core.commands.PersistentState</code>). Certain common identifiers (see <code>org.blueberry.ui.menus.IMenuStateIds</code>) are understood when the command is being rendered in the menus or tool bars. The identifier only needs to be unique within the command defining the state. - - - - - - - - - - - - - <p> -The class that can be loaded to store the state of this command. This element is used if you wish to pass multiple parameters to an <code>org.blueberry.osgi.IExecutableExtension</code>. -</p> - - - - - - - - - - The class that can be loaded to store the state of this command. State is shared amongst handlers, and can be persisted between sessions. This class must implement <code>org.blueberry.core.commands.State</code>. Please see API Information. - - - - - - - - - - - - - - - <p> -1.0 -</p> - - - - - - - - - <p> -The <code>plugin.xml</code> file in the <code>org.blueberry.ui</code> plugin makes extensive use of the <code>org.blueberry.ui.commands</code> extension point. -</p> - - - - - - - - - <p> -Handlers can be registered with commands using the <code>org.blueberry.ui.handlers.IHandlerService</code>. This can be retrieved from various workbench components (e.g., workbench, workbench window, part site, etc.) by calling <code>GetService(IHandlerService::ID)</code>. -</p> -<p> -In general, it is preferrably to declare all commands statically (in <code>plugin.xml</code>). This is so that users can attach key bindings to the commands. However, it is possible to declare commands at run-time. To do this, retrieve the <code>org.blueberry.ui.commands.ICommandService</code> from a workbench component, call <code>GetCommand(yourCommandID)</code> and then call <code>Command::Define(...)</code>. -Commands defined programmatically must be cleaned up by the plugin if it is unloaded. -</p> -<p> -There are a few default implementations of handler states that may be useful to users of this extension point: -</p> -<ul> -<!-- -<li>org.eclipse.jface.commands.TextState</li> -<li>org.eclipse.jface.commands.RadioState</li> -<li>org.eclipse.jface.commands.ToggleState</li> -<li>org.eclipse.ui.handlers.RegistryRadioState</li> -<li>org.eclipse.ui.handlers.RegistryToggleState</li> ---> -</ul> - - - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/editors.exsd b/Plugins/org.blueberry.ui.qt/schema/editors.exsd deleted file mode 100755 index 93f1db4a0f..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/editors.exsd +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - This extension point is used to add new editors to the -workbench. A editor is a visual component within a -workbench page. It is typically used to edit or browse -a document or input object. To open an editor, the user -will typically invoke "Open" on an <samp>IFile</samp>. -When this action is performed the workbench registry -is consulted to determine an appropriate editor for -the file type and then a new instance of the editor -type is created. The actual result depends on the -type of the editor. The workbench provides support -for the creation of internal editors, which are tightly -integrated into the workbench, and external editors, -which are launched in a separate frame window. -There are also various level of integration between -these extremes. -<p> -In the case of an internal editor tight integration can -be achieved between the workbench window and the editor -part. The workbench menu and toolbar are pre-loaded -with a number of common actions, such as cut, copy, and -paste. The active part, view or editor, is expected to -provide the implementation for these actions. An internal -editor may also define new actions which appear in the -workbench window. These actions only appear when the -editor is active. -<p> -The integration between the workbench and external -editors is more tenuous. In this case the workbench -may launch an editor but after has no way of determining -the state of the external editor or collaborating -with it by any means except through the file system. - - - - - - - - - - - - a fully qualified identifier of the target extension point - - - - - - - an optional identifier of the extension instance - - - - - - - an optional name of the extension instance - - - - - - - - - - - - - - - - - - - - - - - a unique name that will be used to identify this editor - - - - - - - a translatable name that will be used in the UI for this editor - - - - - - - - - - A relative name of the icon that will be used for all resources that match the specified extensions. Editors should provide an icon to make it easy for users to distinguish between different editor types. If you specify a command rather than a class, an icon is not needed. In that case, the workbench -will use the icon provided by the operating system. - - - - - - - - - - an optional field containing the list of file types understood by the editor. This is a string containing comma separate file extensions. For instance, an editor which understands hypertext documents may register for "htm, html". - - - - - - - the name of a class that implements <samp>berry::IEditorPart</samp>. The attributes <samp>class</samp>, <samp>command</samp>, and <samp>launcher</samp> are mutually exclusive. If this attribute is defined then <samp>contributorClass</samp> should also be defined. - - - - - - - - - - a command to run in order to launch an external editor. The executable command must be located on the system path or in the plug-in's directory. The attributes <samp>class</samp>, <samp>command</samp>, and <samp>launcher</samp> are mutually exclusive. - - - - - - - the name of a class which that implements <samp>berry::IEditorLauncher</samp>. -A launcher will open an external editor. The attributes <samp>class</samp>, <samp>command</samp>, and <samp>launcher</samp> are mutually exclusive. - - - - - - - - - - the name of a class that implements <samp>berry::IEditorActionBarContributor</samp>. This attribute should only be defined if the <samp>class</samp> attribute is defined. This class is used to add new actions to the workbench menu and tool bar which reflect the features of the editor type. - - - - - - - - - - if true, this editor will be used as the default editor for the -type. This is only relevant in a case where more than one editor -is registered for the same type. If an editor is not the default -for the type, it can still be launched using "Open with..." -submenu for the selected resource. -<p> -Please note that this attribute is only honored for filename and extension associations at this time. It will not be honored for content type bindings. Content type-based resolution will occur on a first come, first serve basis and is not explicitly specified.</p> - - - - - - - an optional field containing the list of file names -understood by the editor. This is a string -containing comma separate file names. For instance, -an editor which understands specific hypertext -documents may register for "ejb.htm, ejb.html". - - - - - - - the name of a class that implements <samp>berry::IEditorMatchingStrategy</samp>. This attribute should only be defined if the <samp>class</samp> attribute is defined. This allows the editor extension to provide its own algorithm for matching the input of one of its editors to a given editor input. - - - - - - - - - - - - - - - - Advertises that the containing editor understands the given content type and is suitable for editing files of that type. - - - - - - - The content type identifier. This is an ID defined by the 'org.blueberry.core.runtime.contentTypes' extension point. - - - - - - - - - - - - - The following is an example -of an internal editor extension definition: -<p> -<pre> - <extension point="org.blueberry.ui.editors"> - <editor - id="com.xyz.XMLEditor" - name="Fancy XYZ XML editor" - icon="./icons/XMLEditor.gif" - extensions="xml" - class="xyz::XMLEditor" - contributorClass="xyz::XMLEditorContributor" - default="false"> - </editor> - </extension> -</pre> -</p> - - - - - - - - - If the command attribute is used, it will be treated -as an external program command line that will be executed - in a platform-dependent manner. -<p> -If the launcher attribute is used the editor will also -be treated as an external program. In this case the -specified class must implement -<samp>org.eclipse.ui.IEditorLauncher</samp>. -The launcher will be instantiated and then -<samp>open(IPath path)</samp> will be invoked to -launch the editor on the provided local file system path. -<p> -If the class attribute is used, the workbench will -assume that it is an internal editor and the specified -class must implement <samp>org.eclipse.ui.IEditorPart</samp>. -It is common practice to -<samp>subclass org.eclipse.ui.EditorPart</samp> when -defining a new editor type. It is also necessary to -define a <samp>contributorClass</samp> attribute. -The specified class must implement -<samp>org.eclipse.ui.IEditorActionBarContributor</samp>, -and is used to add new actions to the workbench -menu and tool bar which reflect the features of the -editor type. -<p> -Within the workbench there may be more than one open -editor of a particular type. For instance, there may -be one or more open Java Editors. To avoid the creation -of duplicate actions and action images the editor -concept has been split into two. An -<samp>IEditorActionBarContributor</samp> is responsible -for the creation of actions. The editor is responsible -for action implementation. Furthermore, the contributor -is shared by each open editor. As a result of this -design there is only one set of actions for one or -more open editors. -<p> -The contributor will add new actions to the workbench -menu and toolbar which reflect the editor type. These -actions are shared and, when invoked, act upon the -active editor. The active editor is passed to the -contributor by invoking -<samp>IEditorActionBarContributor.setActiveEditor</samp>. -The identifiers for actions and major groups within -the workbench window are defined in -<samp>org.eclipse.ui.IWorkbenchActionConstants</samp>. -These should be used as a reference point for the -addition of new actions. Top level menus are created -by using the following values for the path attribute: -<ul> -<li> -additions - represents a group to the left of the Window menu. -</li> -</ul> -Actions and menus added into these paths will only be -shown while the associated editor is active. When the -editor is closed, menus and actions will be removed. - - - - - - - - - The workbench provides a "Default Text Editor". The end user product may contain other editors as part of the shipping bundle. In that case, editors will be registered as extensions using the syntax described above. - - - - - - - - - Copyright (c) 2002, 2007 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made -available under the terms of the Eclipse Public License v1.0 which accompanies -this distribution, and is available at <a -href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/elementFactories.exsd b/Plugins/org.blueberry.ui.qt/schema/elementFactories.exsd deleted file mode 100644 index ac2acf1c37..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/elementFactories.exsd +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - This extension point is used to add element factories -to the workbench. An element factory is used to -recreate <samp>IAdaptable</samp> objects which are -persisted during workbench shutdown. -<p> -As an example, the element factory is used to -persist editor input. The input for an -editor must implement -<samp>berry::EditorInput</samp>. -The life cycle of an <samp>berry::IEditorInput</samp> within -an editor has a number of phases. -<ol> -<li> -The initial input for an editor is passed in during -editor creation. -</li> -<li> -On shutdown the workbench state is captured. -In this process the workbench will create a memento -for each open editor and its input. The input is -saved as a two part memento containing a factory ID -and any primitive data required to recreate the -element on startup. For more information see -the documentation on -<samp>berry::IPersistableElement</samp>. -</li> -<li> -On startup the workbench state is read and the -editors from the previous session are recreated. -In this process the workbench will recreate the input -element for each open editor. To do this it will -map the original factory ID for the input element -to a concrete factory class defined in the registry. -If a mapping exists, and the factory class is valid, -an instance of the factory class is created. Then -the workbench asks the factory to recreate the original -element from the remaining primitive data within the -memento. The resulting <samp>berry::IAdaptable</samp> is cast -to an <samp>berry::IEditorInput</samp> and passed to the -new editor. -</li> -</ol> - - - - - - - - - - - - a fully qualified identifier of the target extension point - - - - - - - an optional identifier of the extension instance - - - - - - - an optional name of the extension instance - - - - - - - - - - - - - - - a unique name that will be used to identify this factory. - - - - - - - a fully qualified name of a class that implements -<samp>berry::IElementFactory</samp> - - - - - - - - - - - - - - - The following is an example of an element factory extension: -<p> -<pre> - <extension - point = "org.blueberry.ui.elementFactories"> - <factory - id ="com.xyz.ElementFactory" - class="xyz::ElementFactory"> - </factory> - </extension> -</pre> -</p> - - - - - - - - - The value of the <samp>class</samp> attribute must -be a fully qualified name of a class that implements -<samp>berry::IElementFactory</samp>. An instance -of this class must create an <samp>berry::IAdaptable</samp> -object from a workbench memento. - - - - - - - - - The workbench provides an <samp>IResource</samp> factory. -Additional factories should be added to recreate other -<samp>berry::IAdaptable</samp> types commonly found in other -object models. - - - - - - - - - Copyright (c) 2002, 2005 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made -available under the terms of the Eclipse Public License v1.0 which accompanies -this distribution, and is available at <a -href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/handlers.exsd b/Plugins/org.blueberry.ui.qt/schema/handlers.exsd deleted file mode 100755 index 1ce19c0c10..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/handlers.exsd +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - - - <p> -The handlers extension point is an elaboration of the experimental <code>handlerSubmission</code> element defined in Eclipse 3.0. A handler is the behaviour of a command at a particular point in time. A command can have zero or more handlers associated with it. At any one point in time, however, a command will either have no active handler or one active handler. The active handler is the one which is currently responsible for carrying out the behaviour of the command. This is very similar to the concept of an action handler and a retargettable action. -</p> -<p> -The handlers extension point allows a plug-in developer to specify a handler that should become active and/or enabled under certain conditions. If a handler is inactive, then no command will delegate its behaviour to the handler. If a handler is disabled, then the handler will not be asked to execute; execution of the handler is blocked. The conditions are defined using the expression language facility added during 3.0. They are expressed using <code>activeWhen</code> and <code>enabledWhen</code> clauses. -</p> -<p> -The workbench provides some variables that these expressions can rely on. Variables that are valid in activeWhen and enabledWhen expressions can be found in <code>org.eclipse.ui.ISources</code>. The types of the variables are determined by the <code>org.eclipse.ui.ISourceProvider</code> that provides them. -</p> -<p> -A handler that specifies no conditions is a default handler. A default handler is only active if no other handler has all of its conditions satisfied. If two handlers still have conditions that are satisfied, then the conditions are compared. The idea is to select a handler whose condition is more specific or more local. To do this, the variables referred to by the condition are looked at. The condition that refers to the most specific variable "wins". The order of specificity (from least specific to most specific) is suggested in <code>org.eclipse.ui.ISources</code>. -</p> -<p> -If this still doesn't resolve the conflict, then no handler is active. If a particular tracing option is turned on, then this leads to a message in the log. A conflict can also occur if there are two default handlers. It is the responsibility of the plug-in developers and integration testers to ensure that this does not happen. -</p> -<p> -These conditions are used to avoid unnecessary plug-in loading. These handler definitions are wrapped in a proxy. For a proxy to load its underlying handler, two things must happen: the conditions for the proxy must be met so that it becomes active, and the command must be asked to do something which it must delegate (e.g., execute(), isEnabled()). -</p> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <p>Associated a command with a handler implementation.</p> - - - - - - - - - - - - <p>The id of the command to associate with this handler implementation.</p> - - - - - - - <p>The handler class that imlements <code>org.eclipse.core.commands.IHandler</code> or extends <code>org.eclipse.core.commands.AbstractHandler</code>.</p> - - - - - - - - - - <p> -The identifier of the help context that relates to this specific handler. While a command can provide a general description of a command's behaviour, it is sometimes appropriate for a handler to provide help more specific to their implementation. -</p> -<p><em>Since: 3.2</em></p> - - - - - - - - - - <p>Contains a core expression used by the <code>IHandlerService</code> to determine when this handler is active.</p> - - - - - - - - - - - - - - - - - - - - - - - - - <p>Contains a core expression used by the workbench handler proxy to determine when this handler is enabled without loading it.</p> - - - - - - - - - - - - - - - - - - - - - - - - - <p>Used when creating an <code>IExecutableExtension</code> with a named parameter, or more than one.</p> - - - - - - - - - - <p>The handler class that imlements <code>org.eclipse.core.commands.IHandler</code> or extends <code>org.eclipse.core.commands.AbstractHandler</code>.</p> - - - - - - - - - - - - - <p>A parameter for an <code>IExecutableExtension</code>.</p> - - - - - - - <p>The parameter name.</p> - - - - - - - <p>The parameter value.</p> - - - - - - - - - - - - 3.1 - - - - - - - - - <p> -Variables that are valid in activeWhen and enabledWhen expressions can be found in <code>org.eclipse.ui.ISources</code>. The types of the variables are determined by the <code>org.eclipse.ui.ISourceProvider</code> that provides them. -</p> -<pre> -<extension - point="org.eclipse.ui.handlers"> - <handler - commandId="commandId" - class="org.eclipse.compare.Command"> - <activeWhen> - <with variable="selection"> - <count value="1" /> - <iterate operator="and"> - <adapt type="org.eclipse.core.resources.IResource" /> - </iterate> - </with> - </activeWhen> - </handler> - <handler - commandId="other.commandId" - class="org.eclipse.ui.TalkToMe"> - <activeWhen> - <with variable="activePartId"> - <equals value="org.eclipse.ui.views.SampleView"/> - </with> - </activeWhen> - </handler> -</extension> -</pre> -<p> -To further avoid plug-in loading, it is possible to specify when the handler is enabled. If the proxy has not yet loaded the handler, then only the expressions syntax is used to decide if the handler is enabled. If the proxy has loaded the handler, then the expressions syntax is consulted first. If the expressions syntax evaluates to true, then the handler is asked if it is enabled. (This is a short-circuit Boolean "and" operation between the expressions syntax and the handler's enabled state.) -</p> -<pre> -<extension - point="org.eclipse.ui.handlers"> - <handler - commandId="commandId" - class="org.eclipse.Handler"> - <enabledWhen> - <with variable="activeContexts"> - <iterator operator="or"> - <equals value="org.eclipse.ui.contexts.window"/> - </iterator> - </with> - </enabledWhen> - </handler> -</extension> -</pre> - - - - - - - - - <p> -All handlers implement <code>org.eclipse.core.commands.IHandler</code>, and can use <code>org.eclipse.core.commands.AbstractHandler</code> as a base class. Within the workbench, it is possible to activate and deactivate handlers using the <code>org.eclipse.ui.handlers.IHandlerService</code> interface. This interface can be retrieved from supporting workbench objects, such as <code>IWorkbench</code> itself, a workbench window, or a part site. To retrieve the service, you would make a call like <code>IWorkbench.getService(IHandlerService.class)</code>. -</p> -<p> -It is also possible to activate and deactive handlers using legacy code in the workbench. This can be done through the legacy mechanism shown below. This mechanism is useful to clients who are using actions to contribute to menus or toolbars. This is deprecated and not recommended. -</p> -<pre> - IWorkbenchPartSite mySite; - IAction myAction; - - myAction.setActionDefinitionId(commandId); - IKeyBindingService service = mySite.getKeyBindingService(); - service.registerAction(myAction); -</pre> - - - - - - - - - - - - - - - - - - Copyright (c) 2005, 2007 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made -available under the terms of the Eclipse Public License v1.0 which accompanies -this distribution, and is available at <a -href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/intro.exsd b/Plugins/org.blueberry.ui.qt/schema/intro.exsd deleted file mode 100755 index b1badeb3bd..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/intro.exsd +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - - <p>This extension point is used to register implementations of special workbench parts, called intro parts, that are responsible for introducing a product to new users. An intro part is typically shown the first time a product is started up. Rules for associating an intro part implementation with particular products are also contributed via this extension point. -</p> -The life cycle is as follows: -<ul> -<li>The intro area is created on workbench start up. As with editor and view areas, this area is managed by an intro site (implementing <code>IIntroSite</code>).</li> -<li>The id of the current product (Platform::GetProduct()) is used to choose the relevant intro part implementation. -</li> -<li>The intro part class (implementing <code>IIntroPart</code>) is created and initialized with the intro site. -</li> -<li>While the intro part is showing to the user, it can transition back and forth between full and standby mode (either programmatically or explicitly by the user). -</li> -<li>Eventually the intro part is closed (either programmatically or explicitly by the user). The current perspective takes over the entire workbench window area. -</li> -</ul> - - - - - - - - - - - - - - - - - - a fully qualified identifier of the target extension point - - - - - - - an optional identifier of the extension instance - - - - - - - an optional name of the extension instance - - - - - - - - - - - - - - - - Specifies an introduction. An introduction is a product-specific presentation shown to first-time users on product start up. - - - - - - - a unique identifier for this introduction - - - - - - - a plug-in-relative file name of the icon that will be associated with this introduction - - - - - - - - - - a fully qualified name of the class implementing the <code>berry::IIntroPart</code> interface. A common practice -is to subclass <samp>berry::IntroPart</samp> -in order to inherit the default functionality. This class implements the introduction. - - - - - - - - - - a fully qualified name of a class extending <code>berry::IntroContentDetector</code>. This optional class is used to detect newly added introduction content. If new content is available, the view showing the introduction will be opened again. - - - - - - - - - - an string label for this introduction that will be used in the construction of the open action as well as the part label. - - - - - - - - - - Specifies a binding between a product and an introduction. These bindings determine which introduction is appropriate for the current product (as defined by <code>Platform::GetProduct()</code>). - - - - - - - unique id of a product - - - - - - - unique id of an introduction - - - - - - - - - - - - 3.0 - - - - - - - - - The following is an example of an intro part extension that contributes an particular introduction and associates it with a particular product: -<p> -<pre> - <extension point="org.eclipse.ui.intro"> - <intro - id="com.example.xyz.intro.custom" - class="com.example.xyz.intro.IntroPart"/> - <introProductBinding - productId="com.example.xyz.Product" - introId="com.example.xyz.intro.custom"/> - </extension> -</pre> -</p> - - - - - - - - - The value of the <code>class</code> attribute must be the fully qualified name of a class that implements the<code>org.eclipse.ui.intro.IIntroPart</code> interface by subclassing <code>org.eclipse.ui.part.intro.IntroPart</code>. - - - - - - - - - There are no default implementations of the initial user experience. Each Eclipse-based product is responsible for providing one that is closely matched to its branding and function. - - - - - - - - - Copyright (c) 2004, 2007 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made -available under the terms of the Eclipse Public License v1.0 which accompanies -this distribution, and is available at <a -href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/keywords.exsd b/Plugins/org.blueberry.ui.qt/schema/keywords.exsd deleted file mode 100644 index ac8a532caf..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/keywords.exsd +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - The keywords extension point defines keywords and a unique id for reference by other schemas. - -See propertyPages and preferencePages. - - - - - - - - - - - - - - - - a fully qualified identifier of the target extension point - - - - - - - an optional identifier of the extension instance - - - - - - - an optional name of the extension instance - - - - - - - - - - - - - - - - - - - The id is the unique id used to reference the keyword. - - - - - - - The human readable label of the keyword - - - - - - - - - - - - - - - The following is an example of a keyword extension: -<p> -<pre> - <extension - point="org.blueberry.ui.keywords"> - <keyword - label="presentation tab themes" - id="com.xyz.AppearanceKeywords"/> - </extension> -</pre> -</p> - - - - - - - - - There currently is no public API for retrieving or creating keywords other than this extension point. - - - - - - - - - Keywords are used only with preference and property pages. See the <samp>keywordReference</samp> element of the org.blueberry.ui.propertyPages and org.blueberry.ui.preferencePages extension points. - - - - - - - - - Copyright (c) 2005,2006 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made -available under the terms of the Eclipse Public License v1.0 which accompanies -this distribution, and is available at <a -href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/menus.exsd b/Plugins/org.blueberry.ui.qt/schema/menus.exsd deleted file mode 100644 index ecae8da9b0..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/menus.exsd +++ /dev/null @@ -1,646 +0,0 @@ - - - - - - - - -<p> -This extension point allows the plug-in developer to add (contribute) a variety of custom additions to the BlueBerry framework: -<ul> - <li>Main Menu</li> - <li>Main Toolbars</li> - <li>View Menus/Toolbars: - <ul> - <li>View Dropdown Menu</li> - <li>View Toolbar</li> - <li>Context Menu(s)</li> - </ul> - </li> - <li>Trim</li> -</ul> -</p> -<p> -The general strategy for this mechanism is to separate the 'location' where the contributions should be inserted from the visibility and enablement state of the element. Each contribution first defines its insertion location through a Menu 'URI', a string (loosely) formatted according to the jave.net.URI format: -</p><p> -<b>"[Scheme]:[ID]?[ArgList]"</b> -<ul> -<li><b>Scheme</b> - The 'type' of the UI component into which the contributions will be added. It may be either "menu", "popup" or "toolbar". While 'popup' is indeed a form of menu it is provided to allow a distinction between a view's 'chevron' menu (for which we use the "menu" scheme) and its default context menu which, by convention, should be registered using the "popup" scheme.</li> -<li><b>ID</b> - This is the id of menu or toolbar into which the contributions should be added. By convention views should use their view id as the id of the root of their chevron and default popup menu. Note that there is no explicit distinction between contributions supporting editors and 'normal' contributions into the Menu Menu or Toolbar; both global contributions and editor contributions would use the "org.blueberry.ui.main.menu" id or "org.blueberry.ui.main.toolbar". A special id used with popup:, "org.blueberry.ui.popup.any", is reserved to handle contributions which are candidates to appear on any (top level) context menu. Note that these contributions are expected to implement a 'visibleWhen' expression sufficient to limit their visibility to appropriate menus</li> -<li><b>Query</b> - This field allows fine-grained definition of the specific location <i>within</i> a given menu. It has the form "[placement]=[id]" where placement is one of "before", "after", or "endof" and the id is expected to be the id of some IContributionItem in the menu.</li> -</ul> -<p> -This will define the location at which the contributions will appear in the BlueBerry UI. Once the insertion point has been defined the rest of the contributions describe the UI elements that will be added at that location. Each element supports a 'visibleWhen' expression that determines at run time whether a particular item should appear in the menu based on the system's current state (selection, active view/editor, context...). See <code>berry::ISources</code> for a list of currently -supported variables. -</p> - - - - - - - - - - - - - - - - - - - - - org.blueberry.ui.menus - - - - - - - An optional identifier of the extension instance. - - - - - - - An optional name of the extension instance. - - - - - - - - - - - - - A class element supporting the executable extension parsing syntax for both <code>widget</code> and <code>dynamic</code> elements. - - - - - - - - - - The class to load as an <code>IExecutableExtension</code>. - - - - - - - - - - - - - A core Expression that controls the visibility of the given element. - - - - - - - - - - - - - - - - - - - - - - If this attribute is set to <code>true</code>, then there should be no sub-elements. This just checks the enabled state of the command, and makes the corresponding element visible if the command is enabled. - - - - - - - - - - A parameter to either an executable extension or a command -- depending on where it appears in the extension. - - - - - - - The name is either the name of the parameter to pass to the executable extension, or the identifier of the parameter for the command. - - - - - - - - - - The value to pass for this parameter. - - - - - - - - - - <p>Defines an ordered set of additions to the command UI structure. The defined elements will be added into the command UI structure at the location specified by the <code>locationURI</code> element. -</p><p> -This should be the starting point for <i>all</i> contributions into menus, toolbars or trim, wherever they occur in the UI. -</p> - - - - - - - - - - - - - - - A <code>URI</code> specification that defines the insertion point at which the contained additions will be added. - -The format for the URI is comprised of three basic parts: - -Scheme: One of "menu", "popup" or "toolbar. Indicates the type of the manager used to handle the contributions -Id: This is either the id of an existing menu, a view id or the id of the editor 'type' -Query: The query format is &lt;placement&gt;=&lt;id&gt; where: - &lt;placement&gt; is either "before", "after", or "endof" and - &lt;id&gt; is the id of an existing menu item. The placement modifier is executed when this contribution is processed. Following contributions may change the final shape of the menu when they are processed. - - - - - - - If this optional attribute is specified the provided class will be instantiated and used to provide menu contributions at this location. If provided, all child elements will be ignored. - - - - - - - - - - By default popup contributions are not contributed to context menus that do not include an <b>additions</b> marker. - - - - - - - - - - Defines a new menu contribution at the given insertion point. - - - - - - - - - - - - - - - - The label to be displayed for this element when it is placed in either a menu or a toolbar. This value should be translatable. - - - - - - - - - - The 'id' of this menu contribution. If defined then it can be extended through other 'menuAddition' elements or the id can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element. - - - - - - - The character of the Label that should be given the mnemonic affordance. This is to allow the menu system to re-define the value during translation without having to understand the various platforms' conventions for menu label definition (i.e. using the '&amp;' character...). - - - - - - - - - - A plugin relative path to the image to be used as the icon for this menu in either a menu or a toolbar. - - - - - - - - - - The tooltip to be displayed for this element when it is placed in a toolbar. This value should be translatable. - - - - - - - - - - Th commandId is used to update the submenu text with a keyboard shortcut. The command should have a handler that can launch a quickmenu version of this menu. - - - - - - - - - - - - - Defines a new Command Contribution at the defined insertion point. - - - - - - - - - - - The label to be displayed for this element when it is placed in either a menu. This value should be translatable. - - - - - - - - - - This is the id of the Command that is to be bound to this element. This is the hook into the Commands/Handlers/Key binding services that actually do the work should this item be selected. In many cases this command will have been defined in a previous extension declaration. - - - - - - - - - - The 'id' of this contribution. If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element. - - - - - - - The character of the Label that should be given the mnemonic affordance. This is to allow the menu system to re-define the value during translation without having to understand the various platforms' conventions for menu label definition (i.e. using the '&amp;' character...). - - - - - - - - - - a relative path of an icon used to visually represent the action in its context. -If omitted and the action appears in the toolbar, the Workbench will use a placeholder icon. The path is relative to the location of the plugin.xml file of the contributing plug-in, or the <code>ISharedImages</code> constant. - - - - - - - - - - a relative path of an icon used to visually represent the action in its context when the action is disabled. If omitted, the normal icon will simply appear greyed out. The path is relative to the location of the plugin.xml file of the contributing plug-in. The disabled icon will appear in toolbars but not in menus. Icons for disabled actions in menus will be supplied by the OS. - - - - - - - - - - a relative path of an icon used to visually represent the action in its context when the mouse pointer is over the action. If omitted, the normal icon will be used. The path is relative to the location of the plugin.xml file of the contributing plug-in. - - - - - - - - - - The tooltip to be displayed for this element when it is placed in a toolbar. This value should be translatable. - - - - - - - - - - a unique identifier indicating the help context for this action. If the action appears as a menu item, then pressing F1 while the menu item is highlighted will display help. This overrides the help context id provided by the active handler or command. - - - - - - - an attribute to define the user interface style type for the action. If omitted, then it is <samp>push</samp> by default. The attribute value will be one of the following: - <table border="0" width="80%"> - <tr> - <td valign="top" width="25"></td> - <td valign="top" nowrap><b>push</b></td> - <td valign="top">- as a regular menu item or tool item.</td> - </tr> - <tr> - <td valign="top" width="25"></td> - <td valign="top" nowrap><b>radio</b></td> - <td valign="top">- as a radio style menu item or tool item. Actions with the radio style within the same menu or toolbar group behave as a radio set. The initial value is specified by the <samp>state</samp> attribute.</td> - </tr> - <tr> - <td valign="top" width="25"></td> - <td valign="top" nowrap><b>toggle</b></td> - <td valign="top">- as a checked style menu item or as a toggle tool item. The initial value is specified by the <samp>state</samp> attribute.</td> - </tr> - <tr> - <td valign="top" width="25"></td> - <td valign="top" nowrap><b>pulldown</b></td> - <td valign="top">- (ToolBar only) Creates a ToolItem with the <code>SWT.DROP_DOWN</code> affordance. The URI of the menu is "menu:" + this item's ID.</td> - </tr> - </table> - - - - - - - - - - - - - - - - - - - For commands appearing in a toolbar, <code>FORCE_TEXT</code> will show text even if there is an icon. See CommandContributionItem. - - - - - - - - - - - - - - - - Inserts a separator at the current insertion point. - - - - - - - The 'id' of this contribution. If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element (or at the end of the logical group containing this element using the 'endof' value). -<p> -Separator contributions that have an id define the start of a logical group so the result of using the 'endof' value for placement is to search forward in the current menu to locate the next separator and to place the inserted elements before that element. If no trailing separator is found then the items are placed at the end of the menu. -</p> - - - - - - - Indicates whether or not the separator should be visible in the UI. <code>false</code> by default. - - - - - - - - - - Contributes a new ToolBar at the current insertion point. This element is only currently valid for CoolBarManagers, which can contain toolbars. For example, the trim location URIs specified in <code>org.blueberry.ui.menus.MenuUtil</code>. - - - - - - - - - - - - - - - - The 'id' of this toolbar contribution. If defined then it can be extended through other 'menuAddition' elements or the id can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element. - - - - - - - The label to be displayed for this element when it is displayed in the customize perspective dialog. This value should be translatable. - - - - - - - - - - - - - Used to contribute controls to ToolBars in the workbench. The 'class' attribute must be a derivative of the -WorkbenchWindowControlContribution base class. -<p> -<b>NOTE:</b> Due to platform restrictions control contributions are only supported for toolbars; Attempts to contribute controls into a menu or popup will be treated as a NO-OP. -</p> - - - - - - - - - - The 'id' of this menu contribution. If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element. - - - - - - - The class which will be used to create the control that is to be hosted in a ToolBar. This must be a subclass of -WorkbenchWindowControlContribution which provides information as to the control's location (i.e. which workbench window it's being hosted in and the side of the window that it is currently being displayed on. - - - - - - - - - - - - - The element provides a mechanism that will call back into the defined class to provide an IContributionItem to be shown when the menu or toolbar is built. The defined class must be a derivative of the org.blueberry.jface.action.ContributionItem base class. It can also use org.blueberry.ui.action.CompoundContributionItem and provide an implementation for the abstract <code>getContributionItems</code> method to provide a dynamic menu item. - - - - - - - - - - - A unique identifier for this contribution. It is recommended that the identifier be prefixed by the plug-in name, to guarantee uniqueness. For example, a widget contributed by <code>org.blueberry.ui</code> might be called <code>org.blueberry.ui.widget1</code>. -<p> -If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element (or at the end of the logical group containing this element using the 'endof' value). -</p> - - - - - - - This class is expected to be a subclass of ContributionItem. The item may implement IWorkbenchContribution to be provided an IServiceLocator. - - - - - - - - - - - - - - - <p> -It is preferred that menu contributions be added in the <code>plugin.xml</code>. Plugins can -programmatically add their own menu contributions using <code>org.blueberry.ui.menus.IMenuService</code> and <code>org.blueberry.ui.menus.AbstractContributionFactory</code>, but should be sure to remove them if the plugin is unloaded. The <code>IMenuService</code> can be retrieved through any of the <code>IServiceLocators</code>, the workbench, the workbench window, or the part site. -</p> -<p> -See <a href="org_blueberry_ui_commands.html">org.blueberry.ui.commands</a> to define a command and <a href="org_blueberry_ui_handlers.html">org.blueberry.ui.handlers</a> to define an implementation for the command. -</p> -<p>To register a context menu, use the <code>IWorkbenchPartSite.registerContextMenu</code> methods.</p> - - - - - - - - - 3.3 - - - - - - - - - <p> -A basic extension looks like this. -</p> -<pre> - <extension - id="add.item" - point="org.blueberry.ui.menus"> - <menuContribution - locationURI="menu:someorg.somemenu.id?after=additions"> - <command - commandId="someorg.someid.someCommand" - icon="icons/anything.gif" - id="someorg.someid.BasicCmdItem" - label="Simple Item" - mnemonic="S"> - </command> - </menuContribution> - </extension> -</pre> -<p> -This is the simplest example; adding a command contribution after an existing menu's additions group. -</p> - - - - - - - - - - Copyright (c) 2005,2007 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made -available under the terms of the Eclipse Public License v1.0 which accompanies -this distribution, and is available at <a -href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/perspectiveExtensions.exsd b/Plugins/org.blueberry.ui.qt/schema/perspectiveExtensions.exsd deleted file mode 100644 index d908729c13..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/perspectiveExtensions.exsd +++ /dev/null @@ -1,373 +0,0 @@ - - - - - - - - - This extension point is used to extend perspectives -registered by other plug-ins. A perspective defines -the initial contents of the window action bars -(menu and toolbar) and the initial set of views -and their layout within a workbench page. -Other plug-ins may contribute actions or views to -the perspective which appear when the perspective -is selected. Optional additions by other plug-ins -are appended to the initial definition. - - - - - - - - - - - - - - - - - a fully qualified identifier of the target extension point - - - - - - - an optional identifier of the extension instance - - - - - - - an optional name of the extension instance - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - the unique identifier of the perspective (as specified in the registry) into which the contribution is made. If the value is set to "*" the extension is applied to all perspectives. - - - - - - - - - - - - - - - - - - - - - the unique identifier of the action set which will be added to the perspective. - - - - - - - - - - - - - - - the unique identifier of the view which will be added to the perspective's "Show View" submenu of the "Window" menu. - - - - - - - - - - - - - - - the unique identifier of the perspective which will be added to the perspective's "Open Perspective" submenu of the "Window" menu. - - - - - - - - - - - - - - - the unique identifier of the new wizard which will be added to the perspective's "New" submenu of the "File" menu. - - - - - - - - - - - - - - - the unique identifier of the view which will be added to the perspective's "Show In..." prompter in the Navigate menu. - - - - - - - - - - - - - - - the unique identifier of the view which will be added to the perspective layout. - - - - - - - - - - the unique identifier of a view which already exists in the perspective. This will be used as a reference point for placement of the view. The relationship between these two views is defined by <samp>relationship</samp>. Ignored if relationship is "fast". - - - - - - - - - - - - - - - - specifies the relationship between <samp>id</samp> and -<samp>relative</samp>. -The following values are supported: -<ul> -<b>fast</b> - the view extension will be created as a fast view. -<br><b>stack</b> - the view extension will be stacked with the relative -view in a folder. -<br><b>left, right, top, bottom</b> - the view extension will be placed -beside the relative view. In this case a <samp>ratio</samp> must also -be defined.</ul> - - - - - - - - - - - - - - - - - - - - - - - the percentage of area within the relative view which will be donated to the view extension. If the view extension is a fast view, the ratio is the percentage of the workbench the fast view will cover when active. This must be defined as a floating point value and lie between 0.05 and 0.95. - - - - - - - whether the view is initially visible when the perspective is opened. This attribute should have a value of "true" or "false" if used. -If this attribute is not used, the view will be initially visible by default. - - - - - - - whether the view is closeable in the target perspective. This attribute should have a value of "true" or "false" if used. If this attribute is not used, the view will be closeable, unless the perspective itself is marked as fixed. - - - - - - - whether the view is moveable. A non-moveable view cannot be moved either within the same folder, or moved between folders in the perspective. This attribute should have a value of "true" or "false" if used. -If this attribute is not used, the view will be moveable, unless the perspective itself is marked as fixed. - - - - - - - whether the view is a standalone view. A standalone view cannot be docked together with others in the same folder. This attribute should have a value of "true" or "false" if used. This attribute is ignored if the relationship attribute is "fast" or "stacked". If this attribute is not used, the view will be a regular view, not a standalone view (default is "false"). - - - - - - - whether the view's title is shown. This attribute should have a value of "true" or "false" if used. This attribute only applies to standalone views. If this attribute is not used, the view's title will be shown (default is "true"). - - - - - - - If the perspective extension will result in a new view stack being created (i.e. the 'relationship' attribute is one of left, right, top or bottom) this field determines the new stack's initial display state. - - - - - - - - - - - - The unique identifier of the Command which is to be removed from the menu. - -<strong>WARNING:</strong> This is considered to be a 'Product level' extension and should not be used in consumable plugins without great care. - - - - - - - - - - - - The unique identifier of the Command which is to be removed from thetoolbar. - -<strong>WARNING:</strong> This is considered to be a 'Product level' extension and should not be used in consumable plugins without great care. - - - - - - - - - - - - The following is an example of a perspective extension (note the subelements and the way attributes are used): -<p> -<pre> - <extension point="org.blueberry.ui.perspectiveExtensions"> - <perspectiveExtension - targetID="org.blueberry.ui.resourcePerspective"> - <actionSet id="org.xyz.MyActionSet"/> - <viewShortcut id="org.xyz.views.PackageExplorer"/> - <newWizardShortcut id="org.xyz.wizards.NewProjectCreationWizard"/> - <perspectiveShortcut id="org.xyz.MyPerspective"/> - <view id="org.xyz.views.PackageExplorer" - relative="org.blueberry.ui.views.ResourceNavigator" - relationship="stack"/> - <view id="org.xyz.views.TypeHierarchy" - relative="org.blueberry.ui.views.ResourceNavigator" - relationship="left" - ratio="0.50"/> - </perspectiveExtension> - </extension> -</pre> -</p> -<p> -In the example above, an action set, view shortcut, -new wizard shortcut, and perspective shortcut are -contributed to the initial contents of the -Resource Perspective. In addition, the -Package Explorer view is stacked on the -Resource Navigator and the Type Hierarchy View is -added beside the Resource Navigator. -</p> - - - - - - - - - The items defined within the perspective extension are contributed to the initial contents of the target perspective. Following this, the user may remove any contribution or add others to a perspective from within the workbench user interface. - - - - - - - - - - - Copyright (c) 2002, 2007 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made -available under the terms of the Eclipse Public License v1.0 which accompanies -this distribution, and is available at <a -href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/perspectives.exsd b/Plugins/org.blueberry.ui.qt/schema/perspectives.exsd deleted file mode 100755 index 8e355d8ed3..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/perspectives.exsd +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - - This extension point is used to add perspective factories to the workbench. A perspective factory is used to define the initial layout and visible action sets for a perspective. The user can select a perspective by invoking the "Open Perspective" submenu of the "Window" menu. - - - - - - - - - - - - a fully qualified identifier of the target extension point - - - - - - - an optional identifier of the extension instance - - - - - - - an optional name of the extension instance - - - - - - - - - - - - - - - - - - - - - - - - a unique name that will be used to identify this perspective. - - - - - - - a translatable name that will be used in the workbench window menu bar to represent this perspective. - - - - - - - - - - a fully qualified name of the class that implements -<samp>berry::IPerspectiveFactory</samp> interface. - - - - - - - - - - a relative name of the icon that will be associated -with this perspective. - - - - - - - - - - indicates whether the layout of the perspective is fixed. If true, then views created by the perspective factory are not closeable, and cannot be moved. The default is false. - - - - - - - - - - - - - an optional subelement whose body should contain text providing a short description of the perspective. - - - - - - - - - - The following is an example of a perspective extension: -<p> -<pre> - <extension - point="org.blueberry.ui.perspectives"> - <perspective - id="org.blueberry.ui.resourcePerspective" - name="Resource" - class="berry::ResourcePerspective" - icon="resources/MyIcon.gif"> - </perspective> - </extension> -</pre> -</p> - - - - - - - - - The value of the <samp>class</samp> attribute must be the -fully qualified name of a class that implements -<samp>berry::IPerspectiveFactory</samp>. -The class must supply the initial layout for a -perspective when asked by the workbench. -<p> -The <samp>plugin_customization.ini</samp> file is used to define the default perspective. The <i>default perspective</i> is the first perspective which appears when the product is launched after install. It is also used when the user opens a page or window with no specified perspective. The default perspective is defined as a property within the plugin_customization.ini, as shown below. The user may also override this perspective from the workbench perspectives preference page. -<pre> - defaultPerspectiveId = org.blueberry.ui.resourcePerspective -</pre> -The perspectives which appear in the "Open Perspective" menu are shortcuts for perspective selection. This set is defined by the active perspective itself, and extensions made through the perspectiveExtensions extension point. - - - - - - - - - The workbench provides a "Resource Perspective". -Additional perspectives may be added by plug-ins. -They are selected using the "Open Perspective" submenu of the "Window" menu. - - - - - - - - - Copyright (c) 2002, 2005 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made -available under the terms of the Eclipse Public License v1.0 which accompanies -this distribution, and is available at <a -href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/preferencePages.exsd b/Plugins/org.blueberry.ui.qt/schema/preferencePages.exsd deleted file mode 100644 index 0869da9db8..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/preferencePages.exsd +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - The workbench provides one common dialog box for preferences. -The purpose of this extension point is to allow plug-ins to add -pages to the preference dialog box. When preference dialog box -is opened (initiated from the menu bar), pages contributed in -this way will be added to the dialog box. - -<p> -The preference dialog -box provides for hierarchical grouping of the pages. For this -reason, a page can optionally specify a <samp>category</samp> attribute. -This -attribute represents a path composed of parent page IDs separated -by '/'. If this attribute is omitted or if any of the parent -nodes in the path cannot be found, the page will be added at -the root level. -</p> - - - - - - - - - - - - a fully qualified identifier of the target extension point - - - - - - - an optional identifier of the extension instance - - - - - - - an optional name of the extension instance - - - - - - - - - - - - - - - - - - - - - - - a unique name that will be used to identify this page. - - - - - - - a translatable name that will be used in the UI for this page. - - - - - - - - - - a name of the fully qualified class that implements -<samp>berry::IWorkbenchPreferencePage</samp>. - - - - - - - - - - a path indicating the location of the page in the preference tree. The path may either be a parent node ID or a sequence - of IDs separated by '/', representing the full path from the root node. - - - - - - - - - - - - - A reference by a preference page to a keyword. See the keywords extension point. - - - - - - - The id of the keyword being referred to. - - - - - - - - - - - - - - - The following is an example for the preference extension point: -<p> -<pre> - <extension - point="org.blueberry.ui.preferencePages"> - <page - id="com.xyz.prefpage1" - name="XYZ" - class="xyz::PrefPage1"> - <keywordReference id="xyz.Keyword"/> - </page> - <page - id="com.xyz.prefpage2" - name="Keyboard Settings" - class="xyz::PrefPage2" - category="com.xyz.prefpage1"> - </page> - </extension> -</pre> -</p> - - - - - - - - - The value of the attribute class must represent a fully qualified name of the class that implements -<samp>berry::IWorkbenchPreferencePage</samp>. - - - - - - - - - - - The workbench adds several pages for setting the preferences of the platform. Pages registered -through this extension will be added after them according to their category information. - - - - - - - - - Copyright (c) 2002, 2005 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made -available under the terms of the Eclipse Public License v1.0 which accompanies -this distribution, and is available at <a -href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/presentationFactories.exsd b/Plugins/org.blueberry.ui.qt/schema/presentationFactories.exsd deleted file mode 100755 index e7dcb6d72f..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/presentationFactories.exsd +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - This extension point is used to add presentation factories to the workbench. - A presentation factory defines the overall look and feel of the workbench, - including how views and editors are presented. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Specify the fully qualified class to be used for the presentation factory. The specified value must implement the interface <code>berry::IPresentationFactory</code>. - - - - - - - - - - a unique name that will be used to identify this presentation factory - - - - - - - a translatable name that can be used to show this presentation factory in the UI - - - - - - - - - - - - - - - The following is an example of a presentationFactory extension: -<pre> - <extension point="org.blueberry.ui.presentationFactories"> - <factory - class="berry::ExampleWorkbenchPresentationFactory"/> - </extension> - </pre> - - - - - - - - - The class specified in the factory element must be a concrete subclass of <code>org.eclipse.ui.presentations.AbstractPresentationFactory</code>. - - - - - - - - - If a presentation factory is not specified or is missing then the implementation in <code>berry::QtWorkbenchPresentationFactory</code> will be used. - - - - - - - - - Copyright (c) 2004, 2005 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made -available under the terms of the Eclipse Public License v1.0 which accompanies -this distribution, and is available at <a -href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/services.exsd b/Plugins/org.blueberry.ui.qt/schema/services.exsd deleted file mode 100755 index b07d5c4c07..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/services.exsd +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - Define service factories so that services can be contributed declaratively and will be available through <code>berry::IServiceLocator::GetService(Class)</code>. The implementation of <code>AbstractServiceFactory</code> must be able to return a global service and multiple child services (if applicable). -<p> -Services must follow a general contract: -<ul> -<li>The top level service has no parent.</li> -<li>The child service may use the supplied parent, which can be cast to the service interface.</li> -<li>Any other services needed for initialization should be retrieved from the <code>berry::IServiceLocator</code>.</li> -<li>If the service needs to clean up any state (like listeners) it should implement <code>berry::IDisposable</code>.</li> -<li>Services should clearly specify when they perform cleanup for clients, such as removing listeners automatically on disposal.</li> -</ul> -</p> - - - - - - - Contribute services to the workbench. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Match a service interface to a factory that can supply a hierachical implementation of that service. - - - - - - - - - - The factory that extends <code>AbstractServiceFactory</code> and can create the implementation for the serviceClass. - - - - - - - - - - - - - A service this factory can provide. - - - - - - - The interface that represents a service contract. - - - - - - - - - - - - - A Source Provider supplies source variables to the IEvaluationService. It can also notify the IEvaluationService when one or more of the variables change. - - - - - - - - - - This class must provide variables and call the appropriate fireSourceChanged(*) method when any of the variables change. - - - - - - - - - - - - - A source variable from this provider. A source provider must declare all variables that it provides. - - - - - - - The name of a contributed source variable. It is a good practice to prepend the plugin id to the variable name to avoid collisions with other source providers. - - - - - - - For conflict resolution used by services like the IHandlerService, contributed source variables must assign a priority. <b>workbench</b> is the global default priority. See <code>ISources</code> for relative priority information. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <p> -Here is a basic definition: -<pre> - <extension - point="org.blueberry.ui.services"> - <serviceFactory - factoryClass="my::LevelServiceFactory"> - <service - serviceClass="my::ILevelService"> - </service> - </serviceFactory> - </extension> -</pre></p> -<p> -The <code>LevelServiceFactory</code> can return an <code>ILevelService</code> when it is requested from the <code>IServiceLocator</code>: -<pre> - berry::ILevelService::Pointer s = GetSite()->GetService(my::ILevelService::GetStaticClassName()); - std::cout << s->GetLevel(); -</pre> -</p> -<p> -In this test example, the factory would instantiate three <code>ILevelService</code> implementations during the first call to <code>GetSite()->GetService(*)</code>. The global one in the workbench, one for the workbench window, and one for the site. -</p> - - - - - - - - - <p> -Please see <code>org.eclipse.ui.services.AbstractServiceFactory</code>, <code>org.eclipse.ui.services.IDisposable</code>, and <code>org.eclipse.ui.services.IServiceWithSources</code> for more information. -</p> - - - - - - - - - - - Copyright (c) 2007 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made -available under the terms of the Eclipse Public License v1.0 which accompanies -this distribution, and is available at <a -href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/tweaklets.exsd b/Plugins/org.blueberry.ui.qt/schema/tweaklets.exsd deleted file mode 100755 index 6d4f0a67d4..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/tweaklets.exsd +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - This extension point is used to define tweaklets. A tweaklet is anything that can be used to tweak the look and feel of the Workbench. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - a unique name that will be used to identify this tweaklet - - - - - - - a translatable name that will be used in the UI for this tweaklet - - - - - - - - - - a translatable short description of this tweaklet, to be used in the UI - - - - - - - - - - an identifier of the tweaklet definition in the workbench, typically a fully qualified type name without colons - - - - - - - an identifier of the tweaklet implementation provided by the extender, typically a fully qualified class name - - - - - - - - - - - - - The following is an example tweaklet: -<p> -<pre> - <extension point="org.blueberry.ui.tweaklets"> - <tweaklet - id="org.blueberry.ui.tweaklets.ConcreteXYZTweaklet" - name="XYZ Tweaklet" - description="Short description of the tweak" - definition="berryAbstractXYZTweaklet" - implementation="berry::ConcreteXYZTweaklet"/> - </extension> -</pre> -</p> - - - - - - - - - Typically, although not required, the value of the <samp>definition</samp> attribute is the -fully qualified name without colons of an abstract class defined by the -workbench, and the value of the <samp>implementation</samp> attribute is the -fully qualified name of a non-abstract class provided by the extending plug-in. - - - - - - - - - Tweaklets are usually used to specialize the workbench for a specific GUI toolkit. - - - - - diff --git a/Plugins/org.blueberry.ui.qt/schema/views.exsd b/Plugins/org.blueberry.ui.qt/schema/views.exsd deleted file mode 100755 index 3ebdced734..0000000000 --- a/Plugins/org.blueberry.ui.qt/schema/views.exsd +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - - - This extension point is used to define additional views -for the workbench. A view is a visual component -within a workbench page. It is typically used to -navigate a hierarchy of information (like the workspace), -open an editor, or display properties for -the active editor. The user can make a view -visible from the Window > Show View menu or close it from the -view local title bar. -<p> -In order to reduce the visual clutter in the Show View Dialog, views should be grouped using categories. - - - - - - - - - - - - - - - - - - - a fully qualified identifier of the target extension point - - - - - - - an optional identifier of the extension instance - - - - - - - an optional name of the extension instance - - - - - - - - - - - - - - - a unique name that will be used to identify this category - - - - - - - a translatable name that will be used in the UI for this category - - - - - - - - - - an optional path composed of category IDs separated by '/'. This -allows the creation of a hierarchy of categories. - - - - - - - - - - - - - - - - - - - a unique name that will be used to identify this view - - - - - - - a translatable name that will be used in the UI for this view - - - - - - - - - - an optional attribute that is composed of the category IDs separated -by '/'. Each referenced category must be declared in a corresponding category element. - - - - - - - - - - a fully qualified name of the class that implements -<samp>berry::IViewPart</samp>. A common practice -is to subclass <samp>berry::ViewPart</samp> or <samp>berry::QtViewPart</samp> -in order to inherit the default functionality. - - - - - - - - - - a relative name of the icon that will -be associated with the view. - - - - - - - - - - the percentage of the width of the workbench that the view will take up as an active fast view. -This must be defined as a floating point value and lie between 0.05 and 0.95. -If no value is supplied, a default ratio will be used. - - - - - - - flag indicating whether this view allows multiple instances to be created using IWorkbenchPage::ShowView(QString id, QString secondaryId). The default is false. - - - - - - - flag indicating whether this view allows to be restored upon workbench restart. If set to false, the view will not be open after a workbench restart. The default is true. - - - - - - - - - - - - - an optional subelement whose body should contain text providing a short description of the view. - - - - - - - - A sticky view is a view that will appear by default across all perspectives in a window once it is opened. Its initial placement is governemed by the location attribute, but nothing prevents it from being moved or closed by the user. Use of this element will only cause a placeholder for the view to be created, it will not show the view. Please note that usage of this element should be done with great care and should only be applied to views that truely have a need to live across perspectives. - - - - - - - the id of the view to be made sticky. - - - - - - - - - - optional attribute that specifies the location of the sticky view relative to the editor area. If absent, the view will be docked to the right of the editor area. - - - - - - - - - - - - - - - - - - - optional attribute that specifies wether the view should be closeable. If absent it will be closeable. - - - - - - - optional attribute that specifies wether the view should be moveable. If absent it will be moveable. - - - - - - - - - - - - The following is an example of the extension point: -<p> -<pre> - <extension point="org.blueberry.ui.views"> - <category - id="com.xyz.views.XYZviews" - name="XYZ"/> - <view - id="com.xyz.views.XYZView" - name="XYZ View" - category="com.xyz.views.XYZviews" - class="ns::XYZView" - icon="icons/XYZ.gif"/> - </extension> -</pre> -</p> -The following is an example of a sticky view declaration: -<p> -<pre> - <extension point="org.blueberry.ui.views"> - <stickyView - id="com.xyz.views.XYZView" /> - </extension> -</pre> -</p> - - - - - - - - - The value of the <samp>class</samp> attribute must be a -fully qualified name of the class that implements -<samp>berry::IViewPart</samp>. It is common -practice to subclass <samp>berry::ViewPart</samp> -or <samp>berry::QtViewPart<samp> when developing a new view. - - - - - - - - - - The BlueBerry Platform provides a number of standard views. From the user point of view, these views are no different from any other view provided by the plug-ins. All the views can be shown from the "Show View" submenu of the "Window" menu. The position of a view is persistent: it is saved when the view is closed and restored when the view is reopened in a single session. The position is also persisted between workbench sessions. - - - - - - - - - Copyright (c) 2002, 2005 IBM Corporation and others.<br> -All rights reserved. This program and the accompanying materials are made -available under the terms of the Eclipse Public License v1.0 which accompanies -this distribution, and is available at <a -href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> - - - - diff --git a/Plugins/org.mitk.core.ext/plugin.xml b/Plugins/org.mitk.core.ext/plugin.xml index 6b6ceeb06f..8e95e4d3c5 100644 --- a/Plugins/org.mitk.core.ext/plugin.xml +++ b/Plugins/org.mitk.core.ext/plugin.xml @@ -1,4 +1,3 @@ - diff --git a/Plugins/org.mitk.core.ext/schema/inputdevice.exsd b/Plugins/org.mitk.core.ext/schema/inputdevice.exsd deleted file mode 100644 index 6fc8bb6533..0000000000 --- a/Plugins/org.mitk.core.ext/schema/inputdevice.exsd +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - This extension point is used to define additional input devices. - - - - - - - - - - - - - - - - - a fully qualified identifier of the target extension point - - - - - - - an optional identifier of the extension instance - - - - - - - an optional name of the extension instance - - - - - - - - - - - - - - - - - - - - - - - the identifier of the input device - - - - - - - an optional name of the input device - - - - - - - - - - a fully qualified name of the class that implements -<samp>mitk::IInputDevice</samp>. - - - - - - - - - - - - - - - - an optional subelement whose body should contain text providing a short description of the input device. - - - - - - - - - - The following is an example of the extension point: -<p> -<pre> - <extension point="org.mitk.core.ext.inputdevices"> - <inputdevice - id="com.xyz.inputdevice.XYZDevice" - name="XYZ Device" - class="ns::XYZDevice" > - <description>My new 20-dimensional input device</description> - </inputdevice> - </extension> -</pre> -</p> - - - - - - - - - The value of the <samp>class</samp> attribute must be a -fully qualified name of the class that implements -<samp>mitk::IInputDevice</samp>. - - - - - - - - - - The MITK Platform can handle multiple distinct input devices by... - - - - - - - - - Copyright (c) German Cancer Research Center (DKFZ)<br> -All rights reserved. - - - - diff --git a/Plugins/org.mitk.gui.qt.datamanager/plugin.xml b/Plugins/org.mitk.gui.qt.datamanager/plugin.xml index 43c6e710de..703cfb91f8 100644 --- a/Plugins/org.mitk.gui.qt.datamanager/plugin.xml +++ b/Plugins/org.mitk.gui.qt.datamanager/plugin.xml @@ -1,29 +1,26 @@ - - -