| Summary: | Quick diff marks do not disappear in the vertical ruler of JavaScript editor | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Tomoki Shiratori <shiratori.tomo> | ||||
| Component: | wst.sse | Assignee: | Nitin Dahyabhai <thatnitind> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | Flags: | for.work.things:
review+
|
||||
| Version: | 2.0 | ||||||
| Target Milestone: | 2.0 RC4 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Tomoki Shiratori
Interesting, atfer this problem occurs I can delete the file from the project, copy a different file with the same name to the project and the quick diff markers show up. This is a really bad bug. I think the problem is in org.eclipse.wst.sse.core.internal.provisional.IModelManager getModelForRead(file). If the file doesn't represent a structure document, the code must be leaving some lock on the file so that it doesn't close correctly. The causes a lot of problems including the contents on the file not matching the contents in the editor. It also causes problems when deleting the file, since the file isn't completely deleted. This occurs when the getModelForRead(file) is made for a JavaScript file. Instead of making the call and testing for null to determine whether the file is a JavaScript file, I will work around the problem by changing the code to determine whether it is a JavaScript file by other means. I will also contact the component owner of the ModelManger, since this seems to be a bug in that component. (In reply to comment #2) > I will also contact the component owner of the ModelManger, since this seems > to be a bug in that component. Consider me contacted. You're right, in the case of a non-SSE file type, the org.eclipse.wst.sse.core.internal.FileBufferModelManager.getModel(IFile) method will call connect() on the TextFileBufferManager but never call the disconnect() if the document in the buffer is not an IStructuredDocument. I'm not fully up to speed on ATF's schedule, given that WTP is working on RC3, what sort of timeframe is ATF looking at for a fix? Will our 2.0.1 builds do? Created attachment 70275 [details]
Patch for SSE FileBufferModelManager
Corrects the SSE FileBufferModelManager so it doesn't keep the file's ITextFileBuffer open.
I can change the code to work around the problem. I'm going to check to see if the file only has JavaScript content type and does not also have HTML or JSP content type. If the file only has JavaScript content type, I will not call getModelForRead(file). I committed a work around for the problem. I'm transferring the bug to the wst.sse component. Patch released in RC4 on behalf of bug 193805. |