How to make eclipse allow autohotkey shortcuts to work? - eclipse

Since eclipse doesn't have functionality to easily switch which split-screen editor you're using I tried writing an Autohotkey script to just click on the upper corner of the halves.
The AHK script works great... in any application except Eclipse. It seems that eclipse binds the shortcut and won't let go of it. I have removed all instances of ctrlup/down from the general --> keys in eclipse preferences.
Using:
Eclipse Helios
Newest version of AHK
Win 7 (in a VM)
How can I make eclipse relinquish control of this shortcut?
The test script in question (I'm testing with just up, will add down once this works):
^Up::
Click 901, 81

Found the solution:
I was running eclipse as administrator. Compiling the script to a standalone executable and running that as an administrator solved the issue.

Try this code:
Loop
{
if (GetKeyState("CTRL"))
{
if (GetKeyState("UP"))
{
Click 901, 81
}
}
}

Related

Eclipse CDT doesn't run the program

I have written a small piece of code in C++(gui/wxWidgets) . It compiles/ links without any errors and produces an executable that when launched from command line opens the desired 'Hello World!' window, but when tried from within eclipse (menu, toolbar or ctrl-F11), it doesn't run. A quick error dialog appears/disappears before it can be read. After many runs I could make out that of the two msgs it displays, one reads something like "Looking for executables...". Apparently eclipse is unable to get to the executable in the Debug folder.
I tried a console application which runs without any issue from within eclipse as well.
My installation is indigo on Ubuntu 12.04.
Any ideas what could be the problem?
Problem resolved.
There was no Launch Configuration in Project Properties -> Run/Debug Settings.
Added one with defaults and it worked.

Jar file won't run - Windows 7

I am trying to run a .jar file that I have created using either the command line and double clicking. The Jar makes a JFrame GUI with button, text, labels etc.. It should display this window.
I have checked and the file is associated with javaw.exe in the correct directly. I have also tried via the command like using java -jar filename.jar and it just paused for a split second and then moves to the next line, no errors.
I have also run javafix which also hasn't helped.
I have reinstalled JRE and JKE and still no luck, the file was created in Netbeans and compiles without problem.
I am using this Netbeans tutorial: Introduction to GUI Building.
Any suggestions? I'm Stumped.
The best I can tell is to Press Win + R and type regedit.exe, Press Enter.
In your Registry Editor Window, Expand HKEY_CURRENT_USER->Software->Microsoft->Windows->CurrentVersion->Explorer->FileExts
Delete the entry or Key Name .jar from the list. Do check the version used by your NetBeans and the one on your classpath. Hopefully they both are same versions, it can be one of the reasons too, for .jar not working. Now again try to run your .jar file. That might help it to run again.
Regards

Eclipse RCP menus and the new Natty Unity

So I restarted my Eclipse RCP application after I upgraded my Ubuntu, and it seems that the Main menu has disappeared!
Does anyone know if this is the fault of the new Unity interface or something in SWT?
If you're having the same problem as I had, about getting the Eclipse menu in the Unity Global Menu with HUD then this is what did the trick for me (nobody seems to be able to explain why it works, but for me and others it worked perfectly). I'm using Ubuntu 12.04 and Eclipse Indigo from their website.
(Change the commands accordingly if you're not using Vim for editing.)
Edit libappmenu.so:
$ sudo vim /usr/lib/gtk-2.0/2.10.0/menuproxies/libappmenu.so
Search for 'Eclipse':
/Eclipse
Replace the 'E' with 'X':
rX
This might be optional but doing it didn't hurt for me:
$ sudo ldconfig
Now you should be good to go with Eclipse using the Unity Global Menu and The HUD working like a charm.
(Credit: elvisd blog)
As a workaround you can do
alias eclipse='UBUNTU_MENUPROXY=0;eclipse'
But this will mean that you have to launch Eclipse from a terminal. If you want to launch Eclipse from Unity Dash then you have to add
UBUNTU_MENUPROXY=0
as the first line in /usr/bin/eclipse.
This will show the file menu inside the application.
As #Geniedesalpages mentions, it's the interaction between eclipse events and the Unity menu. https://bugs.eclipse.org/bugs/show_bug.cgi?id=330563
There should be updates to unity to allow eclipse to retain its old style menu bar.
PW
Create a file a bash script in the folder of Aptana/Eclipse and run the Aptana/Eclipse by this file.
#!/bin/bash
export UBUNTU_MENUPROXY=0
./AptanaStudio3

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.

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