I have a very strange effect when using subclipse with eclipse. Whenever I use Team->Export to export a file from the editor the export works fine, but the label of the tab of the file is removed.
Effect can be seen here: http://www.daspferd.de/img/tabs.png
Strangely enough it happens with php-files, css-files, html-files but NOT with javascript-files. So I'm assuming it's some kind of setting that I haven't found yet and not a bug in subclipse.
Anyone know where I can shut down this behaviour?
It could be a bug in the editors. If eclipse opens an editor on the exported file, it might not open it as an IFileEditorInput, and the editors therefore do not set the title correctly (that's the job of each individual editor implementation).
This is just a guess, but it would be consistent with some editors behaving ok and some not. It would basically be a missing feature in some of your editors.
Related
I am using Eclipse Neon.3 (4.6.3). In the past, Eclipse used to have several tabs on the bottom of the editor window, when a file was opened in the Properties File Editor mode. There you could choose to view the file either in a table-like view or as a plain text file.
I usually edit my resource files in plain text, which still works fine. However, the table view had one nice feature: Duplicate entries were highlighted in red color in the table-view.
But this view is no longer available, since there are no tabs in the Properties File Editor anymore. Did I miss anything? Where has this tab gone? Do I need an additional plug-in for this feature? As far as I can tell, this used to be a built-in feature of Eclipse.
I still had an old installation of Eclipse Mars and found out, that the feature in question is not built-in to Eclipse. The feature is provided by the JBoss Tools Properties Editor, which is part of Red Hat's Hibernate Tools.
To install on Eclipse Mars, follow the instructions of this StackOverflow post.
I've got a small homework project, and for whatever reason Eclipse has decided to stop highlighting syntax or allowing intellisense or goto definitions or anything in this Main.java file. I've tried rebooting it, and the computer, but had no luck.
The thing that really has me confused is that it's still compiling and running the code correctly (eg, changes I make in Main.java are compiled and run - it's not running old Main.class files), so it's still in the build path ... right?
Any ideas?
Right click on the file in the Package Explorer and choose the Open With menu. You will probably find that Text Editor is selected, choose Java Editor to open the file with the correct editor.
The Open With menu selection is remembered so you should get the Java Editor in future, but equally if you choose the plain text editor that is also remembered.
I suggest finding a way to reset any setting you might have set by accident. Not saying that you did it. But just to make sure, just try it out. If you customized the preferences already, you could make some kind of note of the settings, then change it. If that doesn't work, let me know. Good Luck!
Copy the text somewhere, delete the file, and then add a new class (of the same name) and paste the text back.
I'm using Eclipse 3.7 on Ubuntu. Often, after editing a file, I cannot save it - the "save" option is greyed out in the menu and Ctrl+s seems to do nothing, even though the file has just been modified and the editor displays the asterisk before the file name in the tab header.
Changing the active tab to another file and then coming back to the first file "unlocks" the save option, which I can then choose.
What causes this behavior, and how can I fix it?
This is a reported bug in Eclipse. You can follow up and bring more information in the bug report in Eclipse's bugzilla.
The easiest workaround I could find was to just restart eclipse. Worked for me.
That can also happen when the Project Explorer view has focus (bug 211520)
The new Eclipse 2019-09 has fixed that issue
You can now save the active editor even when the Project Explorer has focus.
In cases where an extension contributes Saveables to the Project Explorer, the extension is honored and the save action on the Project Explorer will save the provided saveable item instead of the active editor.
In Eclipse, if I change a file programmatically, and it is open in a text editor, it doesn't always reload, not even when refreshing the resource programmatically. How can I forcibly reload the text editor from code so that it show the changed file contents?
In your project explorer or navigator, you can right-click on the file that's currently open and select refresh. This has always worked for me, even when editing files with several programs. Make sure to click the file itself, not parent objects like packages or folders or projects.
Edit
Refreshing programmatically? I would look into an Eclipse scripting tool:
http://eclipse-shell.sourceforge.net/
I guess there was another one called Monkey, but it doesn't appear to be maintained.
I don't know of any possibility to programmatically reload the file.
Some editors (e.g. GMF editors) look for changes in the underlying files, and refresh themselves, but this is not required at all.
I don't think that a forced reload is an option implemented globally, as in some cases there could be some merging steps involved that can be quite erroneous.
My ideas to solve this:
Have a specific editor that refreshes its content when the used resource changes (this can be timeconsuming);
Or close the editors of the file and reopen them (this is ugly in the eye of the user).
Since the Luna release of eclipse there's no need to reload files with F5/manual Refresh.
Really nice, especially as there was a bug with the F5 key binding.
In Eclipse, I can switch through open editors using control-page up/down. This works great, except for editors like XML or JavaScript, where there are Design and Source tabs. For those editors, it just toggles between the different tabs. Is there any way to get Eclipse to ignore them? I know about alt-F6 for "Next Editor", but that doesn't use the same order that the editor tabs are displayed in, so it's confusing.
With Ctrl-E you can jump directly to any editor by typing the beginning of it's name. Quite handy when you've got a lot of editors open.
You're right -- looks like Eclipse has acknowledged it as a bug. It's fixed in 3.5.
I was initially thinking Alt-← and Alt-→ might do what you want, but that's more for going forward and backwards in history of tabs you've viewed. Which might sort of get you what you want, but is probably just as confusing as Alt-F6.
I think it sounds more like a bug in Eclipse, might be worth going over to eclipse.org to see if there's a pre-existing bug for this.