Shortcut key to activate project explorer in Eclipse - java

I am unable to find out the shortcut key to activate the project explorer in eclipse. I usually use cmd+F12 key to activate the editor, however i have to rely on mouse to move to a project explorer.
Is there a shortcut key available for that ? If not can it be configured ?

Go to Window --> Preferences --> Click on General --> Keys. You will see
Now, below Scheme there is textbox, type project explorer. You will see
Select Show View from the grid. In Binding type the short key which ever you want. I typed Ctrl+Alt+Shift+Q. Then click on Apply and OK.
If you want to assign a short key and that short key exists then you will see in Conflicts: table.
Some useful shortcuts are
103 shortcuts
more shortcuts

By activate do you mean to open the project?
This shortcut is not set by default. Go to Preferences->keys and serach for open project and set shortcut of your choice.
But to apply this shortcut you will have to reach that project. So set a shortcut to reach Project explorer [same way as explained above] , use arrow keys to reach project and then use your open project shortcut. Easiest way use mouse :)

Customise the Show View dialog.
The Eclipse defaults don't include the Project Explorer view, so you must add that.
From eclipseonetips.com:
The Show View commands are activated by pressing Alt+Shift+Q, then the letter for the relevant view, eg. to navigate to the Package Explorer, press Alt+Shift+Q, P.
So pressing Alt+Shift+Q will cause the Show View dialog to pop up where you can select the view you want with the cursor arrows, the mouse or the P.
Follow the instructions given in Aniket Kulkami's answer and add Alt+Shift+Q,R to the Project Explorer Show View item. Then you will see the option appear in the Show View dialog along with the other views it's possible to navigate to, and R will select it.
It might also make sense for you to remove the P from the Package Explorer view so you can use it for the Project Explorer instead.

Press Ctrl+Shift+L to open the Key Assist. All key shortcuts are available in key assist, see what you need is available there or not

Related

Show source code for selected class name in editor in IntelliJ 2018.1

Through Maven, I have the source code and JavaDoc both downloaded for libraries used by my code.
I want to select a class name called in my code in the IntelliJ code editor, and then ask IntelliJ to show me the source code for that particular class.
Bonus: Show the JavaDoc for that class.
I thought F1 key would do this, but no so.
If a keyboard shortcut is required, please indicate the macOS version as well as the PC version if known.
Hold Command key, hover mouse, and click
On a Mac, hold down the Command key. Notice as you move the mouse pointer, the class names change to blue underscored text like an old-school web page link. Click that retro-link while holding down Command.
I am guessing, per comment by Justice, that on a PC you would hold down Control key while hovering/clicking.
No need to select the class name.
Before, no keys pressed
After, pressing Command while hovering mouse pointer
Click the apparent link to open the local copy of class source code.
This approach worked on IntelliJ 2018.1 on macOS Sierra.
Pressing CTRL+N will open a text box where you can search for the class by name, and then open it, regardless of whether it's a class that's part of your project's sources or a library you use. If you have the library's source downloaded, IntelliJ IDEA will show you that instead of the decompiled binary of the class.
COMMAND+B is used to show source code after selecting the class or interface for IntelliJ Users.

Eclipse right click new project preferences

Well, honestly, it is a simple question I can't find on eclipse nor google.
I am a lazy dev and want to add the Maven Projectoption to my [right click]->New->(Maven Project). But can't find an option in the preferences. Every Javaproject I create is a maven project (DM FTW, YEA!)
In PHPStorm I can simply add/edit an entry in a config section and I am done. It gets added to any "New" context.
Can I do something like that in eclipse? Add completely new "New..." entries to create a templated new file type and (the original topic) can I add another menu entry without writing a plugin?
Thank you in advance!
open eclipse, then go to Window menu, select Customize perspective...
a windows appears. it has for tabs.
Tool bar visiblity
Menu visiblity
Command Groups Availablity
Shortcuts
select Menu visiblity tab, it will shows all menus with tree view.
then expand tree view of File then do same for the New which is sub tree of File.
now select All of those project types that you want, then click Ok.
The concept is:
new means creating a bare project begining from zero,
adding means import some project that you/other have/has started...
in eclipse import is the menu you need to click to, then maven, then select the proj option the best fits you...

