This commit is contained in:
Basile Burg 2016-12-28 03:15:07 +01:00
parent ea19f4d24e
commit 81816eed90
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
14 changed files with 93 additions and 66 deletions

51
docs/features_projects.md Normal file
View File

@ -0,0 +1,51 @@
---
title: Projects
---
### Projects
Two project formats are supported.
For all the formats a single widget is used to display the source files list and the configurations, the [project inspector](widgets_project_inspector).
Project properties are edited in specific widgets.
#### DUB
Coedit handles [DUB](http://code.dlang.org/getting_started) projects.
DUB [JSON format](http://code.dlang.org/package-format?lang=json) format is fully supported.
DUB [SDL](http://code.dlang.org/package-format?lang=sdl) format is supported in read-only mode.
The widget used to edit the properties is the [DUB project editor](widgets_dub_project_editor).
The option editor exposes a [category for DUB](options_dub_build). The options specified in this category are applied each time a project is compiled.
#### CE format
The CE (Coedit) format (previously called _native format_) is based on DMD command line interface.
The widget used to edit the properties is the [CE project editor](widgets_ce_project_editor) (the format is detailed in this page).
#### Menu reference
- **"New project"**: Closes and creates a new project (either with the native format or a DUB project). A warning may be displayed if the current project is not yet saved.
- **"Open project"**: Opens a project from a dialog.
- **"Open recent"**: Displays the list of the most recently used projects.
- **"Close project"**: Closes the current project. A warning may be displayed if the current project is yet not saved.
- **"Save project"**: Saves the current project.
- **"Save project as"**: Saves the current project from a dialog.
- **"Add project to group": Adds this project to the project group. See also the page dedicated to the [project groups](widgets_project_groups)
- **"Project editor"**: Displays widget used to edit the project properties,in respect with the format (CE or DUB).
- **"Edit project file"**: Opens the project file in a new source editor. When saved from a source editor, a project file is directly reloaded.
- **"View project command line"**: Displays the list of switches and arguments, as they would be passed to the compiler (or the build tool) when compiling.
- **"View in mini explorer"**: Expands the [mini-explorer](widgets_mini_explorer) tree on the folder that contains the project file.
- **"Compile project"**: Compiles the project using the current configuration.
- **"Compile and run project"**: Compiles the project using the current configuration and executes the output when the binary produced is executable.
- **"Compile and run project..."**: Ditto. Before the execution of the binary an input query dialog lets you pass options to the process.
- **"Run project"**: Executes the project output when the binary produced is executable.
- **"Run project..."**: Ditto. Before the execution, an input query dialog lets you specify switches and arguments to the process.
#### Other build tools
It's possible to use the [custom tools](widgets_custom_tools) to call other build tools.
For example to call _make_, add a new tool with _make_ as _executable_ and sets the _workingDirectory_ to the folder that contains the makefile.
To specify a special target, such as _release_, add _release_ in the parameters editor.
To get _make_ output in the messages, check _popUsesPipes_ in the tool options.

View File

@ -10,7 +10,7 @@ The symbolic strings represent variables defined by the software. They are used
- the [native project confirguration widget](widgets_native_project_configuration): many fields accept symbols.
- the [custom tools](widgets_custom_tools): parameters, working directory.
- the [process input](widgets_process_input): the input field can include a symbol.
- the [GDB commander](widgets_gdbcommander) custom commands.
- the [GDB commander](widgets_gdb_commander) custom commands.
Possible symbols, by context, include:

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -6,6 +6,7 @@ title: index
#### Features
* [Projects](features_projects)
* [Runnable modules](features_runnables)
* [Symbolic strings](features_symbolic_strings)
@ -13,16 +14,23 @@ title: index
* [Code metrics](options_code_metrics)
* [Compiler paths](options_compilers_paths)
* [DUB build](options_dub_build)
* [Messages](widgets_messages)
* [Runnable modules](features_runnables)
* [Symbol list](widgets_symbol_list)
#### Widgets
* [DUB project editor](widgets_dub_project_editor)
* [CE project editor](widgets_ce_project_editor)
* [Custom tools](widgets_custom_tools)
* [GDB commander](widgets_gdb_commander)
* [Library manager](widgets_library_manager)
* [Mini explorer](widgets_mini_explorer)
* [Messages](widgets_messages)
* [Options editor](widgets_options_editor)
* [Project groups](widgets_project_groups)
* [Process input](widgets_process_input)
* [Project inspector](widgets_project_inspector)
* [Search](widgets_search)
* [Symbol list](widgets_symbol_list)

19
docs/options_dub_build.md Normal file
View File

@ -0,0 +1,19 @@
---
title: Options - DUB build
---
#### DUB build
This category exposes the DUB options that are passed to the build tool each time it's used.
![](img/options_dub_build.png)
- **combined**: If checked, tries to build the whole project in a single compiler run.
- **compiler**: Selects [which compiler](options_compilers_paths) is used by DUB.
- **dependenciesCheck**: Defines how DUB checks the project dependencies, typically used to avoid too much network operations.
- **forceRebuild**: Forces a full recompilation, even if DUB determines that this would not be necessary.
- **linkMode**: Specifies the way the compiler and linker are invoked.
- **other**: Displays a list that can be filled with more switches. One item per line.
- **parallel**: If checked, tries to build using several CPU.
See also [the official DUB command line reference](http://code.dlang.org/docs/commandline) for more detailed descriptions.

View File

@ -0,0 +1,3 @@
---
title: Widgets - DUB project editor
---

View File

@ -0,0 +1,3 @@
---
title: Widgets - process input
---

View File

@ -0,0 +1 @@

View File

@ -3275,7 +3275,7 @@ object CEMainForm: TCEMainForm
Caption = '-'
end
object MenuItem41: TMenuItem
Action = actProjOpts
Action = actProjEditor
Bitmap.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF000000
@ -4930,11 +4930,11 @@ object CEMainForm: TCEMainForm
OnExecute = actProjCloseExecute
OnUpdate = updateProjectBasedAction
end
object actProjOpts: TAction
object actProjEditor: TAction
Category = 'Project'
Caption = 'Project configuration'
Caption = 'Project editor'
ImageIndex = 24
OnExecute = actProjOptsExecute
OnExecute = actProjEditorExecute
OnUpdate = updateProjectBasedAction
end
object actProjSource: TAction

View File

@ -126,7 +126,7 @@ type
actProjCompileAndRun: TAction;
actProjCompAndRunWithArgs: TAction;
actProjClose: TAction;
actProjOpts: TAction;
actProjEditor: TAction;
actProjOpen: TAction;
actProjSave: TAction;
actProjSaveAs: TAction;
@ -307,7 +307,7 @@ type
procedure actProjOpenExecute(Sender: TObject);
procedure actEdPasteExecute(Sender: TObject);
procedure actProjCloseExecute(Sender: TObject);
procedure actProjOptsExecute(Sender: TObject);
procedure actProjEditorExecute(Sender: TObject);
procedure actEdRedoExecute(Sender: TObject);
procedure actFileSaveAsExecute(Sender: TObject);
procedure actFileSaveExecute(Sender: TObject);
@ -3331,7 +3331,7 @@ begin
end;
end;
procedure TCEMainForm.actProjOptsExecute(Sender: TObject);
procedure TCEMainForm.actProjEditorExecute(Sender: TObject);
var
win: TControl = nil;
begin

View File

View File

@ -151,64 +151,6 @@ For discussions, the official D forums [propose a section dedicated to the IDEs]
- **"Verify with Dscanner"**: verifies the current file with [Dscanner](https://github.com/Hackerpilot/Dscanner). Results are displayed in the [message widget][lnk_widg_msg].
- **"View in mini explorer"**: expands the [mini-explorer][lnk_widg_miniexpl] tree on the folder that contains the current file.
## Project
- **"New project"**: closes and creates a new project (either with the native format or a DUB project). Optionally a warning is displayed if the current project is not saved.
- **"Open project"**: opens a project from a dialog.
- **"Open recent"**: displays the list of the most recently used projects.
- **"Close project"**: closes the current project. Optionally a warning is displayed if the current project is not saved.
- **"Save project"**: saves the current project.
- **"Save project as"**: saves the current project from a dialog.
- **"Project configuration"**: displays the project configuration widget.
- **"Edit project file"**: opens the project file in a new editor. When saved from a source editor, a project file is directly reloaded. It means that a particular care must be taken during the edition. Coedit will skip any error in the project file, without warnings.
- **"View project command line"**: displays the list of the switches and their arguments, as passed to DMD before the compilation. Note that under Windows, the content can be copied using the <kbd>Ctrl</kbd> + <kbd>C</kbd> shortcut on the dialog.
- **"View in mini explorer"**: expands the [mini-explorer][lnk_widg_miniexpl] tree on the folder containing the project file.
- **"Compile project"**: compiles the project using the current configuration.
- **"Compile and run project"**: compiles the project using the current configuration and execute the output if the option _binaryKind_ is set to _executable_.
- **"Compile and run project..."**: Ditto. Before the execution of the output file an input-query dialog lets you pass options to the process. Note that this command was added before the _runOptions_ of the project configuration, which allows to specify the parameters in a more advantageous way.
- **"Run project"**: tries to execute the output if the project output option _binaryKind_ is set to _executable_.
- **"Run project..."**: Ditto. Before the execution of the output file, an input-query dialog lets you specify switches and arguments to the process.
# Native projects
Coedit features a native project format completely based on the _DMD_ options.
Almost each DMD switch is represented by a project option.
The project has common parameters,
- The source files. Either modules, interfaces, static libraries or objects.
- Library aliases: a list of aliases to specify the [_libman_ entries][lnk_widg_lib] used by the project.
but most of them are specific to each configuration.
Two widgets are related to the native projects:
- [the project inspector][lnk_widg_prjinsp], allows to manage and maintain the source files list and to open them in an editor.
- [the project configuration widget][lnk_widg_prjconf], allows to manage accurately the configurations, their options
and how to execute the project output when launched from _Coedit_. For more information about the project format,
see the [project configuration][lnk_widg_prjconf] and the [project inspector][lnk_widg_prjinsp] descriptions.
The file names and directory paths can be relative.
The base directory of a relative path is always the folder where is saved the project.
They can often contain [symbolic strings][lnk_sym] and a path can be itself relative to a symbol.
The project format is cross-platform, path separators are internally converted.
Here are some more or less complex examples which illustrates the project format:
- the [metad][lnk_metad] meta repository.
- the tools written for Coedit: [cesyms][lnk_cesyms] and [cetodo][lnk_cetodo].
- [iz](https://github.com/BBasile/iz) and [dbeaengine](https://github.com/BBasile/dbeaengine)
Even if it's based on the _DMD_ options, it's also possible to compile a CE project using [LDC](https://github.com/ldc-developers/ldc) or
[GDMD](https://github.com/D-Programming-GDC/GDMD/tree/dport).
To do so, the application option _Native project compiler_ must be set accordingly.
# DUB projects.
Since the version 2, Coedit also handles [DUB](http://code.dlang.org/getting_started) projects.
DUB project description must be in [JSON format](http://code.dlang.org/package-format?lang=json), [SDL](http://code.dlang.org/package-format?lang=sdl) in not supported.
DUB projects are handled exactly as CE projects are. The _project_ menu proposes the same features
however the configuration is done in another widget, see the [dedicated paragraph][lnk_widg_dub].
# D Completion Daemon integration
The **D Completion Daemon** (DCD) is used for the completion, the function call tips, to find the declaration of a symbol and to display the _DDOC_ comment associated to a symbol.