Intellij - how to copy some text from tooltip messages to clipboard [duplicate] - intellij-idea

When I'm writing code in intellij and make an errors, it highlists code with erros, when I put mouse over it, it displays detailed error message. The problem is I can't copy it. When i'm moving mouse over pop-up baloon message and start selecting the message, baloon disappears. In eclipse there is a feature 'focus' on F2 with allows you to focus it on pop-up so it becames a modal window and won't disappear when you move mouse away. is there such feature in intellij idea or is there any other way to copy error message?
EDIT: I just figured out that I need to:
very carefully move mouse down to baloon,
very carefully move mouse to the left side, but only to the left side of the text, not baloon
press left mouse button, then very carefully move mouse to the right side of text, not baloon
without releasing left mouse button press ctrl+c.
Come on! that's really annoying, is there a 'focus' feature feature like F2 in Eclipse?
EDIT2: another way of doing this:
carefully move mouse down to baloon message
hold left mouse button
without releasing left mouse button press ctrl and then really fast A then C
It'll make baloon message to go away, but if you're lucky enough you'll manage to select all text from baloon and copy it. With certain practice it's really faster then method #1.
Still no "normal" way to do this.
I found that if I compile class, I can get error messages, but they can be completely different and if my class doesn't compile, I won't get my error message at all.

UPDATE: It works via Alt+Click in the current IDE versions, but there are still several usability issues: it's not discoverable, doesn't work for all the pop-ups and may copy additional text/keyboard shortcut symbols. There is also a request to make it more straightforward by allowing to copy only selected text via Ctrl+C.
Original answer:
Please vote for this issue to get it fixed.

I can't select text from the error message tooltip at all on Mac and IntelliJ CE 2018, but someone in the linked bug ticket pointed out that Alt + Mouse Click copies the text to the clipboard (meaning you can then paste and get the text) and that worked for me.

The issue is now fixed.
I've tested it with Intellij IDEA 2017.1.4 and it's working just fine :

Holding CTRL key seemed to do the trick then I could select the description and copy.

Related

How can I move focus from the Quick Documentation pop-up back to the Code completion pop-up without using the mouse?

Context:
When a code completion pop-up (Ctrl+Space) appears I often need to have a look at docs for each individual method / constant / etc). The IDE is set to show the Quick Documentation pop-up for a highlighted suggestion automatically after a small delay. Sometimes the documentation is too big and I need to jump to the Quick Documentation pop-up in order to be able to scroll down through it.
Using the mouse I can click on the documentation pop-up and scroll using the mouse wheel. When I'm done reading the documents I can click on the code completion pop-up to explore other suggestions.
My problem is that once the Quick Documentation pop-up is in focus, I haven't found a way to move the focus back to the code completion pop-up without using the mouse.
While I can move focus from the code completion to the quick documentation pop-up by pressing Ctrl+Q, and then use the arrow keys to "scroll" through the documentation, I haven't found a shortcut to return the focus to the code completion pop-up.
What I've tried to far:
Esc closes both pop-ups
Pressing Ctrl+Q a second time opens the docs on a tool window
Any insights on how I can close the Quick Documentation pop-up or move the focus back to the code completion pop-up in such a way that preserves the suggestion that I have previously highlighted?
This seems to be a bug in IntelliJ IDEA . Feel free to add your use-case at https://youtrack.jetbrains.com/issue/IDEA-168388
Here is a workaround that could be used for the time being:
Open Documentation as a Tool Window:
Add keyboard shortcut to focus documentation window from anywhere:
When the completion popup appears, focus documentation tool window by the shortcut from [2] and scroll it
Press Esc to unfocus documentation tool window and focus completion popup

SAP GUI scripting - Button press fails

I am using a macro in an Excel file that runs the SAP GUI. There is a step where, when I click a button in SAP there will be another window that pops up.
For that I have written a code like this:
session.findbyid("wnd[0]/XX/btnXX").press
session.findbyid("wnd[1]/XX/btnXXX").press
There is a button (btnXXX) in the window (wnd[1]). But when I execute this query, I am getting an error object not found for findbyid.
When I keep the break point and execute it, it is throwing error on 2nd line in the above code. I try to pick the activewindow.name and it shows wnd[0] still. Here the issue is wnd[1] is not getting opened.
Does somebody know why the 2nd "button press" doesn't work?
You should be able to replace all mouse clicks with keyboard strokes.
Replace:
session.findbyid("wnd[0]/XX/btnXX").press
With:
session.findById("wnd[0]").sendVKey(N)
Where N is the linked hot-key ID.
To get the exact command, use SAP script recording and only use the keyboard to transition between views and windows. The easiest way to determine how is to hover your mouse over the buttons you would normally click to learn the hot-key then record the hot-key.
Note 1) So far I have found that btn[XX] always maps to sendVKey(XX), but I can't be certain this is always the case.
Note 2) sendVKey always appears to be referenced off the window (wnd[Y]) even if a button is another layer down (/tbar, /usr, etc.).

How can I read errors and warnings in IntelliJ with a screen reader?

