|Accessing the workbench via servlets? [message #105252]
||Fri, 15 February 2008 12:28
Originally posted by: stefan.melbinger.gmail.com|
Following several tutorials, I managed to get a project running, which
consists of a bundle including a BundleActivator and some static and
dynamic (servlet) content. It's possible to access this content through a
browser, loading pages from localhost.
The aim of my experiments is to offer a webpage which allows the user to
click on links and thus make things happen within the running Eclipse
process. For example, I'd like a link called "open the JAR export wizard",
which, after clicking, opens the wizard within the Eclipse window.
The problem I encounter is that the servlet is of course not an UI-thread.
I cannot do the usual
IWorkbench workbench = PlatformUI.getWorkbench();
Shell shell = workbench.getActiveWorkbenchWindow().getShell();
because, as the API states, the getActiveWorkbenchWindow() function
returns "null if called from a non-UI thread".
I found out about the possibility of calling
Display.getDefault().[a]syncExec(). However, this is not working as
intended. Using asyncExec(), nothing happens at all, and using syncExec(),
the whole thing blocks forever.
Let me ask you, can my initial idea be realized in theory? Is it possible
to make things happen within Eclipse from clicking on a link in a browser,
thus running a GET request on a servlet, which is able to get a link to
the running process and, for example, open wizards or show cheatsheets?
Institute of Computer Technology
Technical University of Vienna
Powered by FUDForum
. Page generated in 0.01379 seconds