Bug 96777 - [JUnit] "Add JUnit Libraries" intentionally dirties the current editor
Summary: [JUnit] "Add JUnit Libraries" intentionally dirties the current editor
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
: 86320 (view as bug list)
Depends on: 65267
Blocks:
  Show dependency tree
 
Reported: 2005-05-26 09:44 EDT by David Saff CLA
Modified: 2009-08-30 02:05 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Saff CLA 2005-05-26 09:44:56 EDT
In N20050526-0010, "Add JUnit Libraries" intentionally dirties the current
editor, even though no text has changed.  See bug 94287.  This is potentially
confusing to the user.  I'm adding Erich to the CC, because it's possible that
there's a reason behind this that I'm not aware of.
Comment 1 Dirk Baeumer CLA 2005-05-26 11:38:00 EDT
Erich, any comments here ?
Comment 2 Erich Gamma CLA 2005-05-26 12:47:37 EDT
The dirtying is done to force a reconcile so that the error message goes away in
the source. This is hacky...What is a better way to force a reconcile?
Comment 3 Dirk Baeumer CLA 2005-05-26 13:07:33 EDT
Have to check with Jerome what happens on reconcile if the structure of the CU
didn't change.

Jerome, can you please comment on this ?
Comment 4 Jerome Lanneluc CLA 2005-05-26 17:35:07 EDT
Maybe I'm missing something, but to force problem to be recomputed you can use
the 'forceProblemDetection' flag on ICompilationUnit#reconcile(...).
Comment 5 Erich Gamma CLA 2005-05-26 18:58:54 EDT
I wasn't aware of this flag when I did it, so we should give it a try
Comment 6 Erich Gamma CLA 2005-05-27 07:27:13 EDT
Tried it with the flag, the problem is that the problem requestor of the Java
editor isn't active at this point. Therefore no update takes place.

Another workaround would be to undo the change, but this is a workaround
following a workaround and the problem isn't that critical.

suggest no action for 3.1 (3.0 was already shipped with this problem)
Comment 7 Dirk Baeumer CLA 2005-05-27 09:41:55 EDT
Deferrring then.
Comment 8 Martin Aeschlimann CLA 2006-06-16 04:23:38 EDT
It seems to me that the editor should also listen to classpath changes so it can force a reconcile. Dani, what do you think?
Comment 9 Dani Megert CLA 2006-06-16 05:09:34 EDT
see bug 65267
Comment 10 Martin Aeschlimann CLA 2006-06-16 05:14:12 EDT
When we bug 65267 gets fixed, we can take away the code that dirties the CU. Setting to REMIND until this is the case.
Comment 11 Martin Aeschlimann CLA 2006-06-24 03:16:37 EDT
*** Bug 86320 has been marked as a duplicate of this bug. ***
Comment 12 Denis Roy CLA 2009-08-30 02:05:15 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.