Community
Participate
Working Groups
Context: - create a TextMergeViewer instance - set the input using an ICompareInput - make the left and/or right leg dirty - set the input using an IStreamContentAccessor as input for the left and/or right leg of a new instance of ICompareInput The expected behaviour is that the viewer will prompt the user to save changes or to discard them. This behaviour is controlled by the sameDoc() method of TextMergeViewer which determines if the IDocument instances associated with the left, right, and ancestor legs are the same for both the old input and the new input. This method uses getDocument() for each leg, which in the case of an IStreamContentAccessor input, asks the DocumentManager for a cached working copy. For the old input, this is fine since the DocumentManager still contains the old working copy. For the new input, however, this usually returns 'null' because no copy has yet been cached. So in this case sameDoc() will always return 'true' for each leg! Hence the user will never be prompted to save changes and sometimes they will be lost. This is a serious issue for VCM because many of its components are built around IStreamContentAccessors and exhibit the problem.
fixed in > 20020514