Difference between revisions of "Ide/Project Tree"
Boris Belov (talk | contribs) |
Boris Belov (talk | contribs) m |
||
(3 intermediate revisions by the same user not shown) | |||
Line 175: | Line 175: | ||
Names of interfaces, classes, class implementations are prefixed with the plus [[Image:Ide_Plus_Icon.png]] or minus [[Image:Ide_Minus_Icon.png]] icons. Clicking a plus [[Image:Ide_Plus_Icon.png]] or minus [[Image:Ide_Minus_Icon.png]] icon (or pressing the right and left arrows) you expand (or collapse) the correspondent node. | Names of interfaces, classes, class implementations are prefixed with the plus [[Image:Ide_Plus_Icon.png]] or minus [[Image:Ide_Minus_Icon.png]] icons. Clicking a plus [[Image:Ide_Plus_Icon.png]] or minus [[Image:Ide_Minus_Icon.png]] icon (or pressing the right and left arrows) you expand (or collapse) the correspondent node. | ||
Notice that the displayed view depends on the chosen '''Group Members''' mode in the pop-up menu. When it is checked ON, then the tree displays the program sections (<vp>predicates</vp>, <vp>facts</vp>, <vp>domains</vp>, <vp>constants</vp>) prefixed with the [[Image:Ide_PT_NetDisk.png]] icon, which is prefixed with the plus [[Image:Ide_Plus_Icon.png]] or minus [[Image:Ide_Minus_Icon.png]] icons. | Notice that the displayed view depends on the chosen '''Group Members''' mode in the pop-up menu. When it is checked ON, then the tree displays the program sections (<vp>predicates</vp>, <vp>facts</vp>, <vp>domains</vp>, <vp>constants</vp>, <vp>properties</vp>) prefixed with the [[Image:Ide_PT_NetDisk.png]] icon, which is prefixed with the plus [[Image:Ide_Plus_Icon.png]] or minus [[Image:Ide_Minus_Icon.png]] icons. | ||
Double-click any Prolog name (predicate, domain, constant, fact, class, etc.) loads the correspondent file into the text-editor (activates the correspondent editor window if the file is already edited) and positions the caret onto the declaration/definition of the selected name. Notice that predicate names are suffixed with the predicate arity and return value mark (->, if any). | Double-click any Prolog name (predicate, domain, constant, fact, class, etc.) loads the correspondent file into the text-editor (activates the correspondent editor window if the file is already edited) and positions the caret onto the declaration/definition of the selected name. Notice that predicate names are suffixed with the predicate arity and return value mark (->, if any). | ||
Line 203: | Line 203: | ||
'''Project File''' | '''Project File''' | ||
When you click the right mouse button on project file (<vp>*. | When you click the right mouse button on project file (<vp>*.vipprj</vp>), then the following pop-up menu appears: | ||
[[Image:Ide_PT_Popup_Project.png]] | [[Image:Ide_PT_Popup_Project.png]] |
Latest revision as of 12:10, 11 September 2019
IDE |
---|
The Project Tree
The Project window is opened when you load a project into the IDE or create a new project.
The Project window provides the main view onto the loaded project. The Project window consists of two panes:
- The Project Tree pane. It is the left pane. It displays the Project tree. In the Project tree you can see all modules included into the project.
- The Browse Information pane. It is the right pane. It displays the Browse information from the file selected in the Project Tree pane. These are: names of interfaces, classes, predicates, and other Visual Prolog names declared/defined in this file.
In the Project tree you can see files that are registered in the project: object libraries (and type libraries), DLLs (Dynamically Linked Libraries), object files, resource description (descriptions of menus, dialogs, windows, forms, toolbars) and resource files (bitmaps, icons, cursors), the manifest file and Visual Prolog packages (*.pack).
After a package is compiled, the Project tree starts to show some additional information about the package files. You can see the package headers (*.ph) and Visual Prolog source files (interfaces - *.i, classes - *.cl, class implementations - *.pro).
And the Browse Information pane starts to display for each file:
- Interfaces and classes that are declared in the file.
- Classes that are implemented in the file.
- Constructors, class predicates, object predicates, and local predicates that are declared and implemented in the file. Declarations and implementations are displayed with their arities.
- Class and object facts that are defined in the file.
- Domains and constants that are defined in the file.
- Properties that are defined in the file. They are displayed with their flow patterns.
Icons Used in the Project Window
The Project window uses the following icons to identify different kinds of items:
Icons Used in the Project Tree Pane
Icon | Description |
---|---|
Project Directories | |
The Visual Prolog root directory. This is the root directory of your Visual Prolog system installation. | |
Project subdirectories | |
Project Source Files | |
Project file | |
Package file | |
Vipcom Package file | |
Project module file that is not a package or a type library. For example, object libraries *.lib | |
A project include file. Such files are included into one or more project packages (modules) | |
Manifest file | |
Project Resource Files | |
Image (bitmap, cursor or icon) file | |
Menu description file | |
Toolbar description file | |
Dialog description file | |
Form description file | |
IDE custom control description file | |
Task window description file |
Icons Used in the Browse Information Pane
Project Tree Properties
Using the File |New and the File | Add commands, you should register in the Project Tree pane all source modules that you wish to be used while project compiling and linking. Notice that Project Settings automatically registers here (during creation of a new project) standard libraries, which are referenced by build script symbols (see also Make facility), and PFC packages used in the project. Notice that if you delete some of PFC packages required for the project, then the IDE restores these packages using #requires directives.
Initially (before packages are compiled) only the Project Tree pane of the Project window displays the reduced view of the Project tree, which contains only names of registered modules, libraries, and resource files. The Browse Information pane of the Project window is initially empty.
After compilation of a package, the package "browse" information generated by the compiler (for the Source Code Browser) is used to display additional information about the package in both the Project Tree and Browse Information panes. The Project Tree pane starts to display names of all Prolog source files in the package (not only the package file). The Browse Information pane starts to display information about Prolog instances declared/defined in Prolog source files.
In the Project Tree pane. Double clicking (or pressing Enter) the name of a Prolog source file loads this file into the text editor (activates the corresponding text editor window if the file is already edited). Double clicking (or pressing Enter) the name of a resource description file opens this resource in the corresponding resource editor.
You can click (or press the right arrow) the plus icon to expand this tree node. Click the mouse button (or press the left arrow) on a minus icon to collapse the correspondent sub-tree, which is started from this node.
In the Browse Information pane. When a Prolog source file is selected in the Project Tree pane, then the Browse Information pane displays names of all declared interfaces and classes, implemented classes, supported interfaces, inherited classes, and all other Prolog instances declared/defined in a file. Usually each file contains only one interface or class declaration or only one class implementation.
Names of interfaces, classes, class implementations are prefixed with the plus or minus icons. Clicking a plus or minus icon (or pressing the right and left arrows) you expand (or collapse) the correspondent node.
Notice that the displayed view depends on the chosen Group Members mode in the pop-up menu. When it is checked ON, then the tree displays the program sections (predicates, facts, domains, constants, properties) prefixed with the icon, which is prefixed with the plus or minus icons.
Double-click any Prolog name (predicate, domain, constant, fact, class, etc.) loads the correspondent file into the text-editor (activates the correspondent editor window if the file is already edited) and positions the caret onto the declaration/definition of the selected name. Notice that predicate names are suffixed with the predicate arity and return value mark (->, if any).
Notice that icons prefixing class entities contain double colons, like this . Icons prefixing object entities contain single colons, like this .
Notice that icons prefixing public entities have colored background, like this . Icons prefixing private entities have white background, like this .
Pop-up Menus
Depending on the type of the node selected in the Project window, clicking the right mouse button activates context pop-up menus.
The menu contains:
- New and Add items activate the File | New and File | Add commands correspondingly (giving you possibility to add new project items into the selected folder).
- Remove From Project command deletes this folder from the project.
- Explore command activates the standard Windows Explorer with this folder selected.
- Build Directory command activates the Build | Build command, which compiles packages in the selected folder.
- Rebuild Directory command activates the Build | Rebuild ALL command. This command deletes all object (and other intermediate) files generated from files in the selected folder and then compiles all packages in the selected folder.
- Optimal Set of Include Directives command activates the check for the structure of included files in order to make it optimal. This feature allows to exclude not needed inclusion directives and / or to add the obligatory inclusion directives which will make the units all-sufficient.
- View Unused Predicates command displays some information for public predicates which are not used in a project, duplicated domain and constant names, etc.
Project File
When you click the right mouse button on project file (*.vipprj), then the following pop-up menu appears:
The menu contains:
- Build command activates the Build | Build command, which compiles project.
- Rebuild All command activates the Build | Rebuild ALL command. This command deletes all object (and other intermediate) files generated from files and then compiles all packages in the project.
- Settings... item opens the Project Settings dialog.
- Explore Containg Folder... item explores the folder for a file.
- File Properties... item activates the standard Windows dialog 'SelectedFileName' Properties in which you can view/modify some Windows properties of the 'SelectedFileName' file.
Project Source Files and Package Header Files
When you click the right mouse button on Visual Prolog source files (containing interfaces - *.i, classes - *.cl, and class implementations - *.pro) of the project, or package header file (*.ph), then the following pop-up menu appears:
This pop-up menu contains:
- Compile Package item activates the Build | Compile command that compiles the package into which the selected file is included.
- Open command activates the text editor for the selected file (or switches to the text editor window with this file if it is already edited).
- Explore Containg Folder... item (it is described above).
- File Properties... command (it is described above).
Packages
When you click the right mouse button on package files (*.pack), a pop-up menu appears:
This pop-up menu contains:
- New and Add commands activate the File | New and File | Add commands correspondingly (giving you possibility to add new project items into the selected folder).
- Compile activates the Build | Compile command that compiles the selected package.
- Open item (it is described above).
- Remove From Project command deletes the selected package from the project.
- Explore Containg Folder... item (it is described above).
- File Properties... item (it is described above).
Resource Description Files
When you click the right mouse button on resource description files (dialogs - *.dlg, windows - *.win, forms - *.frm, menus - *.mnu, toolbars - *.tb, bitmaps - *.bmp, icons - *.ico, and cursors - *.cur), then the following pop-up menu appears:
This pop-up menu contains:
- Attribute command activates the Attributes dialog for this resource.
- Open command opens this resource for editing in the correspondent resource editor.
- Remove From Project command deletes this resource from the project.
- Explore Containg Folder... item (it is described above).
- File Properties... item (it is described above).
Prolog Names
When you click the right mouse button on Visual Prolog names (interfaces, classes, class implementations, or names of predicates, facts, domains, and constants), the following pop-up menu that contains the following entries appears:
- Go to Declaration command opens the text editor, loads the selected file and jumps on this name declaration.
- Go to Definition command opens the text editor, loads the selected file and jumps on this name definition.