[fedora-java] Some patches for the eclipse specfile editor

alcapcom alcapcom at gmail.com
Thu Mar 8 19:54:20 UTC 2007


Hi all,

Last weeks I have make some changes on org.eclipse.cdt.rpm.editor
eclipse plugin, these changes work like a charm here and I found them
really useful.
 
I would really like to work more on this plugin, but before that I
prefer to contact the devs to know if help is welcome and which type of
functionality should be implement in first time.

Modifications are separate into 3 patches (macro-hover,
sections-folding, completion-support)

1. macro-hover patch:
---------------------
When the cursor is placed hover a macro the content of the macro is
showed into the tooltip text.

At the moment content is searched in these two hardcoded files,
/usr/lib/rpm/macros and ~/.rpmmacros.
We can replace these hardcoded string with properties in a preference
page contain a sortable list of rpm-macro-definitions-file-to-include,
that can be useful for example to overwrite system macros definitions by
user macros definitions and vis versa.


2. folding-section patch:
-------------------------
Add folding on each section (preambule, %pre, %build, %install, %
changelog).

It use the existing .getSections() method to get the folding position,
but as a quick fix the preambule section begin always at the first line.


3. completion support:
----------------------
This patch add completion for macro, rpm package and contextual content
assist templates.

Macro completion use the same code as hover macro to retrieve the macro
proposals, the content of the macro is used as description.

There is specific content assist templates for each section, so %patch
template is usable only in the %build section.

Rpm package completion can be used only in the preambule section, there
is a preference page to build the RPM list file (this file must contain
one package per line).
Informations on the packages are retrieve using "rpm -qi", so
description of the packages is show only if the proposals list is less
than 10 items.



I hope that these patches have chance to be included in upstream, so if
some modifications are require in order to be approved, let me know.

Voilà,
Have fun ;)

-- 
Regards,
Alphonse
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpmeditor-sections-folding-support.patch
Type: text/x-patch
Size: 11554 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/java-devel/attachments/20070308/7ab08f62/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpmeditor-macro-hover.patch
Type: text/x-patch
Size: 4805 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/java-devel/attachments/20070308/7ab08f62/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpmeditor-completion-support.patch
Type: text/x-patch
Size: 41453 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/java-devel/attachments/20070308/7ab08f62/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.fedoraproject.org/pipermail/java-devel/attachments/20070308/7ab08f62/attachment-0003.bin 


More information about the java-devel mailing list