From d9042eca0a4935dc6185523642935de8e814452e Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 24 Aug 2016 11:04:29 -0400 Subject: [PATCH] Add IDE format styles and rearrange dirs --- contrib/styles/README.md | 26 +++ contrib/{utilities => styles}/astyle.rc | 0 contrib/styles/eclipse-dealii-code-format.xml | 167 ++++++++++++++++++ .../styles/qtcreator-dealii-code-format.xml | 39 ++++ contrib/styles/qtcreator-prm-format.xml | 51 ++++++ contrib/utilities/indent | 6 +- 6 files changed, 286 insertions(+), 3 deletions(-) create mode 100644 contrib/styles/README.md rename contrib/{utilities => styles}/astyle.rc (100%) create mode 100644 contrib/styles/eclipse-dealii-code-format.xml create mode 100644 contrib/styles/qtcreator-dealii-code-format.xml create mode 100644 contrib/styles/qtcreator-prm-format.xml diff --git a/contrib/styles/README.md b/contrib/styles/README.md new file mode 100644 index 0000000000..0e0c21ac4c --- /dev/null +++ b/contrib/styles/README.md @@ -0,0 +1,26 @@ +This folder contains style files for IDEs for deal.II +============================================================== + +Astyle +------ + +astyle.rc - C++ style for astyle, see contrib/utilities/indent + + +Atom +---- + +Hosted externally at https://github.com/davydden/language-dealii-prm + + +Eclipse +------- + +eclipse-dealii-code-format.xml - Style for C++ code + + +QtCreator +--------- + +qtcreator-dealii-code-format.xml - Style for C++ code +qtcreator-prm-format.xml - Style for .prm files diff --git a/contrib/utilities/astyle.rc b/contrib/styles/astyle.rc similarity index 100% rename from contrib/utilities/astyle.rc rename to contrib/styles/astyle.rc diff --git a/contrib/styles/eclipse-dealii-code-format.xml b/contrib/styles/eclipse-dealii-code-format.xml new file mode 100644 index 0000000000..164ac9f39b --- /dev/null +++ b/contrib/styles/eclipse-dealii-code-format.xml @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/styles/qtcreator-dealii-code-format.xml b/contrib/styles/qtcreator-dealii-code-format.xml new file mode 100644 index 0000000000..64214fa52a --- /dev/null +++ b/contrib/styles/qtcreator-dealii-code-format.xml @@ -0,0 +1,39 @@ + + + + + + CodeStyleData + + false + false + false + false + false + true + true + false + true + true + true + false + true + true + false + true + false + true + false + 2 + true + true + 2 + true + 2 + + + + DisplayName + deal.II + + diff --git a/contrib/styles/qtcreator-prm-format.xml b/contrib/styles/qtcreator-prm-format.xml new file mode 100644 index 0000000000..782d011e28 --- /dev/null +++ b/contrib/styles/qtcreator-prm-format.xml @@ -0,0 +1,51 @@ + + + + + + set + include + subsection + end> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/utilities/indent b/contrib/utilities/indent index b22a3bac58..84809134e0 100755 --- a/contrib/utilities/indent +++ b/contrib/utilities/indent @@ -19,8 +19,8 @@ if test ! -d source -o ! -d include -o ! -d examples ; then exit 1 fi -if test ! -f contrib/utilities/astyle.rc ; then - echo "*** No style file contrib/utilities/astyle.rc found." +if test ! -f contrib/styles/astyle.rc ; then + echo "*** No style file contrib/styles/astyle.rc found." exit 1 fi @@ -42,7 +42,7 @@ fi # collect all header and source files and process them in batches of 50 files # with up to 10 in parallel -find tests include source examples \( -name '*.cc' -o -name '*.h' \) -print | xargs -n 50 -P 10 astyle --options=contrib/utilities/astyle.rc +find tests include source examples \( -name '*.cc' -o -name '*.h' \) -print | xargs -n 50 -P 10 astyle --options=contrib/styles/astyle.rc # format .inst.in files. We need to replace \{ and \} because it confuses # astyle. -- 2.39.5