Bug 67178 - [model] [watch/edit] reword prompt preference to indicate that it may not prompt in all cases
Summary: [model] [watch/edit] reword prompt preference to indicate that it may not pro...
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-15 04:23 EDT by Martin Aeschlimann CLA
Modified: 2009-08-30 02:39 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2004-06-15 04:23:54 EDT
RC2

1. On the CVS-Edit preference page enable 'Watch/Edit' and configure to 'Always
prompt'
2. Check out a Java project and open the build path page
3. Make some classpath changes and press 'OK'
4. No 'Perform Edit' dialog is shown

Probably a bug in CVS as they don't show the dialog even they promise to show
one on performEdit. I filed it against jdt.core to make sure that performEdit is
called before manipulating the .classpath file
Comment 1 Philipe Mulet CLA 2004-06-15 05:47:30 EDT
I don't know about #performEdit. 
We do call #validateEdit on classpath file iff it is read-only.
Comment 2 Philipe Mulet CLA 2004-06-15 06:06:05 EDT
Furthermore, we cannot pass a UI context to VCM as we are sitting in a core 
component. There isn't much we can do here.
I suspect that when null and some UI is around, VCM should provide its own 
context or way to surface a dialog to user as it promised in its preferences.

Moving to team for further investigation.
Comment 3 Jean-Michel Lemieux CLA 2004-06-15 09:12:40 EDT
The spec for validateEdit says that if a null context is provider the
implementer should perform the validateEdit in a headless manner. I've verified
that changing the build patch *does* call validateEdit correctly but as Philippe
noted it provides a null context.

The watch/edit preference could be re-worded to say "when possible".
Comment 4 Martin Aeschlimann CLA 2004-06-15 09:32:42 EDT
why not use the active shell if null is passed?
Comment 5 Jean-Michel Lemieux CLA 2004-06-15 09:47:08 EDT
The spec says that we can't. 
Comment 6 Michael Valenta CLA 2004-06-16 11:19:50 EDT
Even though JDT Core is invoking the validatEdit hook, it is not being invoked 
in a headless environment so it is a bug not to pass a UI context. Either JDT 
Core should provide API for their clients to pass a Shell through as an object 
(as is done by the validateEdit hook itself and by refactoring) or the client 
that is causing the change should perform the validateEdit up front before 
making the change. I understand that neither of these is ideal but this is how 
validate Edit is specified and we're stuck with it. Moving back to JDT Core.
Comment 7 Jerome Lanneluc CLA 2006-03-28 08:52:06 EST
This would need a new API. Post 3.2.
Comment 8 Eclipse Webmaster CLA 2009-08-30 02:39:23 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.