Remove Project explorer from rdditor [duplicate]

How can I disable the Java editor breadcrumb in Eclipse?
If you are referring to the breadcrumbs in the help file of a RCP application, there is only a manual way to do it.
Since Ganymede 3.4M5:
Michael Borgwardt mentions the toolbar icon
Slava Semushin provides a native shortcut based on Ctrl+3+bread, which points directly to the Toggle Java Editor Breadcrumb option.
Shachi reminds us below that you can right-click on any icon on the breadcrumb, and select the entry named "Hide Breadcrumb".
Original answer (manual way, through key mapping)
Find the file org.eclipse.help.webapp\advanced\breadcrumbs.css and replace its contents with.
.help_breadcrumbs {
display: none;
}
For the Java Editor breadcrumb, you need to assign a shortcut to the "Toggle Java Editor Breadcrumb" command (I have tested Alt+B, for instance)
That shortcut will make the breadcrumb bar appear/disappear at will.
With the editor window focussed, look for this icon in your toolbar:
And click on it. That's all. The icon is present by default, but can be deactivated, in which case you have to activated as in MvanGeest's answer.
Another way which works for me at Eclipse Indigo (3.7): press Ctrl+3 and type bread, after that click on item Toggle Java Editor Breadcrumb.
RightClick on any icon on breadcrumb.
There is an option named HIDE BREADCRUMB.
Click it and you are done. :D
Look for this icon in the toolbar:
This button toggles the Breadcrumb view on/off.
(I'm using Eclipse 3.7, and it's there by default)
Here it is :
In the toolbar, toggle bread crumb option.
Something like http://loadcontext.blogspot.com/2008/08/eclipse-34-breadcrumbs-hide-and-show.html?
Customize Perspective, choose the
Commands tab. In the Available command
group, choose Java Editor
Presentation. The Toolbar details
shows the button for Toggle
Breadcrumbs, which looks like a folder
with a C in a circle with a black
triangle on top of it.
Despite my absolute lack of experience with Eclipse, I suppose this setting must appear in other Presentation items too. After the button's enabled, all you have to do is click it. Or not?
Change property breadcrumb.org.eclipse.jdt.ui.JavaPerspective from true to false
in your org.eclipse.jdt.ui.prefs file.
In Juno: type 'Bread' and select 'Toggle Java Editor Breadcrumb'
It very simple just right click in your class editor then select bread crumb or directly right click in top of your class in tool bar then select hide breadcrumb then its done.
When you see the BreadCrumb toolbar, right-click on the green class icon and then from the menu options click on Hide Breadcrumb.

How to add "Team - Show in History" to Eclipse's toolbar

I find myself frequently doing Team - Show in History frequently in Eclipse (right click on file in Project Explorer). How can I add this to the toolbar? I've tried Customize Perspective but Show in History is not available under Team.
why don't you use shortcut keys, which is more convenient than clicking on toolbar. Open preferences -> General -> keys, and search "show in history". set binding you like.

Stop spacebar keypress from triggering autocomplete in Eclipse

