Eclipse with vrapper doesn't recognize file changes - eclipse

I have a file open in Eclipse. I make some changes (new lines, type some stuff), and it never indicates the file has been changed (with the * on the file tab). So I ctrl+s to save, close the file, re-open it, and my changes are not there.
Context
Eclipse Build Details
Eclipse Platform
Version: 2020-06 (4.16)
Build id: X20200903-1448
OS: Linux, v.5.8.11-200.fc32.x86_64, x86_64 / gtk 3.24.23, WebKit 2.28.4
Java version: 11.0.8
Other
Vrapper (VIM) extension
PHP project
Happens in multiple projects
Only happens in PHP files
Reproduce
Double click a file to open. Starts in Normal Mode (VIM)
go to a line & press O to create a new line
Type echo "zeeb"; exit;
Now, there should be an asterisk next to my filename on the file tab, but there isn't.
At this point, if I click with the mouse & select some text, the asterisk will appear most of the time. Then I can save. Or, if I go back into normal mode, the asterisk appears
What I've tried
Project -> Clean
Project -> uncheck 'Build Automatically' (same behavior either way)
Closing all Eclipse windows & re-opening just one window
Disabling vrapper <- this works! But I need my vim.

Adding :set noatomicinsert to ~/.vrapperrc seems to have fixed it.
Vrapper Settings states:
Whether inserts should be handled as atomic operation. This causes problems sometimes, so it is deactivatable.

Related

Eclipse + PyDev: file reopens in debug mode

I use Eclipse (4.2.1) to develop Python (3.2) programs using PyDev (2.8.2). I start my program in debug mode and when I encounter the first breakpoint, a new tab is opened with a copy of the script containing the breakpoint.
Debugging then takes places in the new copy.
When I stop debugging, the tab with the copy remains.
Changes to the copy, must be saved to update the original tab.
How can I make Eclipse NOT open a separate copy of my program?
Status: I still have this problem!

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.

Eclipse project explorer retains focus when opening a file

Opening a file in Eclipse's Project Explorer with a double click opens the file in the built-in editor but does not transfer the focus to the file for immediate editing. Instead the focus remains in the Project Explorer and a further click in the editor window or tab is required before editing or moving around the document. I guess this is by design but I am hoping there is an option or workaround of some kind. Thanks.
Using Eclipse 3.7.2 with C++ development tools installed on Ubuntu 12-04

Eclipse on Windows 7

Every time I open eclipse Galilio on Windows 7 64bit this message appear
and it won't work
-------------------------------------------------------------------------------------
Faild to load the JNI shared library "C:\Program Files(x86)\java\jre6\client\jvm.dll"
-------------------------------------------------------------------------------------
Help me please.
If you are using the 64-bit distribution of Galileo, you need a 64bit distribution of JRE (not a 32bit installed in "C:\Program Files(x86)").
If not (you are using a 32bit) version, you can (as in this thread),
Check your path variable,
make sure that if you type "java -version" at a command prompt you get the version you expect.
Or better yet, edit your eclipse.ini file to specify a particular JVM location.
See http://wiki.eclipse.org/Eclipse.ini for examples.
Now check out what's below. This should help you fix your Eclipse issue with Java and Windows 7 64-bit.
Eclipse will not open when the exe is clicked on Windows 7 64-bit OS.
Eclipse Standard/SDK
Version: Kepler Release
Build ID: 2013614-0229
This is for the Firefox v22 64-bit browser
OS: Windows OS 64-bit
Okay, you assume that Java is set properly on your Windows 64-bit PC and you've loaded Eclipse in a folder on your desktop. You've also created a separate folder called Eclipse Workspace which also resides on the desktop. Now you're ready to go and then in the Eclipse/Eclipse directory you click the Eclipse.exe and then you get this janky error message after the Eclipse window opens:
"Java was started but returned exit code=1" (with other related data)
or ------->
You clicked the Eclipse.exe file and this message was displayed: "A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java Virtual Machine was found after sending the following locations: c:\Program Files (x86)\Java\jre7\javaw.exe" or something like this. Now I'm not saying that this solution will work for everyone but note that this is a good baseline starting point to find out your solution.
--- or ---
2b. In DOS, you typed Java or java -version in the command line, pressed then this error was thrown:
"Picked up_Java_options:
-Xrunjvmhook -Xbootclasspath/a:C"\Program~2\hp\Quickt~1\bin\Java_S~1\classes;c:\Progra~2\hp\Quickt~1\bin\Java_S~1\classes\jasmine.jar
Error occurred during initialization fo VM could not find agent library JVMhook on the library path; with error" Can't find dependent libraries..."
* Again, keep in mind, this process is being done with the FireFox v22 64-bit browser** If using this browser, you need to check the following, to see if Java is enabled in the browser. I know what you're thinking but just do it!
Open or maximize the Firefox browser.
At the top left of the page, click Tools then the Add-ons option.
Click the Plugins option in the left pane.
You should see:
Java Development Toolkit 7.0.250.17 10.25.2.17 NPRuntime Script Plug-in Library for
Java (TM) Deploy. (or a plugin with a relevant version number)
Look to the right and make sure this plugin is Enabled~! If it is not Enabled, enable it!
If you do not see this plugin, at the top of this page, enter "Java" in the Search All Add-ons field, locate the plugin then install it.
Now go to Java.com and download the current version of Java for 64-bit. You need a JRE (Java Runtime Environment) and a JDK (Java Development Kit files and both have to be 64-bit!!!!!!! Once downloaded run both. They usually sit at either of these locations with these path distinctions:
c:\Program Files\Java\jre7 (This is the location of the JRE=Java Runtime Environment)
c:\Program Files\Java\jdk1.7.0_25 (This is the location of the JDK=Java Development Kit)
--- or ---
c:\Program Files (x86)\Java\jre7 (This is the location of the JRE=Java Runtime Environment)
c:\Program Files (x86)\Java\jdk1.7.0_25 (This is the location of the JDK=Java Development Kit)
* Now keep in the these version numbers will change but here are the preferred locations.
Environment Variables Edits
Click Windows Start button (bottom left on Windows 7) then click Computer.
At the upper left, click System Properties. The Control Panel Home window opens.
Click the Advanced System Settings option.
Your User Account Control window may open.
Click the [Yes] button.
The Systems Properties window opens.
Click the [Environment Variables] button.
Go to the User Variables for (Your System Name here).
Delete everything here accept, the following:
PATH
TEMP
TMP
Now highlight the PATH variable and then click the [Edit] button.
The Edit User Variable window opens.
You want to add the following:
;c:\users\Your User Name\desktop\eclipse\eclipse\jre\bin;c:\Program Files (x86)\Java
\jre\bin;c:\Program Files (x86)\jre7\;c:\Program Files (x86)\Java\jdk1.7.0_25\bin
Click the [OK] button and the Edit User Variable window closes.
Now go to the System Variables section.
Delete all the Variables accept the following:
asl.log
CLASSPATH
Comspec
FP_NO_HOST_C...
NUMBER_Of_P...
OnlineServices
OD
PATH
PATHTEXT
PCBRANDS
Platform
PROCESSOR_A...
PROCESSOR_id...
PROCESSOR_LE...
PROCESSOR_R...
PSModulePath
TEMP
TERM
TMP
USERNAME
Click the [New...] button.
The New System Variable window opens.
In the Variable Name field (which the cursor is currently blinking in...), enter JAVA_HOME.
Then go to the Variable Value field and enter c:\Program Files (x86)\Java\jdk1.7.0_25\bin;%JAVA_HOME%/bin.(Without the period, of course!)
Click the [OK] button and the New System Variable window closes.
Now highlight the PATH option and click the [Edit...] button.
The Edit System Variable window opens.
Go to the Variable value field and add the following at the end of the string already there:
;c:\Users\Your username here\desktop\eclipse\eclipse\jre\bin;c:\Program Files
(x86)\Java\jre7\;c:\Program Files (x86)\Java \jdk1.7.0_25\bin
Click the [OK] button and the Edit System Variable window closes.
Click the [OK] button to close the Environment Variables window.
Click the [OK] button to close the System Properties window.
Now for the Pista Resistance!!!!!!! Go back to the Eclipse folder on your desktop (or alternative location), then click open. Now download Notepad ++ from http://notepad-plus-plus.com and install it.
Use Notepad ++ to open the eclipse.ini file from the Eclipse folder. Using Notepad ++ keeps the eclipse.ini file's format correct.
With the eclipse.ini file opened with Notepad ++, look for -- launcher.append Vmargs. Once you've found this entry, place the cursor after it and then press . You should now see a space.
In that space enter the following: (and this must be entered exactly like what's listed below)
-vm
c:\Program Files (x86)\Java\jre7\bin\
c:\Program Files (x86)\Java\jdk1.7.0_25\bin
Now click File then Save as, with the file name as Eclipse.ini, then click the [Save] button.
A message box will display asking "Do you want to replace the file?", click the [Yes] button.
Now click File then Exit and Notepad ++ closes.
Now close then restart the Firefox browser.
Now close then reopen the Eclipse folder. ( I know what you're thinking but just listen and nod and do it.)
Click the Eclipse.exe file and now you should see the Eclipse splash screen.
After a few seconds, a message displays asking you to select an Eclipse Workspace. You should have this Workspace on your desktop
or some where you can make this connection.
Now Eclipse is working! Let me know if this process worked for you!

How do I enable undo in eclipse ant editor?

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