Community
Participate
Working Groups
Hi, In our application we are using an external tool that generates java files in a given project. After the generation is finished we call javaProject.getResource().refreshLocal(IResource.DEPTH_INFINITE, null). This refreshesh the java model, however the necessary ElementChangedEvent-s are not broadcasted to the registered listeners. Calling the IOpenable.makeConsistent(IProgressMonitor) doesn't broadcast the events. Regards, Hristo
Hi, One clarification. The external tool used the java.io.* API to create new files. It's exactly these new files for which ElementChangedEvent is not fired. Regards, Hristo
Could you please provide the build number and exact steps to reproduce ?
Hi, I'm using Eclipse 3.3 RC1. JDT details: Eclipse Java Development Tools Version: 3.3.0.v20070501-0010-7o7hE8PEFpPomYYgh4CRhYP Build id: I20070503-0010 Regards, Hristo
Created attachment 71029 [details] JUnit Test Case reproducing the problem Hi, In the attached file you can find a PDE JUnit test reproducing the problem. Check the assertions for definition of expected behavior. Basically the test does the following: 1. Create a java project 2. Create source folder (package fragment root) 3. Creates a new compilation unit containing a primary type. This is done using the java.io API 4. Refreshesh the package fragment root with infinite depth 5. Verifies that no ElementChangedEvent with delta containing the newly created compilation unit has been fired. The delta is traveresed recursively through all the child deltas. Regards, Hristo
The first refresh causes a delta to be sent indicating that the package com.sap.test has been added. This implicitly include the addition of all children of the package. No resource modification is done before the second refresh. So no delta is sent on the second refresh. This works as designed.
Hi, Thanks for the clarification. Regards, Hristo