How to get rid of this red line in eclipse? - eclipse

Steps to reproduce:
Open eclipse jee.
Open any file containing text.
Error Screenshot:
Eclipse Version:

That's the print margin, which has been enabled by default in the Eclipse IDE for Enterprise Java and Web Developers (jee) 2021-06, but not in other IDE packages.
To turn it off, in Window (macOS: Eclipse) > Preferences: General > Editors > Text Editors uncheck the checkbox Show print margin.
For details see this Twitter thread.

Related

Eclipse CDT spell-check in XML (non-C++) files

In Eclipse Oxygen with CDT I can configure spell checking for most file types under
Preferences > General > Editors > Text Editors > Spelling
However for XML files, which are apparently opened in the "Structured Text Editor", I can not find such an option.
Is this hidden somewhere or covered by a good plug-in?
Update
The user guide mentions spell-checking for "Structured Text Editor", but that does not match the actual UI; neither "Window > Preferences > Spell Check" exists as described nor "Edit > Spell Check":
EDIT:
Seems to be a known bug / feature request:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=185695
https://bugs.eclipse.org/bugs/show_bug.cgi?id=521658
Possibly installing Java tooling on top would fix.
NOT HELPING:
The eclipse help has an article on this:
http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.wst.sse.doc.user%2Ftopics%2Ftsrcedt010.html
Also Eclipse should have an "Open With" context menu entry by which you could open as a text file, and have spell check.

How do you enable word-wrap by default in Eclipse?

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

EclEmma not working

I'm trying to use EclEmma with Eclipse, but I can't get it to work. I can't see the button that's supposed to launch my project in Coverage mode, There;s also no such option in Run menu:
I've tried to fix it in two ways I've found on the Internet, and none worked:
the EclEmma help page says that I should enable the Coverage command group on the Commands tab in the Customize Perspective dialog, but there's no such tab in the dialog and no Coverage command group in existing tabs
I tried to find “Java Code Coverage” in Window > Preferences > General > Appearance > Label Decorators menu - not there
I'm using Eclipse Mars.2 Release (4.5.2) on Windows 10, I have EclEmma v. 2.3.3.201602231923 (according to Help > About Eclipse > Installation Details) installed via Eclipse Marketplace. I have no idea how to fix it, I'll appreciate any help.
In eclipse 4.9 (2018-9) the option to enable the "Coverage as ..." command can be found in "Customizing Perspective" (rightclick on the perspective shortcut), then on tab page "Action Set Availability": Click the "Java Code Coverage" option.
Another problem I encountered: Although the "Coverage as..." command was available, there was no result visible at the end in the view "Coverage". The problem can be solved by following the advice from the eclEmma FAQ:
The Coverage view stays empty and there is no source highlighting. Why?
In Eclipse preferences there is an option Launch in debug mode when workspace contains breakpoints under Run/Debug → Launching. If this option is enabled and there are breakpoints in your workspace coverage mode will not work, because it is automatically replaced with debug mode. Set this option to Never if you want to run code coverage analysis.
BTW: I am using eclEmma plugin 3.1.2

Eclipse autocomplete broken

Eclipse autocomplete is not working and is always telling me merely "No Default Proposals".
This is true whether I try to autocomplete for code under java.util or in my own project.
I'm running Eclipse 3.5.2 on Lucid Lynx using java-6-openjdk.
Any ideas?
Window > Preferences > Java > Editor > Content Assist > Advanced
All the Java options were turned off. Don't know how this happened or why it's not always on :o/
Open eclipse and go to the following:
Window > Preferences > Java > Editor > Content Assist > Advanced
Select all checkboxes and click Ok.

How do I increase the capacity of the Eclipse output console?

Even with the "scroll lock" option enabled for the Eclipse console, eventually it overfills and starts auto-scrolling on me.
Is there some way of increasing the capacity of the console so that it stores more lines? I wasn't able to find the option.
Under Window > Preferences, go to the Run/Debug > Console section, then you should see an option "Limit console output." You can uncheck this or change the number in the "Console buffer size (characters)" text box below.
(This is in Galileo, Helios CDT, Kepler, Juno, Luna, Mars, Neon, Oxygen and 2018-09)
Open the Windows > Preferences menu.
Expand the Run/Debug > Console preferences.
Set the Console buffer size (characters) to something much bigger. 2147383647 / ~2GB is the upper limit (or 1000000 / ~1MB in older releases). Or just uncheck the Limit console output.
For CDT users / C/C++ build, also adjust the setting
in Window > Preferences
under C/C++ > Build > Console (!)
(This time in number of lines.)
This also affects the "CDT Global Build Console".
Alternative
If your console is not empty, right click on the Console area > Preferences... > change the value for the Console buffer size (characters) (recommended) or uncheck the Limit console output (not recommended):
On the MAC OS X 10.9.5 and Eclipse Luna Service Release 1 (4.4.1), its not found under the Window menu, but instead under: Eclipse > Preferences > Run/Debug > Console.
Window > Preferences, go to the Run/Debug > Console section >> "Limit console output.>>Console buffer size(characters):"
(This option can be seen in Eclipse Indigo ,but it limits buffer size at 1,000,000 )
Under Window > Preferences, go to the Run/Debug > Console section, then you should see an option "Limit console output." You can unchecked this or change the number in the "Console buffer size (characters)" text box below. Do Unchecked.
This is for the Eclipse like Galileo, Kepler, Juno, Luna, Mars and Helios.
Please go through the below guidelines. Do the changes accordingly.
For C++ users, to increase the Build console output size see here
ie Windows > Preference > C/C++ > Build > Console
Eclipse has limit of 32000 characters per line. If you have, for example JSONObject, which you want to log into console, you won't succeed. You can't handle this with the checkbox. Tested