Example usage for org.eclipse.jface.viewers TextCellEditor getValue

List of usage examples for org.eclipse.jface.viewers TextCellEditor getValue

Introduction

In this page you can find the example usage for org.eclipse.jface.viewers TextCellEditor getValue.

Prototype

public final Object getValue() 

Source Link

Document

Returns this cell editor's value provided that it has a valid one.

Usage

From source file:com.nokia.s60ct.gui.eventListener.FeatureTreeListener.java

License:Open Source License

public void applyEditorValue() {
    TextCellEditor cellEditor = (TextCellEditor) viewer.getCellEditors()[0];

    Command command = null;/*from  w w  w  .  j  av  a2  s .  c o m*/
    if (sObject instanceof Configuration)
        command = SetCommand.create(Project.instance().getEditingDomain(), sObject,
                ConfigurationemfPackage.eINSTANCE.getConfiguration_Name(), cellEditor.getValue());
    else if (sObject instanceof Feature)
        command = SetCommand.create(Project.instance().getEditingDomain(), sObject,
                ConfigurationemfPackage.eINSTANCE.getFeature_Name(), cellEditor.getValue());
    else if (sObject instanceof View)
        command = SetCommand.create(Project.instance().getEditingDomain(), sObject,
                ConfigurationemfPackage.eINSTANCE.getView_Name(), cellEditor.getValue());
    else if (sObject instanceof Group)
        command = SetCommand.create(Project.instance().getEditingDomain(), sObject,
                ConfigurationemfPackage.eINSTANCE.getGroup_Name(), cellEditor.getValue());
    else if (sObject instanceof Setting)
        command = SetCommand.create(Project.instance().getEditingDomain(), sObject,
                ConfigurationemfPackage.eINSTANCE.getSetting_Name(), cellEditor.getValue());
    if (command != null)
        Project.instance().getEditingDomain().getCommandStack().execute(command);

}

From source file:org.jboss.tools.common.propertieseditor.PropertiesEditor.java

License:Open Source License

protected void fireTableEditorChanged(final TextCellEditor cEditor) {
    if (changeListener != null) {
        Display.getDefault().asyncExec(new Runnable() {
            public void run() {
                changeListener//from   w w w.j  a  v  a  2s  . c om
                        .propertyChange(new PropertyChangeEvent(cEditor, "value", "", cEditor.getValue()));
            }
        });
    }
}