Show docstring in an widget in Eclipse/pydev? - eclipse

In Eclipse/Pydev, the docstring is shown in hover and is disappeared after typing anything. Is there a plugin that can show the docstring in a widget that will keep shown until next docstring is triggered?
There's a similar feature called Object Inspect in spyder. It is very useful when using some unfamiliar packages.

Unfortunately there's no such feature right now. Please create a feature request in the tracker for that -- although even better would be a pull request ;) (shouldn't be hard as it'd be mostly creating a view which shows what the hover already shows).

Related

How to get VS Code to list methods of object when multiple extensions are competing for tab complete

In VS Code, when writing the name of a method on an object, it seems to take a while for the method menu to pop up. I also am using github copilot, which is great, but it's suggestions often show first and I don't see the menu for the methods until I type some more letters.
Example, let's say I have the following line of code:
my_json = My_Class(id=5).
and I want to type the name of the method that returns some json. Gitlab copilot might suggest something like the following, where the 'get_json' portion is in grey and available for tab complete.
my_json = My_Class(id=5).get_json()
But, let's say the correct name for the method is 'get_object_json', I would have to type the following before the object method/attribute menu pops up
my_json = My_Class(id=5).get_o
Is there a way to manually open the object method/attribute menu? A keyboard shortcut? So that I can open it right after I have typed the period?
Similarly, sometimes I DO want the GitHub suggestion but, right as I hit tab, Pylance IntelliSense replaces the tab complete with the name of some variable or library, or global (i.e. some built-in exception class).
It would be great if there was a way to assign a specific key combo for tab complete of GitHub copilot. Like tab-option, or something, that will only complete the github copilot suggestion, if there is one.

vscode shows no function documentation for some functions on hover

I guess vscode is supposed to show the full function documentation in the docstring on hovering over it. At least that is what it does for many functions. However, for some functions it only shows the function with all arguments. For example, the first link shows an example where the full docstring is displayed and the second link an example where it isnt. Both functions are from the same package, so this really does not make any sense to me. Does anyone know if there is a fix or if this is a bug that somehow has to be fixed by vscode or something?

Hide VSCode snippets in suggestion list when no code is written?

In VSCode there is a setting for having snippets first in the list of suggestions ("editor.snippetSuggestions": "top",). This is great, as you might want a snippet to take precedence over other intellisense items when it matches what you've written.
However, the snippets will also be ordered at the top when you display suggestions without writing anything. I often show suggestions inside classes to see what properties/methods I have available, but in those cases I have to scroll through my entire list of snippets before the properties/methods show up. Is there any way to turn off snippet suggestions when you have not written anything?
Example image of the suggestions showing above halfway down in the suggestion list:
This is not an option as of yet, and a feature request for this funtionality has been added. https://github.com/microsoft/vscode/issues/147357
In the meantime, a workaround is to hide snippets from completions and use the explicit > Insert Snippet command instead. (Copied from the issue response)

Eclipse (ctrl+space) content assist hook

I wrote a plugin that gets user input from Java editor, makes some computation, and writes the results to my view. The way I start the process of aforementioned computation is via context menu and I hate it. I would like it to start on ctrl+space, i.e. content assist. It is faster, more intuitive w.r.t. what the plugin does. Is there a way to do so?
Update:
For example, what should I do to get the current cursor position when user presses ctrl+space? I would use that position info and print it to my view. This is the most simplistic plugin that I basically need.
You could take part in the content assistent calculation of Ctrl-Space by extending javaCompletionProposalComputer. However, if you want to trigger some arbitrary modification operation on the Java file, you are better suited by providing a quick assist instead.
If you are confused by the terms: An example for quick assist is the suggestion "Invert if statement", which you can see when pressing Ctrl-1 with the cursor placed on an "if".

How do I jump to a method in RubyMine?

In Visual Studio, the editor has a drop-down list of functions in the current class; clicking on one will take me to the top of that function. Is there a way to get a similar behaviour from RubyMine?
I suggested this as a feature request to the folks at JetBrains, and within the day they got back to me to tell me about the 'File Structure Popup' on ^F12 which does very nearly what I want; it's an extra keypress but I can live with it.
If you're working on a Rails project, change the project view to Rails (change the View as: dropdown value)
Online help is here.
It looks like this is as close as it gets to the functionality you're looking for.
Ctrl+0 key in editor will show all methods with search capacity.
The same is drop-down menu Navigate -> File structure.