Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] DocumentationHover question

Hi Jae,

First it calls selection engine to determine what model elements are under cursor - it there are no model elements it just used the word under cursor.

This is in the AbstractScriptEditorTextHover class.

Regards,
Alex

----- Original Message -----
From: "Jae Gangemi" <jgangemi@xxxxxxxxx>
To: "DLTK Developer Discussions" <dltk-dev@xxxxxxxxxxx>
Sent: Tuesday, September 30, 2008 8:21:51 AM GMT +06:00 Almaty, Novosibirsk
Subject: [Dltk-dev] DocumentationHover question



hello all - 

i was looking (yes, i'm peaking into a lot of different cookie jars right now) at DocumentHovers and wanted to know if it was possible to increase the hover region that is calculated, or perhaps i am looking at the wrong thing all together. let me give an example... 

say i have the following subroutine declaration: 

=item B<method> 

this is a contrived method 

=cut 

sub method 
{ 
my $self = shift; 

Dot::method(); 
Arrow->method(); 

print "hello\n"; 
} 

if i let the cursor sit over the 'method' that is defined as part of the Dot::method call, the getInfo(String content) method is called on my IScriptDocumentationProvider implementation, and 'method' is passed to it, but that does not seem to be useful. i tried this out w/ the ruby plugin and it appears that getInfo(IMember element, boolean lookIntoParents, boolean lookIntoExternal) method is being called instead of getInfo(String content) like in my case. 

could someone shed some insight into this? at the moment my source parser doesn't look at the contents of subroutines, but it does build MethodDeclarations for them, and they are in the ast, so i would think that if i let the cursor sit in the 'sub method' line, that should cause the getInfo(IMember...) method to be called. 

i'd like to be able to provide hovers that show the docs for all the 'method' methods (and have it be the correct documentation for each), as well as providing hovers for the builtins (shift and print) - but that's long term. i'll be happy to just get the basics going. 

thx! 

-- 
-jae 

_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev


Back to the top