Eclipse RCP menus and the new Natty Unity - eclipse

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

Related

Copy and Paste mouse shortcuts in Git Bash terminal in Eclipse

The text cannot be COPIED by double-clicking and PASTED on right-clicking when working on Git bash in Eclipse, similar to the usage in Git Bash Windows application, which saves much time.
Is there any solution or best terminal alternative integrated in Eclipse?
That does not seem to be supported by the Terminal component, part of CDT since Eclipse 2020-03, with code source now in org.eclipse.cdt.git/tree/terminal.
No issue has been mentioned in this bugzilla list, which means you would need to create one to mention this use case.

Adding Eclipse to Gnome Do

I'm trying to make do without a start menu on my Lubuntu laptop, and have installed Gnome Do as my launcher of choice.
Everything has been working the way it should up to now, and I have to say that the launcher really does eliminate the need for a start menu.
Anyway, I recently installed Eclipse (the java ide) and I can't get it to show up in Gnome Do. Here's how I installed eclipse:
$ ...Download eclipse, obviously...
$ cd /opt
$ sudo tar xvfz ~/Downloads/eclipse-whatever.tar.gz
Then I created a launcher for use on the Lubuntu desktop:
$ lxshortcut -o ~/Desktop/eclipse
After some fiddling around I ended up with this file in my ~/Desktop folder:
eclipse.desktop:
[Desktop Entry]
Type=Application
Exec=/opt/eclipse/eclipse
GenericName=Eclipse Java IDE
Icon=/opt/eclipse/icon.xpm
Name[en_US]=Eclipse Java IDE
StartupNotify=true
Categories=Development
The icon shows up nicely on the Lubuntu desktop. I can click it, and eclipse launches as expected.
However, no matter what amount of tweaking and restarting of Gnome Do, I just can't get it to show Eclipse.
Strange thing is I have Firefox on the desktop, with pretty much the same contents in the desktop shortcut file, and this shows up just fine.
What am I doing wrong here?
I never found out why this doesn't work, but searching around on google I found that many people were using a tool called alacarte to setup new menu items. So I threw away the eclipse.desktop file I had created and used alacarte to set up the launcher, and after having done that the problem was solved. I can now search for eclipse with Gnome Do.

How to force eclipse to use the SceneBuilder executable file? Mac os x

