diff --git a/codeblocks/configure.ac b/codeblocks/configure.ac index c0217bd4..dcf5fea6 100644 --- a/codeblocks/configure.ac +++ b/codeblocks/configure.ac @@ -542,6 +542,27 @@ AC_CONFIG_FILES([Makefile src/plugins/contrib/EditorTweaks/Makefile src/plugins/contrib/envvars/Makefile src/plugins/contrib/FileManager/Makefile + src/plugins/contrib/FortranProject/Makefile + src/plugins/contrib/FortranProject/images/Makefile + src/plugins/contrib/FortranProject/images/16x16/Makefile + src/plugins/contrib/FortranProject/images/20x20/Makefile + src/plugins/contrib/FortranProject/images/24x24/Makefile + src/plugins/contrib/FortranProject/images/28x28/Makefile + src/plugins/contrib/FortranProject/images/32x32/Makefile + src/plugins/contrib/FortranProject/images/40x40/Makefile + src/plugins/contrib/FortranProject/images/48x48/Makefile + src/plugins/contrib/FortranProject/images/56x56/Makefile + src/plugins/contrib/FortranProject/images/64x64/Makefile + src/plugins/contrib/FortranProject/images/fortranproject/16x16/Makefile + src/plugins/contrib/FortranProject/images/fortranproject/20x20/Makefile + src/plugins/contrib/FortranProject/images/fortranproject/24x24/Makefile + src/plugins/contrib/FortranProject/images/fortranproject/28x28/Makefile + src/plugins/contrib/FortranProject/images/fortranproject/32x32/Makefile + src/plugins/contrib/FortranProject/images/fortranproject/40x40/Makefile + src/plugins/contrib/FortranProject/images/fortranproject/48x48/Makefile + src/plugins/contrib/FortranProject/images/fortranproject/56x56/Makefile + src/plugins/contrib/FortranProject/images/fortranproject/64x64/Makefile + src/plugins/contrib/FortranProject/images/fortranproject/Makefile src/plugins/contrib/headerfixup/Makefile src/plugins/contrib/help_plugin/Makefile src/plugins/contrib/help_plugin/bzip2/Makefile diff --git a/codeblocks/m4/acinclude.m4 b/codeblocks/m4/acinclude.m4 index ee877b1f..af90475e 100644 --- a/codeblocks/m4/acinclude.m4 +++ b/codeblocks/m4/acinclude.m4 @@ -345,6 +345,7 @@ AC_DEFUN([BUILD_CONTRIB_NONE], [ AM_CONDITIONAL([BUILD_EDITORTWEAKS], [false]) AM_CONDITIONAL([BUILD_ENVVARS], [false]) AM_CONDITIONAL([BUILD_FILEMANAGER], [false]) + AM_CONDITIONAL([BUILD_FORTRANPROJECT], [false]) AM_CONDITIONAL([BUILD_HEADERFIXUP], [false]) AM_CONDITIONAL([BUILD_HELP], [false]) AM_CONDITIONAL([BUILD_KEYBINDER], [false]) @@ -388,6 +389,7 @@ AC_DEFUN([BUILD_CONTRIB_ALL], [ AM_CONDITIONAL([BUILD_EDITORTWEAKS], [true]) AM_CONDITIONAL([BUILD_ENVVARS], [true]) AM_CONDITIONAL([BUILD_FILEMANAGER], [true]) + AM_CONDITIONAL([BUILD_FORTRANPROJECT], [true]) AM_CONDITIONAL([BUILD_HEADERFIXUP], [true]) AM_CONDITIONAL([BUILD_HELP], [true]) AM_CONDITIONAL([BUILD_KEYBINDER], [true]) @@ -429,7 +431,7 @@ AC_ARG_WITH(contrib-plugins, [ compiles none of the contrib-plugins ] [ Plugin names are: AutoVersioning, BrowseTracker, byogames, Cccc, CppCheck, cbkoders, codesnippets, ] [ codestat, copystrings, Cscope, DoxyBlocks, dragscroll, EditorConfig, EditorTweaks, envvars, exporter, ] - [ FileManager, headerfixup, help, hexeditor, incsearch, keybinder, libfinder, MouseSap, ] + [ FileManager, FortranProject, headerfixup, help, hexeditor, incsearch, keybinder, libfinder, MouseSap, ] [ NassiShneiderman, ProjectOptionsManipulator, profiler, regex, ReopenEditor, rndgen, smartindent, spellchecker, ] [ symtab, ThreadSearch, ToolsPlus, Valgrind, wxcontrib, wxsmith, wxsmithcontrib, wxsmithaui ], plugins="$withval", plugins="none") @@ -483,6 +485,9 @@ do FileManager) AM_CONDITIONAL([BUILD_FILEMANAGER], [true]) ;; + FortranProject) + AM_CONDITIONAL([BUILD_FORTRANPROJECT], [true]) + ;; headerfixup) AM_CONDITIONAL([BUILD_HEADERFIXUP], [true]) ;; @@ -603,6 +608,9 @@ do -FileManager) AM_CONDITIONAL([BUILD_FILEMANAGER], [false]) ;; + -FortranProject) + AM_CONDITIONAL([BUILD_FORTRANPROJECT], [false]) + ;; -headerfixup) AM_CONDITIONAL([BUILD_HEADERFIXUP], [false]) ;; @@ -708,6 +716,7 @@ AC_SUBST(BUILD_EDITORCONFIG) AC_SUBST(BUILD_EDITORTWEAKS) AC_SUBST(BUILD_ENVVARS) AC_SUBST(BUILD_FILEMANAGER) +AC_SUBST(BUILD_FORTRANPROJECT) AC_SUBST(BUILD_HEADERFIXUP) AC_SUBST(BUILD_HELP) AC_SUBST(BUILD_HEXEDITOR) diff --git a/codeblocks/src/plugins/contrib/FortranProject/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/Makefile.am new file mode 100644 index 00000000..9c1833b8 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/Makefile.am @@ -0,0 +1,147 @@ +SUBDIRS = images + +ACLOCAL_AMFLAGS = --install -I m4 + +AM_CPPFLAGS = $(WX_CXXFLAGS) \ + -I$(top_srcdir)/src/include \ + -I$(top_srcdir)/src/sdk/wxscintilla/include + +cb_plugin_datadir = $(datarootdir)/@PACKAGE@/ +cb_plugin_libdir = $(pkglibdir)/plugins/ + +cb_plugin_lib_LTLIBRARIES = libFortranProject.la + +libFortranProject_la_LDFLAGS = -shared -no-undefined -avoid-version + +libFortranProject_la_LIBADD = ../../../sdk/libcodeblocks.la \ + $(WX_LIBS) \ + $(CB_TINYXML_LIBS) + +libFortranProject_la_SOURCES = adddirparserthread.cpp \ + autoinsert.cpp \ + bindto.cpp \ + bindtonewtype.cpp \ + bufferparserthread.cpp \ + calledbydict.cpp \ + calltree.cpp \ + calltreeview.cpp \ + ccsmartfilter.cpp \ + changecase.cpp \ + constrhighlighter.cpp \ + docblock.cpp \ + farrays.cpp \ + fconstruct.cpp \ + finfowindow.cpp \ + formatindent.cpp \ + formatindentdlg.cpp \ + fortranfileext.cpp \ + fortranproject.cpp \ + fpimagelist.cpp \ + fpoptionsdlg.cpp \ + fpoptionsprjdlg.cpp \ + includedb.cpp \ + indentestimator.cpp \ + jumptracker.cpp \ + keywordsparserf.cpp \ + lineaddress.cpp \ + makefiledlg.cpp \ + makefilegen.cpp \ + moduletokenf.cpp \ + nativeparserf.cpp \ + parserf.cpp \ + parserthreadf.cpp \ + projectdependencies.cpp \ + tab2space.cpp \ + textcutter.cpp \ + tokenf.cpp \ + tokenizerf.cpp \ + usetokenf.cpp \ + workspacebrowserbuilder.cpp \ + workspacebrowserf.cpp \ + workspaceparserthread.cpp + +noinst_HEADERS = adddirparserthread.h \ + autoinsert.h \ + bindto.h \ + bindtonewtype.h \ + bufferparserthread.h \ + calledbydict.h \ + calltree.h \ + calltreeview.h \ + ccsmartfilter.h \ + changecase.h \ + constrhighlighter.h \ + docblock.h \ + farrays.h \ + fconstruct.h \ + finfowindow.h \ + formatindent.h \ + formatindentdlg.h \ + fortranfileext.h \ + fortranproject.h \ + fpimagelist.h \ + fpoptionsdlg.h \ + fpoptionsprjdlg.h \ + includedb.h \ + indentestimator.h \ + jumptracker.h \ + keywordsparserf.h \ + lineaddress.h \ + makefiledlg.h \ + makefilegen.h \ + moduletokenf.h \ + nativeparserf.h \ + parserf.h \ + parserthreadf.h \ + projectdependencies.h \ + tab2space.h \ + textcutter.h \ + tokenf.h \ + tokenizerf.h \ + usetokenf.h \ + workspacebrowserbuilder.h \ + workspacebrowserf.h \ + workspaceparserthread.h + +EXTRA_DIST = $(srcdir)/*.cbp \ + wxsmith/Bindto.wxs \ + wxsmith/BindNewType.wxs \ + wxsmith/FormatIndentDlg.wxs \ + wxsmith/MakefileDlg.wxs \ + manifest.xml \ + resources/calltreeview.xrc \ + resources/changecase.xrc \ + resources/fortranprojecttoolbar.xrc \ + resources/project_settings_fortran.xrc \ + resources/settings.xrc \ + resources/tab2space.xrc \ + resources/workspacebrowserf.xrc \ + update* \ + images/16x16/*.png \ + images/20x20/*.png \ + images/24x24/*.png \ + images/28x28/*.png \ + images/32x32/*.png \ + images/40x40/*.png \ + images/48x48/*.png \ + images/56x56/*.png \ + images/64x64/*.png \ + images/fortranproject/*.py \ + images/fortranproject/*.f90 \ + images/fortranproject/16x16/*.png \ + images/fortranproject/20x20/*.png \ + images/fortranproject/24x24*.png \ + images/fortranproject/28x28/*.png \ + images/fortranproject/32x32/*.png \ + images/fortranproject/40x40/*.png \ + images/fortranproject/48x48/*.png \ + images/fortranproject/56x56/*.png \ + images/fortranproject/64x64/*.png + +cb_plugin_data_DATA = FortranProject.zip + +CLEANFILES = $(cb_plugin_data_DATA) + +FortranProject.zip: manifest.xml + PWD=`pwd` cd $(srcdir) && zip -j9 $(PWD)/FortranProject.zip manifest.xml resources/*.xrc > /dev/null + PWD=`pwd` cd $(srcdir) && zip -R9 $(PWD)/FortranProject.zip images/16x16/*.png images/20x20/*.png images/24x24/*.png images/28x28/*.png images/32x32/*.png images/40x40/*.png images/48x48/*.png images/56x56/*.png images/64x64/*.png images/fortranproject/*.f90 images/fortranproject/16x16/*.png images/fortranproject/20x20/*.png images/fortranproject/24x24/*.png images/fortranproject/28x28/*.png images/fortranproject/32x32/*.png images/fortranproject/40x40/*.png images/fortranproject/48x48/*.png images/fortranproject/56x56/*.png images/fortranproject/64x64/*.png > /dev/null diff --git a/codeblocks/src/plugins/contrib/FortranProject/ax_cxx_compile_stdcxx.m4 b/codeblocks/src/plugins/contrib/FortranProject/ax_cxx_compile_stdcxx.m4 new file mode 100644 index 00000000..079e17d2 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/ax_cxx_compile_stdcxx.m4 @@ -0,0 +1,558 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) +# +# DESCRIPTION +# +# Check for baseline language coverage in the compiler for the specified +# version of the C++ standard. If necessary, add switches to CXXFLAGS to +# enable support. VERSION may be '11' (for the C++11 standard) or '14' +# (for the C++14 standard). +# +# The second argument, if specified, indicates whether you insist on an +# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. +# -std=c++11). If neither is specified, you get whatever works, with +# preference for an extended mode. +# +# The third argument, if specified 'mandatory' or if left unspecified, +# indicates that baseline support for the specified C++ standard is +# required and that the macro should error out if no mode with that +# support is found. If specified 'optional', then configuration proceeds +# regardless, after defining HAVE_CXX${VERSION} if and only if a +# supporting mode is found. +# +# LICENSE +# +# Copyright (c) 2008 Benjamin Kosnik +# Copyright (c) 2012 Zack Weinberg +# Copyright (c) 2013 Roy Stogner +# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov +# Copyright (c) 2015 Paul Norman +# Copyright (c) 2015 Moritz Klammler +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 1 + +dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro +dnl (serial version number 13). + +AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl + m4_if([$1], [11], [], + [$1], [14], [], + [$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])], + [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl + m4_if([$2], [], [], + [$2], [ext], [], + [$2], [noext], [], + [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl + m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], + [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], + [$3], [optional], [ax_cxx_compile_cxx$1_required=false], + [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) + AC_LANG_PUSH([C++])dnl + ac_success=no + AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, + ax_cv_cxx_compile_cxx$1, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [ax_cv_cxx_compile_cxx$1=yes], + [ax_cv_cxx_compile_cxx$1=no])]) + if test x$ax_cv_cxx_compile_cxx$1 = xyes; then + ac_success=yes + fi + + m4_if([$2], [noext], [], [dnl + if test x$ac_success = xno; then + for switch in -std=gnu++$1 -std=gnu++0x; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXXFLAGS="$ac_save_CXXFLAGS"]) + if eval test x\$$cachevar = xyes; then + CXXFLAGS="$CXXFLAGS $switch" + ac_success=yes + break + fi + done + fi]) + + m4_if([$2], [ext], [], [dnl + if test x$ac_success = xno; then + dnl HP's aCC needs +std=c++11 according to: + dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf + dnl Cray's crayCC needs "-h std=c++11" + for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXXFLAGS="$ac_save_CXXFLAGS"]) + if eval test x\$$cachevar = xyes; then + CXXFLAGS="$CXXFLAGS $switch" + ac_success=yes + break + fi + done + fi]) + AC_LANG_POP([C++]) + if test x$ax_cxx_compile_cxx$1_required = xtrue; then + if test x$ac_success = xno; then + AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.]) + fi + else + if test x$ac_success = xno; then + HAVE_CXX$1=0 + AC_MSG_NOTICE([No compiler with C++$1 support was found]) + else + HAVE_CXX$1=1 + AC_DEFINE(HAVE_CXX$1,1, + [define if the compiler supports basic C++$1 syntax]) + fi + + AC_SUBST(HAVE_CXX$1) + fi +]) + + +dnl Test body for checking C++11 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 +) + + +dnl Test body for checking C++14 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 +) + + +dnl Tests for new features in C++11 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ + +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201103L + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + } + + namespace test_final_override + { + + struct Base + { + virtual void f() {} + }; + + struct Derived : public Base + { + virtual void f() override {} + }; + + } + + namespace test_double_right_angle_brackets + { + + template < typename T > + struct check {}; + + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; + + } + + namespace test_decltype + { + + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } + + } + + namespace test_type_deduction + { + + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + + template < typename T > + struct is_same + { + static const bool value = true; + }; + + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + +]]) + + +dnl Tests for new features in C++14 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ + +// If the compiler admits that it is not ready for C++14, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201402L + +#error "This is not a C++14 compiler" + +#else + +namespace cxx14 +{ + + namespace test_polymorphic_lambdas + { + + int + test() + { + const auto lambda = [](auto&&... args){ + const auto istiny = [](auto x){ + return (sizeof(x) == 1UL) ? 1 : 0; + }; + const int aretiny[] = { istiny(args)... }; + return aretiny[0]; + }; + return lambda(1, 1L, 1.0f, '1'); + } + + } + + namespace test_binary_literals + { + + constexpr auto ivii = 0b0000000000101010; + static_assert(ivii == 42, "wrong value"); + + } + + namespace test_generalized_constexpr + { + + template < typename CharT > + constexpr unsigned long + strlen_c(const CharT *const s) noexcept + { + auto length = 0UL; + for (auto p = s; *p; ++p) + ++length; + return length; + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("x") == 1UL, ""); + static_assert(strlen_c("test") == 4UL, ""); + static_assert(strlen_c("another\0test") == 7UL, ""); + + } + + namespace test_lambda_init_capture + { + + int + test() + { + auto x = 0; + const auto lambda1 = [a = x](int b){ return a + b; }; + const auto lambda2 = [a = lambda1(x)](){ return a; }; + return lambda2(); + } + + } + + namespace test_digit_seperators + { + + constexpr auto ten_million = 100'000'000; + static_assert(ten_million == 100000000, ""); + + } + + namespace test_return_type_deduction + { + + auto f(int& x) { return x; } + decltype(auto) g(int& x) { return x; } + + template < typename T1, typename T2 > + struct is_same + { + static constexpr auto value = false; + }; + + template < typename T > + struct is_same + { + static constexpr auto value = true; + }; + + int + test() + { + auto x = 0; + static_assert(is_same::value, ""); + static_assert(is_same::value, ""); + return x; + } + + } + +} // namespace cxx14 + +#endif // __cplusplus >= 201402L + +]]) diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/16x16/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/16x16/Makefile.am new file mode 100644 index 00000000..9e0c9caf --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/16x16/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/16x16 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/20x20/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/20x20/Makefile.am new file mode 100644 index 00000000..063190c5 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/20x20/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/20x20 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/24x24/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/24x24/Makefile.am new file mode 100644 index 00000000..8121a1a3 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/24x24/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/24x24 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/28x28/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/28x28/Makefile.am new file mode 100644 index 00000000..f50a5a57 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/28x28/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/28x28 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/32x32/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/32x32/Makefile.am new file mode 100644 index 00000000..d56b5cad --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/32x32/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/32x32 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/40x40/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/40x40/Makefile.am new file mode 100644 index 00000000..954d2383 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/40x40/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/40x40 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/48x48/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/48x48/Makefile.am new file mode 100644 index 00000000..c597ab05 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/48x48/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/48x48 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/56x56/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/56x56/Makefile.am new file mode 100644 index 00000000..27048f3b --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/56x56/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/56x56 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/64x64/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/64x64/Makefile.am new file mode 100644 index 00000000..6a7f465f --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/64x64/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/64x64 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/Makefile.am new file mode 100644 index 00000000..aa70cb39 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/Makefile.am @@ -0,0 +1,4 @@ +SUBDIRS = 16x16 20x20 24x24 28x28 32x32 40x40 48x48 56x56 64x64 fortranproject + +pkgdatadir = $(datarootdir)/@PACKAGE@/images + diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/16x16/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/16x16/Makefile.am new file mode 100644 index 00000000..4953d911 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/16x16/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/fortranproject/16x16 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/20x20/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/20x20/Makefile.am new file mode 100644 index 00000000..323c74e7 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/20x20/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/fortranproject/20x20 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/24x24/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/24x24/Makefile.am new file mode 100644 index 00000000..c033e793 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/24x24/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/fortranproject/24x24 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/28x28/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/28x28/Makefile.am new file mode 100644 index 00000000..1f6d7231 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/28x28/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/fortranproject/28x28 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/32x32/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/32x32/Makefile.am new file mode 100644 index 00000000..57534348 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/32x32/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/fortranproject/32x32 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/40x40/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/40x40/Makefile.am new file mode 100644 index 00000000..7cde716c --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/40x40/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/fortranproject/40x40 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/48x48/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/48x48/Makefile.am new file mode 100644 index 00000000..f2beeeed --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/48x48/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/fortranproject/48x48 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/56x56/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/56x56/Makefile.am new file mode 100644 index 00000000..f58246e0 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/56x56/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/fortranproject/56x56 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/64x64/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/64x64/Makefile.am new file mode 100644 index 00000000..0cc582a6 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/64x64/Makefile.am @@ -0,0 +1,3 @@ +pkgdatadir = $(datarootdir)/@PACKAGE@/images/fortranproject/64x64 + +dist_pkgdata_DATA = $(srcdir)/*.png diff --git a/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/Makefile.am b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/Makefile.am new file mode 100644 index 00000000..4ccd3fd3 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/images/fortranproject/Makefile.am @@ -0,0 +1,5 @@ +SUBDIRS = 16x16 20x20 24x24 28x28 32x32 40x40 48x48 56x56 64x64 + +pkgdatadir = $(datarootdir)/@PACKAGE@/images/fortranproject + +dist_pkgdata_DATA = $(srcdir)/*.f90 $(srcdir)/*.py $(srcdir)/*.dem diff --git a/codeblocks/src/plugins/contrib/FortranProject/nativeparserf.cpp b/codeblocks/src/plugins/contrib/FortranProject/nativeparserf.cpp index 1e9f5a62..3e8bad74 100644 --- a/codeblocks/src/plugins/contrib/FortranProject/nativeparserf.cpp +++ b/codeblocks/src/plugins/contrib/FortranProject/nativeparserf.cpp @@ -420,13 +420,59 @@ void NativeParserF::OnEditorClose(EditorBase* editor) void NativeParserF::UpdateWorkspaceFilesDependency() { ClearWSDependency(); + UpdateWSFilesDependency(); +} + +void NativeParserF::UpdateWSFilesDependency() +{ ProjectsArray* projects = Manager::Get()->GetProjectManager()->GetProjects(); + ProjectFilesArray pfs; for (size_t i = 0; i < projects->GetCount(); ++i) { cbProject* proj = projects->Item(i); - if (!proj->IsMakefileCustom()) - UpdateProjectFilesDependency(proj); + if (proj->IsMakefileCustom()) continue; + + proj->SaveAllFiles(); + + FilesList& flist = proj->GetFilesList(); + for (FilesList::iterator it = flist.begin(); it != flist.end(); ++it) + { + ProjectFile* pf = *it; + if (IsFileFortran(pf->relativeFilename)) + { + pfs.push_back(pf); + } + } + } + + wxString name = _T("### WorkspaceAllFortranFiles ###"); + WSDependencyMap::iterator pos; + pos = m_WSDependency.find(name); + if (pos == m_WSDependency.end()) + { + pos = m_WSDependency.insert(std::make_pair(name,new ProjectDependencies())).first; + } + if (pfs.size() > 0) + { + ProjectDependencies* projDep = pos->second; + projDep->MakeProjectFilesDependencies(pfs, m_Parser); + projDep->EnsureUpToDateObjs(); + + for (size_t i=0; ifile.GetFullPath(); + unsigned short int wt = projDep->GetFileWeight(fn2); + pfs[i]->weight = wt; + } + if (projDep->HasInfiniteDependences()) + { + wxString msg = _T("Warning. FortranProject plugin:\n"); + msg << _T(" 'It seems you have a circular dependency in Fortran files. Check your USE or INCLUDE statements.'"); + Manager::Get()->GetLogManager()->Log(msg); + cbMessageBox(_("It seems you have a circular dependency in Fortran files. Check your USE or INCLUDE statements."), + _("Warning")); + } } } @@ -435,7 +481,8 @@ void NativeParserF::UpdateProjectFilesDependency(cbProject* project) project->SaveAllFiles(); ProjectFilesArray pfs; - for (FilesList::iterator it = project->GetFilesList().begin(); it != project->GetFilesList().end(); ++it) + FilesList& flist = project->GetFilesList(); + for (FilesList::iterator it = flist.begin(); it != flist.end(); ++it) { ProjectFile* pf = *it; if (IsFileFortran(pf->relativeFilename)) @@ -449,20 +496,21 @@ void NativeParserF::UpdateProjectFilesDependency(cbProject* project) pos = m_WSDependency.find(fn); if (pos == m_WSDependency.end()) { - pos = m_WSDependency.insert(std::make_pair(fn,new ProjectDependencies(project))).first; + pos = m_WSDependency.insert(std::make_pair(fn,new ProjectDependencies())).first; } if (pfs.size() > 0) { - pos->second->MakeProjectFilesDependencies(pfs, m_Parser); - pos->second->EnsureUpToDateObjs(); + ProjectDependencies* projDep = pos->second; + projDep->MakeProjectFilesDependencies(pfs, m_Parser); + projDep->EnsureUpToDateObjs(); for (size_t i=0; ifile.GetFullPath(); - unsigned short int wt = pos->second->GetFileWeight(fn2); + unsigned short int wt = projDep->GetFileWeight(fn2); pfs[i]->weight = wt; } - if (pos->second->HasInfiniteDependences()) + if (projDep->HasInfiniteDependences()) { wxString msg = _T("Warning. FortranProject plugin:\n"); msg << _T(" 'It seems you have a circular dependency in Fortran files. Check your USE or INCLUDE statements.'"); diff --git a/codeblocks/src/plugins/contrib/FortranProject/nativeparserf.h b/codeblocks/src/plugins/contrib/FortranProject/nativeparserf.h index 2f9719d3..aea6266b 100644 --- a/codeblocks/src/plugins/contrib/FortranProject/nativeparserf.h +++ b/codeblocks/src/plugins/contrib/FortranProject/nativeparserf.h @@ -91,6 +91,7 @@ class NativeParserF : public wxEvtHandler void OnEditorClose(EditorBase* editor); void OnProjectActivated(cbProject* project); void UpdateWorkspaceFilesDependency(); + void UpdateWSFilesDependency(); void ClearWSDependency(); void RemoveProjectFilesDependency(cbProject* project); diff --git a/codeblocks/src/plugins/contrib/FortranProject/projectdependencies.cpp b/codeblocks/src/plugins/contrib/FortranProject/projectdependencies.cpp index 44e1d027..c6c58878 100644 --- a/codeblocks/src/plugins/contrib/FortranProject/projectdependencies.cpp +++ b/codeblocks/src/plugins/contrib/FortranProject/projectdependencies.cpp @@ -24,10 +24,10 @@ #include "nativeparserf.h" -ProjectDependencies::ProjectDependencies(cbProject* project) +ProjectDependencies::ProjectDependencies() { - m_Project = project; //ctor + m_WasInfiniteLoop = false; } ProjectDependencies::~ProjectDependencies() @@ -198,6 +198,7 @@ unsigned short int ProjectDependencies::GetFileWeightByIndex(size_t idx) { return 0; } + cbProject* project = m_prFilesArr[idx]->GetParentProject(); unsigned short int wt; unsigned short int wt_max = 0; StringSet* fileUseModules = m_pUseModules[idx]; @@ -213,6 +214,9 @@ unsigned short int ProjectDependencies::GetFileWeightByIndex(size_t idx) size_t fidx = m_ModuleFileIdxMap[*pos]; if (fidx == idx) continue; // module defined and is used in the same file. + cbProject* project2 = m_prFilesArr[fidx]->GetParentProject(); + if (project != project2) + continue; // files are from different projects. File weight is limited to the same project. m_Deep++; wt = 1 + GetFileWeightByIndex(fidx); m_Deep--; @@ -421,7 +425,8 @@ void ProjectDependencies::EnsureUpToDateObjs() const wxArrayString& btarr = pf->GetBuildTargets(); if (btarr.IsEmpty()) continue; - ProjectBuildTarget* bTarget = m_Project->GetBuildTarget(btarr[0]); + cbProject* curProject = pf->GetParentProject(); + ProjectBuildTarget* bTarget = curProject->GetBuildTarget(btarr[0]); const pfDetails& pfd = pf->GetFileDetails(bTarget); time_t time_src = wxFileModificationTime(pfd.source_file_absolute_native); @@ -430,12 +435,12 @@ void ProjectDependencies::EnsureUpToDateObjs() for (pos=children->begin(); pos != children->end(); ++pos) { ProjectFile* pfChild = m_prFilesArr[*pos]; - + cbProject* childProject = pfChild->GetParentProject(); const wxArrayString& btChild_arr = pfChild->GetBuildTargets(); size_t nChTag = btChild_arr.size(); for (size_t iCh=0; iCh < nChTag; ++iCh) { - ProjectBuildTarget* bTargetChild = m_Project->GetBuildTarget(btChild_arr[iCh]); + ProjectBuildTarget* bTargetChild = childProject->GetBuildTarget(btChild_arr[iCh]); Compiler* compilerChild = CompilerFactory::GetCompiler(bTargetChild->GetCompilerID()); if(!compilerChild) continue; @@ -514,15 +519,34 @@ void ProjectDependencies::RemoveModFiles(cbProject* pr, ProjectBuildTarget* bTar void ProjectDependencies::RemoveModFilesWS(NativeParserF* nativeParser) { - //Remove all *.mod files in Workspace + //Remove all *.mod and *.smod files in Workspace + cbProject* activeProject = Manager::Get()->GetProjectManager()->GetActiveProject(); + if (!activeProject) + return; + wxString activeTargetName = activeProject->GetActiveBuildTarget(); ProjectsArray* projects = Manager::Get()->GetProjectManager()->GetProjects(); for (size_t i = 0; i < projects->GetCount(); ++i) { cbProject* pr = projects->Item(i); if (!pr->IsMakefileCustom()) { - ProjectBuildTarget* bTarget = pr->GetBuildTarget(pr->GetActiveBuildTarget()); - RemoveModFiles(pr, bTarget, nativeParser); + ProjectBuildTarget* bTarget = pr->GetBuildTarget(activeTargetName); + if (!bTarget) + { + const wxArrayString virtTagGroup = pr->GetVirtualBuildTargetGroup(activeTargetName); + for (size_t j = 0; j < virtTagGroup.GetCount(); ++j) + { + bTarget = pr->GetBuildTarget(virtTagGroup[j]); + if (bTarget) + { + RemoveModFiles(pr, bTarget, nativeParser); + } + } + } + else + { + RemoveModFiles(pr, bTarget, nativeParser); + } } } } diff --git a/codeblocks/src/plugins/contrib/FortranProject/projectdependencies.h b/codeblocks/src/plugins/contrib/FortranProject/projectdependencies.h index 0cf4de40..44a46f33 100644 --- a/codeblocks/src/plugins/contrib/FortranProject/projectdependencies.h +++ b/codeblocks/src/plugins/contrib/FortranProject/projectdependencies.h @@ -34,7 +34,7 @@ class NativeParserF; class ProjectDependencies { public: - ProjectDependencies(cbProject* project); + ProjectDependencies(); virtual ~ProjectDependencies(); void Clear(); void MakeProjectFilesDependencies(ProjectFilesArray& prFilesArr, ParserF& parser); @@ -53,7 +53,6 @@ class ProjectDependencies unsigned short int GetFileWeightByIndex(size_t idx); void MakeFileChildren(IntSet* children, size_t fileIndex); - cbProject* m_Project; ProjectFilesArray m_prFilesArr; StringSetPVector m_pUseModules; StringSetPVector m_pDeclaredModules; diff --git a/codeblocks/src/plugins/contrib/FortranProject/wxsmith/Bindto.wxs b/codeblocks/src/plugins/contrib/FortranProject/wxsmith/Bindto.wxs new file mode 100644 index 00000000..6c71dbad --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/wxsmith/Bindto.wxs @@ -0,0 +1,514 @@ + + + + Bind To + 0 + + + wxVERTICAL + + + + + + + + wxVERTICAL + + + + + wxALL|wxALIGN_LEFT + 5 + + + + + + wxTOP|wxLEFT|wxRIGHT|wxALIGN_LEFT + 5 + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + 30,0 + + + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + wxALL|wxALIGN_LEFT + 5 + + + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + + Write how the names called from C code will be constructed. Variables "$procname$", "$modulename$" and "$modname$" will be changed procedure, module and truncated module names corespondingly. + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + + wxEXPAND + 5 + + + + + + wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_LEFT + 5 + + + + + + wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_LEFT + 5 + + + + wxVERTICAL + + + + + + wxLEFT|wxALIGN_CENTER_HORIZONTAL + 5 + + + + + + wxALIGN_CENTER_VERTICAL + 5 + 30,0 + + + + + + wxLEFT|wxRIGHT|wxALIGN_CENTER_VERTICAL + 5 + + + + myprocedures.f90 + + wxLEFT|wxRIGHT|wxEXPAND + 5 + + + + wxEXPAND + 5 + + + + wxTOP|wxBOTTOM|wxALIGN_LEFT + 5 + + + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + + Text + + wxALIGN_CENTER_VERTICAL + 5 + + + + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + wxALL|wxEXPAND + + + + + + + + 314,298 + + wxVERTICAL + + + wxVERTICAL + + + + + wxTOP|wxLEFT|wxRIGHT|wxALIGN_LEFT + 5 + + + + 500,300 + + + wxTOP|wxBOTTOM|wxEXPAND + 5 + + + + + + + + Add a new type + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + + + Copy selected type to a new one + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + + + Edit selected type + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + + + Remove selected type + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + wxALIGN_CENTER_VERTICAL + 5 + + + + + + Restore default binding types + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + wxALL|wxEXPAND + 5 + + + wxTOP|wxBOTTOM|wxEXPAND + 5 + + + + + + + + + + wxVERTICAL + + + + + wxALL|wxALIGN_LEFT + 5 + + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + 30,0 + + + + 2 + 2 + 2 + 1 + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + + + + + Text + + wxALL|wxALIGN_CENTER_VERTICAL + + + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + + + + + Text + + wxALL|wxALIGN_CENTER_VERTICAL + + + + wxALL|wxALIGN_CENTER_VERTICAL + + + + wxALL|wxALIGN_CENTER_VERTICAL + + + + wxALL|wxALIGN_LEFT + + + + + + + + + wxVERTICAL + + + + + wxALL|wxALIGN_LEFT + 5 + + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + 30,0 + + + + 2 + 2 + 2 + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + + + + + Text + + wxALL|wxALIGN_CENTER_VERTICAL + + + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + + + + + Text + + wxALL|wxALIGN_CENTER_VERTICAL + + + + wxALL|wxALIGN_CENTER_VERTICAL + + + wxALL|wxALIGN_CENTER_VERTICAL + + + wxALL|wxALIGN_LEFT + + + + + + wxTOP|wxLEFT|wxRIGHT|wxALIGN_LEFT + 5 + + + + + + wxALL|wxALIGN_LEFT + + + + + + + + + wxVERTICAL + + + + + wxALL|wxALIGN_LEFT + 5 + + + + + + + wxALL|wxALIGN_LEFT + 5 + + + + + wxVERTICAL + + + + + + + wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL + 5 + + + + Text + + wxALIGN_CENTER_VERTICAL + 5 + + + + wxALL|wxEXPAND + 5 + + + + + + wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_LEFT + 5 + + + + + + wxALL|wxALIGN_LEFT + 5 + + + + + + wxALL|wxALIGN_LEFT + 5 + + + + wxEXPAND + 5 + + + + + + + + wxALL|wxEXPAND + 5 + + + + wxEXPAND + 5 + + + + + + + + + + + + + + + + wxALL|wxALIGN_CENTER_HORIZONTAL + 5 + + + + diff --git a/codeblocks/src/plugins/contrib/FortranProject/wxsmith/BindtoNewType.wxs b/codeblocks/src/plugins/contrib/FortranProject/wxsmith/BindtoNewType.wxs new file mode 100644 index 00000000..0f5888f1 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/wxsmith/BindtoNewType.wxs @@ -0,0 +1,83 @@ + + + + Add New Type + 400,180 + 200,100 + 0 + + + wxVERTICAL + + + 2 + 3 + 1 + 2 + + + + + wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL + 5 + + + + wxTOP|wxBOTTOM|wxEXPAND + 5 + + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + + wxTOP|wxBOTTOM|wxEXPAND + 5 + + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + + wxTOP|wxBOTTOM|wxEXPAND + 5 + + + + wxALL|wxEXPAND + 5 + + + wxALL|wxALIGN_CENTER_HORIZONTAL + 5 + + + + + + + + + + + + + + + + wxALL|wxALIGN_CENTER_HORIZONTAL + 5 + + + + diff --git a/codeblocks/src/plugins/contrib/FortranProject/wxsmith/FormatIndentDlg.wxs b/codeblocks/src/plugins/contrib/FortranProject/wxsmith/FormatIndentDlg.wxs new file mode 100644 index 00000000..9339a2ce --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/wxsmith/FormatIndentDlg.wxs @@ -0,0 +1,263 @@ + + + + 0 + + wxVERTICAL + + + + + + wxVERTICAL + + + wxVERTICAL + + + + + wxALL|wxALIGN_LEFT + 5 + + + + + + wxALL|wxALIGN_LEFT + 5 + + + wxTOP|wxLEFT|wxRIGHT|wxEXPAND + 5 + + + + + wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 9 + + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_LEFT + 5 + + + + + + + + + wxVERTICAL + + + + + + + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 5 + + + wxTOP|wxLEFT|wxRIGHT|wxALIGN_LEFT + 5 + + + + wxVERTICAL + + + + + wxALL|wxALIGN_LEFT + 2 + + + + + + + wxALL|wxALIGN_LEFT + 2 + + + + + + + wxALL|wxALIGN_LEFT + 2 + + + + + + + wxALL|wxALIGN_LEFT + 2 + + + + + + + wxALL|wxALIGN_LEFT + 2 + + + + + + + wxALL|wxALIGN_LEFT + 2 + + + + + + + wxALL|wxALIGN_LEFT + 2 + + + + + + + wxALL|wxALIGN_LEFT + 2 + + + + + + + wxALL|wxALIGN_LEFT + 2 + + + + + + + wxALL|wxALIGN_LEFT + 2 + + + + wxALL|wxEXPAND + 5 + + + + + + + + + + wxVERTICAL + + + + + wxALL|wxALIGN_LEFT + 5 + + + + + wxVERTICAL + + + + + + wxALL|wxALIGN_LEFT + 2 + + + + + + wxALL|wxALIGN_LEFT + 2 + + + + + + + + wxRIGHT|wxALIGN_CENTER_VERTICAL + 4 + + + + 0 + 1 + 16 + + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 2 + + + + wxALL|wxALIGN_LEFT + 2 + + + wxALL|wxALIGN_LEFT + 5 + + + + + + + wxALL|wxEXPAND + 5 + + + + + + + + + + + + + + + + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 5 + + + + diff --git a/codeblocks/src/plugins/contrib/FortranProject/wxsmith/MakefileDlg.wxs b/codeblocks/src/plugins/contrib/FortranProject/wxsmith/MakefileDlg.wxs new file mode 100644 index 00000000..6c33da58 --- /dev/null +++ b/codeblocks/src/plugins/contrib/FortranProject/wxsmith/MakefileDlg.wxs @@ -0,0 +1,78 @@ + + + + Generate Makefile + 0 + + + + wxVERTICAL + + + wxVERTICAL + + + + + + + wxALL + 5 + + + wxALL|wxEXPAND + 5 + 100,-1d + + + wxALL|wxEXPAND + 5 + + + + + + Text + -1,-1 + + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 5 + + + + + + + + + wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL + 5 + + + wxALL|wxEXPAND + + + + wxALL|wxEXPAND + 5 + + + + + + + + + + + + + + + + wxALL|wxALIGN_RIGHT + 5 + + + + diff --git a/codeblocks/src/plugins/contrib/Makefile.am b/codeblocks/src/plugins/contrib/Makefile.am index 16dba995..0dcad145 100644 --- a/codeblocks/src/plugins/contrib/Makefile.am +++ b/codeblocks/src/plugins/contrib/Makefile.am @@ -54,6 +54,10 @@ if BUILD_FILEMANAGER MAYBE_FILEMANAGER=FileManager appdata endif +if BUILD_FORTRANPROJECT +MAYBE_FORTRANPROJECT=FortranProject appdata +endif + if BUILD_HELP MAYBE_HELP=help_plugin appdata endif @@ -174,6 +178,7 @@ SUBDIRS = $(MAYBE_AUTOVERSIONING) \ $(MAYBE_EDITORTWEAKS) \ $(MAYBE_ENVVARS) \ $(MAYBE_FILEMANAGER) \ + $(MAYBE_FORTRANPROJECT) \ $(MAYBE_HEADERFIXUP) \ $(MAYBE_HELP) \ $(MAYBE_HEXEDITOR) \ @@ -217,6 +222,7 @@ DIST_SUBDIRS = appdata \ EditorTweaks \ envvars \ FileManager \ + FortranProject \ headerfixup \ help_plugin \ HexEditor \