Doc: Move sidebar view docs into separate topics

- Link the topics from "Show and hide sidebars"
- Hide "Working in Edit Mode" from QDS because the Edit mode is
  hidden by default there
- Fix links to the new topics and remove links to
  "Browsing Project Contents"

Task-number: QTCREATORBUG-29361
Change-Id: Ia9ae6474bf0925a76f9ccee693369d2460b9266f
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
This commit is contained in:
Leena Miettinen
2023-07-04 16:48:52 +02:00
parent 72c401d9ce
commit 707d3dd7aa
18 changed files with 222 additions and 251 deletions

View File

@@ -26,11 +26,16 @@
\li \l{Writing Code}
\if defined(qtdesignstudio)
The \l{Code} view offers services, such as semantic highlighting,
syntax checking, code completion, code indentation, and in-line
error indicators while you are typing.
\else
Writing, editing, and navigating in source code are core tasks in
application development. Therefore, the code editor is one of the
key components of \QC. You can use the code editor in the
\uicontrol Edit mode.
\endif
\li \l{Finding}
Use the incremental and advanced search to search from currently

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2018 The Qt Company Ltd.
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
// **********************************************************************
@@ -8,9 +8,13 @@
// **********************************************************************
/*!
\previouspage creator-coding.html
\page creator-editor-functions.html
\previouspage creator-coding.html
\if defined(qtdesignstudio)
\nextpage creator-output-panes.html
\else
\nextpage creator-coding-navigating.html
\endif
\title Writing Code
@@ -19,14 +23,14 @@
in-line error indicators while you are typing.
\list
\if defined(qtcreator)
\li \l{Working in Edit Mode}
You can use the editor toolbar to navigate between open files
and symbols in use. You can also split the view to work on
several files simultaneously, add bookmarks, and move between
symbol definitions and declarations.
\endif
\li \l{Semantic Highlighting}
\QC enables you to write well formatted code by highlighting
@@ -75,8 +79,6 @@
keyboard sequence as a macro. You can then play the macro to
repeat the sequence. You can save the latest macro and assign a
keyboard shortcut for running it or run it from the locator.
\endif
\endlist
\section1 Related Topics
@@ -88,7 +90,6 @@
You can use a diff editor to compare two versions of a file and
view the differences side-by-side in the \uicontrol Edit mode.
\if defined(qtcreator)
\li \l{Parsing C++ Files with the Clang Code Model}
The Clang code model offers some of the same services as the

View File

@@ -28,9 +28,8 @@
{locator}, \l{Moving to Symbol Definition or Declaration}
{following symbols}, and so on
\li Inspecting code by using the \l{Browsing Project Contents}
{class browser}, the \l{Viewing Defined Types and Symbols}
{outline}, and so on
\li Inspecting code by using the \l{Class View}{class browser}, the
\l{Outline}{outline}, and so on
\li Diagnostics
@@ -154,9 +153,8 @@
specify that the projects in the session should be managed by a single
clangd process.
The document outline in the \l{Viewing Defined Types and Symbols}
{Outline} view is backed by clangd's document symbol support, which
makes the results more reliable than before.
The document outline in the \l{Outline} view is backed by clangd's document
symbol support, which makes the results more reliable than before.
To specify settings for clangd:

View File

@@ -1,33 +1,20 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
// **********************************************************************
// 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.
// **********************************************************************
/*!
\previouspage creator-editor-functions.html
\page creator-coding-navigating.html
\if defined(qtdesignstudio)
\nextpage creator-views.html
\else
\nextpage creator-highlighting.html
\endif
\title Working in Edit Mode
This section describes how to use the \uicontrol Edit mode. For more
information about using the sidebar, see \l{Browsing Project Contents}.
You can write code in the \uicontrol Edit mode.
\section1 Using the Editor Toolbar
The editor toolbar is located at the top of the editor view. The editor
toolbar is context sensitive and shows items relevant to the file currently
open in the editor.
The editor toolbar is located at the top of the editor view. It is context
sensitive and shows items relevant to the file currently open in the editor.
\if defined(qtcreator)
\image qtcreator-editortoolbar-symbols.webp {Edit mode toolbar}
To add more space around the toolbar items, select \uicontrol Edit >
@@ -35,9 +22,6 @@
then select \uicontrol Relaxed in the \uicontrol {Toolbar style} field.
\image qtcreator-preferences-environment-interface.webp {Interface tab in Environment preferences}
\else
\image studio-edit-mode.png
\endif
\section2 Navigating Between Open Files and Symbols
@@ -72,10 +56,9 @@
\l{Searching with the Locator}{locator}. Enter the line number and column
number in the locator, separated by a colon (:).
\note You can also use the \l{Browsing Project Contents}{sidebars} to
\note You can also use the \l{Show and hide sidebars}{sidebars} to
move around in \QC.
\if defined(qtcreator)
\section2 Selecting Parse Context
Code might be interpreted differently in different contexts. A file can be
@@ -104,7 +87,6 @@
To reload the file with the selected encoding, select
\uicontrol {Reload with Encoding}. To save the file with
the new encoding, select \uicontrol {Save with Encoding}.
\endif
\section2 Selecting Line Ending Style
@@ -120,7 +102,7 @@
To set the line endings to use for a project, select \uicontrol Projects >
\uicontrol {Project Settings} > \uicontrol Editor.
\if defined(qtcreator)
For more information, see \l {Specifying Editor Settings}.
\section2 Managing Language Servers
@@ -132,7 +114,6 @@
\l{Inspecting Language Clients}{inspect the communication} between \QC
and language servers and view server capabilities, as well as
\l{Specifying Settings for Language Clients}{set language server preferences}.
\endif
\section1 Editing Selected Lines
@@ -246,12 +227,7 @@
\endlist
To view the note, move the mouse pointer over the bookmark or open the
\uicontrol Bookmarks view
\if defined(qtcreator)
in the \l{Show and hide sidebars}{sidebar}.
\else
in the \l{Managing Workspaces}{workspace}.
\endif
\uicontrol Bookmarks view in the \l{Show and hide sidebars}{sidebar}.
\section2 Navigating Bookmarks
@@ -338,7 +314,6 @@
\uicontrol {Open Corresponding Header/Source in Next Split}. You can also
press \key F4 or \key {Ctrl+E,F4}, respectively.
\if defined(qtcreator)
\section1 Reparsing Externally Changed Files
If source files are modified from outside \QC, the opened files will be
@@ -363,13 +338,4 @@
\QC underlines semantic errors in olive in the C++ code editor. To check the
correct paths for includes that are not resolved or that are resolved to the
wrong file, select \uicontrol {Project Parts} > \uicontrol {Header Paths}.
\else
\section1 Related Topics
\list
\li \l{Browsing Project Contents}
\li \l{Viewing Output}
\endlist
\endif
*/

