Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 392698

Summary: An ClasspathInitializer cannot resolve files in the project
Product: [Eclipse Project] JDT Reporter: Nicolas Lalevée <nicolas.lalevee>
Component: CoreAssignee: Jay Arthanareeswaran <jarthana>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: srikanth_sankaran
Version: 4.3   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard: stalebug

Description Nicolas Lalevée CLA 2012-10-23 16:29:50 EDT
Since I didn't have any answer in the forum, I am filling a defect report.
See http://www.eclipse.org/forums/index.php/m/946074/

I have a bug in the plugin I maintain: ant.apache.org/ivy/ivyde/
issues.apache.org/jira/browse/IVYDE-302

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 ?
Comment 1 Srikanth Sankaran CLA 2012-10-23 20:03:57 EDT
Jay, please take a look.
Comment 2 Eclipse Genie CLA 2019-11-18 12:18:51 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.