• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..09-Oct-2021-

src/H09-Oct-2021-4,6303,528

AUTHORSH A D16-Jul-201733 21

COPYINGH A D16-Jul-201717.6 KiB341281

Makefile.amH A D17-Oct-201786 53

Makefile.inH A D29-Sep-202126.9 KiB865779

NEWSH A D16-Jul-2017581 1513

READMEH A D12-May-201910.8 KiB237185

THANKSH A D16-Jul-2017361 97

README

1=================
2Project Organizer
3=================
4
5.. contents::
6
7About
8=====
9
10Project Organizer is an extension of Geany's project management displaying a tree of
11files belonging to the project in the sidebar. In addition, it enables complete indexing
12of the project files (and having code completion, syntax highlighting and symbol
13definition/declaration jumps for the whole project) quick swapping between header
14and source files, improved opening of includes, searching project files by name
15and more. External directories can be attached to the project to extend the plugin's
16functionality to related directories outside the project tree. The plugin was created
17with big projects in mind so everything works fast enough even with projects consisting
18of tens of thousands of files.
19
20Why was it created?
21-------------------
22
23A project in Geany is completely file-agnostic when it comes to the question of
24what files are stored in the project. In principle the information that Geany stores
25for every project is:
26
27* project's base directory
28* build settings
29* list of open files
30
31This approach is fine for smaller projects where most of the project files
32are stored in a single directory but doesn't work very well with projects consisting
33of many deeply nested directories containing thousands of files. For such projects
34an expandable tree showing all the project files is a better alternative making it much
35easier to to navigate among various project directories. Knowing which files
36belong to the project makes it possible to add other useful features like project file
37indexing, header/source swapping or file searching.
38
39Why are files belonging to a project defined by patterns?
40---------------------------------------------------------
41
42Maintaining a list of project files is rather painful with larger projects consisting
43of thousands files and many developers working on them. Files are created, deleted
44and moved quite frequently and after each change the project has to be updated manually.
45Instead, Project Organizer defines a list of files belonging to the project implicitly
46using:
47
48* project's base directory
49* a list of glob-like patterns (e.g. \*.c, \*.h, or just simply \* if you want to
50  see everything)
51
52Every file under the base directory matching the patterns is included into the project
53and updating the file list is as simple as pressing the refresh button in the sidebar.
54
55What are the differences between Project Organizer and GeanyPrj?
56----------------------------------------------------------------
57
58There is another project-management Geany plugin - GeanyPrj. Project Organizer and GeanyPrj
59differ in several aspects:
60
61* Project Organizer is an extension of Geany's project so every Geany project is a
62  Project Organizer project at the same time and vice versa. On the other hand, GeanyPrj
63  project is a separate project so if you want to set build properties for a GeanyPrj
64  project, you have to set up a second Geany project in parallel.
65* GeanyPrj can display several projects in the sidebar; even though only a single project
66  can be opened with Project Organizer at one time, similar effect can be achieved with the
67  "external directories" feature.
68* Project Organizer displays full tree in the sidebar while GeanyPrj displays only two-level
69  tree (full directory name as a parent and a list of files under the directory).
70* Project Organizer has configurable file patterns while patterns in GeanyPrj are hard-coded
71* Project Organizer offers header/source swapping
72* Project Organizer offers finding project files by name and improved include file opening
73
74Usage
75=====
76
77Project configuration
78---------------------
79
80Upon project creation, you should define the list of file patterns under the
81Project->Properties Project tab. For instance, for a typical open source C project,
82use patterns "\*.c \*h \*.am \*.ac" to see the source files together with
83automake and autoconf files. If no patterns are defined (default), Project Organizer
84treats this as the "\*" pattern in which case all files under the project directory
85are displayed. After closing the dialog, the files matching the patterns
86should appear in the sidebar under the Project tab.
87
88Additional settings are available from the Project Organizer tab under the Project
89properties dialog. You can define patterns to distinguish between header and source
90files for C-like languages. This information is used for header/source swapping.
91
92In addition, you can define patterns for files and directories that should be ignored when
93searching for files belonging to the project. These will typically be various binary
94files and VCS or hidden directories.
95
96Finally, you can specify whether all the project files should be indexed or not.
97The default settings is Auto which means that if the total number
98of project (and external directory) files is less than 300, indexing is performed.
99This is a rather conservative number, at least for an SSD disk - Project Organizer
100was tested with tens of thousands project files and even though the initial scanning
101may take some time (for the linux kernel with 35000 files and 2300000 symbols it takes
102about 20s with an SSD disk), the work with the project is completely normal afterwards.
103However, with ordinary HDD expect only around 100 scanned files per second because
104of slow random access time.
105
106Sidebar
107-------
108
109The sidebar contains a tree of files belonging to the project and external directory
110trees (drawn with gray background to distinguish them from ordinary project files).
111Directories can be expanded by double-clicking them; the same action is used to open
112files. When a sidebar item is right-clicked, a context menu appears:
113
114* Expand all - recursively expands all the subdirectories of the given directory
115* Find in files - opens the Find in files dialog and sets the search directory
116  to the clicked directory
117* Find file - opens the Find file dialog and sets the search directory to the
118  clicked directory
119* Find symbol - opens the Find symbol dialog and sets the search directory to the
120  clicked directory
121* Remove external directory - removes a previously added external directory from
122  the project
123
124The following actions can be invoked from the sidebar's toolbar:
125
126* Reload all - reloads the project file tree and reindexes the files (if symbol generation
127  enabled). This is useful when files were added, modified externally or removed from
128  the project.
129* Add external directory - adds an additional directory related to the project (e.g.
130  it is useful to have the geany project as an external directory for the geany-plugins
131  project). External directories are indexed, and basically
132  all Project Organizer features work with external directories too (find file or
133  find in files from the context menu, swap header/source, open selected file, symbol
134  definition/declaration jumps, and active editor following). Apart from adding related
135  projects, one of the possible uses is the addition of system header directories,
136  e.g. /usr/include/gtk-2.0, and having them indexed for code completion and syntax
137  highlighting.
138* Expand all - recursively expands all the directories
139* Collapse to project root - collapses all the directories except for the project root
140* Follow active editor - automatically selects the current file in the sidebar
141  when the user switches to another file. It auto-expands the tree to reveal the selected
142  file. On by default.
143
144Project menu entries
145--------------------
146
147Project Organizer adds some extra entries under the Project menu:
148
149* Find in Project Files - opens the Find in files dialog and sets the search directory
150  to the base directory of the project
151* Find Project File - opens the Find file dialog which can be used to find files
152  within the project or external directories
153* Find Project Symbol - opens the Find symbol dialog which can be used to find symbols
154  within the project or external directories
155* Swap Header/Source - if the current file matches one of the source patterns from
156  the properties, it opens a project file with the same base name (without extension)
157  matching header patterns (and vice versa). If the files are already open, it
158  just switches the document tabs. Nothing happens if no matching file is found.
159
160Each of these entries can be assigned a key binding under Edit->Preferences->Keybindings.
161
162Find file dialog
163----------------
164
165The Find file dialog can be invoked either from the Project menu or from the
166sidebar's context menu. Searches are performed recursively, starting from the
167"Search inside" directory. All files having the searched string as a substring of their
168name are displayed in the Messages window. Clicking the file name opens the file.
169The following search properties are configurable:
170
171* Case sensitive - specifies whether the searches should be case-sensitive
172* Search in full path - when not checked, the search is performed in the file
173  name only (excluding path); when checked, the search is performed in the full path
174
175Find symbol dialog
176------------------
177
178The Find symbol dialog can be invoked either from the Project menu or from the
179sidebar's context menu. Searches are performed within the "Search inside" directory.
180There are several search types:
181
182* prefix (default) - finds all symbols with the specified prefix
183* exact - finds all symbols matching the name exactly
184* pattern - finds all symbols matching the provided glob pattern
185
186By default, symbol definitions are searched; to search symbol declarations, select the
187Declaration option.
188
189Editor context menu
190-------------------
191
192Project Organizer adds an extra entry into the context menu of the editor:
193
194* Open Selected File (Project Organizer) - contrary to the Open Selected File entry
195  present in Geany it also searches for the file in project files and external
196  directories.
197
198Known issues
199============
200
201* In general it is not a good idea to use both the Project Organizer and GeanyPrj
202  at the same time because both of the plugins access the tag manager in Geany
203  to keep all the project files indexed and might cause conflicts to each other.
204
205License
206=======
207
208Project Organizer is distributed under the terms of the GNU General Public License
209as published by the Free Software Foundation; either version 2 of the
210License, or (at your option) any later version.  A copy of this license
211can be found in the file COPYING included with the source code of this
212program.
213
214Downloads
215=========
216
217Project Organizer is part of the combined Geany Plugins release.
218For more information and downloads, please visit
219http://plugins.geany.org/geany-plugins/
220
221Development Code
222================
223
224Get the code from::
225
226    git clone https://github.com/geany/geany-plugins.git
227
228Ideas, questions, patches and bug reports
229=========================================
230
231Please direct all questions, bug reports and patches to the plugin author using the
232email address listed below or to the Geany mailing list to get some help from other
233Geany users.
234
2352010-2014 by Jiří Techet
236techet(at)gmail(dot)com
237