I am using IntelliJ Idea for developing scala and Java programs. I am also a screen reader user.
One of the most useful features that IDEs provide is code linting and displaying error and warnings in your code, along with descriptions. I understand if you are a sighted user, you can just hover your mouse over an erroneous line of code and you get a tooltip with the description.
I haven't been able to figure out how to access this description as a screen reader users. So far, to review errors/warnings I would just build the program and look at the command line output, however this is pretty inefficient compared to just hovering over line of code.
Could someone share a better way of reviewing errors/warnings in IntelliJ using a screen reader? Ideally how to access the error tooltip, or how to access a better UI for reviewing them instead of looking at raw command line output.
I'm not sure about warnings however errors can be accessed in two ways:
Firstly when the caret is moved into a line with error the error text is written into the status bar - the problem with this approach is that for JAB applications screen readers are generally unable to find it, so in case of NVDA object navigation has to be used.
The second way requires your caret to be exactly at the point with error - generally it would be set in the proper place if you've navigated to the line with F2. After that you need to press CTRL+f1 - focus moves to the unnamed pane and the error text is its first descendant so once again you need to employ object navigation. I haven't found any reasonable way to access error texts with JAWS sadly.
Importantly, make sure to turn on screen reader support:
settings (ctrl + alt + S) > appearance and behaviour > Appearance > Support screen readers (requires restart)
Then when your caret is on an error/warning, you can press ctrl + F1 and a dialogue will pop up with the description. Press escape to close it.
If you want to make sure the caret is on an error/warning, use F2 to jump to next error/warning.
As noted by lukaszgo1 in his answer, the description is also printed to status bar, but NVDA cant find it using its normal command, because JAB GUI applications are lacklustre in their implementation of accessibility, however if you want to access the status bar of IntelliJ to read the description you can use an NVDA addon which I developed, that adds a command for reading IntelliJ status bar and fixes list items not being labelled properly.
I actually forgot I asked this until I got an answer recently.
Thanks to lukaszgo1 for his answer.

how can I copy error message from intellij idea?

When I'm writing code in intellij and make an errors, it highlists code with erros, when I put mouse over it, it displays detailed error message. The problem is I can't copy it. When i'm moving mouse over pop-up baloon message and start selecting the message, baloon disappears. In eclipse there is a feature 'focus' on F2 with allows you to focus it on pop-up so it becames a modal window and won't disappear when you move mouse away. is there such feature in intellij idea or is there any other way to copy error message?
EDIT: I just figured out that I need to:
very carefully move mouse down to baloon,
very carefully move mouse to the left side, but only to the left side of the text, not baloon
press left mouse button, then very carefully move mouse to the right side of text, not baloon
without releasing left mouse button press ctrl+c.
Come on! that's really annoying, is there a 'focus' feature feature like F2 in Eclipse?
EDIT2: another way of doing this:
carefully move mouse down to baloon message
hold left mouse button
without releasing left mouse button press ctrl and then really fast A then C
It'll make baloon message to go away, but if you're lucky enough you'll manage to select all text from baloon and copy it. With certain practice it's really faster then method #1.
Still no "normal" way to do this.
I found that if I compile class, I can get error messages, but they can be completely different and if my class doesn't compile, I won't get my error message at all.
UPDATE: It works via Alt+Click in the current IDE versions, but there are still several usability issues: it's not discoverable, doesn't work for all the pop-ups and may copy additional text/keyboard shortcut symbols. There is also a request to make it more straightforward by allowing to copy only selected text via Ctrl+C.
Original answer:
Please vote for this issue to get it fixed.
I can't select text from the error message tooltip at all on Mac and IntelliJ CE 2018, but someone in the linked bug ticket pointed out that Alt + Mouse Click copies the text to the clipboard (meaning you can then paste and get the text) and that worked for me.
The issue is now fixed.
I've tested it with Intellij IDEA 2017.1.4 and it's working just fine :
Holding CTRL key seemed to do the trick then I could select the description and copy.

For intelliJ 12.X how do i get the console back in the debugger?

Just like this question here:
IntelliJ: After hiding my "Output" sub-panel within the "Debug" panel, how do I get it back?
I canno get the log/console viewer back in debug mode.
The suggested solution in the given question no longer works the "restore layout" button does nothing, and the "certain spot" on the debug is extremely vague at best.
Is there a way to retrieve the console if it gets vanished (or better yet, just stop that button for vanishing it from even existing)?
I am using IntelliJ 12 Ultimate. If the restore layout didn't work for you either, this should fix the problem:
Open the Debug panel.
Keep mouse on the Debug tab and move it straight right to the Watches icon.
You may see a few more more icons here, and Output may or may not be visible (not visible for me)
If visible, click it and the Output view will be restored.
If not visible, move your mouse slowly to either side of the Watches icon and an empty block would highlight indicating that you are hovering over an icon. There may be several of these. Use tooltip to figure out which is Ouput and click it.
Worked for me, I hope it works for you too.
click the button on the left of Debug View called "restore layout",then the console will go back in the Debug View! 1
Syed explained it pretty well, but a picture could be even better:
A view can be hidden via its context menu, then restored by clicking the corresponding icon (with red circle) to the right.
You can restore the layout using this button as of 2018.1.8
In 2016.2, I had to re-run in debug mode for it to reappear. I could not find a way to un-hide the console in the debug window.
You don't say which version of IntelliJ you're using, but I've just tried this in version 12 and the console window minimises to the far right of the debugger tabs. Look at where it says 'Debugger' and then eyes right until you see one or more icons over the Watches panel. Try clicking on them. If you're not using version 12, then only god can help you :)
In v. 2020.1 there is Layout Settings on the top right corner of Debug window
I've just spent an hour trying to get my console output back, and although this answer didn't solve it, it did help.
I'm on Intellij 11.1 Ultimate Edition, and Restore layout didn't help. Nor did I have any icons above the Watches window in the debugger, but I clicked around above the Watches anyway - and suddenly my console output was restored.
I've tried clicking around there again to see if I can provide more concrete steps, but without success. Can only suggest you keep clicking till it reappears.