You can see in the image, the variable classId is marked with some special colors, this is very helpful in the case of knowing where and all that variable is used in a particular block, same in the case of methods also. But in my Eclipse Galileo only for a particular workspace these marks are not appearing. The above image is taken from a different workspace, there it is working fine, but in that particular workspace it is not working that too only sometimes.
Workspace image for which this is not working
I have clicked on reference to which is visible in other portions of code, but not highlighted
Can anybody explain how can I bring it back in my Eclipse IDE.
This is probably the 'Mark Occurences' setting. This is selected by the 'Toggle Mark Occurences' button on the toolbar:
You may have to customize the perspective to see this button.
There is also a keyboard shortcut - Alt+Shift+O (⌥+⌘+O on macOS).
For Java files there are also settings in the Preferences in 'Java > Editor > Mark Occurrences'. Some editors for other languages have similar preferences.
Related
Like in the topic - is there any default way or any plugin that lets you have multiple 'Compare' windows open and active at the same time? I find it very frustrating that while doing changes to few files at the same time, I can't have active 'Compare' window for each of them, to see my changes/original code.
I would use Window -> New Window, rerun Team -> Show History and then compare another file.
A compare window in Eclipse is placed inside a normal editor tab.
You can have several editor tabs, including compare windows, visible at the same time. To do this just drag the editor tab (the one on the top with the editor name) to somewhere inside the editor area. The editor area will get split in two, each one displaying one editor.
This works with more than two editors also.
If you find that you need more space for the compare windows because other views take up much space you can maximize the editor area by pressing Ctrl+M while the editor area has focus.
Example:
Go to preferences -> team -> General Team Preferences. For me, the "Reuse open compare editors when opening comparisons" was already checked by default. I unchecked that and now I can have multiple file comparison windows open! (I'm using Eclipse Oxygen.3a -- 4.7.3a)
I have noticed that qtCreator handles the auto-completion much better than eclipse.
For example, if I have a line that says object.firstItem() and put my cursor between . and f, and then delete the first word (thus becoming object.|item()) and then press ctrl+space and choose secondItem(), qtCreator guesses object.secondItem();, whereas eclipse chooses object.firstItem()Item().
There could well be other features that are present in qtCreator, too, but not in eclipse, though it's the only one I really noticed. But why not share all good ideas since they all are open source ? I would be interested in all good features of qtCreator and eclipse combined.
Is there a way to have such a behaviour in eclipse too, through configuration or through a plugin ?
This feature is supported by Eclipse, too. (Or more specifically, the Eclipse Java Development Tools.)
Just hold down the ctrl key when selecting the item from the list of proposed completions to toggle between inserting and overwriting completion mode.
To change the default behaviour, go to Preferences -> Java -> Editor -> Content Assist and change the top-most radio button from "Completion inserts" to "Completion overwrites".
I've been using Komodo Edit for the last few years, but am once again thinking of switching to Aptana Studio because of it's built in refactoring tools for Python.
One of the features I use all the time in Komodo Edit is "show unsaved changes". This simple feature pops up a window with a diff of the text in the current editor window vs. the saved file on disk.
There must be a way of doing this in Aptana Studio (or more to the point, there must be a way of doing this in Eclipse, since Aptana is built on top of it.)
How do I get a diff show unsaved changes?
Windows -> Preferences -> General -> Editors -> Quick Diff.
Check the 'Show Differences in overview ruler'. Set the combo on 'Version on disk'. Select nicer colors for the diff ;) and OK the dialog.
Now, every change in your file will be visible on the 'Overview Ruler' and on the 'Annotation Ruler' (the editor left and right bars). The marks will be visible until you save the file.
Not an exact match to the Komodo feature, but this, along with the local history feature of Eclipse, can provide a lot of control.
Hope that helps.
I am using classic Eclipse 3.6.1.
I have a Java project which is throwing an exception because of a stack overflow.
Unlike other editors, when I hover my mouse pointer on a variable it does not show me the value of that variable.
Here are the settings in
Window->Preferences->Java->Editor->Hovers
Combined Hover - Shift
Variable Values - Ctrl
Source - Shift+Ctrl
But this doesn't seem to be working. I have seen threads by others about this same problem but could not find a solution. Is this a bug that hasn't been fixed yet?
Thanks!
Go to Window - Preferences - Java - Editor - Hovers.
Is "Combined Hover" selected? Uncheck it; apply; close the window; restart debugging session; go back; check it again; apply.
If the above doesn't help, you can check "Variable Values" option and specify a modifier key for it. Not as convenient as "combined", but should work.
The problem gets "fixed" by renaming the package.
For whatever reason, this refactoring triggers something in Eclipse, and immediately I was able to view variable values during debugging. Also, when I go back into Preferences under Hovers, I can now see the "Variable Values" option.
In my case Preferences under Hovers were checked and enabled. Even after that it was not showing values when I move the mouse on the variable. Problem has been fixed by simply closing and reopening the Eclipse (I was using Eclipse with Python).
A fellow developer dislikes the Eclipse hovering Javadoc and would like to disable it (one option), or, better yet, only selectively enable it (other option). He's using Eclipse 3.3. Is this possible?
Not sure what you mean by "selectively" enabling it. Based on what?
Directions below are for 3.5, I don't have 3.3 lying around to check but I'm pretty sure same settings were available.
Go to Window - Preferences; select Java -> Editor -> Hovers on left hand side. You'll have to uncheck the Combined Hover option on the right; you can then either uncheck Javadoc option or check it but specify a modifier key for it (in the edit box below). In the latter case javadoc hover would only appear if you hold that key.
I've got to say, though, that the inconvenience of not having Combined Handler makes this really not worth it in my opinion.
You could go to
Preferences / Java / Editor / Hover
and untick the "Combined Hover" option: no more popup.
Then you would have:
Shift+F2: open the external javadoc if javadoc archive or directory has been associated with your project (and if some javadoc has been generated)
Alt+Shift+Q, followed by J: open the javadoc view, with the same content than the popup previously seen on mouse hovering.
In Eclipse 3.6 you can now specify a modifier key to be pressed down for the Combined Hover to be activated. This way, you can have the old behavior without the automatic popups. The automatic popups were driving me crazy, often obscuring something I was trying to read.