Community
Participate
Working Groups
N20101102-2000 The auto-encoding of unsupported characters in .properties files should also work on Find/Replace. This happens when the real character is pasted into the Replace field, and it also happens when I enable regex and e.g. replace with \u2603.
For typing or pasting you get this call stack Thread [main] (Suspended (breakpoint at line 63 in PropertiesFileAutoEditStrategy)) PropertiesFileAutoEditStrategy.customizeDocumentCommand(IDocument, DocumentCommand) line: 63 SourceViewer(TextViewer).customizeDocumentCommand(DocumentCommand) line: 3749 SourceViewer(TextViewer).handleVerifyEvent(VerifyEvent) line: 3779 TextViewer$TextVerifyListener.verifyText(VerifyEvent) line: 434 TypedListener.handleEvent(Event) line: 255 EventTable.sendEvent(Event) line: 84 StyledText(Widget).sendEvent(Event) line: 1053 StyledText(Widget).sendEvent(int, Event, boolean) line: 1077 But in case of Find/replace TypedListener does not get an event. Investigating...
(In reply to comment #1) > But in case of Find/replace TypedListener does not get an event. TypedListener needs to get a SWT.Verify event but it does not. (It gets only SWT.Selection and SWT.Paint event) The Find/Replace dialog modifies the IDocument (see FindReplaceDocumentAdapter.findReplace(...) line 213), which should modify the underlying StyledText and which should result in a call to StyledText.modifyContent(Event, boolean) - but it does not.
(In reply to comment #2) > > But in case of Find/replace TypedListener does not get an event. > TypedListener needs to get a SWT.Verify event but it does not. (It gets only > SWT.Selection and SWT.Paint event) The current policy is that StyledText only sends Verify events when the modification is initiated by the StyledText. We can't extends this and send events in all cases the underlying content changes externally (that would break many clients that don't expect these events and would e.g. not be complete if the modification occurs in a folded area that is not shown in the StyledText). The problem is even broader than Find/Replace. E.g. File Search is also affected. Lowering severity and priority, since this has not been an issue in practice so far.