how to refresh programmatically after exec()? [message #160639] |
Sat, 22 November 2003 23:24 |
Eclipse User |
|
|
|
Originally posted by: progers.classwide.com
I have an action that invokes an external tool on a set of files in a
selection; this tool potentially modifies the files. I use exec() to
invoke this external tool. Once this tool finishes I want to
automatically refresh the workspace, just like the External Tool
wizard allows one to do. I cannot simply call localRefresh() after
the exec() call because exec returns immediately, so my refresh call
would occur before the external tool finishes.
Where do I make this call? Do I need a listener to do it? If so,
how?
Thanks very much.
PS: I don't use the External Tool wizard for this because I need to
pass multiple resources (files) to the external tool. Too, I want to
have my own button and menu pull-down for it, but in any case I didn't
see a way with the wizard to pass more than one resource. Did I miss
something?
|
|
|
|
|
|
|
Re: how to refresh programmatically after exec()? [message #167311 is a reply to message #160821] |
Mon, 08 December 2003 15:51 |
Eclipse User |
|
|
|
Originally posted by: progers.classwide.com
Darin Swanson wrote:
[snip]
> You have two choices:
> You can busy wait for your process associated with your external
tool
> to terminate
> OR
> do your refreshing asychronously like the
BackgroundResourceRefresher.
> Essentially you need to register as a debug event listener to
trigger
> to refresh the resources when the process associated with your
> external tool terminates.
I'm going with the debug event listener approach and am getting an
error that I do not understand.
The log in .metadata says (among other things):
java.lang.NoClassDefFoundError:
org/eclipse/debug/core/IDebugEventSetListener
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at
org.eclipse.core.internal.boot.DelegatingURLClassLoader.find Class(Dele
gatingURLClassLoader.java:922)
at
org.eclipse.core.internal.plugins.PluginClassLoader.internal FindClassP
arentsSelf(PluginClassLoader.java:166)
at
org.eclipse.core.internal.boot.DelegatingURLClassLoader.find ClassParen
tsSelf(DelegatingURLClassLoader.java:485)
at
org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Dele
gatingURLClassLoader.java:882)
at
org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Dele
gatingURLClassLoader.java:862)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Does this represent an Eclipse environment setting that is not set?
In the Eclipse console output I get:
"Unhandled exception caught in event loop.
Reason:
org/eclipse/debug/core/IDebugEventSetListener"
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08098 seconds