In Eclipse, is it possible to adjust the width of the filename tabs across the top of the open file? At the moment each tab shows only the first 12 characters of a filename. As java class names are usually quite long, this isn't enough to distinguish the files eg:
ExistingCustomer.java
ExistingCustomerService.java
ExistingCustomerController.java
Becomes:
ExistingCust...
ExistingCust...
ExistingCust...
Sorry but I think this is not possible out of the box. Maybe there are plugins that can achieve this but I'm not aware of any standard eclipse setting serving this purpose.
I know that eclipse tries to display as much as possible of each file's name but if you open too many files at the same time, the part control has to trim the size of the part taps in order to display some more.
If you find the corresponding setting or a plugin for the intended behavior, please let me know ;)
Related
The source code I'm working with has many files where the first 15 characters of a file name are the same. When multiple files are open in Eclipse the tabs all look the same. I have searched online and not come up with any answers, including a vague reference on this site, where someone asked a similar question, but the suggestions more had to do with configuring the number of tabs, not the number of characters in the file name appearing on the tab.
As far as I can tell, the ability to configure this does not seem to appear in Preferences for Eclipse; but then again, I'm relatively new to it. I would like to have wider tabs, displaying the unique portion of the file name.
No this can't be changed using a preference.
The width seems to be hard coded in the stack rendering code (org.eclipse.e4.ui.workbench.renderers.sw.StackRenderer) so it would require a custom renderer to change.
My laptop and desktop monitors are wider than they are tall. When I'm looking at code, from half to 2/3 of the screen is empty with no code. This is silly.
I'd like to take a look at how to extend eclipse's editor to show data in multiple columns.
If anyone has any idea regarding what api I should lookup or any other resources, please point them out.
Thanks
I don't know if one viewer can display code in multiple columns, but you can split a view for the same file (Window -> New editor).
That way, you can see more of your code, each tab using that horizontal space you have so much on your screen.
For different files, you can put different editor side-to-side:
That will give:
In Eclipse 2018-12 (4.10) there is the "Window/Editor/Toggle split editor vertical" menu option which does exactly what you need. There is also Toggle split editor horizontal option there.
When working with MVC in Eclipse you might often have a model, view, and controller all with the same name open at the same time. When looking at each of the file tabs, you won't always know which is which and have to click through them, which can be quite a hassle sometimes. I've heard of being able to color code files based on the path in some editors. For example, tabs with path model could be set as green, path controller set as yellow, etc. Is this possible in Eclipse, or is there a plugin for something like this? If not, what do you do to more easily differentiate between the tabs? I've heard of people always opening a MVC set in a certain order. So you'll know the leftmost tab is the controller, the right most is the view, etc. However, that must also mean you need to open all 3 files each time. Any better tips or tricks?
Another thing about the file tabs that can be annoying is that when you have more files that can't fit in one line, eclipse pushes off to an arrow which you have to click to see the rest. It seems to be random which tabs get pushed off there, maybe the least used ones, I have no idea... This coupled with the problem above gets kind of annoying. I was trying to find a way to disable this and just show tabs that can't fit in one line to show up on a second line, but surprisingly couldn't find such an option (then again you also can't wordwrap without a plugin).
Hopefully there are some solutions to these two problems. Thanks.
Maybe this can be helpful
http://www.dipherence.com/2011/03/20/full-coloured-eclipse-navigator-plug-in/
With the latest version of Eclipse (Kepler 4.3.1, build M20130911-1000) when two or more files with the same base name are opened, tab will show also the parent directory name.
Is there an app that can change the order of images inside an icon?
Thanks!
What you'll need to do that is a resource editor. A google search will reveal many free ones out there. The restorator is a great one, but not free and over-priced IMO.
Any decent resource editor will allow you to see icons in the exe or dll and save them or replace them. I don't know of any that will allow you to reorder them, but just about any out there would allow you to save the icons out and then replace them back in the exe/dll in whatever order you'd like.
The only resource editor I know of that will allow you to re-order the embedded icons including png compressed vista icons is Resource Tuner Console.
You can change the image order using Pixelformer (an icon/bitmap editor). Import the icon, reorder the images as you wish, then export it back.
Using a resource editor is not an easy way to do this because you have to edit both ICON and ICON GROUP and I tried to do this with Resource Hacker and could not do it.
I found Easy Icon Maker is able to rearrange the order of the icons properly... it's the only icon editor that I found with this option, and I tried about half a dozen. The editor itself is not nearly as good as IcoFX (http://portableapps.com/apps/graphics_pictures/icofx_portable)
Why would you want to do this? Well there are certain times when Windows will use the first icon file that matches the size, but this may not be the color-depth that you want... for instance if you are on an older machine like Windows 2000 that doesn't support Alpha Channels then putting these at the beginning of your ICO file will cause Windows 2000 to try to render it so it results in black dots all over the image.
I would like to automatically convert between tabs and spaces for indentation when I commit/update code to/from our repository. I have found the AnyEdit plugin for eclipse, which can convert directories of files. Not bad for a start, but does anybody have more expierience on how to handle this? Or maybe know of an Ant script or something else?
Make sure you have your editor set to use spaces instead of tabs.
Select all text and hit CMD + I on mac or CTRL + I on windows.
Why not just use the code formatter and/or cleanup function? It has settings that take care of that stuff for you. You can even have it run automatically on save.
Edit: As Peter Perháč points out in the comments, this only answers half the question. I don't have any practical experience, but you could try the Maven Eclipse Format Plugin to format from a Maven build.
Unfortunately, that's Maven only, and I know of no light-weight command line formatter. But if you happen to use Maven, you can bind the format goal to the proper phase, and if you set Eclipse to auto-build, it would format on update.
Depending on the SCM tool (git, svn, etc), you could also create a hook that runs the build (but it might be a bit too heavy-weight for that).
I use the AnyEdit plugin to auto-convert tabs to spaces on the save of a file. I also configure the base text editor (from which pretty much all the others derive) to insert spaces instead of tabs. This sounds redundant, but what it does is ensure that I don't insert any tabs, and any file that I edit that already has tabs will be converted as soon as I save it.
Tabs have no place in source code. If someone else looks at the file with their tab-stops set to a different value, they lose most alignment/formatting anyway.
(Of course, if you have Makefiles that you edit directly, you'll want to make sure their tabs are retained. But in my projects, if make is used at all the Makefile is derived from a different source, such as a Makefile.PL in Perl.)
A bit overkill, and only something to attempt with certain repository products that can handle it, but a hook script to call indent or astyle could do the trick. It'll format everyone's code the same way for every file, depending how you write the hook script, and it'd have to be pre-commit of course.
You may lose alignment/formatting by using tabs instead of spaces if and only if the tabs are not at the beginning of the line. Never use tabs insides lines, always use tabs at the front of lines. This allows you to use your editor to adjust to your desired indent level without impacting your co-workers view of the file. Challenge: Find an example where tabs at the front of the line loses alignment.
I use Kedit for just this thing. It also natively converts text files from Macintosh, UNIX and MS-Dos. Since it's an older editor, I use one of it's scripts to handle unicode files.
You might also want to look at some of the other smart editors.
I use Eclipse for Java EE developer 4.6.0 Neon. I use http://marketplace.eclipse.org/content/anyedit-tools