View File

@@ -29,11 +29,9 @@
{locator} or \l{Moving to Symbol Definition or Declaration}
{moving to the symbol definition}
\li Inspecting code by viewing the document outline in the
\l{Viewing Defined Types and Symbols}{Outline} view or
in the \uicontrol Symbols list on the \l{Using the Editor Toolbar}
{editor toolbar}
\li \l{Viewing Call Hierarchy}
{Viewing the callers and callees of a function}
\l{Outline} view or in the \uicontrol Symbols list on the
\l{Using the Editor Toolbar}{editor toolbar}
\li \l{Call Hierarchy}{Viewing the callers and callees of a function}
\li \l{Finding Symbols}{Finding references to symbols}
\li \l{Renaming Symbols}{Renaming the symbol under cursor}
\li Code actions

View File

@@ -1,9 +1,13 @@
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\previouspage creator-coding-navigating.html
\page creator-highlighting.html
\if defined(qtdesignstudio)
\previouspage creator-output-panes.html
\else
\previouspage creator-coding-navigating.html
\endif
\nextpage creator-checking-code-syntax.html
\title Semantic Highlighting

View File

@@ -19,12 +19,6 @@
\li \l{IDE Overview}
\li \l{User Interface}
\list
\li \l{Browsing Project Contents}
\list
\li \l{Projects}
\li \l{File System}
\li \l{Open Documents}
\endlist
\li \l{Viewing Output}
\endlist
\li \l{Configuring Qt Creator}

View File

@@ -3,22 +3,30 @@
/*!
\page creator-file-system-view.html
\if defined(qtdesignstudio)
\previouspage creator-projects-view.html
\nextpage creator-open-documents-view.html
\else
\previouspage creator-how-to-show-and-hide-sidebars.html
\nextpage creator-output-panes.html
\endif
\ingroup creator-reference-sidebar-views
\ingroup studio-views
\title File System
The \uicontrol {File System} view shows all the files in the file system.
\brief Shows all the files in the current directory.
\if defined(qtcreator)
\note Usually, \l{Searching with the Locator}{searching with the locator}
is the fastest way to find a particular project, file, class, or function,
or almost anything else in your project. Use the \e {file system (f)} filter
to open files from anywhere in the file system.
\if defined(qtdesignstudio)
\image qtcreator-filesystem-view-design.png {File System view}
\else
\image qtcreator-filesystem-view.webp {File System view in the sidebar}
\else
\image qtcreator-filesystem-view-design.png {File System view}
\endif
To move to the root directory of the file system, select \uicontrol Computer

View File

@@ -31,4 +31,13 @@
\li To close a sidebar view, click \inlineimage icons/splitbutton_closetop.png
(\uicontrol {Close}).
\endlist
\section1 Sidebar views
Manage projects and files in the following views:
\annotatedlist creator-reference-sidebar-views
In some views, right-clicking opens a context menu that has functions
for managing the objects listed in the view.
*/

View File

@@ -0,0 +1,134 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page creator-outline-view.html
\previouspage creator-how-to-show-and-hide-sidebars.html
\nextpage creator-output-panes.html
\ingroup creator-reference-sidebar-views
\title Outline
\brief Shows an overview of defined types and other symbols, as well as
their properties and hierarchy in a source file.
To move the code for types and symbols around in the source file, drag
them in the outline.
\image qtcreator-outline-view.png {Outline view}
\list
\li To see a complete list of all bindings, select
\inlineimage icons/filtericon.png
(\uicontrol {Filter Tree}) > \uicontrol {Show All Bindings}.
\li To sort types or symbols alphabetically, select
\inlineimage icons/sort_alphabetically.png
(\uicontrol {Sort Alphabetically}).
\li To stop the synchronization with the type or symbol selected in the
editor, deselect \inlineimage icons/linkicon.png
(\uicontrol {Synchronize with Editor}).
\endlist
*/
/*!
\page creator-class-view.html
\previouspage creator-how-to-show-and-hide-sidebars.html
\nextpage creator-output-panes.html
\ingroup creator-reference-sidebar-views
\title Class View
\brief Shows the class hierarchy of the currently open projects.
\image qtcreator-class-view.png {Class View}
\list
\li To organize the view by subprojects, click
\inlineimage icons/qtcreator-show-subprojects.png
(\uicontrol {Show Subprojects}).
\li To visit all parts of a namespace, double-click on the
namespace item multiple times.
\endlist
*/
/*!
\page creator-call-hierarchy-view.html
\previouspage creator-how-to-show-and-hide-sidebars.html
\nextpage creator-output-panes.html
\ingroup creator-reference-sidebar-views
\title Call Hierarchy
\brief Shows information about incoming and outgoing function calls from a
\l{Using Language Servers}{language server}.
Place the cursor on a function definition in the code editor to see lists
of functions that call it and the functions it calls. This works recursively,
so you can also see the caller of the caller. However, Clangd only lists
incoming calls.
Select the \inlineimage icons/languageclient.png
button on the \l{Managing Language Servers}{editor toolbar}, and then select
\uicontrol {Restart} to collect call hierarchy information for the function.
\image qtcreator-call-hierarchy-view.png {Call Hierarchy view}
*/
/*!
\page creator-type-hierarchy.html
\previouspage creator-how-to-show-and-hide-sidebars.html
\nextpage creator-output-panes.html
\ingroup creator-reference-sidebar-views
\title Type Hierarchy
\brief Shows the base classes and derived classes of a class.
To view type hierarchy of a class:
\list 1
\li Right-click a class in the code editor.
\li Select \uicontrol {Open Type Hierarchy} or press \key {Ctrl+Shift+T}.
\endlist
\image qtcreator-type-hierarchy-view.png {Type Hierarchy view}
To navigate in the type hierarchy:
\list
\li Double-click a class or select it.
\li Select \uicontrol {Open Type Hierarchy} in the context menu.
\endlist
The view highlights the previous class.
The definition of the selected class opens in the code editor. You
can also select \uicontrol {Open in Editor} in the context menu to open
it.
*/
/*!
\page creator-include-hierarchy-view.html
\previouspage creator-how-to-show-and-hide-sidebars.html
\nextpage creator-output-panes.html
\ingroup creator-reference-sidebar-views
\title Include Hierarchy
\brief Shows the files that the current file includes and those that include
the current file.
To view the include hierarchy of a file:
\list 1
\li Right-click a file in the editor.
\li Select \uicontrol {Open Include Hierarchy}
or press \key {Ctrl+Shift+I}.
\endlist
\image qtcreator-include-hierarchy-view.png {Include Hierarchy view}
To keep the view synchronized with the file currently open in the editor,
select \inlineimage icons/linkicon.png
(\uicontrol {Synchronize with Editor}).
*/

View File

@@ -1,20 +1,25 @@
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page creator-open-documents-view.html
\previouspage creator-file-system-view.html
\if defined(qtdesignstudio)
\previouspage creator-file-system-view.html
\nextpage studio-content-library.html
\else
\previouspage creator-how-to-show-and-hide-sidebars.html
\nextpage creator-output-panes.html
\endif
\ingroup creator-reference-sidebar-views
\ingroup studio-views
\title Open Documents
The \uicontrol {Open Documents} view displays a list of open documents.
\brief Shows currently open files.
\image qtcreator-open-documents-view.png "Open Documents view"
\image qtcreator-open-documents-view.png {Open Documents view}
You can use the context menu to apply some of the functions also available
in the \uicontrol File menu and in the \l {File System Context Menu}
@@ -25,17 +30,17 @@
\list
\li Copy the full path of the file or just the filename to the
clipboard.
\li Pin files to ensure they stay at the top of the list and are not
closed when you select \uicontrol {Close All}.
\li Pin files to the top of the list to keep them open when you
select \uicontrol {Close All}.
\endlist
\section1 Specifying Settings for Opening Files
\section1 Setting Preferences for Opening Files
To specify settings for opening files and handling open files, select
To set preferences for opening files and handling open files, select
\uicontrol Edit > \uicontrol Preferences > \uicontrol Environment >
\uicontrol System:
\image qtcreator-options-environment-system.png "Environment preferences System tab"
\image qtcreator-options-environment-system.png {System tab in Environment preferences}
\list
\li In the \uicontrol {When files are externally modified} field,

View File

@@ -5,28 +5,32 @@
\page creator-projects-view.html
\if defined(qtdesignstudio)
\previouspage qtquick-curve-editor.html
\else
\previouspage creator-views.html
\endif
\nextpage creator-file-system-view.html
\else
\previouspage creator-how-to-show-and-hide-sidebars.html
\nextpage creator-output-panes.html
\endif
\ingroup creator-reference-sidebar-views
\ingroup studio-views
\title Projects
The \uicontrol Projects view displays projects in a project tree.
\brief Shows a list of projects in a project tree.
\if defined(qtcreator)
The project tree has a list of all projects open in the current
\l{Managing Sessions}{session}. For each project, the tree visualizes
the build system structure of the project and lists all files that
are part of the project.
\image qtcreator-projects-view-edit.png {Projects view in the sidebar}
\note Usually, \l{Searching with the Locator}{searching with the locator}
is the fastest way to find a particular project, file, class, or function,
or almost anything else in your project.
\if defined(qtdesignstudio)
\image qtcreator-projects-view-design.png {Projects view}
\else
\image qtcreator-projects-view-edit.png {Projects view in the sidebar}
\image qtcreator-projects-view-design.png {Projects view}
\endif
You can use the project tree in the following ways:

View File

@@ -82,7 +82,6 @@
For information about new features and bug fixes in each \QC release,
select \uicontrol Help > \uicontrol {Change Log}.
\sa {Show and hide sidebars}, {Browsing Project Contents}
\sa {Use the UI}{How-to: Use the UI}
\else
@@ -145,7 +144,7 @@
/*!
\page creator-output-panes.html
\if defined(qtdesignstudio)
\previouspage creator-views.html
\previouspage creator-editor-functions.html
\nextpage creator-highlighting.html
\else
\previouspage creator-open-documents-view.html

View File

@@ -1,148 +0,0 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page creator-views.html
\if defined(qtdesignstudio)
\previouspage creator-coding-navigating.html
\nextpage creator-output-panes.html
\else
\previouspage creator-quick-tour.html
\nextpage creator-projects-view.html
\endif
\title Browsing Project Contents
\if defined(qtdesignstudio)
You can organize \QDS views as \l {Managing Workspaces}{workspaces}.
\else
You can organize \QC views in \l {Show and hide sidebars}{sidebars} or as
workspaces, depending on the \l{Switch between modes}{mode} you are working
in. Only views that are relevant to a mode are available in it.
\endif
\note Usually, \l{Searching with the Locator}{searching with the locator}
is the fastest way to find a particular project, file, class, or function,
or almost anything else in your project.
Manage projects and files in the following views:
\list
\li \l Projects shows a list of projects open in the current
session and the project files needed by the build system.
\li \l{File System} shows all files in the currently selected
directory.
\li \l{Open Documents} shows currently open files.
\li \l{Using Bookmarks}{Bookmarks} shows all bookmarks for the current
session.
\li \l{Working with Branches}{Git Branches} shows the local and remote
branches for the project in the Git version control system.
\li \l{Viewing Defined Types and Symbols}{Outline} shows an overview of
defined types and other symbols, as well as their properties and
hierarchy in a source file.
\endlist
\if defined(qtcreator)
The following views display additional information about C++ code:
\list
\li \l{Viewing the Class Hierarchy}{Class View} shows the class
hierarchy of the currently open projects.
\li \l{Running Autotests}{Tests} lists autotests and Qt Quick
tests in the project.
\li \l{Viewing Type Hierarchy}{Type Hierarchy} shows the base
classes of a class.
\li \l{Viewing Include Hierarchy}{Include Hierarchy} shows the
files that the current file includes and those that include
the current file.
\endlist
\else
For more information about views that are only available when editing QML
files in the \uicontrol Design mode, see \l{Design Views}.
\endif
The following sections describe the additional options in a particular view.
In some views, right-clicking opens a context menu that has functions
for managing the objects listed in the view.
\section1 Viewing Defined Types and Symbols
The \uicontrol Outline view shows an overview of defined types and other
symbols, as well as their properties and hierarchy in a source file.
You can move the code for types and symbols around in the source file
by dragging and dropping them in the outline.
\image qtcreator-outline-view.png "Outline view"
\list
\li To see a complete list of all bindings, select
\inlineimage icons/filtericon.png
(\uicontrol {Filter Tree}) > \uicontrol {Show All Bindings}.
\li To sort types or symbols alphabetically, select
\inlineimage icons/sort_alphabetically.png
(\uicontrol {Sort Alphabetically}).
\li To stop the synchronization with the type or symbol selected in the
editor, deselect \inlineimage icons/linkicon.png
(\uicontrol {Synchronize with Editor}).
\endlist
\if defined(qtcreator)
\section1 Viewing the Class Hierarchy
The \uicontrol {Class View} shows the class hierarchy of the currently
open projects.
\image qtcreator-class-view.png "Class View"
To organize the view by subprojects, click
\inlineimage icons/qtcreator-show-subprojects.png
(\uicontrol {Show Subprojects}).
To visit all parts of a namespace, double-click on the namespace item
multiple times.
\section1 Viewing Call Hierarchy
The \uicontrol {Call Hierarchy} view shows information about incoming and
outgoing function calls from a \l{Using Language Servers}{language server}.
Place the cursor on a function definition in the code editor to see lists
of functions that call it and the functions it calls. This works recursively,
so you can also see the caller of the caller. However, Clangd only lists
incoming calls.
Select the \inlineimage icons/languageclient.png
button on the \l{Managing Language Servers}{editor toolbar}, and then select
\uicontrol {Restart} to collect call hierarchy information for the function.
\image qtcreator-call-hierarchy-view.png {Call Hierarchy view}
\section1 Viewing Type Hierarchy
To view the base classes and derived classes of a class, right-click the
class in the code editor and select \uicontrol {Open Type Hierarchy} or
press \key {Ctrl+Shift+T}.
\image qtcreator-type-hierarchy-view.png "Type Hierarchy view"
To navigate in the type hierarchy, double-click a class or select it,
and then select \uicontrol {Open Type Hierarchy} in the context menu.
The view highlights the previous class.
The definition of the selected class opens in the code editor. You
can also select \uicontrol {Open in Editor} in the context menu to open
it.
\section1 Viewing Include Hierarchy
To view the files that the current file includes and those that include
the current file, right-click in the editor and select
\uicontrol {Open Include Hierarchy} or press \key {Ctrl+Shift+I}.
\image qtcreator-include-hierarchy-view.png "Include Hierarchy view"
To keep the view synchronized with the file currently open in the editor,
select \inlineimage icons/linkicon.png
(\uicontrol {Synchronize with Editor}).
\endif
*/

