Package org.apache.directory.ldapstudio.browser.ui.valueeditors

Examples of org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor


     */
    private void editUserClass()
    {
        UserClassWrapper userClassWrapper = getSelectedUserClassWrapper();

        AbstractDialogStringValueEditor editor = userClassWrapper.getValueEditor();
        if(editor != null)
        {
            MultiValuedDialog dialog = new MultiValuedDialog( getShell(), userClassWrapper.getDisplayName(), userClassWrapper.getValues(), context, editor );
            dialog.open();
            refreshTable();
View Full Code Here


     */
    private void editProtectedItem()
    {
        ProtectedItemWrapper protectedItemWrapper = getSelectedProtectedItemWrapper();
       
        AbstractDialogStringValueEditor valueEditor = protectedItemWrapper.getValueEditor();
        if(valueEditor != null)
        {
            if(protectedItemWrapper.isMultivalued())
            {
                MultiValuedDialog dialog = new MultiValuedDialog( getShell(), protectedItemWrapper.getDisplayName(), protectedItemWrapper.getValues(), context, valueEditor );
                dialog.open();
                refreshTable();
            }
            else
            {
                List<String> values = protectedItemWrapper.getValues();
                String oldValue = values.isEmpty() ? null : values.get( 0 );
                if ( oldValue == null )
                {
                    oldValue = "";
                }
                Object oldRawValue = valueEditor.getRawValue( context.getConnection(), oldValue );
               
                CellEditor cellEditor = valueEditor.getCellEditor();
                cellEditor.setValue( oldRawValue );
                cellEditor.activate();
                Object newRawValue = cellEditor.getValue();
               
                if(newRawValue != null)
                {
                    String newValue = (String) valueEditor.getStringOrBinaryValue( newRawValue );
                   
                    values.clear();
                    values.add( newValue );
                    tableViewer.refresh();
                }
View Full Code Here

TOP

Related Classes of org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogStringValueEditor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.