334 Commits

Author SHA1 Message Date
Colomban Wendling
6f7a06780f Improve performances of symbol list updating
Rather than walking the whole tree for each tag to find a possibly
corresponding row, use a hash table as cache.
This is a very significant improvement on large files with many tags,
reducing for example to about 170ms an update that took more than 18s
before.

Also fix merging of tags with same name and scope (probably unlikely to
exist in real-world files, but the tagmanager extract them correctly
and they used to display correctly too).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5567 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-05 22:56:55 +00:00
Colomban Wendling
57d00f48d0 Update the symbol list rather than clearing and re-building it
The main advantages of not clearing and rebuilding the whole list is
that it doesn't loose the folding and selection (as far as the selected
row(s) still exist after the update, of course), and it reduces
flickering upon update.

The current implementation works in 3-steps:
1) mark all rows as invalid;
2) insert/update the rows, according to the new tag list, marking them
   as valid;
3) remove all rows that are still invalid.
This walks (rows) the first time, (tags*rows) the second and (rows) the
third. This also uses an extra column to store the row's validity.

A (probably) better implementation would be to:
1) walk the current rows, updating them if necessary, or removing them;
2) add the remaining tags that weren't there before.
This is probably faster in theory (and probably also in practice), but
it needs to refactor a lot the code to easily update *or* create a row,
what the current code does not provide.
Basically this is would be a two-pass update, walking (rows*tags) in
the first pass, and only the remaining non-added tags in the second.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5562 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-05 22:53:13 +00:00
Colomban Wendling
f120554364 Provide a GType for TMTag and use it
It is a boxed type but uses reference counting behind the scene. This
allow for example the tag store to make sure the tags it holds are
always valid.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5560 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-05 22:50:04 +00:00
Colomban Wendling
88aa81b6a8 Improve implementation of hide_empty_rows() to do all in one shot
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5558 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-05 22:47:13 +00:00
Enrico Tröger
ec408fa4b9 Add filetype Cobol (based on a patch by Seth Keiper).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5533 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-01-30 15:03:51 +00:00
Enrico Tröger
6ac2623208 Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5528 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-01-19 19:39:09 +00:00
Nick Treleaven
c61a189c00 If the current word's tag is on the current line, make Go to Tag
Definition look for a tag declaration instead, as this is more
useful. Likewise make Go to Tag Declaration search for a tag
definition in this case also.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5428 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-23 13:17:42 +00:00
Nick Treleaven
f346f985df Add filetypes_get_display_name() to get translations for filetype
None.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5366 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-04 18:06:09 +00:00
Nick Treleaven
568f1853d2 Remove unnecessary uses of FILETYPE_ID() macro with
GeanyDocument::file_type.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5323 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-25 17:24:47 +00:00
Enrico Tröger
3eb6db8dc2 Fix crash when trying to sort NULL pointers as tags in the Symbols list (closes #3011986).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5004 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-06 18:02:49 +00:00
Nick Treleaven
fdfbd2efb4 Add symbols_get_context_separator() to plugin API (patch by Colomban
Wendling, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4876 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-05 16:26:25 +00:00
Enrico Tröger
8c963d2829 Make string arguments const where appropriate (patch by Colomban Wendling, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4862 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-25 17:43:39 +00:00
Enrico Tröger
85cded2a87 Remove unused code.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4824 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-17 14:34:19 +00:00
Enrico Tröger
db6c8bcaa0 Add R tagmanager symbol parser (patch by Jon Senior, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4685 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-21 14:54:53 +00:00
Enrico Tröger
3c85d86c9e Explicitly read filetype configuration files before generating global tags to get settings for custom filetypes.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4637 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-01 21:44:10 +00:00
Enrico Tröger
7ba4a81181 Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4518 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-01 22:55:18 +00:00
Nick Treleaven
5f28284cb1 Apply patch from Kelvin Gardiner to add Verilog filetype (thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4474 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-12-07 17:51:37 +00:00
Nick Treleaven
6b6d4b882b Fix VHDL symbol list to display all tags (patch from Kelvin Gardiner,
thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4448 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-11-26 12:33:28 +00:00
Nick Treleaven
2c1a9171a0 Parse VHDL signals.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4446 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-11-24 16:27:37 +00:00
Nick Treleaven
8f9336abef Fix invalid tree iter access when using tv_iters.tag_other but not
using tv_iters.tag_variable.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4416 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-11-10 18:37:23 +00:00
Nick Treleaven
d17141ca9a Support loading global tags files for custom filetypes.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4343 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-20 12:07:12 +00:00
Enrico Tröger
8d79e62937 Add missing icon for Java packages in the Symbol List.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4274 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-30 19:44:59 +00:00
Nick Treleaven
550acb30be Add utils_get_file_list_full() which can optionally sort or include
a full path for each list item.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4264 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-29 12:10:17 +00:00
Nick Treleaven
e8d7322871 Change Perl tag parser to ctags SVN r601. This removes support for
buggy local/my/our but it parses constant/format/labels and should
be less buggy overall (closes #2861232).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4261 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-29 11:07:10 +00:00
Nick Treleaven
caec1ec7c3 Rename treeviews.[hc] -> sidebar.[hc].
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4252 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-28 11:16:59 +00:00
Enrico Tröger
b84a64934d Add new filetype: Abc (patch by Eric Forgeot, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4211 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-20 18:46:56 +00:00
Nick Treleaven
a3f7357137 Use SYMBOLS_COLUMN_NAME constant.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4202 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-17 16:39:11 +00:00
Nick Treleaven
1986d915cc Run ./scripts/fix-alignment.pl -w src/*.[hc] plugins/*.[hc] (skipping generated files).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4199 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-16 14:13:38 +00:00
Enrico Tröger
6a73751aba Add new filetype: Txt2Tags (patch by Eric Forgeot, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4163 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-06 20:57:42 +00:00
Nick Treleaven
2bb49a38c8 Support adding custom filetype files e.g. filetype.Foo.conf. (Only
tested with empty file so far).
Allow GeanyFiletype::extension to be NULL.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@4070 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-08-12 11:19:54 +00:00
Nick Treleaven
84f8db733d Make foreach_ptr_array() use an integer argument for its
implementation, as this is more useful potentially than a gpointer*
argument, and more straightforward.
Add foreach_c_array(), foreach_ptr_array() to API.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3997 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-07-20 12:25:24 +00:00
Enrico Tröger
226d43b812 Fix duplicate "context_action_cmd" key.
Use different icons for "Methods" and "Procedures" in the symbol list for Tcl files.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3903 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-06-29 19:46:04 +00:00
Enrico Tröger
355f8ef2b5 Improve parsing of Tcl files (parsing new Tcl8.6 style classes, methods and namespaces).
Patch by Witek Mozga, thanks.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3900 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-06-28 10:42:34 +00:00
Nick Treleaven
94025e5f89 Only use ":::" context separator for Conf, ReST, not all Misc group.
(Minor edit of yesterday's changelog.)


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3835 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-06-02 14:45:23 +00:00
Nick Treleaven
221b3fda3a Fix grouping symbol list children when parent name has "." character
in for reStructuredText and Conf filetypes (and any in the Misc
group).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3830 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-06-01 15:21:55 +00:00
Enrico Tröger
bf179fa14d Parse Python import statements to get symbol completion for the imported module names.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3804 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-05-19 20:17:21 +00:00
Enrico Tröger
7879c0cdd7 Fix compiler warning.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3794 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-05-13 22:17:30 +00:00
Nick Treleaven
bebb03c977 Also print debug messages when loading a tag file manually or for
default global tags files e.g. python.tags.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/unstable@3761 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-05-01 15:04:46 +00:00
Nick Treleaven
f478125961 Show the number of tags in a user global tags file (instead of the
running total) in the debug message.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/unstable@3760 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-05-01 14:45:31 +00:00
Nick Treleaven
236d99c763 Read custom system global tags files from $prefix/share/geany/tags.
Closes #2778923.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/unstable@3751 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-30 12:54:15 +00:00
Enrico Tröger
26318a59ca Prevent crashes when two or more top level items in the symbol list have the same name (closes #2778246).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3735 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-25 09:30:07 +00:00
Enrico Tröger
61f89d5c25 Add a trivial symbol parser for NSIS files.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3716 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-21 20:52:19 +00:00
Enrico Tröger
a95a59a42f Remove all G_LIKELY macros inside g_return_if_fail() statements as this is redundant.
Remove many other G_LIKELY/G_UNLIKELY macros which doesn't make much sense to keep the code more readable.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3708 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-15 22:47:33 +00:00
Enrico Tröger
54f406a548 When updating global type definitions for opened documents, take also C++ namespace symbols into account and don't ignore symbols which are defined inside a scope.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3706 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-09 12:41:29 +00:00
Enrico Tröger
8111ada01b Prevent showing an empty macro list.
Show only macros of the same filetype instead of all macros of all loaded filetypes.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3698 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-07 22:09:08 +00:00
Nick Treleaven
bfe7da53bd Fix 2 old uses of filetype IDs.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3694 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-07 15:42:24 +00:00
Enrico Tröger
a9dc990049 Start using G_LIKELY/G_UNLIKELY macros to gain a little more performance when building the code with gcc.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3687 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-05 21:07:40 +00:00
Nick Treleaven
5ddc129829 Make GEANY_FILETYPES_NONE = 0; other things are now broken, e.g.
setting Open dialog filetypes.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/reorder-filetypes@3640 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-20 16:18:32 +00:00
Enrico Tröger
4122c1b138 Add filetype ActionScript (patch by Chris Macksey, thanks).
Update type keywords only for real C-like languages.
Fix wrong sorting of Assembler and Ada filetypes.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3624 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-13 09:58:27 +00:00
Enrico Tröger
57c761dea2 Fix missing brace in comment.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3608 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-27 14:06:34 +00:00