Summary: | Pre auto build notification fired when closing or opening a file | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Pascal Rapicault <pascal> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | RESOLVED WONTFIX | QA Contact: | |
Severity: | major | ||
Priority: | P3 | CC: | john.arthorne |
Version: | 2.1 | ||
Target Milestone: | 2.1 RC1 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Pascal Rapicault
2003-02-17 13:27:16 EST
No this is what platform is notifying (we simply convert a resource delta into a Java one). Same notification stages. John and I checked, and the platform does send any pre_auto_build event when a file is closed or opened. To correct Pascal's comment, the platform does NOT send pre auto build events when a file is opened or closed. This seems to be a special working copy delta that is not based on a resource delta. I see. However, this doesn't strike me. Pre-auto-build isn't meant to be specifically for builders, just a hook to prepare some forthcoming build actions. Also, does platform notifies opening/closing a file ? I didn't think it existed. Working copies are not truly resources, and their deltas are useful for many kind of usage. Opening and closing a file does not modify any resources, so the platform does not fire any kind of event. I think Pascal's problem is that he receives a pre "build" notification even in this case, where a build can't possibly happen. The name of the event is confusing in this case. Got it. Note though that pre/post build notifications also occur when no builder is running (autobuild is off). Won't change this behavior as this would be a contract change. The JavaModel has a notion of working copies, which platform doesn't. We notify their changes along other resource changes, i.e. JavaModel offers more deltas at finer grain. Working as per design. I understand that you provide more deltas, but the usage of the pre_auto_build flag for the notification of working copy is confusing compared to the platform behavior, and what is described in the article about builders. I wonder if this should not be fixed for 2.2? A non breaking change for know would be to provide a workingCopy flag into the delta. Is this possible? Flags aren't necessary, the associated Java element can be asked if it represents a working copy. |