Simple question: how do you enable word-wrap by default in Eclipse? I looked at this plugin but it only goes up to Luna. In addition, this plugin is a separate text editor and does not have syntax highlighting or validation. I'm open to other suggestions.
Word wrap is available in Eclipse Neon IDE: https://www.eclipse.org/neon/noteworthy/#_word_wrap_in_text_editors.
Just consider using the latest version.
Keyboard shortcut: Alt+Shift+Y
Or button:
Or menu Window > Editor > Toggle Word Wrap:
As pointed out by #KrisWebDev in this answer, Eclipse supports soft line/word wrapping as of Eclipse Neon but the GUI to control this setting does not exist yet. There should be a global settings to enable soft word wrapping by default in any text editor in Window > Preferences > General > Editors > Text Editors > Enable Wordwrap and it is not there.
Instead, you have to manually edit the org.eclipse.ui.editors.prefs file (.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs) in your eclipse workspace. There, you can add the settings wordwrap.enabled=true.
For windows this worked for me(change workspace6 if not works), open settings file
%APPDATA%\DBeaverData\workspace6\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ui.editors.prefs
add
wordwrap.enabled=true
I have Eclipse (Mars) web development tools installed on a MacBook Air. Recently, hitting f3 stopped opening the declaration.
The key mapping in Eclipse (Mars) - web development tools:
In another Eclipse install (Luna) - Android development tools, where the f3 function is working, the key mapping is:
What is wrong with the Mars version? What do I need to add to get it to work in the Java editor?
I have seen this post, but I don't have the exact same issue. Nothing happens when I hit f3.
Additionally
Other short cut keys work.
Opening the declaration with the context menu does work.
But there is no key short cut listed in the context menu.
Did this key mapping change with Mars? In my Luna verion, the context menu has the key map listed:
I've the same issue. You can use "Ctrl + Left mouse click" instead.
Make sure your function lock key is not pressed. I apparently hit mine and didn't notice given that F3 is the only function key I use.
Seems stupid but this literally happened to me and the other suggestion didn't help.
In eclipse mars goto:
window
preferences
General
Keys to open the key mapping view.
type 'open declaration' in the filter text.
copy one of the commands that are already there Copy Command
Enter 'F3' in the Binding.
In the drop down menu of the combo box of 'When' select Editing
Then whatever Language You Are Using
Source
Apply
and press Ok
I had the same issue after installing Apache Directory Studio.
Go to Window->Preferences, General->Keys. Filter for F3 and you'll see all the different ways that F3 is bound. I got it to work again by disabling F3 in the LDAP windows (i.e. deleting the binding).
Some suggestions to try:
1) Try creating a new workspace, and check if F3 works
2) Try switching to a different perspective
3) Try downloading a different eclipse release, maybe the java developers release, check that F3 works, then install whatever you need for web development.
Good luck :)
Right Click on the project -> Properties -> Project Facets -> Click on the Configuration Link -> Click on Apply Button -> Click on OK button.
The above steps should set your project as a Java project.
Looking at the comparison of the preferences that work vs what does not work, the issue is clear.
Go to: Window/preferences/General/Keys to open the key mapping view.
Type 'Open declaration' in the search box
Enter 'F3' in the Binding textbox.
If you are editing for C++, Java any language, you need to have a specific F3 binding for that language!
Example for Java source code select 'Editing Java Source' in the 'When' dropbox.
Apply and press Ok
Even I faced the same issue in windows,I was using cucumber and was unable to navigate using F3. I solved by doing the following:
Click on Help in Eclipse >
Eclipse MarketPlace
type "Natural" in search and press enter
Install "Natural 0.9" plugin
Restart Eclipse
This should work, if not working even after that, uninstall cucumber plugin in Eclipse Marketplace
You will be able to navigate from Gherkins, even after this if you are finding issues do the following:
Go to Window ->Preferences, General->Keys > Click on "Restore Defaults"
I had a similar problem today - Unable to open Declarations in Java Editor using F3 or CTRL+Left Click.
Solution :
STEP1: Selected any java file in Eclipse Explorer.
STEP2: Clicked the - sign at the top of the Eclipse explorer. This compressed view of all modules in Eclipse.
STEP3: Right click on the empty space on the Eclipse Java Explorer and chose Refresh Option (F5) .
STPE4 : Happily the navigate options like F3, F2 , CTRL + Right Click all started working.
Solution :
1. Download and install this eclipse
eclipse-jee-2019-12-R-win32-x86_64
F3 shortcut key is worked for java file and Testng.xml.
i am able see package name and class name and also it navigate methods.
We recently upgraded our copies of Sublime. Problem is now our developers that use eclipse are having trouble opening java files. It seems that Eclipse has for one reason or another decided that half of the java files should be opened with "Java Editor" (when you right click and go to Open With) and the other half should open in "System Default" which as it turns out, is Sublime.
Where is the button I press to reset this stupid thing so Eclipse will open java files in Eclipse?
Eclipse "remembers" when files were "Open with"-ed with a certain Viewer and opens that file always with that Viewer from than on (it gets highlighted in the Options list and overrides the file-association).
You could try to change it back to the default by choosing "Default Editor" in the "Open with" context menu option in Project Explorer for each file that behaves strange.
The default editor for a file type can be set through Window>Preferences>General>Editors>File Associations. If multiple editors are set for .java and it's bugging out then possibly removing all editors except the default will help.
I'm using eclipse on Ubuntu 12.04 and Ctrl+x closes my Eclipse. I tested Ctrl+x in other applications and it cuts text, which is what I want, so it must be an eclipse shortcut binding.
I checked my Preferences>General>Keys settings and couldn't find an exit/quit/explode eclipse command and when I search for Ctrl+x I only see 'Cut' binded to that key combo.
It has been driving me crazy so any help will be appriciated, you go to cut and omg eclipse is closing lol.
I had a similar problem. Here's how to solve it:
When you open Eclipse, go to Window -> Preferences -> General -> Keys.
Search for the 'Cut' command. The Binding option should show 'Ctrl+X'. Change the When option from 'In Dialogs and Windows' to 'Editing Text'.
I checked my Eclipse environment, I don't have this problem. Ctrl+ X is for cut.
I can suggest to go where you did, and look inside the bindings column, if there is any ctrl+x and change it.
Look also for other programs you are running, maybe they listen to shortcuts.
Cheers
I had the exact same problem on Windows 8. The CTRL+x binding closed Eclipse but in the bindings dialog the only binding for CTRL+x was for the cut action. Finally, I have found the solution in the Arch Linux Wiki. See https://wiki.archlinux.org/index.php/eclipse#Ctrl.2BX_closes_Eclipse . It's a bug in Eclipse which can be solved by editing a metadata file by hand.
Opening a file in Eclipse's Project Explorer with a double click opens the file in the built-in editor but does not transfer the focus to the file for immediate editing. Instead the focus remains in the Project Explorer and a further click in the editor window or tab is required before editing or moving around the document. I guess this is by design but I am hoping there is an option or workaround of some kind. Thanks.
Using Eclipse 3.7.2 with C++ development tools installed on Ubuntu 12-04