Posts

Showing posts from August, 2012

Eclipse Editor: Partially editable/read-only editor Part 4

Image
Blocking drag & drop action to non-editable section It is an additional post to Eclipse Editor: Partially editable/read-only editor series . In all the previous pos ts I have explained making editor partially editable step by step to make functionality more robust. This post I am going to explain how to block drag & drop action to non-editable section of editor. Eclipse’s default implementation of text editor supports drag and drop of selection of text. When you have read-only as well as editable code section present, then such drag and drop may disturb read-only code section. To prevent the read-only code section from getting modified knowing or unknowingly , any drop action on read-on code section should be disabled. Eclipse TextEditor gives handle to DragAndDrop service , using it you can install your own implementation for DropTragetListener against the expected source viewer control. In your implementation any drop operation on the read-only code section can be ignore...