I'm trying to get SceneBuilder to work with Eclipse v4.4.2 on Mac OS X. I'm following the advice from this tutorial: http://code.makery.ch/library/javafx-8-tutorial/part1/. I downloaded the Mac OS .dmg version of the SceneBuilder app from here: http://gluonhq.com/products/downloads/. It works when I run it as a stand alone.
When I try to configure Eclipse to use the app as part of the e(fx)eclipse package, Eclipse seems to be configured to look for the file Contents/MacOs/scenebuilder-launcher.sh in the application package contents. The version of the app I have doesn't have it, instead it just has the executable Contents/MacOs/SceneBuilder.
Failure to launch SceneBuilder [...] Cannot run program "/Applications/SceneBuilder.app/Contents/MacOs/scenebuilder-launcher.sh". No such file or directory.
Does anyone know which version of SceneBuilder I should be using (and where I can get it), or is there a hacky solution to sort this?
Just playing around with the SceneBuilder standalone it seems like it's a big step up from WindowBuilder, shame that just finding a packaged/compiled version of it has been so difficult!
The answer provided by ItachiUchiha is not the full solution with the new binaries provided by Gluon. Obviously they have forgotten to package the file Contents/MacOs/scenebuilder-launcher.sh with the new binaries. It is however sufficient to just copy over this file from an old version of SceneBuilder to make the launch from within Eclipse work.
Hi guys my solution is not clean by the way I use:
On OSX :
$cd /Applications/SceneBuilder.app/Contents/MacOS/
$ln -s SceneBuilder scenebuilder-launcher.sh
And for that works.
On a Mac:
I just installed sceneBuilder 8.3.
After setting up Eclipse with the proper SceneBuilder executable (in the Applications folder)
I had the same problem.
Failure to launch SceneBuilder [...] Cannot run program "/Applications/SceneBuilder.app/Contents/MacOs/scenebuilder-launcher.sh". No such file or directory.Error=2
Then in Eclipse I went to the
Help Menu, Check for Updates and Installed
all of the latest updates offered.
When I was asked if OK to Re-Start Eclipse I clicked OK.
After Eclipse restart
I Right Clicked on a Main.fxml and selected
Open with SceneBuilder.
It worked perfectly.
Best of Luck to you all
You can change the path in
Eclipse -> Preference -> JavaFX -> SceneBuilder Executable
I had this same issue on my mac following the code.makery tutorial but discovered you can still use the official JavaFX Scene Builder 2.0 download from oracle.com available at JavaFX Scene Builder 2.0.
After downloading and installing (by double-clicking on the downloaded .dmg file and dragging to the application folder), simply navigate to Eclipse>preferences>JavaFX and then browse to your Applications folder and select the JavaFX Scene Builder app you just installed. Worked and is still working for me!
I downloaded the older version of scene builder from oracle site. Copied the scenebuilder-launcher.sh from the fresh installation directory to the Glueon scenebuilder directory. And this fixed the issue.
My solution on Mac OSX was gleaned from the bug report at https://github.com/gluonhq/scenebuilder/issues/2. Apparently newer versions of Scene Builder (not including version 2 and before) are missing the scenebuilder-launcher.sh file. To make this all work, do the following.
Install a new version of Scene Builder from Gluon (not Oracle). I used https://gluonhq.com/products/scene-builder/. Install AND OPEN Scene Builder. For this to work, it is important to actually open Scene Builder before attempting to use it in Eclipse. If you don't, the first invocation under Eclipse will attempt to pop up a the normal OSX security message which, of course, it can't do because it is being invoked from a shell script. This only happens on first invocation, so the next time you won't have the problem. You get a message to the effect that the application is damaged. You will also get this message if you install a new version. Just invoke the Scene Builder application standalone before continuing to use it with Eclipse.
open a terminal session (sorry I don't know of another way to do this otherwise as you need to make the file you create executable)
cd /Applications/SceneBuilder.app/Contents/MacOS
sudo vi scenebuilder.sh (or use your favorite editor other than vi)
cut-and-paste the file from the Gluon issue into your editor and save it.
sudo chmod +x scenebuilder.sh
open Eclipse and open Preferences > General > Editors > File Associations (or type file in the filter box and select File Associations.
scroll down to .fxml in the file type box and select it. If you don't see it, click add to the right of the file types list. Enter .fxml and click OK.
in the associations pane, click Add to the right of the associations pane and click the Internal radio button. Scroll down to Scene Builder and select it. Click OK, the Apply and Close.
You should now be able to right-click on an .fxml file and click Open with Scene Builder and Scene Builder should start with the fxml file open in the builder.

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 to launch eclipse from a command line on MacOS with a workspace pathname

On linux:
eclipse PathnameToWorkspace
works fine, and launches eclipse on the workspace.
I've never been able to figure out the MacOS moral equivalent, given the MacOS application tree structure.
I suspect this is not a hard problem.
./eclipse -data <workspace-path> (see also How do I run Eclipse in the Eclipse Wiki).
On my system there's a link to the eclipse binary from /Applications/eclipse/eclipse, and I find that just running that will start Eclipse with my default workspace.
You might also find the Eclipse binary in '/Applications/Eclipse.app/Contents/MacOS/eclipse'.
When I start Eclipse like this (from the command line) I find that my Mac will not always switch to the desktop where Eclipse is started, so that I will have to go hunt for the Eclipse window with Exposé/Misson Control (Ctrl-Up Arrow). – This is especially true when I'm have two monitors connected to my Mac.
Since I found typing the full path to eclipse annoying, I simply added a symlink to it from /opt/local/bin and made sure that directory is in my $PATH:
cd /opt/local/bin
sudo ln -s /Applications/eclipse/eclipse .
echo 'PATH="$PATH:/opt/local/bin' >>~/.bashrc
After that, just issuing the command eclipse (without the preceding /Applications/eclipse part) works as it should.
After doing lots of hit and try I have added following into my bash_profile and I am able to launch eclipse from terminal.
(Note: Eclipse is inside Application)
export PATH="$PATH:/Applications/Eclipse.app/Contents/MacOS"
Hope it will be helpful for beginner like me.