I'm using Texlipse to edit some LaTeX files, so it is very helpful to have the line wrap functionality. The one (the only one I found) I'm using now is Eclipse word-wrap plugin. However, the line numbers do not show correctly with this plugin.
How can I fix it?
Unfortunately the Word-Wrap plugin has this problem, as is stated at the bottom of the page you link to. There is no way around it.
This plug-in is only a quick hack to switch on the word wrap functionality of the text box widget that the Eclipse editors are build on top of, not a solid solution to the problem. Eclipse is not good with texts that need word wrap.
As Google led me here first - I will provide an update on this 2 year old question:
This issue has been solved in another plugin which is based on word-wrap:
Eclipse Word-Wrap Plug-In
Additional remark: After the installation it might be needed to run eclipse with the "- clean" parameter to enable the LineNumbering fix (mentioned here)
Related
I am trying to develop an eclipse plugin that does some documentation check on java code and highlights some lines of code in the editor.
To achieve my goal, I DON'T want to create a new editor in eclipse, I simply want to extend the default java editor to draw a line under (or highlight) the methods that do not satisfy some set of predetermined requirements.
Do I need to create a PresentationReconciler? If yes, how do I make the JDT or workbench use my reconciler.
I have never done plugin development and this is my first attempt.
Several starting points for you:
Annotations are an UI feature of JFace's text editor that allows you to visually mark some places in an open editor.
Markers are a Workbench feature, more high-level. They are generic "objects that may be associated with Workbench resources", and they can display in several places: in text editors (as annotations) or in the Problems view, for example.
Depending on what you want to do, you would plug in your plug-in into extension points related to either of those.
The Eclipse Java editor is located in the org.eclipse.jdt.internal.ui.javaeditor.JavaEditor package.
The "internal" in the package name means that the Eclipse development team can change how the Java editor works with new revisions.
Try this help page: Juno Help on syntax highlighting
At the end of the page, it describes how to dynamically add a PresentationReconciler, which is used for syntax highlighting. See if that fits the problem that you want to solve.
I assume you already have a plugin project.
In your plugin.xml, open the tab Extensions, click Add..., search for org.eclipse.ui.editors, then you should see a template named Editor, which will produce a simple xml editor to experiment and play with. Also, you will be able to see the needed structure to define a custom editor.
Hope this helps...
I don't know if you still have a need for this, but you are going to want to use Annotations to keep track of what parts of the editor you need to highlight.
For actually doing the graphical effect of highlighting, you could do syntax highlighting via a PresentationReconciler, but I have no experience with that.
We used a technique we borrowed from http://editbox.sourceforge.net/, replacing the background image of the editor Shell. Its open source, so check it out. (Our code might also help -- its at https://github.com/IDE4edu/EclipseEditorOverlay )
In Eclipse Indigo (I'm on 3.7.2), is it possible to move the editor tabs from the top of the editor pane to the side of the editor pane, creating a vertical stack of tabs? This would allow many more tabs to be seen at once. Given my widescreen display and the large number of active files I am switching between this would be a useful configuration. I cannot find a setting or a plugin that will do so.
Not possible yet. See here and here
I got fed up with not being able to do this and wrote an eclipse plugin. You can find it in the marketplace at: https://marketplace.eclipse.org/content/open-editors
Here is a screenshot
I do not know of a plugin which would allow one to do this.
This (
In Eclipse, can I view the files I currently have open in a vertical stack instead of a horizontal one?) confirms the same unfortunately.
I just searched a bit. I can see a lot of talk about having multi-line tabs, but vertical tabs don't seem to come up a lot.
The Open-Editors plugin has issue
Works well on Windows10 + Eclipse 4.8 + OpenJDK11. 100%
Have just tested. Dont forget to link your Eclipse to JDK-11
https://wiki.eclipse.org/Eclipse.ini
Install Plugin
https://marketplace.eclipse.org/content/open-editors#comment-6750
I searched for "wrap" in keyboard mappings without success. I don't see this option in menu neither.
EDIT: I was thinking about result the you get let's say in Notepad2 by pressing Ctrl+W (or selecting View -> Word Wrap). So I'am asking about toggling such Word Wrap
In Tools->Options there is a whole section on line wrapping. The options you choose here will depend on how you need to do the wrapping - it is quite configurable.
Go to Tools->Options.
Click on Editor in the ribbon at the top.
Choose the formatting tab.
Choose the language you require the wrapping for it the Language combobox.
In the Category, choose Wrapping.
Configure how you would like the wrapping to take place.
Hope this helps...
Stolen from Sidarta's tip in this SO post:
You can use word wrap in Netbeans.
Add to netbeans.conf
(netbans_instalation_path/etc/netbeans.conf):
-J-Dorg.netbeans.editor.linewrap=true and restart Netbeans.
In Options->Editor->Formating there is
Line Wrap dropdown option
Works fine for me in Netbeans 6.9
Are you talking about "soft wrapping"? That is, there are no line breaks inserted into the text file, but each line is wrapped to fit in the editor window?
NetBeans doesn't support that. Hard to believe, I know. I think it might be coming in the 7.0 version, I'm not sure.
Since Netbeans 7, word wrap is available. See this blog for directions:
Netbeans & Wordwarp
As Daniel says, after Netbeans 7 this is possible. Just go to your NetBeans options and select the editor tab. In languages (dropdown) selection choose "all languages". Then you will see the option Line Wrap. Change it to "After Words" or "Anywhere".
Go to toolbar-> option ->Editor(Tab)
view this picture..
soft wrap in netbean
select your line wrap 'after words' .
after apply these settings. you will see the code responsive way. you don't need to scroll horizontal to see code.view the picture for resutl.
soft wrap in netbean
EDIT: For anyone coming to this question through searching, you can install a Gnome Theme called Clearlooks Compact to shorten your tabs in Eclipse. This will free up a lot of screen space. You can also check out the answer below to learn how to make the tabs more horizontally compact.
Short version: How do I make a short version of Eclipse's tabs & toolbars in Ubuntu?
I've been looking around for a fix to this on Google, but to no avail. With any GTK theme, I still have this same issue and it's very, very annoying--to the point where I've stopped using Eclipse in favor of gEdit. However, after running pylint from a terminal too. many. times. I've decided I need to find a solution to this issues with Eclipse so I can have PyDev back. Here's what the tabs look like:
alt text http://c0496682.cdn.cloudfiles.rackspacecloud.com/big-tabs.png
As you can see, not only are the tabs exaggerated, but the toolbar is, too: so is the toolbar on the bottom; so are the tabs in the bottom pane. Overall, it's eating up a lot of screen space, which is a hard item to come by on a 17" screen. Any suggestions/fixes?
This can be solved changing your GTK settings;
gedit ~/.gtkrc-2.0
Then add this;
style "gtkcompact" {
GtkButton::default_border={0,0,0,0}
GtkButton::default_outside_border={0,0,0,0}
GtkButtonBox::child_min_width=0
GtkButtonBox::child_min_heigth=0
GtkButtonBox::child_internal_pad_x=0
GtkButtonBox::child_internal_pad_y=0
GtkMenu::vertical-padding=1
GtkMenuBar::internal_padding=0
GtkMenuItem::horizontal_padding=4
GtkToolbar::internal-padding=0
GtkToolbar::space-size=0
GtkOptionMenu::indicator_size=0
GtkOptionMenu::indicator_spacing=0
GtkPaned::handle_size=4
GtkRange::trough_border=0
GtkRange::stepper_spacing=0
GtkScale::value_spacing=0
GtkScrolledWindow::scrollbar_spacing=0
GtkTreeView::vertical-separator=0
GtkTreeView::horizontal-separator=0
GtkTreeView::fixed-height-mode=TRUE
GtkWidget::focus_padding=0
}
class "GtkWidget" style "gtkcompact"
borrowed from http://ubuntuforums.org/showthread.php?t=1465712
In addition to #Varun Mehta answer, I recommend the following tips for Eclipse 4 (Juno), whose interface is partially dictated and configurable by CSS rules:
In YourEclipseDir/plugins/org.eclipse.platform_4.x.y.v2012zzzzzzzz/css, edit:
e4_basestyle.css
e4_default.css
e4_default_gtk.css
... and adjust those files. I use the following set of tweaks:
set all the margin-* and padding to 0
set swt-shadow-visible: false everywhere you find it, to get rid of those huge shadows
set .MPartStack {font-size} to something smaller than 12
Finally, remember you can disable the toolbar. In 4.0, its state wasn't remembered across sessions, but it seems like the issue is solved in 4.2.1
Bonus resources: Eclipse4/CSS will get you started on Eclipse4 CSS, E4/CSS/SWT Mapping lists other interesting CSS attributes, and CSS Spy will help you inspect the UI.
Screenshot of what I end up with:
EDIT: see also How to remove the close (×) button from Eclipse Juno tabs?
In Addition to Ronans answer, it is possible to change the height of the tabs directly in Eclipse Juno.
edit the css file of your current style (e.g. e4_default_gtk.css) and add
CTabFolder {
tab-height: 16px;
}
Note: CTabFolder ... not add this to CTabFolder Canvas!
I too have suffered from this quite a bit, before I found the solution by changing the general appearance of my IDE.
You can try and customize the look-and-feel or you Eclipse Environment from,
Go to : Window -> Preferences -> General -> Appearance.
try setting,
Current Presentation to " Default ".
Enable " Traditional Style Tabs " (for rectangular tabs.)
Disable Animation ( if you don't like swoosh effect.)
Note: the Default Eclipse 4 just got a bit better with bug 420238 closed:
[CSS] Reduce whitespace usage in the default Eclipse themes
Before:
After:
See Lars Vogel's article about it:
If you fire up the next Eclipse 4.4 milestone build, Eclipse uses much less whitespace and leaves more space for the important content.
(That would be 4.4 M5)
While this is on a technical level a trivial change, I hope that this will improve the initial perception people have in using Eclipse.
A big thanks to Daniel Rolka, Robin Stocker and Dani Megert for doing the majority of the work and a big thanks all involved parties in the Bug report to get this change accepted.
If you really want to make the tabs nice an' short, take a gander at Clearlooks Compact.
I preferred to just hit the whole IDE with a splash of "meh," so here's what I ended up with.
Is there a setting or plugin for eclipse that can show indentation guides in the editor? Something like the Codekana plugin for visual studio (not so fancy is also OK). Important that it works with PyDev.
EditBox since v0.0.20 is fixed for support Pydev. Thanks for reporting this. Some default preferences for Python included now, but you are welcomed to share yours here.
This can be achieved this is EditBox.
With some customization through it's preferences you can get to some nice code blocks highlighting of python code (or any other where blocks are signified with whitespace).
It is highly customizable and can achieve the vertical rules codekana style, and various other layouts.
The problem is it doesn't work on PyDev editor from what I see (at least for now). I've opened a feature request for it.
If it's any good, you can still view it's layout when opening a python file with right click "Open With/Text editor". From version 0.20, EditBox fully supports PyDev.
I also tried AnyEdit which has some whitespace highlighting amongst other features, but was not too happy with the results. For example, I had to press they're "show whitespace" button after each change to show the background, and it's not very visually pleasing (it uses eclipse's annotations to highlight whitespace).
IndentGuide is a plugin that does this for Eclipse. I am not sure whether it works for PyDev though.
The closest approximation would be to combine:
showing the whitespace characters (which shows tabs and spaces, but not just tabs)
code folding (available with PyDev)