Hello:
I want to get your thoughts on a possible change to the Code
Snippet part.
I dug through the source code and found where the snippets
are actually stored
on disk, in an *.rc file. What I'm picturing here is a
directory somewhere
containing sub-directories (the groups) and text files (the
actual code
snippet, one text file per snippet).
A routine within the Snippet part would examine this
directory (configured
perhaps within KDevelops settings dialog) and create the
tree-like view (a
KListView widget, right?) structured to match the directory
hierarchy and use
the text file's file name perhaps as the Text to display
for each snippet in
the tree-view.
In my mind, storing the snippets in a directory as regular
text files would
enable several things:
1. It gets closer to the unix philosophy that everything is
a text file (well
even the rc file is a text file, but in this form is is not
so tightly
structured)
2. Having a single file contain a single snippet would
allow users to create
snippets using their favorite editor, vi, emacs, etc. just
as they would
create any other text file (they would not have to worry
about the structure
of an rc file)
3. Folks could use sed, awk, perl, etc. to manipulate and
modify code
snippets with more ease than if they were bound to an rc
file structure.
4. Given this is a simple directory, development teams
could I think more
easily publish a standard set of templates in a location
accessible to all
developers and that way all running instances of KDevelop
(for each
developer) could read that single location for the code
snippets. As far as
I know right now you could not do this with an rc file--you
would have to
give a copy to each developer after you added all the
standard snippets, at
least I think so.
5. Doing so would just seem to open up the snippets to
better use with other
standard Unix tools, as described above.
6. Of course, with the idea of publishing a single
directory for your
snippets, maybe we should think about a primary (or central)
snippets path
and a local snippets path, both configurable within
KDevelop's settings
dialog (or the conf dialog for the snippets part) and the
snippets tree-view
could reflect a main tree-node for the central location and
a main node for
the local location (the individual developer's own personal
snippets
collection). Maybe some sort of "sharing"
feature could be added to allow a
developer to publish a snippet from his local collection to
the central
snippet location? This seems like it would be a simple cp
mysnippet /path/to/central/snippet/location operation.
Well, this is just an idea I had as I was looking at the
current snippet part.
I think this would be an easy enough enhancement for someone
at my level of
knowledge of C++ could handle, unless you all disagree.
Does anyone agree with the idea, or does anyone disagree
with the idea? Does
anyone have any thoughts, concerns, questions, or comments
about the idea?
I think this would give me that great opportunity to finally
contribute some
code to an open source project.
Thanks,
-Jason
_______________________________________________
KDevelop-devel mailing list
KDevelop-devel barney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
|