How do I enable undo in eclipse ant editor? - eclipse

Undo is not working for me in ant editor in eclipse.
When I press Ctrl-Z nothing happens.
Is it possible to enable undo somehow or is this a bug?
I am using Eclipse 3.4.2 (Ganymede) on Windows XP Professional.

Yes undo should be working perfectly in an ant editor.
For Ctrl-Z to not workcould mean:
the shortcut has been assigned to another action (Windows > Preferences > General > Keys)
the undo buffer size is somehow at '0' (Windows > Preferences > General > Editors > Text Editor)
a plugin somehow 'steals' the key event for itself
Try a fresh install, and check also with a latest Galileo (3.5RC2) install to see if the problem persist.
Note: zvikico mentions the existence of a known bug with ant editor in 3.4.2
After a quick search, the following bugs might explain your situation:
267780 [ant editor] delete line cannot be undone after cursor has been moved
247434 Failed to undo removal of line in Ant editor, only with 'Eclipse IDE for Java Developers', with Eclipse Classic you don't get this behavior
and finally:
239115 Undo functionality does not work anymore in the ant editor, mainly because a WTP issue, only solved in 3.5

I see this post is very old, but I am adding a response for the people who find this through the search engines.
Ctrl-Z stopped working in eclipse for me when I made a small change in one part of my code which in turn triggered an unexpected infinite loop in a different part of my code.
I used the windows task manager to kill the application that I had been testing when Ctrl-Z had stopped working, and then I used system.out.println() to identify the part of the code where the infinite loop was being triggered.
I then disabled that section of code, which in turn caused Ctrl-Z and everything else to start working again.
I was able to finish debugging from there.

If the CTRL-Z (undo) does not work anymore, you might try that. It worked for me:
go to Preferences -> General -> Keys and click on apply button or restore defaults button

Related

Eclipse Rename - Refactor hotkey inserts registered trademark symbol

Previously, using the ALT+COMMAND+R key combination after highlighting a variable name in a Java file would go into the rename refactor mode. Now, the key combination replaces the highlighted text with a registered trademark symbol. How can I get the key combination to go into the rename refactor mode instead of inserting the symbol?
The current file encoding is set to MacRoman, which is the default setting inherited from container. As far as I know, nothing here has changed.
I am using Eclipse Indigo (Build id: 20110615-0604) on Mac OS X 10.7.5. Eclipse IDE for Java EE Developers 1.4.0.20110615-0550 and FreeMarker IDE SDK 1.1.0.v201006011046R-H111-GA are installed. I don't think there are any non-standard plugins.
The only recent change I can remember making is installing PyDev a few weeks ago. With the default PyDev installed, ALT+COMMAND+R opens a context menu in the lower right corner with 2 option: rename and set next symbol (this is in addition to replace the text with the symbol). I disabled the Set Next Symbol key binding in my preferences, restarted eclipse, and tried the key combo again. The text was still replaced by the symbol but the rename refactor mode was not entered did not open. I uninstalled PyDev, restarted eclipse, and tried the key combo again. The text was still replaced by the symbol.
Update (December, 2012): Another user on eclipse forums is having a similar issue: http://www.eclipse.org/forums/index.php?t=rview&goto=990973
Update (January, 2013): I have opened APSTUD-7664 in PyDev's Jira. Hopefully, a developer will pick it up and find a solution.
Same problem here (OS X 10.7.5, Eclipse Juno for Java, build 20120614-1722, PyDev recently installed). The following solution worked for me:
Eclipse > Preferences... > General > Keys
Choose Rename - Refactoring (Category: Refactor - Java)
Click Unbind Command
Click Binding field and type Command-Option-R
Click OK
A possible clue as to what's going on (I don't know): the User column is set to "C" before fixing the binding, and set to "U" afterward.
Ed's unbind/rebind trick didn't work for me, but changing "When" from "In Windows" to the more specific "Editing Java Source" seems to have done the trick.
I guess it's a bit more restrictive, but for my workflow Java is really the only place I'll be doing any refactoring.
If anyone is still having this issue (and it is still an issue with the most recent Eclipse Kepler when you install PyDev), this is the solution that worked for me. It's very similar to Ed's, but I had to unbind on the PyDev command specifically.
Go into Preferences > General > Keys menu:
Filter by the word "refactor" in the filter box. What you'll see is that there's a conflict ("C" in user column):
You need to sort by the highlight the Rename - Refactoring command and sort by binding. Then remove the filter. This will show all conflicts (including the PyDev one that is fouling things up)
Click the PyDev command bound to the same key combination click "Unbind Command"
Now nothing will be bound to that key combination, so just go back up to the correct command, "Rename - Refactoring" and rebind Command-Option-R to it.
When you're finished, it will show as a User defined command (U in user column), but it will work properly in both the project menu and in the code editor. The only thing that won't work is the PyDev command that was bound to it. If you want, feel free to bind that command to an alternative key combination.
I think .. the solution is full resetting. So i do as follow.
My environment is Eclipse kepller and Mac Mountain lion.
Terminate eclipse.
Copy workspace for safety. (Maybe its useless, but for safety...)
Delete .metadata hidden folder from workspace.
Start eclipse, then you see whole new workbench without projects!
Now, import existing project from your workspace folder.
That's all. Your default rename key is restored. And you have refreshed environment.
It's simple.
Have a nice development time.

