Commit f1a9d003 authored by Adrien's avatar Adrien Committed by Romain Bioteau
Browse files

fix(editors) focus lost on cell editor with proposal provider (#891)

* proposal provider has its own focus lost event, to handle all the
focus lost 

closes [BS-17682](https://bonitasoft.atlassian.net/browse/BS-17682)
parent 5e2e49ae
......@@ -23,6 +23,8 @@ import org.eclipse.jface.fieldassist.TextContentAdapter;
import org.eclipse.jface.viewers.ColumnViewer;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
......@@ -68,6 +70,13 @@ public class AutoCompleteTextCellEditor extends TextCellEditor {
proposalAdapter.setPropagateKeys(true);
proposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
proposalAdapter.setAutoActivationDelay(0);
proposalAdapter.getControl().addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
AutoCompleteTextCellEditor.this.focusLost();
}
});
}
@Override
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment