📄 projects.docbook
字号:
<variablelist><varlistentry><term><guilabel>File Path</guilabel></term><listitem><para>Displays a list of all source files included in the project. Note that when adding and removing files, the project itself is not modified until the <guibutton>OK</guibutton> button is clicked.</para></listitem></varlistentry><varlistentry><term><guibutton>Filter</guibutton></term><listitem><para>Hides all files whose path names do not include the text entered in the edit-box to the left of the button. This can simplify the task of finding files in the project. The filter text can be any simplified regular expression (as given to file commands in a shell).</para></listitem></varlistentry><varlistentry><term><guibutton>Show All</guibutton></term><listitem><para>Reveals any files formerly hidden with the <guibutton>Filter</guibutton> button.</para></listitem></varlistentry><varlistentry><term><guilabel>Add</guilabel></term><listitem><para>All buttons in this group add files to the current project.</para><variablelist><varlistentry><term><guibutton>Files...</guibutton></term><listitem><para><action>Adds user-selected files to the current project.</action></para></listitem></varlistentry><varlistentry><term><guibutton>Directory...</guibutton></term><listitem><para><action>Adds all source files in a directory to the current project.</action> Source files are scanned according to the file-types associated with the project. Note that sub-directories are not scanned for files.</para></listitem></varlistentry><varlistentry><term><guibutton>Tree...</guibutton></term><listitem><para><action>Adds all source files in a selected directory and its sub-directories to the current project.</action> Source files are scanned according to the file-types associated with the project.</para></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry><term><guilabel>Remove</guilabel></term><listitem><para>All buttons in this group remove files from the current project.</para><variablelist><varlistentry><term><guibutton>Selected</guibutton></term><listitem><para><action>Removes all selected files from the current project.</action> Files can be selected for removal by clicking their path name in the file list. The <keycap>Ctrl</keycap> key can be used to select multiple files, and the <keycap>Shift</keycap> key can be used to select ranges of files.</para></listitem></varlistentry><varlistentry><term><guibutton>Directory...</guibutton></term><listitem><para><action>Removes all source files in a directory from the current project.</action> Note that sub-directories are not included.</para></listitem></varlistentry><varlistentry><term><guibutton>Tree...</guibutton></term><listitem><para><action>Removes all source files in a directory and any of its sub-directories from the current project.</action></para></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry><term><guibutton>OK</guibutton></term><listitem><para><action>Accepts the new list of source files, and updates the project.</action></para></listitem></varlistentry><varlistentry><term><guibutton>Cancel</guibutton></term><listitem><para><action>Closes the dialogue without modifying the list of project files.</action></para></listitem></varlistentry></variablelist><para>Once the list of project files changes (either when files are first added to the project, or upon any subsequent modification), &kapp; informs <application>Cscope</application> to rebuild the cross-reference database.</para></sect2><sect2 id="project-open"><title>Opening an Existing Project</title><para>Existing projects can be opened using the <menuchoice><guimenu>Project</guimenu><guimenuitem>Open...</guimenuitem></menuchoice> menu command. Choosing this command invokes the <guilabel>Open Project</guilabel> dialogue, which allows the user to select the project to open.</para><screenshot><screeninfo>The Open Project dialogue</screeninfo><mediaobject><imageobject><imagedata fileref="project_open.png" format="PNG" /></imageobject><textobject><phrase>The Open Project dialogue</phrase></textobject></mediaobject></screenshot><variablelist><varlistentry><term><guilabel>Project Path</guilabel></term><listitem><para>The full path of the project directory. Use the browser button to locate a project by its configuration file (<filename>cscope.proj</filename>).</para></listitem></varlistentry><varlistentry><term><guilabel>Recent Projects</guilabel></term><listitem><para>Displays a list of recently-opened projects. Clicking a list item copies its path to the Project Path edit-box, while double-clicking an item opens the project.</para></listitem></varlistentry><varlistentry><term><guibutton>Remove</guibutton></term><listitem><para><action>Removes an entry from the list of recently-opened projects.</action></para></listitem></varlistentry><varlistentry><term><guibutton>Open</guibutton></term><listitem><para><action>Opens the project whose directory is set in the Project Path edit-box.</action></para></listitem></varlistentry><varlistentry><term><guibutton>Cancel</guibutton></term><listitem><para><action>Closes the dialogue without opening a project.</action></para></listitem></varlistentry></variablelist><para>When a project is closed, it saves session information, such as source files being edited and the contents of locked queries. The session is restored when that project is opened again.</para><para>After the project has been opened, &kapp; will invoke <application>Cscope</application>, which, in turn, will check whether any files have been modified since the last time the project had been closed. If any files have changed, <application>Cscope</application> will rebuild the cross-reference database.</para></sect2><sect2 id="project-prop"><title>Changing Project Properties</title><para>The properties of an open project can be changed by choosing the <menuchoice><guimenu>Project</guimenu><guimenuitem>Properties...</guimenuitem></menuchoice> menu command. This command invokes the <guilabel>Project Properties</guilabel> dialogue, which is similar to the <guilabel>New Project</guilabel> dialogue, except that the name and path of the project cannot be changed.</para><para>See the <link linkend="project-create">New Project dialogue</link> for a description of the available project options.</para></sect2><sect2 id="projects-temp"><title>Temporary Projects</title><para>Temporary projects are created when a user opens a cscope.out file directly. This option is useful for working on projects created by some other <application>Cscope</application> front-end (<application>Cscope</application>'s ncurses interface, <application>Vi</application>, <application>>Emacs</application>, etc.), or simply using <application>Cscope</application>'s <option>-b</option> command-line parameter.</para><para>To open a database file, use the <menuchoice><guimenu>Project</guimenu><guimenuitem>Open Cscope.out...</guimenuitem></menuchoice> menu command. If the file is a valid <application>Cscope</application> cross-reference database, &kapp; will invoke <application>Cscope</application> using this file, and will be ready to accept queries on the database. Cscope.out files can also be opened through the command line, which means that you can simply drag a Cscope.out file, and drop it over &kapp;'s programme icon.</para><para>Note, however, that most project management options provided by &kapp; will not be available for temporary projects: the file list for the project will be empty, users will not be able to add or remove files, and the project properties dialogue will not be available. You will also need to rebuild the database manually when making any changes. &kapp;'s rebuild command assumes the database has been updated, and only re-runs <application>Cscope</application>.</para></sect2><sect2 id="projects-build"><title>Building Projects</title><para>While &kapp; was not designed as an IDE with a complete write-build-debug cycle, it does provide a simple GUI for building projects. The command <menuchoice><guimenu>Project</guimenu><guimenuitem>Make Project</guimenuitem></menuchoice> displays a dialogue, which can be used to invoke any external tool on a given directory. By default, it runs <command>make</command> on the project's source root. The output of the command will be displayed in the dialogue's <guilabel>Output</guilabel> pane, with any errors or warnings marked-up, similar to links in a browser. Clicking on a link will jump to an editor page showing the source file and line responsible for the message. A list of all abnormal messages also appears in the dialogue's <guilabel>Errors and Warnings</guilabel> pane.</para><screenshot><screeninfo>The Make Project dialogue</screeninfo><mediaobject><imageobject><imagedata fileref="project_make.png" format="PNG" /></imageobject><textobject><phrase>The Make Project dialogue</phrase></textobject></mediaobject></screenshot><variablelist><varlistentry><term><guilabel>Root Directory</guilabel></term><listitem><para>The directory in which to run the build command.</para></listitem></varlistentry><varlistentry><term><guilabel>Command</guilabel></term><listitem><para>The command to execute.</para></listitem></varlistentry><varlistentry><term><guibutton>Make</guibutton></term><listitem><para><action>Executes the build command.</action></para></listitem></varlistentry><varlistentry><term><guibutton>Stop</guibutton></term><listitem><para><action>Halts an executing build process.</action></para></listitem></varlistentry><varlistentry><term><guibutton>Close</guibutton></term><listitem><para><action>Closes the dialogue.</action></para></listitem></varlistentry></variablelist></sect2></sect1>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -