LiClipse and execute codes in console shortcuts? - eclipse

For Eclipse PyDev, you can select a few lines of codes, then hit Ctrl+Shift+Enter to execute the codes in interactive console, but with LiClipse, that simply removes the selected codes, I can't find anywhere mentioning this, anyone?

Well, this is a feature of PyDev, so, it'll only work if you open the .py files with the PyDev editor (i.e.: in preferences > general > editors > file associations check that '*.py' is marked to be opened with the 'Python Editor' -- for PyDev -- and not the 'LiClipse Python Editor').
Alternatively you can right click a file and choose 'open with > Python Editor'.
After that, Ctrl+Alt+Enter should work for you (note that in the latest version, Ctrl+Alt+Enter is really for opening the editor, but F2 is the recommended way of sending things line-by-line to the console... See: http://pydev.org/manual_adv_interactive_console.html for details).

Related

Eclipse with vrapper doesn't recognize file changes

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.

How to associate .CGI with PERL EPIC in Eclipse?

I am searching for a solution of how to associate .cgi extension with Perl language (to highlight syntax correctly) in Perl Epic under Eclipse 3.8.1 Linux x64? Currently it highlights only files with .pl extension. When opening .cgi or files without any extensions the Eclipse highlights them very different than Perl Epic is set up.
Any help is appreciated! Thanks!
You'll need to create a new file association and associate the "Epic Perl Editor" with it. Also see Associating Files with the Perl Editor in the EPIC documentation, which says:
Eclipse associates file extensions with editors. If another plug-in is
installed, the EPIC Perl Editor might not be used as the default
editor when opening *.pl, *.pm or *.cgi files. To associate these file
extensions with the Perl Editor, choose Window → Preferences... from
the Eclipse menu and select Workbench → File Associations. If the Perl
extensions are missing, they can be created by pressing the Add...
button. Select the Perl Editor from the list and press the Default
button.

eclipse, refresh files edited by external editor

I currently use emacs to edit .java files and run eclipse.
Eclipse doesn't automatically recognize modified files, so I often end up running unmodified application.
I wonder if there exists a shortcut to refresh all the modified files in eclipse.
Perhaps you want to check Preferences > General > Workspaces > Refresh using native hooks or polling. You can see that the eclipse refreshes the file you edit with external editor (like vi, emacs, etc) when you check the option.
On the project explorer you need to select the project(s) that you want to refresh and then click on File->Refresh or hit F5.

Use an external editor for some file types with Netbeans

So with eclipse I would instruct it to open html/css/js files in textmate, and pretty much just use if for the php side of things.
Would like to do a similar thing with nb if possible.
Any thoughts?
Best,
Bob
There exists a Path Tools plugin for Netbeans. It has a command "Edit path...". With this you can select a file in the tree, click "Edit path..." and the file will be opened in an external editor.
You can customize the external program which is called under "Tools" -> "Options" -> "Miscellaneous" -> "Path Tools" -> "Edit Commands For File" .
You can't assign it to specific file types, but at least you can open files without leaving Netbeans.
The webpage of the Path Tools plugin looks not very active, but it works in Netbeans 6.9.1 without problems (Works on My Machine).
It also has other useful actions:
Copy Paths Action Copy the full paths of the files/folder of selected node to the clipboard.
Explore Action Launch the OS File Explorer
Shell On Path Action Launch the OS shell
Edit Action Launch the editor
This plugin should be integrated to Netbeans.
Thank you for the help on this.
Here is a way for the Path Tools 'Edit' toolbar button to pop up the Windows 'Open With...' dialog box for the selected file.
In Options, Path Tools... 'Edit Commands' 'For File' - change the command to this:
rundll32.exe C:\WINDOWS\system32\shell32.dll,OpenAs_RunDLL {path}
(Edit: I forgot to say this is for XP - idea is the same for newer Windows)
If you don't want to deal with manipulating plugins and configs, you can do it this way (valid for version 8.2):
Go to Tools > Options > Kepmap
search for "path"
It defaults to Alt + Shift + L
use that command in any editor window to get the path for the file, then simply open that path in whichever editor.
I agree it's not as smooth and savvy as having a readily-available "open in external editor" command, but it's almost there.

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