Update
This was fixed in Eclipse 2018-12. This behaviour is still default, but can be configured off - see the accepted answer for how
I'll leave the question as it was for posterity, and for those on earlier versions of Eclipse
In Eclipse, I've enabled intellisense-style suggestions for Java by going to
Window -> Preferences -> Java/Editor/Content Assist
and setting the following
Auto activation delay (ms) -> 0
Auto activation triggers for Java -> .(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
source = Eclipse Intellisense?
This works brilliantly, apart from one annoying problem. When I hit spacebar, the token being typed is autocompleted with whatever is at the top of the suggestions list. Fair enough, except that sometimes I'll type a class/variable name with an exact legal match, but this won't appear as the top suggestion. So when I naturally hit spacebar Eclipse inserts something completely wrong.
E.G. after typing Cookie I'll hit spacebar and get CookieMonster.
This seems like a bug, and happens often enough to be annoying, but even despite this I don't want spacebar to trigger autocomplete in general. I may want to type a variable name which hasn't been declared yet, or something similar. I want to use autocomplete as a helper tool, but my natural typing should always take priority over it.
I'd like to stop spacebar triggering autocomplete, and either fall back to using enter, or better still trigger autocomplete with a custom key not used in ordinary typing. Is any of this possible?
I've played around with all the settings in Content Assist to no avail. Googling the question just returns a bunch of results about disabling the autocomplete feature.
This issue is fixed from Eclipse 2018-12 [4.10] see the accepted answer
It's present in all prior versions, i.e. 2018-09 [4.9], Photon [4.8], Oxygen [4.7], Neon [4.6], etc..
Eclipse 2018-12 was already patched for this!
A patch for Bug 348857 was recently merged to the Eclipse project and was released as part of Eclipse 2018-12. You can download that version here.
You now have a new option to disable all insertion triggers apart from enter, which will prevent spacebar from causing autocompletion.
Simply go to Preferences... -> Java -> Editor -> Content Assist (or Window -> Preferences -> Java -> Editor -> Content Assist on Windows) and select Disable insertion triggers except 'Enter', as shown in the screenshot below:
There is a solution on the issue tracker for this.
Copy the jar in the eclipse/dropins folder. With the next restart space is diabled as autocompletion trigger.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=348857
Eclipse 12-2018 and newer: This is working natively, check Pyves answer.
Use a SDK version of eclipse
1.open Plug-ins View and find org.eclipse.jface.text, right click, choose import as Source Project. After import, you find it in your workspace.
2.In src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
char[] triggers = t.getTriggerCharacter();
if(contains(triggers,key))
change to
if(key!='='&&key!=0x20&&contains(triggers,key))
3.Export org.eclipse.jface.text
Right click the project folder of org.eclipse.jface.text, choose export-->Deployable plugins and fragments, next, destination choose archive file, finish. Replace the one in eclipse/plugins with the one you generate.
The spacebar has been a key to select the autocomplete even in Indigo. To my knowledge, this can't be configured.
In fact, that is probably why the delay exists.
I suggest setting the delay to some optimal value that allows you to type things like private void ... comfortably without triggering suggestions for private and void. Then in case you get a suggestion because you waited too long, press Escape to abort Content Assist.
Same configuration as davnicwil, same issue, still on eclipse 4.4.
Solution: Intercept (hook) SHIFT+SPACE (press and hold) on (editor-window) eclipse and replace it with ESC,SPACE (sequence). Now you my decide between
Autocomplete+SPACE: press SPACE when autosuggestion present
just SPACE: press predefined key combination or sequence (e.g. SHIFT+SPACE)
On windows you may use http://www.heise.de/download/activaid.html (you can also use AutoHotkey, java native hook, ...)
HowTo with ActivAid:
Open Ac'tivAid, select "UserHotkeys"
click on "+", set a description
click on "short cut", press e.g. SHIFT+SPACE
Command: "{ESC}{SPACE}" (without quotes)
click "+", select eclipse editor frame, press ENTER
click OK, OK in Ac'tivAid
My config file:activAid/settings/ac'tivAid.ini:[UserHotkeys]
Hotkey11=+Space
Path11=<Send>{ESC}{SPACE}
Description11=Eclipse Shift+Space -> Esc,Space
Category11=
Application11=ahk_class SWT_Window0
You may also remap keys on non-english keyboards with "HotStrings", e.g. ö->{,ä->} etc.
Finally worked it out.
Try download this org.eclipse.jface.text.jar and copy it to your plugin folder(Typically eclipse/plugin). Do not forget to backup your own one.
Works on Eclipse Juno.
If the link doesn't work, comment on this, thanks.
In Eclipse go to Window -> Preferences -> General -> Keys and remove the binding for the command Content Assist.
You could disable Auto activation via the check box in
Window -> Preferences -> Java/Editor/Content Assist
and activate the auto-complete feature on demand. The default hotkey for this is
CTRL+Space

Categories