Example usage for org.eclipse.jface.viewers ColumnViewerEditorDeactivationEvent EDITOR_SAVED

List of usage examples for org.eclipse.jface.viewers ColumnViewerEditorDeactivationEvent EDITOR_SAVED

Introduction

In this page you can find the example usage for org.eclipse.jface.viewers ColumnViewerEditorDeactivationEvent EDITOR_SAVED.

Prototype

int EDITOR_SAVED

To view the source code for org.eclipse.jface.viewers ColumnViewerEditorDeactivationEvent EDITOR_SAVED.

Click Source Link

Document

Event when editor is saved

Usage

From source file:gov.redhawk.sca.ui.ScaPropertiesViewer.java

License:Open Source License

protected void addEditorActivationListener() {
    viewer.getColumnViewerEditor().addEditorActivationListener(new ColumnViewerEditorActivationListener() {

        @Override//w w  w  .j  a v a2  s  .  c  o m
        public void beforeEditorDeactivated(final ColumnViewerEditorDeactivationEvent event) {

        }

        @Override
        public void beforeEditorActivated(final ColumnViewerEditorActivationEvent event) {

        }

        @Override
        public void afterEditorDeactivated(final ColumnViewerEditorDeactivationEvent event) {
            if (event.eventType == ColumnViewerEditorDeactivationEvent.EDITOR_SAVED) {
                viewer.refresh();
                viewer.setSelection(viewer.getSelection());
            }
        }

        @Override
        public void afterEditorActivated(final ColumnViewerEditorActivationEvent event) {

        }
    });
}