| Summary: | Auto-complete don't work after read-only flag is removed within editor (StructuredTextEditor based editors) | ||
|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Andre Albino Pereira <andreptb> |
| Component: | wst.sse | Assignee: | wst.sse <wst.sse-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | Nitin Dahyabhai <thatnitind> |
| Severity: | normal | ||
| Priority: | P3 | CC: | nsand.dev, rakes123, thatnitind |
| Version: | 3.1 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Attachments: | |||
|
Description
Andre Albino Pereira
Created attachment 178679 [details]
StructuredTextEditor patch to make auto-complete work even if read-only flag is removed within editor
It seems the auto-complete problem is related to a variable managed by org.eclipse.ui.texteditor.AbstractTextEditor that is not updated when the read-only flag removal operation within editor is performed. Forcing AbstractTextEditor.updateState(IEditorInput) to always be executed before AbstractTextEditor.updateStateDependentActions() solves the problem. Note that the proposed approach serves as reference so the problem can be addressed suitably.
Comment on attachment 178679 [details]
StructuredTextEditor patch to make auto-complete work even if read-only flag is removed within editor
This "patch" isn't going to work--it's the entire source file! Additionally, it's had style changes made to the code (always use blocks, refer to fields with 'this.', possibly others) that make it very difficult to find the actual intended change.
Please connect anonymously to our CVS repository on host dev.eclipse.org with repository path /cvsroot/webtools and check out the plug-in folder at sourceediting/plugins/org.eclipse.wst.sse.ui into your workspace. Making your changes there will allow you to create a patch we can examine and possibly include in a future release.
Created attachment 178730 [details]
Patch of StructuredTextEditor to make auto-complete work even if read-only flag is removed within editor
My bad for the previous attachment, hope it helps now.
This bug is a duplicate of Bug 281872. Thank you very much for your patch, Andre! I think it will address the situation, but I think we have to fix the root of the problem, which is in how the StructuredContentAssistant cleans up its ContentAssistProcessors. We'll be tracking this change through Bug 281872. *** This bug has been marked as a duplicate of bug 281872 *** |