Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Enabling hover documentation of C functions
Enabling hover documentation of C functions [message #631487] Thu, 07 October 2010 16:45 Go to next message
No real name is currently offline No real nameFriend
Messages: 101
Registered: August 2010
Senior Member
Hi,

I'm developing a small text editor for a domain specific language (using the Xtext framework). My grammar allows for function calls. These functions are just C fucntion calls like:

x = foo();
y = foo1();

Now, when the user is typing foo(), i want to offer content assist which shows the possibilities foo() and foo1(). furthermore, I want to show the documentation of these functions like upon hovering:

Name:
Prototype:
Args,
Desc.

Basically, something very similar to http://www.eclipse.org/linuxtools/projectPages/libhover/

However, libhover requires CDT and doesn't seems to work with third-party custom libraires. I know Java has javadoc etc. There are two problems here:

1. My DSL will be standalone without CDT/JDT plugins
2. The function calls are actually a C library so javadoc won't work since javadoc requires Java.

How can I write my own Class to provide this information? Is there any other documentation mechanism Eclipse supports besides Javadoc?

Maybe if the documentation was available as an XML file, how could I work off of that?

Thank you for any ideas.
Re: Enabling hover documentation of C functions [message #631591 is a reply to message #631487] Fri, 08 October 2010 06:18 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
pgbackup@yahoo.com wrote:
> Hi,
>
> I'm developing a small text editor for a domain specific language
> (using the Xtext framework). My grammar allows for function calls.
> These functions are just C fucntion calls like:
>
> x = foo(); y = foo1();
>
> Now, when the user is typing foo(), i want to offer content assist
> which shows the possibilities foo() and foo1(). furthermore, I want to
> show the documentation of these functions like upon hovering:
>
> Name:
> Prototype:
> Args,
> Desc.
>
> Basically, something very similar to
> http://www.eclipse.org/linuxtools/projectPages/libhover/
>
> However, libhover requires CDT and doesn't seems to work with
> third-party custom libraires. I know Java has javadoc etc. There are
> two problems here:
>
> 1. My DSL will be standalone without CDT/JDT plugins
> 2. The function calls are actually a C library so javadoc won't work
> since javadoc requires Java.
>
> How can I write my own Class to provide this information? Is there any
> other documentation mechanism Eclipse supports besides Javadoc?
>
> Maybe if the documentation was available as an XML file, how could I
> work off of that?
Take a look at
http://www.eclipse.org/eclipse/platform-text/eclipseCon/2006 /texteditorrecipes.zip

Dani
>
> Thank you for any ideas.
Re: Enabling hover documentation of C functions [message #631858 is a reply to message #631487] Sat, 09 October 2010 08:22 Go to previous message
cc1241 is currently offline cc1241Friend
Messages: 1
Registered: October 2010
Junior Member
DSD
Previous Topic:Type of a field
Next Topic:ASTParser having problems with line comments
Goto Forum:
  


Current Time: Thu Apr 25 04:37:42 GMT 2024

Powered by FUDForum. Page generated in 0.03395 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top