Is there a way to show hover JavaDoc help using the keyboard? - java

Eclipse shows JavaDoc help in a tooltip window when I hover with the mouse over a symbol. This is great, but it would be better if I could pop up this tooltip from the keyboard when the cursor is on the symbol. Is there a shortcut which does this?
I found Shift-F2 which opens external JavaDoc and I do not want that. I'd like to pop up the same tooltip with the keyboard which is shown on mouse hover.
Edit: Thanks, that was quick. :) I accepted the quickest answer.

Try pressing only F2 when cursor is on that word. It will open the same popup dialog as you get when you hover on it.

Move the cursor on a method/class/variable and press F2.

In Netbeans 7.3 the shortcut is Ctrl + Shift + Space
See the original answer at:
How to see Javadoc documentation on mouse hover in NetBeans?

Related

How to keep popup on one screen in Intellij IDEA?

When I type dot and press ctrl+space, I see a pop-up with list of possible methods.
when I press ctrl+q i see another pop-up with javadoc for the selected method.
The problem is half of the popup is on the one screen and second half is on another screen. it's unreadable. how to make the pop-up stay on one screen?
ubuntu 14.04, mate, 2 monitors (extended desktop), intellij 2016.1.1
The pin is your friend!
Press that pin in the top right corner to "Open as tool window"!
From that moment on, the documentation will always appear in that specific window. Just resize it and place it somewhere in your screen where it does not interfere with other things. From that moment on, every time you press Ctrl + Q the documentation will appear in that window.
Also, note you can change the font size:
But it may be more handy to drag the popup with the mouse:

How to show a hover popup with SWT StyledText

I am using SWT's StyledText and I am wondering how I would detect if the user hovers over a word for more then 3 seconds. An example of what I mean is how Eclipse has a popup that shows, when you hover over a text.
You can use a 'mouse track listener' to listen for mouse hover events. However you can't set the hover time for this:
control.addMouseTrackListener(MouseTrackListener)
MouseTrackListener has three events - mouseEnter, mouseExit and mouseHover.
While you can implementet text hover yourself, with a MouseTrackListener like suggested by Greg, you can also use the JFace TextViewer.
The TextViewer provides a higher-level abstraction for text hover. With its setTextHover() methods you can set a callback, that is informed when a text hover for a certain region should be shown.
This is also the method that is used by Eclipse text editors.
I believe those are tooltips that appear when you hover over a text for e.g. in Java editor. See here for tooltip doc and here for examples on how real production code uses eclipse tooltips.

java: add an option "re-size window" in the contextual menu which appears when we right click on the restored window in the tool bar

First I apologize if my English is not very good. it's my 4th language :P:P.
I have a java program (which I run using NetBeans) that open a graphic window (application), when I restore this window then I do a right click on its button in the toolbar it shows a menu that contains a button to close the window (like it does for every window XD), I want to add another button or text to re-size the window to [30,30],(example: we add text "send window to [30,30]" and when we click on it it resize the window to 30,30) cause when I do a remote connection from home I can't see the window its big and it appears in the 2nd screen. I don't know how to write this in Java. I'll be grateful for any help. If I didn't explain the problem well please don't hesitate to ask me and i'll explain it other way. :)
Thank you and have a lovely day everyone :):)

What does it mean arrow in editor in Eclipse?

Sometimes appears this arrow so I cannot see if breakpoint is installed. Does it possible with some shortcut remove this arrow?
Thanks.
I think the yellow arrow is the search results icon. It know it sounds silly :/. You should just be able to close the search pane and the arrow will go. Does that fix it?
The arrow will go away if you close the search result, not the search view. If you press the X or XX on the search view, it will hide/remove the yellow arrow.
On Eclipse Help --> Help Contents --> Search icons.
Select the Editor area marker link, and you will see that the yellow icon is the "Search Result" icon. Whenever you do a search and the result is found, the icon shows which line it found it in.
Window | Show View | Search Click Xx icon in the Search view. Clearing the search will remove the arrows.
We have another way to check if any break point is installed at a line without masking arrow icon. It's just hovering mouse over arrow icon, Eclipse will display a popup to claim what are set (include break point) at this line.
Another way to clear the arrow is to:
Locate the Show Previous Searches icon on the Search pane's toolbar (looks like a flashlight-with-document icon that has an attached Dropdown arrow)
Click on that icon's Dropdown arrow
Select the Clear History menu item
This will clear your search history for the current session and remove all the yellow arrows in the editor without having to close the search tab completely.
The easiest way to clear the arrow (without turning them off entirely) is to simply perform another search.
I tried other approaches (closing the search pane, closing the file) and nothing worked.

How do I make a JPopupMenu appear when a JCheckBox is clicked?

I have a JCheckBox in a program (labeled "Use MiniTimer") that, when right-clicked, shows a JPopupMenu with options "Show on Close", "Show on Minimize", "Show on Close or Minimize", and "Do not use MiniTimer". How can I make this JPopupMnu appear below the JCheckBox when it is left-clicked, too?
Note that I tried setting the actionPerformed method of the JCheckBox to miniTimerPopupMenu.setVisible(true);, but that merel makes the JPopupMenu appear in the top-left corner of the screen, and even then, it will not register any interactions with it. Does anyone have any experience or suggestions they would like to share?
Read the section from the Swing tutorial on Bringing Up a Popup Menu for a working example. The tutorial uses popup.show(...). Don't know if that is the difference.
If you need more help post your SSCCE (http://sscce.org) that demonstrates the problem.
I think you should set the location of the miniTimerPopupMenu using the setLocation() method, I think the following code does the trick
miniTimerPopupMenu.setLocation((int)jCheckBox.getLocation().getX(),(int)jCheckBox.getLocation().getY()-10);
miniTimerPopupMenu.setVisible(true);
Then you can play with y and x location of the top popupmenu.
Hope this works

Categories