View File

@@ -200,11 +200,7 @@
\list
\li \l{Writing Code}
\list
\li \l{Working in Edit Mode}
\list
\li \l{Browsing Project Contents}
\li \l{Viewing Output}
\endlist
\li \l{Viewing Output}
\li \l{Semantic Highlighting}
\li \l{Checking Code Syntax}
\li \l{Completing Code}

View File

@@ -47,9 +47,8 @@
\section2 Source Component
The \uicontrol {Source Component} property defines the component for
\uicontrol Loader3D to instantiate. Currently, the
\uicontrol {Source component} needs to be defined in code using the
\l {Working in Edit Mode}{Edit} mode or the \l {Code} view.
\uicontrol Loader3D to instantiate. Currently, you need to define the
\uicontrol {Source component} in the \l {Code} view.
\section2 Asynchronous

View File

@@ -110,7 +110,7 @@
\li \l{Code}
\li Provides a code editor for viewing and modifying the code
generated by the visual editors.
\li \l {Working in Edit Mode}
\li \l {Writing Code}
\row
\li \l Projects
\li Shows a list of open projects and the files they contain.
@@ -177,12 +177,12 @@
That is, returns the focus to the last location in the last file it
was on.
\li \key Alt+< (\key Opt+Cmd+< on \macos)
\li \l{Navigating Between Open Files and Symbols}
\li
\row
\li \inlineimage icons/next.png
\li \uicontrol {Go Forward}: moves a step forward in your location history.
\li \key Alt+> (\key Opt+Cmd+> on \macos)
\li \l{Navigating Between Open Files and Symbols}
\li
\row
\li \inlineimage icons/close.png
\li \uicontrol {Close Document}: closes the current file.

View File

@@ -21,8 +21,7 @@
\uicontrol Edit > \uicontrol {Find/Replace} > \uicontrol {Find/Replace}.
You can also select \key Ctrl + \key {F}.
You can use a subset of the functions available in the
\l{Writing Code}{Edit mode}:
The view offers the following features:
\list
\li \l{Semantic Highlighting}