|Refresh and classpath initialisation [message #898865]
||Sat, 28 July 2012 07:58
| Nicolas Lalevée
Registered: July 2009
I have a bug in the plugin I maintain: ant.apache.org/ivy/ivyde/|
This issue is that in the IvyDE classpath container configuration, there are some Eclipse variables to resolve to some file in the project. When a project is imported into the workspace, it is refreshed so that files starts to exist from Eclipse point of view. As far as I understand, the classpath initialisation (which calls my IvyClasspathInitializer) is triggered by the refresh of the .classpath. But every file is not yet refreshed. So I cannot try to configure the IvyDE container, it fails immediately while resolving eclipse variable.
I already had that kind of issues years ago with IvyDE. It was storing its setup in some preference files. And the classpath container was builded before the preferences files were available. So I move every configuration bit into the classpath container path so they end up in the .classpath.
Here I don't know what much to do.
I have made the actual computation of the IvyDE container done in a Eclipse job, so the computation can happen after the refresh. I tried every kind of scheduling rule, nothing seems to matter, it get executed before the end of the refresh. The only things that worked is doing a Thread.sleep of arbitrary few seconds. But this is a quite ugly solution.
Is there anyway to to it properly ? How a ClasspathInitializer is supposed to work while the files are not yet there ?
Powered by FUDForum
. Page generated in 0.05920 seconds