I'm using the PMDPlugin (version 1.8.3) with Intellij IDEA Ultimate 2017.3.
After running PMD, hovering the mouse over a line in the PMD pane displays additional information in a tooltip with a yellow background. See the screenshot below for an example.
The problem is that the tooltip disappears after about two seconds. Selecting (clicking) the line first makes no difference; the tooltip still disappears.
I'd like the tooltip to remain displayed for more than a couple of seconds. Is there any way to configure tooltips to become "sticky", or adjust their lifetime in Intellij IDEA, or is this just a feature/limitation of the PMDPlugin?
There is no such setting. Neither in PMD plugin or in IntelliJ IDEA currently. In IDEA you can set just initial delay before showing tooltips but not the duration.
The easiest way of reading details on the issue instead of tooltip is right clicking the issue and selecting 'Details'
It will redirect you to the webpage describing the type issue and the reasoning behind why it is bad, such as here:
https://pmd.github.io/pmd-5.8.1/pmd-java/rules/java/design.html#UseUtilityClass
Compared to the tooltip there is even more information about the issue such as detailed code samples.
Related
In IntelliJ it seems like whenever I save a file there is this annoying green pop-up notifier at the very bottom that obscures my bottom toolbar, i.e. where terminal, messages, debug usually are.
It's usually "Refreshed selected content roots" which I believe is a gradle thing. There is no obvious way to dismiss it and it just trips me up every time.
As I often make a change and then want to switch to SonarLint or Terminal or whatever and it's blocking the button.
I know obvious workarounds like moving buttons around, but I kind of don't understand what that notifier is even called to configure it or even google it.
As #CrazyCoder would know what he's talking about, I found that the alert is caused by the (hasn't been updated in years with no configurable settings) AccuRev Plugin.
You can search this PDF for "Selected Content Roots" and you'll find it:
https://supportline.microfocus.com/Documentation/books/AccuRev/Plugins/IntelliJ/2014.2/intellij-2014.2-users_guide-en.pdf
This means if I don't plan on moving files around I can logout or disable the plugin then run accurev stat -mO when I'm done. There have been plenty of other reasons to do that, so this just added to the heap.
I enabled a setting by mistake in IntelliJ giving me a green outline around parts of my source:
What does this outline mean and how can I disable it again?
Go to your code's tab in Editor -> Colors & Fonts, and look for a setting with the following enabled:
Unchecking that box will disable the effect
I'm seeing this happen when it is highlighting the current scope of an item. It seems to happen when you hold down control and right click on a bit of code, but it probably depends on your keymappings. (I'm using default GNOME keymappings)
Escape seems to clear it.
On the right, we can see something going on, and after it is done, it shows "x error found".
What is this exactly? Java compiler? Lint tool? Build-in analysis?
The problem is, when file gets large, it is hard to find out where the error is.
I know we can use F2 to navigate, but it also navigates to warnings. It would be nice to have a window showing all the errors in one place. Where is the navigation window for "x error found"?
Thanks for Vucko's answer. I didn't know it is clickable. Really appreciate it. But, I have to click that, hover my mouse over the codes, then wait for the error details to pop up, which costs lots of time. Also, warning is clickable, which is annoying. I still prefer a window.
Just Figured it out by myself.
After we Build > Make Project, Messages window pops up. All the errors show up here. We can click on each error to navigate to the corresponding file and location, or copy it to search on Google.
It is most likely Java compiler. Somehow it compiles on the fly. But, sometimes it is not reliable just like Instant Run is not reliable. If it becomes inconsistent with Messages window, try to restart Android Studio.
Never mind how big the file is, you can simply find the error by clicking the horizontal red line below. Every error will have it's own line and by clicking on it, you will be taken to that line immediately.
See the image for better understanding of what I mean:
Note: This is quite a useful tool for some other stuff as well, for example warnings will be shown and colored in orange (every color is customizable of course), and if you're using version control, e.g. Git, your changes will be colored in blue/green for edits/additions respectively.
I know we can use F2 to navigate, but it also navigates to warnings.
You can right-click on the scrollbar and select this option.
Go to high priority problems only
Have you tried filtering Logcat to Error? Like this:
Try Analyze --> Inspect code this will give you all your error with line number. it will even show typo
Yesterday I installed IntelliJ IDEA IDE and so far I like it (I used to use NetBeans which I like and Eclipse which I avoid).
When it comes to code editor I would like to change javadoc popup behavior in 2 ways:
I set javadoc popup to show after one second (Settings -> Editor -> Code completion -> Autopopup documentation in). However it only works when I press Ctrl + Space for code completion. When code completion pops up automatically javadoc window does not show. And I want it to. Simply, it is the same issue as the one addressed here: http://youtrack.jetbrains.com/issue/IDEABKL-6124
The javadoc popup window hides current line (it pops just over code completion window). It would be better if it popped over actual line (with caret) without hiding it.
Is there any plugin that allows such a customisation? Or any setting that I missed?
EDIT 1:
Here is the picture explaining situation 2:
As you can see because of javadoc popup I cannot see what I am currently writing - part of the word "System."
The problem with JavaDoc hiding the code is caused by the low horizontal resolution when the popup cannot fit on the right. Normally displays have enough horizontal pixels to fit it. In any case it's still a bug that can be fixed by displaying the popup above the current line of code.
I've submitted this bug to YouTrack, feel free to vote.
I made a GUI in Eclipse using the Google WindowBuilder plugin. The problem is that when I right-click on the design representation of my code and click, "Test/Preview," my GUI works and looks perfectly (the picture on the right), but when I click the "run" button in Eclipse to actually run the code, the GUI looks all weird (the picture on the left).
Does anybody have a clue as to what the problem is?
Ok this could have multiple reasons, the most obvious one being, that you (accidentally?) set your JButtons' background Color to the same dark-gray as your Frame's background. Check This first! WindowBuilder's preview has a quirk of sometimes not showing recent design changes on some elements immediately.
If that Is not the case with you, it might be some weird formatting thing.
Have you manually changed your buttons' formatting within the code and not within the design tab? Then add (Say your button is called okButton) okButton.repaint(); after the changes you manually made.
If this still doesnt work,
Try adding okButton.setVisible(true); (Althought that is pretty far fetched, seeing that a button outline can be seen!)