For Java, in the editor of a class, I am used to hovering over an unknown class to bring up the quickfix menu which suggests imports to resolve the problem quickly.
Is there any such feature in the Scala IDE for eclipse? Hovering over an unknown class in a scala file does not bring up anything for me, so I end up typing imports manully. That is pretty annoying.
On a mac: CMD+shift+O adds imports as necessary and putting the cursor on a class name and doing CMD+1 does it for that one thing. Non-mac I'm sure has similar.
Related
I am using the Eclipse compiler and have enabled 'Build Project Automatically'. I am not using the power saver mode as well.
This should be a trivial thing to solve for IDEA, but for some reason, they decided that they shouldn't. Suppose I have a class A that uses a field from class B. Now if I make a syntax error in B, it highlights that class in the project windows. But if I delete the field that is being used in class A, no highlighting is done in class A, until I actually open it.
Eclipse does it so well. Am I missing something or is this feature really not present in IntelliJ?
One of the features I love the most about Eclipse is that is shows you suggestions for compilation errors just by hovering over the error with the mouse. For instance, if I make a class implement an interface, it'll automatically offer me to add the unimplemented methods. Or if I use a variable I haven't created yet, it'll offer me to declare it.
Is there such a functionality in Intellij? If so, how can I turn it on?
Place your cursor on the underlined part of code which shows an error, hit ALT+Enter and pop-up menu with available quick-fixes will be shown as illustrated in the screenshot below.
This also works for other types of inspections, such as warnings, not just compilation errors.
Eclipse's class editor has no formatting or collapsable fields / methods. How can I make the class editor have the same text formatting as the java editor? Or at least make it more readable and user friendly, such as the one in Netbeans.
Opening a class in Netbeans:
Opening a class in ECLIPSE:
I would like to make classes more readable in Eclipse, is there any way to do that? I have tried attaching a source / javadocs before with no luck. I am hoping there is a simpler way
You want to see a source like representation of a .class file. Although not exactly what you are looking for JD-Eclipse can be used for that purpose. Addmitedly the scope is broader, because it is a full blown decompiler, that will actually show you the code, but should work for you.
When installed it will by default open .class files and present the code instead of default view that only presents somewhat raw results of parsing bytecode.
Another option is Bytecode Outline that is not a decompiler, it only deassemples bytecodes in the editor, but can make debugging a bit easier, because it seems to handle line numbers in sync with the debugger, unlike JD-Eclipse, which just outputs line number comments.
In Eclipse, you can select a Java class and show the class hierarchy ("open type hierarchy" or F4 in default bindings). It opens the "Type Hierarchy" view, which lists its base classes and the tree of its subclasses.
I'm sure there is an equivalent in IDEA to get this information but I haven't found it yet.
What workflow is best in IDEA to quickly show the base classes of a given class?
Visualizing the subclasses is nice to have but less critical for me. In the editor, I can find the immediate subclasses easily via the "has subclasses" button on the left pane.
Is this the feature you are looking for? The shortcut is Ctrl+H
http://www.jetbrains.com/idea/webhelp/building-class-hierarchy.html
Ctrl+Alt+U also shows a type hierarchy: How to show all parents and subclasses of a class in IntelliJ IDEA?
Try use Ctrl+H Hierarchy class panel should show.
Another option is to set the Keymap to Eclipse in IDE Settings and you would continue to be able to use F4. Go to Settings using Ctrl+Alt+S type Keymap in search box and change Keymaps to Eclipse.
Note: I am using IntelliJ IDEA 12.0.1 ultimate.
There seems to be a bug in netbeans 6.9.1 when it generates the ResourceMap code. My project is called ScriptedResponseApp and the main entry is ScriptedResponseAppView. So, for all the dialogs, I should get something like
org.jdesktop.application.ResourceMap resourceMap =Application.getInstance(ScriptedResponseApp.class).getContext().getResourceMap(SomeDialogClass.class)
but instead I get
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(scriptedresponseapp.ConsoleView.class).getContext().getResourceMap(SomeDialogClass.class);
Where ConsoleView is another unrelated class in my project. Why is netbeans picking ConsoleView up as my main class and how do I fix it? As a work around, I've been closing netbeans, editing the code in a text editor, and reopening netbeans. It work until I make a change to anything involving a resource file, which generates out this same wrong code.
Any ideas on how to fix this annoying bug?
I dont know if it's a bug. In my case, I refactored the main class, but Netbeans don't change the project.xml (nbproject folder).
I mannualy change and it worked.