Minimize an Eclipse RCP tray application - eclipse-rcp

I have an Eclipse RCP tray application. When I run it from Eclipse IDE environment it runs fine. But when it runs as an Eclipse product (standalone exe) it always show a title bar with three buttons (min/max/close) as you see below. I am running Windows 10. Why? How can I suppress this small window/shell.
I am calling the following method from preWindowOpen.
private void minimize() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setInitialSize(new Point(50, 0));
configurer.setShowCoolBar(false);
configurer.setShowStatusLine(false);
configurer.setShowMenuBar(false);
configurer.setShellStyle(0);
configurer.getWindow().getShell().setVisible(false);
configurer.getWindow().getShell().setMinimized(true);
}

The code works in Eclipse Helios but is failing in Neon. I believe some of libraries has changed regarding minimizing a window.

Related

How can I view stdout for an RCP built in Eclipse?

I'm attempting to write a plugin for an RCP application.
I started with the Hello World plugin template in Eclipse. Ran it. Saw it worked in Eclipse. Exported it and dropped the jar into the plugin directory for the RCP application and started that application. It didn't add the new menu.
I changed the code to instead just have a popup on startup (using the org.eclipse.ui.startup extension point.)
I ran that. Saw it worked in Eclipse. Exported and dropped into the RCP application. It doesn't show the popup.
So... I think at this point I want to somehow view the stdout/stderr for the RCP application. I could add in a simple message that goes to stdout on startup in the plugin and see if that shows up. I could also check it for errors, to see if maybe it says there was somekind of error in loading my plugin or something.
The issue is, when I launch the application from PowerShell, it immediately returns the prompt. How do I end up viewing the stdout/stderr from the application?
Correct way to launch eclipse application from CMD is java -jar "%EQUINOXJAR%"
Reference
Eclipse Wiki Starting_Eclipse_Commandline_With_Equinox_Launcher

How to make eclipse allow autohotkey shortcuts to work?

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
}
}
}

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.

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 "Waiting for virtual machine to exit"

I'm working on a blackberry project using eclipse and bb-ant tools. I've created a build.xml file to perform the build. Everytime I try to run an Ant build, eclipse pops up the progress dialog and it hangs stating "Waiting for virtual machine to exit."
I downloaded an open source Blackberry project that has an ant build and it is showing the same behavior.
Does anyone have any suggestions?
Edit:
I used the command line to build my xml file and it built fine. However, when I tried from Eclipse it still hangs.
I've tried both the standard eclipse plugin directory and the path I downloaded ant to.
You could check if your ANT_HOME settings are correct (see also this blog post).
"Window > Preference > Ant > Runtime": "Ant Home Entries".
if the jars files are from a plugin directory (beside the default 'org.apache.ant_1.7.1.v20090120-1145' one) and not an independent ant installation, that might explain the problem.
Try clicking the "Ant Home" button on the right side and setting up ant home such as "C:\path\to\apache-ant-1.7.0"
There are similar bugs to this kind of situation (bug 173419, ticket 91).
It is worth checking the JVM used for the project.
It can also occurs when a ant task is poorly implemented.
You had the problem because the java version ant tries to run with is incorrect.
By default, eclipse will try to run the ant build with the java version it uses to compile the java files (Blackberry JRE), which won't work! You need to change the jre version by choosing "Run As... > Ant build". Before clicking run, go to the JRE tab, choose "Separate JRE:" and change "Blackberry JRE " to a standard java JRE. Press the run button and everything should work correctly.
I hit this problem also. Although I never used the same solution, you pointed me in the same direction.
I was using a ant file as a builder in my project, and I disabled the Allocate Console build option. This is when I hit the 'Waiting for virtual machine to exit'.
So I simply enabled the Launch in background option and it worked.