Zend Debugger Eclipse Startup Error: eclipse.php.debug.core was unable to load class debug.core.model.PHPConditionalBreakpoint

I work on Mac OSX Lion and ever since I've installed the Zend Debugger and gotten it to be able to debug php web applications, I often encounter this Eclipse startup error:
Error creation extension for extension-point
org.eclipse.php.internal.debug.daemon.communication Plug-in
org.eclipse.php.debug.core was unable to load class
org.eclipse.php.internal.debug.core.zend.communication.DebuggerCommunicationDaemon.
An error occurred while automatically activating bundle
org.eclipse.php.debug.core (258).
The error log contains the following stack trace:
org.eclipse.debug.core.DebugException: Plug-in org.eclipse.php.debug.core was unable to load class org.eclipse.php.internal.debug.core.model.PHPConditionalBreakpoint.
at org.eclipse.debug.internal.core.BreakpointManager.createBreakpoint(BreakpointManager.java:554
at org.eclipse.debug.internal.core.BreakpointManager.loadBreakpoints(BreakpointManager.java:264
at org.eclipse.debug.internal.core.BreakpointManager.initializeBreakpoints(BreakpointManager.java:449)
at org.eclipse.debug.internal.core.BreakpointManager.getBreakpoints0(BreakpointManager.java:418) at org.eclipse.debug.internal.core.BreakpointManager.start(BreakpointManager.java:408)
at org.eclipse.debug.core.DebugPlugin.start(DebugPlugin.java:682)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
... Omitted for brevity ...
This error often goes away when I just restart eclipse a few times. I've googled for solutions and tried reinstalling eclipse a couple of times. This error only seems to occur if I have both ADT (Android Development Tools) and PDT (PHP Development Tools) + Zend Debugger installed.
Please let me know if you have information about how to solve this problem. On a related note, I never really got the PDT + Zend debugger to work (as in debug) PHP apps on Windows.
I have seen this error a few times, even in the Zend Eclipse PHP version. It only seems to happen when two things are true:
1) The "breakpoints" view is visible on eclipse start (that is, you can see where breakpoints would be listed)
and
2) The file open and active in the editor is NOT a PHP file
For example, I got this repeatably with a CSS file open in the editor on the debug perspective with the breakpoints tab active.
To get around it: Start eclipse and ignore the bug about loading the plugin (for now). Make a PHP file the active document in the editor, and change from the debug perspective to the PHP perspective. Close eclipse and restart. On restart, the error should be gone and debugging should be active again.
I can't guarantee this is the solution everytime, but I can reliably replicate this failure (and solution) with the breakpoint/non-PHP conditions described above.
I had a similar issue (yours came up top of Google when I pasted my error message) after a few similar and different errors I decided to check my Eclipse workspace settings after an alternative workspace of mine worked and debugged fine.
It turns out my PHP executable pathway was empty (after having previously set it), so I added it back in. No problems so far.
(i.e. here...) Eclipse -> Window -> Preferences -> PHP -> PHP Executables -> Add/replace/reselect here.
UPDATE:
sometimes the simplest thing is to select 'Skip all breakpoints' under the 'Breakpoints' view (which opens in debug perspective). Then restart Eclipse. I have had similar error messages since first answering and that usually does the job (of course you can deselect 'Skip all breakpoints' after that from the same place.
This is a workaround instead of a solution, but so far, it's going good:
I downloaded and installed Eclipse for PHP Developers(aka Zend Eclipse PDT) version 3.0.2 from Zend website and I'm now able to debug Wordpress and Joomla, both pretty complicated projects as far as PHP goes.
I will update if I experience a problem.
I am using Eclipse Indigo on Ubuntu 12.04 and I received this error after installing Java 7. My PDT settings which used to work stop working. My solution was to uninstall PDT and reinstall it. I am not sure if this is relevant to your question but it might solve the issue.
Help -> About eclipse platform
click "Installation details" button
click php development tools (PDT) sdk feature
click uninstall
follow prompts
reinstall pdt in the normal way
My previous debug launches were deleted but my old project was left untouched. I re-ran a debug from Run -> Debug Configurations.
I've only ever gotten this after closing down an Eclipse php project that I've enabled various breakpoints in.
My workaround is once the project opens and I get the error message I select skip all breakpoints, close the project and re-open it. I then deselect the skip breakpoints and start working. The error, at least in my case happens randomly and for no other reason than I closed the project with breakpoints enabled.
Wish I had a more technical solution or fix but I decided my time was better spent working on actual work than chasing this deeper.
The problem happened when I closed Eclipse while a project was still running in debug mode.
I did more or less the same as #rahvin_t to fix it.
Run > Skip all breakpoint. Close Eclipse, start eclipse and I could start the project again.
there are a few errors that happen on start-up similar to this one. They seem to occur when there are 'unusual' files open in the editor (e.g. css or javascript)
What usually works for me:
Close all your files in Eclipse (Ctrl+Shift+W)
Restart Eclipse.

How To Make Eclipse Pydev Plugin Recognize Newly Installed Python Modules?

So I just installed SubnetTree (http://www.icir.org/robin/pysubnettree/) and if I open the Python interactive interpreter I can successfully import it without any error messages. I use it in one of my programs and can successfully run it without a hitch. However, Eclipse marks the import as an error, and this is a problem as I use Eclipse for debugging. I have gone to preferences and have restored the Python interpreter I am using to no avail. I was able to merely restore the Python interpreter exit, and reopen it on my other machine(OS X 10.5, I am now using OS X 10.6) and it identified SubnetTree just fine. Any idea of how I should go about this? Thanks in advance.
if you already tried "refreshing" your interpreter's PYTHONPATH (in Eclipse's Pydev Python interpreter configuration) and it didn't work you could try deleting the interpreter from the list and creating it again. When doing this, you should get all your modules loaded correctly, even the missing new modules.
PyDev version 3.6, on the Eclipse Preferences -> PyDev -> Interpreters preferences pane, offers a button labeled "Check if interpreters are synchronized with environment". On my mac and Eclipse Luna, clicking on this button triggered some behind-the-scenes magic that solved my problem of PyDev not noticing a new installation of PeeWee. I saw a message flash briefly in the lower-right corner of the main Eclipse window "Synch System PYTHONPATH." I did not remove nor re-add the interpreter (Python 2.7), restarting Eclipse did not solve the problem either; but clicking this button did.
Yes - it works! I've been stuck on this for three days. Go to Project, Properties, PyDev - Interpreter/Grammar, "Click here to configure an interpreter not listed", highlight & Remove python (C:/Python27\Python.exe), Auto Configure (brings up a list below that you can review and checkmark as needed), then click on OK.

Eclipse 3.4.2 - very tender

When I select a folder in the Eclipse Project Explorer, the 'explosion' often will cause a file to 'moved' out of its current folder - sometimes even to another project - causing errors in the re-compilation (thankfully).
Does anyone have a solution to this 'tenderness'? (If relevant, I am using Ganymede under Eclipse 3.4.2 with the Android Plugin.)
My theory is that the OP is accidentally doing a drag-and-drop and moving files. I couldn't see a simple way to turn off drag-and-drop in the preferences editor.
I worked On Eclipse Ganymede in Linux
I think there is problem with your Setting of editor
I work with Eclipse a lot, I've used Ganymede for over a year under Linux and sometimes Windows, and neither I nor any of my colleagues have ever seen such a problem.
My guess is that there are problems between your mouse and display drivers, i.e. you are inadvertently clicking on other things when you are meaning only to explode. Can you try opening folded branches by selecting the item and hitting the + key rather than clicking in the GUI?

In Eclipse, why does "Build Automatically" get mysteriously disabled?

I'm running Eclipse Europa (3.3). I leave the "Build Automatically" setting, under the Project menu, on all the time. Once in awhile my code isn't compiling, and I puzzle over it and then pull down the Project menu ... lo and behold, it's not set anymore. What gives? Is this a bug, or is there something else I'm doing that could cause it?
Edit: I am running the regular Java developer installation, plus Subversive and its connectors, Jetty Launcher, and I believe no other plugins. Other people at my workplace have had the same problem.
Edit: I am still having this problem once in a blue moon, only now I'm using Eclipse Galileo (3.5) for Windows. I haven't had this problem in Galileo for OS X, neither in Cocoa nor Carbon, but I have not used that for as long.
With Eclipise Mars.1 (4.5.1), Oomph may be the culprit. Eclipse Oomph supports automatically disabling Build Automatically with entries in
On Windows
%USERPROFILE%\.eclipse\org.eclipse.oomph.setup\setups\user.setup
If you want to disable this Oomph behavior try deleting the following setting
"Eclipse->Navigate Menu-> Open Setup menu entry-> Open User menu entry", a Preference Task under "User Preferences -> org.eclipse.core.resources -> description.autobuilding"
I learned about this setting by posting to the Oomph Eclipse Community Forum on Feb 8th, 2016. I posted a question titled "Oomph Defect? Build Automatically Keeps Getting Disabled". Ed Marks replied the same day with details about Oomph's support for managing the Eclipse "Build Automatically" setting.
https://www.eclipse.org/forums/index.php/m/1722751/#msg_1722751
I don't have eclipse right here to test and make sure but here is an idea.
Is any of the project or even workspace file in SVN ? if they are and they were uploaded with auto build disabled that might explain it
You update and overwrite your settings. This doesn't become apparent until you restart eclipse. this would also explain why other people at your workplace experienc this. it would even explain why some don't : thay are the ones who are careful what they update and don't allow eclipse to overwrite their own settings plus the ones who actually prefer to have autobuild disabled :)
I had the same problem and when I looked at the Source tab under Java Build Path (under the menu Project > Properties ) there were some source directories that didn't exist anymore (marked with a red X). After I deleted them, compilation worked fine and all new .class files are under the bin folder.
Strange. Is there perhaps a plugin installed that turns this off without your knowledge?
Maybe there is some conflicting shortcut. For example, some duplicated shortcut may be toggling it.
I am running 3.4 and I also have this mysterious behavior. I had it in 3.3 as well. I use CVS not SVN. Does not seem to follow a pattern just once in a while it gets switched off and then weird confusing stuff happens until I remember to check it and switch it back on. I am almost to the point where I want to write a plugin to always turn it on when eclipse loads.
When installing Google Plugin for Eclipse, 'Google App Engine for Android' is also installed.
For me, I uninstalled 'Google App Engine for Android', which I didn't need, and solved this problem.