How can I switch to a new java project after using New... and close the remaining windows from the previous project automatically? I have to close each individual window every time, and tell Eclipse that now I want to use the new project.
use cntrl+Shift+W this short key will close the all window in eclipse
Not a direct answer, but when you right click on a window, you have an option to close all other windows.
If you want to close the opened classes from one project, press Ctrl+Shift +E to view the opened editors. Then, press the header for the column "Path" to sort them. Now select the ones from the ones from the previous project(holding the Shift key, as they are contiguous), and click on button "Close selected editors"
Related
I am new to using Eclipse (I just downloaded it).
I began creating a new project, wrote some code, added some packages and classes and closed the project.
Now, I opened it again and I'd like to add a class to a package. So I right-click on that package and the standard popup window appears. But when I now hover over "New ->", there are only three options: "Project", "Example" and "Other". The first time I worked on the project, there were many more options, f.ex. I was able to click on "Class" direct. Right now, I have to select "Other", type "Class" into another window and click "Ok".
Is there any switch or so in the settings that I accidentally enabled that changes the default right-click popup?
I added an image.
Thank you for help!
It seems you are not in the Java perspective: Window > Perspective > Open Perspective > Java
I have a really annoying problem in Eclipse java neon, when i do a right click on a package in order to create a new class or in any area, Eclipse don't show me proposition like class, package or even project but only a incomplete menu unusable
I have already launch eclipse with -clean but not help
An illustration of the problem, I also notice that Eclipse is in... debug mode ? (upper left corner)
Select menu Window -> Perspective -> Customize Perspective....
Select Menu Visibility tab.
Select tree node File -> New.
Toggle check box of menu items as you like.
You are in the Debug Perspective (see What is a Perspective?). You can switch back to the Java or JEE perspective (where most development activities are typically performed) by using the perspective switcher toolbar in the upper-right corner of the Eclipse window.
I suggest you learn about the use of Perspectives in Eclipse.
Try
File --> New --> (Then choose what you want)
Specify the Source folder and package.
When I don't find something in the menu there, I just click on Other... and search for whatever I want to create. Regardless of the Perspective.
Of course it could more practical to customize the Perspective to include the frequently used items as mentioned.
In Eclipse you can use alt+<- or -> to move between places you were. What is the equivalent in Intellij?
It is Ctrl+Alt+← and Ctrl+Alt+→. See this help page.
I confirmed it's ⌘+⌥+←(→) on Mac OS X.
Command + Option + Left(Right)
Just for additional information.
I would suggest just go and select eclipse shortcuts option instead of default provided by IntelliJ idea ide
We can also change default shortcuts option to eclipse shortcuts option -
File -> Settings -> Keymap -> select Eclipse in the dropdown.
I got this from IntelliJ site, I'm sure it will be helpful:
To navigate backwards, press ⌘+[. To navigate forward, press ⌘+].
To navigate to the last edited location, press ⇧+⌘+⌫.
To find the current caret location in the editor, press Ctrl+M. This action might be helpful if you do not want to scroll through a large file.
However, you can press the ↑ and ↓ arrow keys to achieve the same result.
To highlight a word at the caret you are trying to locate, select Edit | Find | Next Occurrence of the Word at Caret from the main menu.
To see on what element the caret is currently positioned, press ⌃+⇧+Q.
To move caret between matching code block braces, press ⌃+M.
To navigate between code blocks, press ⌥+⌘+[ or ⌥+⌘+].
Well, I'm using Ubuntu 18.04 and Intellij IDEA Community Edition 2020.1.3 and i could only make the navigation work by using: ALT+SHIFT+← or ALT+SHIFT+→
i am creating a java application and want to provide a functionality of it in mouse right click menu on windows os
like if we have notepad++ installed then if we right click on some file then it shows an option "edit with notepad++"
i want to do similar kind of thing but with selected text
You'll have to add to your program a functionality to insert your program path into the registry. Check adding program to windows right click option menu for help.
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.