diff options
author | Leena Miettinen <riitta-leena.miettinen@digia.com> | 2014-03-05 13:35:19 +0100 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-03-05 15:32:20 +0100 |
commit | 9bf9f165bae3d6d301e66309890bf2f84ba747b0 (patch) | |
tree | 56a7e16bd697ec71f12cb6fe3c6e47422ea16693 /doc | |
parent | dbb172da795f3c6f81f9622d6713ba9615fdf0db (diff) | |
download | qt-creator-9bf9f165bae3d6d301e66309890bf2f84ba747b0.tar.gz |
Doc: add docs for the Beautifier plugin
Change-Id: I0af00a27ff8b070669578a1c5158882b2e610e24
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/images/beautifier_editor.png | bin | 0 -> 8179 bytes | |||
-rw-r--r-- | doc/images/beautifier_options.png | bin | 0 -> 42752 bytes | |||
-rwxr-xr-x | doc/src/editors/creator-beautifier.qdoc | 99 | ||||
-rw-r--r-- | doc/src/editors/creator-coding.qdoc | 6 | ||||
-rw-r--r-- | doc/src/editors/creator-editors-options.qdoc | 2 | ||||
-rw-r--r-- | doc/src/editors/creator-editors.qdoc | 2 | ||||
-rw-r--r-- | doc/src/qtcreator.qdoc | 1 |
7 files changed, 108 insertions, 2 deletions
diff --git a/doc/images/beautifier_editor.png b/doc/images/beautifier_editor.png Binary files differnew file mode 100755 index 0000000000..52dce630f9 --- /dev/null +++ b/doc/images/beautifier_editor.png diff --git a/doc/images/beautifier_options.png b/doc/images/beautifier_options.png Binary files differnew file mode 100644 index 0000000000..4c91dcc337 --- /dev/null +++ b/doc/images/beautifier_options.png diff --git a/doc/src/editors/creator-beautifier.qdoc b/doc/src/editors/creator-beautifier.qdoc new file mode 100755 index 0000000000..7181381c38 --- /dev/null +++ b/doc/src/editors/creator-beautifier.qdoc @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (c) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator +** +** +** GNU Free Documentation License +** +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of this +** file. +** +** +****************************************************************************/ + +// ********************************************************************** +// NOTE: the sections are not ordered by their logical order to avoid +// reshuffling the file each time the index order changes (i.e., often). +// Run the fixnavi.pl script to adjust the links to the index order. +// ********************************************************************** + +/*! + \contentspage index.html + \previouspage creator-editor-refactoring.html + \page creator-beautifier.html + \nextpage creator-editor-options.html + + \title Beautifying Source Code + + You can use the experimental Beautifier plugin to format your source code + by using the following external tools: + + \list + + \li \l{http://astyle.sourceforge.net}{Artistic Style} + + \li \l{http://clang.llvm.org/docs/ClangFormat.html}{ClangFormat} + + \li \l{http://uncrustify.sourceforge.net}{Uncrustify} + + \endlist + + The Beautifier plugin parses the source code into component structures, such + as assignment statements, if blocks, loops, and so on, and formats them as + specified in the Beautifier options. You can use a predefined style or + define your own style. + + To use the Beautifier plugin: + + \list 1 + + \li Download and install the tool to use for formatting source code. + + \li Select \gui Help > \gui {About Plugins} > \gui {C++} > + \gui Beautifier to enable the plugin. + + \li Restart \QC to be able to use the plugin. + + \li Select \gui Tools > \gui Options > \gui Beautifier to specify + settings for the tool you want to use. The options you have depend + on the tool. + + \li Select \gui Tools > \gui Beautifier > \gui {Artistic Style}, + \gui ClangFormat or \gui Uncrustify > \gui {Format Current File} + to format the currently open file. + + You can \l{Keyboard Shortcuts}{create keyboard shortcuts} for the + functions. + + \endlist + + \section1 Specifying Styles + + Select \gui Tools > \gui Options > \gui Beautifier to set the configuration + file that defines the style to use in the source files. + + \image beautifier_options.png + + Select the \gui {Use file defined in project file} option to use the + configuration file defined in the qmake OTHER_FILES variable as the + configuration file for the selected tool. For example, \c{uncrustify.cfg}. + + Select the \gui {Use $HOME} option to use the specified file in the user's + home directory as the configuration file for the selected tool. For example, + \c{.uncrustify.cgf} or \c{uncrustify.cgf}. + + Select the \gui {Use self-defined Style} option, and then \gui Add to define + your own style. The \gui {Edit Configuration} dialog provides syntax + highlighting, auto-completion, and context-sensitive help. + + \image beautifier_editor.png + + By default, ClangFormat formats only the selected text. To format the entire + file when no text is selected, select the + \gui {Format entire file if no text was selected} check box. +*/ diff --git a/doc/src/editors/creator-coding.qdoc b/doc/src/editors/creator-coding.qdoc index 38ae2ec906..f5cb4224a9 100644 --- a/doc/src/editors/creator-coding.qdoc +++ b/doc/src/editors/creator-coding.qdoc @@ -55,6 +55,12 @@ can easily find and rename symbols and apply predefined actions to refactor code. + \li \l{Beautifying Source Code} + + Beautifying code means applying indentation and style to source + code files. You can use the Artistic Style, ClangFormat, or + Uncrustify tool to format source files. + \li \l{Configuring the Editor} You can change the fonts, colors, highlighting, and indentation. diff --git a/doc/src/editors/creator-editors-options.qdoc b/doc/src/editors/creator-editors-options.qdoc index 5f4efba958..ae08313a77 100644 --- a/doc/src/editors/creator-editors-options.qdoc +++ b/doc/src/editors/creator-editors-options.qdoc @@ -24,7 +24,7 @@ /*! \contentspage index.html - \previouspage creator-editor-refactoring.html + \previouspage creator-beautifier.html \page creator-editor-options.html \nextpage creator-editor-options-text.html diff --git a/doc/src/editors/creator-editors.qdoc b/doc/src/editors/creator-editors.qdoc index bb5a8a5100..da5a4e94af 100644 --- a/doc/src/editors/creator-editors.qdoc +++ b/doc/src/editors/creator-editors.qdoc @@ -1430,7 +1430,7 @@ \contentspage index.html \previouspage creator-editor-locator.html \page creator-editor-refactoring.html - \nextpage creator-editor-options.html + \nextpage creator-beautifier.html \title Refactoring diff --git a/doc/src/qtcreator.qdoc b/doc/src/qtcreator.qdoc index 782d6dc7d3..107c32bb45 100644 --- a/doc/src/qtcreator.qdoc +++ b/doc/src/qtcreator.qdoc @@ -200,6 +200,7 @@ \li \l{Searching with the Locator} \endlist \li \l{Refactoring} + \li \l{Beautifying Source Code} \li \l{Configuring the Editor} \list \li \l{Specifying Text Editor Settings} |