I do used IntelliJ IDEA as my development environment at past and I have recently started to use MyEclipse.
In IntelliJ, using the Ctrl+U shortcut on override/implement method go to original method in super class.
Does MyEclipse have similar shortcut and if it does how do I use it?
Assuming MyEclipse has the same menu command as standard Eclipse, the equivalent command is Open Super Implementation on the Navigate menu. It doesn't have a keyboard shortcut assigned by default, but you can add one.
You can do this by pressing Ctrl+ mouse over the method it will show drop down list and in that it has open super implementation. And you can also set your customize key from Help --> key assist menu..
Related
I've been doing mooc.fi to learn java but because my computer didn't let me install netbeans I used a plug in within intelliJ. For some reason it doesn't respond when I use the shortcut sout but instead puts SQLOutput
You can edit the shortcuts in IntelliJ in the settings tab.
Settings/Preferences -> Editor -> Live Templates. Find out the "sout" shortcut and put "System.out.println();" in the expands to section.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360008575319-sout-shortcut
I had this problem too. My issue was I was trying to 'sout' outside of the main method, so make sure you're inside the main method first.
Eclipse used to import missing packages when I press Ctrl+Shift+O.
The shortcut key has stopped working when used in Java files but the same shortcut is working in Python files (importing missing packages).
Any thoughts on how to fix the issue.
Below are couple of snapshots for your reference.
The Java Organize Import command is overwritten by another Ctrl+Shift+O command: in Window > Preferences: General > Keys the Java Organize Import command (where When is In Windows) is bound to Ctrl+Shift+O, but in the main and right-click menu Source > Organize Imports the command is displayed without the shortcut.
There are two solutions for this problem:
Change or remove the shortcut of the command that overwrites the Java Organize Import command:
Find the command: In the Java editor press Ctrl+Shift+L and see which command is bound to Ctrl+Shift+O. Probably, it is the Beans Quick Outline command.
In Window > Preferences: General > Keys change or remove the binding for the found command.
Restricts the scope of the shortcut of Java Organize Import to the Java editor:
In Window > Preferences: General > Keys select the Java Organize Import command and change When from In Windows to Editing Java Source. This solution restricts Ctrl+Shift+O to the Java editor and disables the shortcut in the Package/Project Explorer.
See also: Spring IDE issue #160: organize imports is not working
To fix this issue:
Go to Preferences -> General -> Keys
Click on Filters... and de-select Filter uncategorized commands then Ok.
Then look for the command Go To Symbol in File and select it.
Then click on Unbind and then Apply and Close
Ctrl+Shift+O. should now work.
EDIT:
Also unbind any other conflicting commands and leave only one command for Ctrl+Shift+O and set the When to Editing Java Source.
Please keep in mind that if you are using an AMD GPU, your Radeon Driver could block Ctrl+Shift+O which is used to toggle an ingame-overlay. It can be changed to other keys as follows: Games → global settings → performance monitoring
Window -> Preferences -> General -> Keys
Click on Binding to sort by Binding then scroll and find Ctrl+Shift+O
If several Organized imports are present edit one bind and choose WHEN: EDITING JAVA SOURCE.
Remove( UNBIND COMMAND) for other existing bindings.
Restart Eclipse
Above shortcut resulted in GPU details being popped up on my screen. SO it was bound to some other app which was overriding it. What worked for me is
-> check.
You need to go to Gaming > Global Settings > Performance Monitoring > Toggle Performance Logging Hotkey
You will see this is bound to Ctrl + Shift + O (so the shortcut is used - just buried).
To remove the shortcut (not an obvious process at all!) you need to click the Toggle Performance Logging Hotkey button, it will then ask to enter your hotkey, you then press delete - that is Del (not backspace, not esc or anything else - the Del key).
i did all but not worked so i checked the AMD forum (https://community.amd.com/thread/227221) and found out my solution which is;
"Now I find that all I need to do is to go to Radeon Settings -> Preferences and uncheck the Show Overlay box."
The autocomplete of eclipse is not working now and I searched for hours but I couldn't find an answer to solve it. I haven't used it for long time then the first thing after opening it was to install SWT and windows builder even though I had swing installed. What I mean is, it is may possibly be because of some conflict caused by swt and swing(I read something about a conflict but I don't if this is possible).
Strange thing is it doesn't show anything when I press ctrl+space but when I go Edit-> Content Assist -> Default(it says Ctrl+Space nearby it), it shows things needed to be shown/works as desired.
public class Dsada {
String sssss;
public Dsada(){
sss //pressing ctrl+space is not working,Edit->ContentAssist->Default works fine
}
}
The solution is not to tick/untick some stuff under Windows->Preferences->...->Content Assist-> Advanced. I checked if "ctrl+space" is hijacked by some other thing which is not and checked keyboard language which is English(Those are suggested in mkyong).
I read something about a bug but I couldn't understand. I tried to delete eclipse and re-install again but I guess some settings just stayed in the machine so that it didn't work.
This is recurring for me. I'm using Eclipse 2019-03 in Windows 10.
The steps below work for my case, and does not require a restart.
Window->Preferences->Java->Editor->Content Assist->Advanced
The following options are de-selected, and when I set them the autocomplete worked as before. No restart needed.
1. Java Non-Type Proposals
2. Java Proposals
3. Java Type Proposals
4. Java Proposals (Task-focused)
I don't know what's triggering this but it only happens after I've created a new project. Usually doesn't. It simply doesn't happen often enough for me to notice a pattern to follow up on more.
Clearly this problem occurs with a variety of causes, so review the other answers to see if they match your case.
The hot key combination ctrl+space might be conflict with other settings in system if you are using windows.
Try modify this combination like alt+/, i always use this one since the first time i knew eclipse. It works well.
Hope it works for you.
Window->Preferences->Java->Editor->Content Assist->Advanced
The following options have to be selected, then the autocomplete worked . No restart is required.
Java Proposals (must be selected, not sure the follows)
Java Non-Type Proposals
Java Type Proposals
Java Proposals (Task-focused)
I was facing the same issue. If you use OS X Eclipse Ctrl+Space shortcut can be interfering with OS X system's "Selecting previous input source" using Ctrl+Space shortcut as default.
It is necessary to
edit System Preferencies/Keyboard/Shortcuts/Input Source and uncheck the "Selecting previous input source" or change the shortcut on something else. Eclipse should work after that even without restart.
I faced hot key problem with use Ctrl+Space. I tried to fix the issue first by Windows->Preferences->...->Content Assist-> Advanced and selected
Select the proposal kinds contained in the 'default' content assist list:
Other Java Proposals,
List item
SWT Template Proposals
Template Proposals
Type Proposals
but didn't help.
Therefore, I tried another solution. There would be multiple languages on your computer which could be eating up your Ctrl command. To solve this Go to Control Panel -> Region and Language -> Keyboards and Languages (tab) and then Change Keyboards.
You’ll see a list of languages installed – remove any that you don’t want (click the language and then click the Remove button) until you only have the ones you want left. That fixed it for me, but you can also check the Advanced Key Settings tab to make sure that none of the keyboard short-cuts that are set include Ctrl-Space.
Once you’ve done that, Ctrl-Space should work nicely!!!!
I had the same Problem on Ubuntu 14.04. The problem for me was that ibus used Ctrl+Space as a shortcut. I solved it by starting the program ibus-setup and chaning the shortcut to something else than Ctrl+Space.
Go to Windows >> Preferences » Java » Editor » Content Assist. Then Check the Auto activation triggers for java, Add this in the text box .abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
Recently, I also faced this issue. When I install neon version eclipse.
By (1) deleting respective class, (2) restoring defaults appearance and (3) restarting eclipse, solved the problem for me.
Hope it will help someone.
Go to Preferences » Java » Editor » Content Assist » Advanced. Make sure Other Java Proposals is ticked/checked.
I checked windows has no conflict of ctrl+space (of eclipse autosuggestion) with windows.
This is mere configuration issue of eclipse. reinstallation would fix it.
Thanks.
I select all the parameters in Preferences -> Java -> Editor -> Content Assist -> Advanced.
It help me and resolve the my problem.
Cltr+space work using this step.
Saving my work and restarting Eclipse solved this for me. I hadn't shut down Eclipse in a while, maybe weeks.
I had the same problem (MacOS Monterey, Eclipse 06-2022). Turned out it works with pressed fn button.
For Mac user, you can try : Preferences -> Java > Editor > Content Assist and then :
tick the field "Enable auto activation"
in the field Auto activation trigger for Java, you can input the text alphabet ".abcdefghijklmnopqrstuvwxyz"
I have recently got a new computer and I have put Eclipse Helios on there. Before, on my old computer, when I used the control-assist (Ctrl + Space) and highlighted the suggested methods, the Javadoc for that method used to appear at the side of the control assist pop up window with the method description and parameters etc...
However, on my new computer this Javadoc doesn't appear and only the method suggestions appear - but even the arguments for the methods aren't named (they're just called arg0, arg1 and so on). The only thing I can think of that is different on the new install is ZoneAlarm but as far as I can see I have allowed eclipse through the firewall; unless it's something to do with Java itself.
This feature is really useful to me so any advice on how to resolve this issue would be greatly appreciated. Thanks in advance.
Eclipse is using a JRE instead of a JDK as the default Java.
Download and install a JDK.
In Eclipse Preferences, Java -> Installed JRE's. Use "Add" or "Search" to locate and add the JDK just installed.
Move the check mark indicating the default Java to the newly found JDK.
Allow the workspace to rebuild.
You need to press F3 on the Class or Method name you want to see javadoc for. Then in the editor it's source will open or if you don't have source attached, you'll have screen with bytecode saying that no sources attached. Then you need to open package view, by default it's on the left side. On the top of it there is an icon with two arrows, if it's not pressed, press it. It will show source you've opened in the package view, then you need to find jar file containing your source by scrolling up if you already don't stand on it.
Now press right mouse button on that jar, you'll see properties window. Select javadoc, then you need to select location of the javadoc. You can provide a URL to an online javadoc. The URL you will be pointing to must provide a page named 'index.html' or similar or Eclipse won't allow you to use that URL. Also you can download javadoc locally and then select the location of that javadoc archive. If you need the javadoc for java SE libraries, you can find it in your jdk installation directory in src.zip folder. Hope it'll help.
Did you specify the javadoc location of your library?
Window -> Preferences -> Java -> Installed JREs -> Select your JRE -> Edit -> Select .jar file(s) (rt.jar) -> Javadoc Location
I have an Eclipse project where I often launch the same java class. I have added my run configuration to the favorites menu, but to launch it I still need to click on the run-drop-down menu and click the icon - is there any way to associate a shortcut to this? When I searched for it I got lost in all the plugins & other things which seemed to be not so simple.
edit: Let me clarify, I want something I can type the moment I start eclipse, regardless of what page I'm viewing, so no "run last" or "run current"; I want F12 to link to "launch foo.bar.MainClass".
Just use Ctrl + F11. (This is the standard keyboard shortcut to run the class you are working on)
I wish this is what you are looking for... buddy.
Open the workspace preferences by the menu: Window > Preferences
Select from the tree: Run/Debug > Launching
Now the Launching preferences are seen.
At the bottom there is Launch Operation
Use the option Always launch the previously launched application
You can configure your launch behaviour so Ctrl-F11 will launch the last launched application again, regardless of your current editor selection.
Look at "Run/Debug" - "Launching" within the eclipse preferences.
alt+shift+x+J Rocks
You can go Window -> Preferences -> General -> Key and bind anything you want!I hope it helps!
You should put in a feature request in the eclipse bug tracker (or vote up an existing equivalent feature request) or code it yourself.
It is Ctrl+F11
Ctrl+Shift+X or Ctrl+Shift+J didn't worked for me!
If you've added these classes to your favorite run configurations (available from the run/debug toolbar buttons as "Organize Favorites..."), then the shortcut key combo is Alt+R,T,1 to run your first favorite, Alt+R,T,2 to run your second, etc. Alt+R,H,# works for debug configs.
on Windows machine
ctrl+Fn F11 --- running
ctrl+Fn+Shift F11 --- debugging
If you are someone like me who wants to create a shortcut to run a class/program in java directly, you can create your own preferable shortcut in ECLIPSE!
Follow these steps:
Window > Preferences > General > Keys
Select run from command column
Enter your own shortcut in Binding section
Apply and close!!
WARNING: Make sure you don't create a shortcut which is already assigned for a different task!
I cannot this the answer here but : CTRL+SHIFT+T do apparently exactly what you want! :) Maybe it's because you code it by yourself by time...
Watch here: http://eclipse.dzone.com/news/effective-eclipse-shortcut-key for more.
I faced this problem in eclipse too. I have customized the configuration for me.
Windows -> preferances -> keys
Search for your configuration eg "Run Java Application" or just look for its icon.
Select it
and below in the binding field press keyboard keys which you want to add a shortcut for this configuration eg. ctrl + shift + T
and Apply
You are good to go use the same shortcut keys to whenever you need it.
Just create an "External tool configuration" instead of a standard configuration for the class you want to run, and assign a shortcut key to "Run last launched external Tool".
Of course, there shall be no other external tool configuration.
Even if other java programs have been launched, or the current class contains a main() method, hitting the shortcut key will always run the same configured class.