Search in sources :

Example 16 with DatabaseNavigatorTree

use of org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree in project dbeaver by serge-rider.

the class DiagramCreateWizardPage method createControl.

@Override
public void createControl(Composite parent) {
    Composite placeholder = UIUtils.createPlaceholder(parent, 1);
    Composite configGroup = UIUtils.createControlGroup(placeholder, ERDMessages.wizard_page_diagram_create_group_settings, 2, GridData.FILL_BOTH, 0);
    //$NON-NLS-1$
    final Text projectNameText = UIUtils.createLabelText(configGroup, "Name", null);
    projectNameText.addModifyListener(new ModifyListener() {

        @Override
        public void modifyText(ModifyEvent e) {
            diagram.setName(projectNameText.getText());
            updateState();
        }
    });
    Label contentLabel = UIUtils.createControlLabel(configGroup, ERDMessages.wizard_page_diagram_create_label_init_content);
    GridData gd = new GridData(GridData.BEGINNING);
    gd.horizontalSpan = 2;
    contentLabel.setLayoutData(gd);
    final DBNProject rootNode = DBeaverCore.getInstance().getNavigatorModel().getRoot().getProject(DBeaverCore.getInstance().getProjectRegistry().getActiveProject());
    if (rootNode == null) {
        setControl(placeholder);
        return;
    }
    contentTree = new DatabaseNavigatorTree(configGroup, rootNode.getDatabases(), SWT.SINGLE | SWT.CHECK);
    gd = new GridData(GridData.FILL_BOTH);
    gd.horizontalSpan = 2;
    gd.heightHint = 400;
    contentTree.setLayoutData(gd);
    CheckboxTreeViewer viewer = (CheckboxTreeViewer) contentTree.getViewer();
    viewer.setCheckStateProvider(new ICheckStateProvider() {

        @Override
        public boolean isChecked(Object element) {
            return false;
        }

        @Override
        public boolean isGrayed(Object element) {
            if (element instanceof DBNDatabaseNode && !(element instanceof DBNDataSource)) {
                DBSObject object = ((DBNDatabaseNode) element).getObject();
                if (object instanceof DBSTable) {
                    return false;
                }
            }
            return true;
        }
    });
    setControl(placeholder);
}
Also used : DBNProject(org.jkiss.dbeaver.model.navigator.DBNProject) DBSTable(org.jkiss.dbeaver.model.struct.rdb.DBSTable) Composite(org.eclipse.swt.widgets.Composite) ModifyListener(org.eclipse.swt.events.ModifyListener) ICheckStateProvider(org.eclipse.jface.viewers.ICheckStateProvider) DBNDataSource(org.jkiss.dbeaver.model.navigator.DBNDataSource) Label(org.eclipse.swt.widgets.Label) Text(org.eclipse.swt.widgets.Text) DatabaseNavigatorTree(org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree) CheckboxTreeViewer(org.eclipse.jface.viewers.CheckboxTreeViewer) DBSObject(org.jkiss.dbeaver.model.struct.DBSObject) ModifyEvent(org.eclipse.swt.events.ModifyEvent) GridData(org.eclipse.swt.layout.GridData) DBSObject(org.jkiss.dbeaver.model.struct.DBSObject) DBNDatabaseNode(org.jkiss.dbeaver.model.navigator.DBNDatabaseNode)

Example 17 with DatabaseNavigatorTree

use of org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree in project dbeaver by dbeaver.

the class DiagramCreateWizardPage method createControl.

@Override
public void createControl(Composite parent) {
    Composite placeholder = UIUtils.createPlaceholder(parent, 1);
    Composite configGroup = UIUtils.createControlGroup(placeholder, ERDMessages.wizard_page_diagram_create_group_settings, 2, GridData.FILL_BOTH, 0);
    // $NON-NLS-1$
    final Text projectNameText = UIUtils.createLabelText(configGroup, "Name", null);
    projectNameText.addModifyListener(new ModifyListener() {

        @Override
        public void modifyText(ModifyEvent e) {
            diagram.setName(projectNameText.getText());
            updateState();
        }
    });
    Label contentLabel = UIUtils.createControlLabel(configGroup, ERDMessages.wizard_page_diagram_create_label_init_content);
    GridData gd = new GridData(GridData.BEGINNING);
    gd.horizontalSpan = 2;
    contentLabel.setLayoutData(gd);
    final DBNProject rootNode = DBeaverCore.getInstance().getNavigatorModel().getRoot().getProject(DBeaverCore.getInstance().getProjectRegistry().getActiveProject());
    if (rootNode == null) {
        setControl(placeholder);
        return;
    }
    contentTree = new DatabaseNavigatorTree(configGroup, rootNode.getDatabases(), SWT.SINGLE | SWT.CHECK);
    gd = new GridData(GridData.FILL_BOTH);
    gd.horizontalSpan = 2;
    gd.heightHint = 400;
    contentTree.setLayoutData(gd);
    CheckboxTreeViewer viewer = (CheckboxTreeViewer) contentTree.getViewer();
    viewer.setCheckStateProvider(new ICheckStateProvider() {

        @Override
        public boolean isChecked(Object element) {
            return false;
        }

        @Override
        public boolean isGrayed(Object element) {
            if (element instanceof DBNDatabaseNode && !(element instanceof DBNDataSource)) {
                DBSObject object = ((DBNDatabaseNode) element).getObject();
                if (object instanceof DBSTable) {
                    return false;
                }
            }
            return true;
        }
    });
    if (entitySelection != null) {
        viewer.setSelection(entitySelection, true);
        viewer.setCheckedElements(entitySelection.toArray());
    }
    setControl(placeholder);
}
Also used : DBNProject(org.jkiss.dbeaver.model.navigator.DBNProject) DBSTable(org.jkiss.dbeaver.model.struct.rdb.DBSTable) Composite(org.eclipse.swt.widgets.Composite) ModifyListener(org.eclipse.swt.events.ModifyListener) ICheckStateProvider(org.eclipse.jface.viewers.ICheckStateProvider) DBNDataSource(org.jkiss.dbeaver.model.navigator.DBNDataSource) Label(org.eclipse.swt.widgets.Label) Text(org.eclipse.swt.widgets.Text) DatabaseNavigatorTree(org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree) CheckboxTreeViewer(org.eclipse.jface.viewers.CheckboxTreeViewer) DBSObject(org.jkiss.dbeaver.model.struct.DBSObject) ModifyEvent(org.eclipse.swt.events.ModifyEvent) GridData(org.eclipse.swt.layout.GridData) DBSObject(org.jkiss.dbeaver.model.struct.DBSObject) DBNDatabaseNode(org.jkiss.dbeaver.model.navigator.DBNDatabaseNode)

Example 18 with DatabaseNavigatorTree

use of org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree in project dbeaver by dbeaver.

the class SelectDataSourceDialog method createDialogArea.

@Override
protected Control createDialogArea(Composite parent) {
    showConnected = getDialogBoundsSettings().getBoolean(PARAM_SHOW_CONNECTED);
    showAllProjects = getDialogBoundsSettings().getBoolean(PARAM_SHOW_ALL_PROJECTS);
    Composite group = (Composite) super.createDialogArea(parent);
    GridData gd = new GridData(GridData.FILL_BOTH);
    group.setLayoutData(gd);
    DBeaverCore core = DBeaverCore.getInstance();
    rootNode = core.getNavigatorModel().getRoot();
    projectNode = null;
    if (project != null) {
        DBNProject projectBaseNode = core.getNavigatorModel().getRoot().getProject(project);
        if (projectBaseNode != null) {
            projectNode = projectBaseNode.getDatabases();
        }
    }
    IFilter dsFilter = element -> element instanceof DBNProject || element instanceof DBNProjectDatabases || element instanceof DBNLocalFolder;
    DatabaseNavigatorTree dataSourceTree = new DatabaseNavigatorTree(group, getTreeRootNode(), SWT.SINGLE | SWT.BORDER, false, dsFilter);
    gd = new GridData(GridData.FILL_BOTH);
    gd.heightHint = 500;
    gd.minimumHeight = 100;
    gd.minimumWidth = 100;
    dataSourceTree.setLayoutData(gd);
    final TreeViewer treeViewer = dataSourceTree.getViewer();
    final Text descriptionText = new Text(group, SWT.READ_ONLY);
    descriptionText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    final Button showConnectedCheck = new Button(group, SWT.CHECK);
    showConnectedCheck.setText("Show &connected databases only");
    showConnectedCheck.setSelection(showConnected);
    showConnectedCheck.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            showConnected = showConnectedCheck.getSelection();
            treeViewer.getControl().setRedraw(false);
            try {
                treeViewer.refresh();
                if (showConnected) {
                    treeViewer.expandAll();
                }
            } finally {
                treeViewer.getControl().setRedraw(true);
            }
            getDialogBoundsSettings().put(PARAM_SHOW_CONNECTED, showConnected);
        }
    });
    final Button showAllProjectsCheck = new Button(group, SWT.CHECK);
    showAllProjectsCheck.setText("Show &all projects");
    showAllProjectsCheck.setSelection(showAllProjects);
    showAllProjectsCheck.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            showAllProjects = showAllProjectsCheck.getSelection();
            treeViewer.getControl().setRedraw(false);
            try {
                dataSourceTree.reloadTree(getTreeRootNode());
                if (showAllProjects) {
                    treeViewer.expandToLevel(3);
                }
            } finally {
                treeViewer.getControl().setRedraw(true);
            }
            getDialogBoundsSettings().put(PARAM_SHOW_ALL_PROJECTS, showAllProjects);
        }
    });
    if (this.dataSource != null) {
        DBNDatabaseNode dsNode = core.getNavigatorModel().getNodeByObject(this.dataSource);
        if (dsNode != null) {
            treeViewer.setSelection(new StructuredSelection(dsNode), true);
        }
    }
    treeViewer.addFilter(new ViewerFilter() {

        @Override
        public boolean select(Viewer viewer, Object parentElement, Object element) {
            if (showConnected) {
                if (element instanceof DBNDataSource) {
                    return ((DBNDataSource) element).getDataSource() != null;
                }
                if (element instanceof DBNLocalFolder) {
                    return ((DBNLocalFolder) element).hasConnected();
                }
            }
            return element instanceof DBNProject || element instanceof DBNProjectDatabases || element instanceof DBNLocalFolder || element instanceof DBNDataSource;
        }
    });
    treeViewer.addSelectionChangedListener(event -> {
        IStructuredSelection structSel = (IStructuredSelection) event.getSelection();
        Object selNode = structSel.isEmpty() ? null : structSel.getFirstElement();
        if (selNode instanceof DBNDataSource) {
            dataSource = ((DBNDataSource) selNode).getObject();
            getButton(IDialogConstants.OK_ID).setEnabled(true);
            String description = dataSource.getDescription();
            if (description == null) {
                description = dataSource.getName();
            }
            descriptionText.setText(description);
        } else {
            dataSource = null;
            getButton(IDialogConstants.OK_ID).setEnabled(false);
        }
    });
    treeViewer.addDoubleClickListener(event -> {
        if (getButton(IDialogConstants.OK_ID).isEnabled()) {
            okPressed();
        }
    });
    DBeaverUI.asyncExec(() -> {
        treeViewer.getControl().setFocus();
        if (showConnected) {
            treeViewer.expandAll();
        }
    });
    closeOnFocusLost(treeViewer.getControl(), dataSourceTree.getFilterControl(), descriptionText, showConnectedCheck, showAllProjectsCheck);
    return group;
}
Also used : SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) DatabaseNavigatorTree(org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree) DBeaverUI(org.jkiss.dbeaver.core.DBeaverUI) org.jkiss.dbeaver.model.navigator(org.jkiss.dbeaver.model.navigator) org.eclipse.swt.widgets(org.eclipse.swt.widgets) IDialogConstants(org.eclipse.jface.dialogs.IDialogConstants) IDialogSettings(org.eclipse.jface.dialogs.IDialogSettings) Nullable(org.jkiss.code.Nullable) org.eclipse.jface.viewers(org.eclipse.jface.viewers) NotNull(org.jkiss.code.NotNull) CoreMessages(org.jkiss.dbeaver.core.CoreMessages) DBPDataSourceContainer(org.jkiss.dbeaver.model.DBPDataSourceContainer) FilteredTree(org.eclipse.ui.dialogs.FilteredTree) IProject(org.eclipse.core.resources.IProject) Dialog(org.eclipse.jface.dialogs.Dialog) DBeaverCore(org.jkiss.dbeaver.core.DBeaverCore) UIUtils(org.jkiss.dbeaver.ui.UIUtils) SWT(org.eclipse.swt.SWT) AbstractPopupPanel(org.jkiss.dbeaver.ui.dialogs.AbstractPopupPanel) SelectionEvent(org.eclipse.swt.events.SelectionEvent) GridData(org.eclipse.swt.layout.GridData) GridLayout(org.eclipse.swt.layout.GridLayout) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) DatabaseNavigatorTree(org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree) DBeaverCore(org.jkiss.dbeaver.core.DBeaverCore) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent)

Example 19 with DatabaseNavigatorTree

use of org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree in project dbeaver by dbeaver.

the class BrowseObjectDialog method createDialogArea.

@Override
protected Control createDialogArea(Composite parent) {
    getShell().setText(title);
    Composite group = (Composite) super.createDialogArea(parent);
    GridData gd = new GridData(GridData.FILL_BOTH);
    group.setLayoutData(gd);
    navigatorTree = new DatabaseNavigatorTree(group, rootNode, (singleSelection ? SWT.SINGLE : SWT.MULTI) | SWT.BORDER, false, new DatabaseNavigatorTreeFilter());
    gd = new GridData(GridData.FILL_BOTH);
    gd.widthHint = 500;
    gd.heightHint = 500;
    navigatorTree.setLayoutData(gd);
    final TreeViewer treeViewer = navigatorTree.getViewer();
    treeViewer.addFilter(new ViewerFilter() {

        @Override
        public boolean select(Viewer viewer, Object parentElement, Object element) {
            if (element instanceof TreeLoadNode || element instanceof DBNLocalFolder) {
                return true;
            }
            if (element instanceof DBNNode) {
                if (element instanceof DBNDatabaseFolder) {
                    DBNDatabaseFolder folder = (DBNDatabaseFolder) element;
                    Class<? extends DBSObject> folderItemsClass = folder.getChildrenClass();
                    return folderItemsClass != null && matchesType(folderItemsClass, false);
                }
                if (element instanceof DBNProject || element instanceof DBNProjectDatabases || element instanceof DBNDataSource || (element instanceof DBSWrapper && matchesType(((DBSWrapper) element).getObject().getClass(), false))) {
                    return true;
                }
            }
            return false;
        }
    });
    if (selectedNode != null) {
        treeViewer.setSelection(new StructuredSelection(selectedNode));
        selectedObjects.add(selectedNode);
    }
    treeViewer.addSelectionChangedListener(event -> {
        selectedObjects.clear();
        IStructuredSelection selection = (IStructuredSelection) treeViewer.getSelection();
        for (Iterator iter = selection.iterator(); iter.hasNext(); ) {
            DBNNode node = (DBNNode) iter.next();
            if (node instanceof DBSWrapper) {
                DBSObject object = DBUtils.getAdapter(DBSObject.class, ((DBSWrapper) node).getObject());
                if (object != null) {
                    if (!matchesType(object.getClass(), true)) {
                        selectedObjects.clear();
                        break;
                    }
                    selectedObjects.add(node);
                }
            }
        }
        getButton(IDialogConstants.OK_ID).setEnabled(!selectedObjects.isEmpty());
    });
    treeViewer.addDoubleClickListener(event -> okPressed());
    treeViewer.getTree().setFocus();
    return group;
}
Also used : Composite(org.eclipse.swt.widgets.Composite) DBSWrapper(org.jkiss.dbeaver.model.struct.DBSWrapper) DatabaseNavigatorTree(org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree) DatabaseNavigatorTreeFilter(org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTreeFilter) DBSObject(org.jkiss.dbeaver.model.struct.DBSObject) TreeLoadNode(org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadNode) GridData(org.eclipse.swt.layout.GridData) Iterator(java.util.Iterator) DBSObject(org.jkiss.dbeaver.model.struct.DBSObject)

Example 20 with DatabaseNavigatorTree

use of org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree in project dbeaver by serge-rider.

the class ScriptsImportWizardPage method createControl.

@Override
public void createControl(Composite parent) {
    String externalDir = DBWorkbench.getPlatform().getPreferenceStore().getString(ScriptsExportWizardPage.PREF_SCRIPTS_EXPORT_OUT_DIR);
    if (CommonUtils.isEmpty(externalDir)) {
        externalDir = RuntimeUtils.getUserHomeDir().getAbsolutePath();
    }
    Composite placeholder = UIUtils.createPlaceholder(parent, 1);
    placeholder.setLayout(new GridLayout(1, false));
    // Input settings
    Composite generalSettings = UIUtils.createPlaceholder(placeholder, 3);
    generalSettings.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    {
        UIUtils.createControlLabel(generalSettings, CoreMessages.dialog_scripts_import_wizard_label_input_directory);
        directoryText = new Text(generalSettings, SWT.BORDER);
        directoryText.setText(externalDir);
        directoryText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        directoryText.addModifyListener(new ModifyListener() {

            @Override
            public void modifyText(ModifyEvent e) {
                updateState();
            }
        });
        Button openFolder = new Button(generalSettings, SWT.PUSH);
        openFolder.setImage(DBeaverIcons.getImage(DBIcon.TREE_FOLDER));
        openFolder.addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE);
                dialog.setMessage(CoreMessages.dialog_scripts_import_wizard_dialog_choose_dir_message);
                dialog.setText(CoreMessages.dialog_scripts_import_wizard_dialog_choose_dir_text);
                String directory = directoryText.getText();
                if (!CommonUtils.isEmpty(directory)) {
                    dialog.setFilterPath(directory);
                }
                directory = dialog.open();
                if (directory != null) {
                    directoryText.setText(directory);
                }
            }
        });
        // $NON-NLS-2$
        extensionsText = UIUtils.createLabelText(generalSettings, CoreMessages.dialog_scripts_import_wizard_label_file_mask, "*.sql,*.txt");
        GridData gd = new GridData(GridData.FILL_HORIZONTAL);
        gd.horizontalSpan = 2;
        extensionsText.setLayoutData(gd);
        UIUtils.createControlLabel(generalSettings, CoreMessages.dialog_scripts_import_wizard_label_default_connection);
        scriptsDataSources = new CSmartCombo<>(generalSettings, SWT.BORDER | SWT.DROP_DOWN | SWT.READ_ONLY, new ConnectionLabelProvider());
        for (DBPDataSourceContainer dataSourceDescriptor : DataSourceRegistry.getAllDataSources()) {
            scriptsDataSources.addItem(dataSourceDescriptor);
        }
        if (scriptsDataSources.getItemCount() > 0) {
            scriptsDataSources.select(0);
        }
        gd = new GridData(GridData.FILL_HORIZONTAL);
        gd.horizontalSpan = 2;
        gd.verticalIndent = 2;
        scriptsDataSources.setLayoutData(gd);
    }
    UIUtils.createControlLabel(placeholder, CoreMessages.dialog_scripts_import_wizard_label_root_folder);
    importRoot = DBWorkbench.getPlatform().getNavigatorModel().getRoot();
    final DatabaseNavigatorTree scriptsNavigator = new DatabaseNavigatorTree(placeholder, importRoot, SWT.BORDER | SWT.SINGLE, false);
    scriptsNavigator.setLayoutData(new GridData(GridData.FILL_BOTH));
    scriptsNavigator.getViewer().addSelectionChangedListener(new ISelectionChangedListener() {

        @Override
        public void selectionChanged(SelectionChangedEvent event) {
            IStructuredSelection sel = (IStructuredSelection) event.getSelection();
            if (sel == null || sel.isEmpty()) {
                importRoot = null;
            } else {
                importRoot = (DBNNode) sel.getFirstElement();
            }
            updateState();
        }
    });
    scriptsNavigator.getViewer().addFilter(new ViewerFilter() {

        @Override
        public boolean select(Viewer viewer, Object parentElement, Object element) {
            return element instanceof DBNResource && ((DBNResource) element).getResource() instanceof IContainer;
        }
    });
    scriptsNavigator.getViewer().expandToLevel(2);
    overwriteCheck = UIUtils.createCheckbox(placeholder, CoreMessages.dialog_project_export_wizard_page_checkbox_overwrite_files, false);
    GridData gd = new GridData(GridData.BEGINNING);
    gd.horizontalSpan = 3;
    overwriteCheck.setLayoutData(gd);
    setControl(placeholder);
    updateState();
}
Also used : ModifyListener(org.eclipse.swt.events.ModifyListener) DBNNode(org.jkiss.dbeaver.model.navigator.DBNNode) GridLayout(org.eclipse.swt.layout.GridLayout) ModifyEvent(org.eclipse.swt.events.ModifyEvent) CSmartCombo(org.jkiss.dbeaver.ui.controls.CSmartCombo) Button(org.eclipse.swt.widgets.Button) SelectionEvent(org.eclipse.swt.events.SelectionEvent) IContainer(org.eclipse.core.resources.IContainer) DBPDataSourceContainer(org.jkiss.dbeaver.model.DBPDataSourceContainer) DirectoryDialog(org.eclipse.swt.widgets.DirectoryDialog) Composite(org.eclipse.swt.widgets.Composite) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) Text(org.eclipse.swt.widgets.Text) DatabaseNavigatorTree(org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree) DBNResource(org.jkiss.dbeaver.model.navigator.DBNResource) GridData(org.eclipse.swt.layout.GridData)

Aggregations

DatabaseNavigatorTree (org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree)36 GridData (org.eclipse.swt.layout.GridData)28 Composite (org.eclipse.swt.widgets.Composite)23 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)17 SelectionEvent (org.eclipse.swt.events.SelectionEvent)17 DBSObject (org.jkiss.dbeaver.model.struct.DBSObject)14 Text (org.eclipse.swt.widgets.Text)13 GridLayout (org.eclipse.swt.layout.GridLayout)11 TreeNodeSpecial (org.jkiss.dbeaver.ui.navigator.database.load.TreeNodeSpecial)10 ModifyEvent (org.eclipse.swt.events.ModifyEvent)8 ModifyListener (org.eclipse.swt.events.ModifyListener)8 Button (org.eclipse.swt.widgets.Button)8 INavigatorFilter (org.jkiss.dbeaver.ui.navigator.INavigatorFilter)8 Viewer (org.eclipse.jface.viewers.Viewer)6 ViewerFilter (org.eclipse.jface.viewers.ViewerFilter)6 SashForm (org.eclipse.swt.custom.SashForm)6 DBNResource (org.jkiss.dbeaver.model.navigator.DBNResource)6 IContainer (org.eclipse.core.resources.IContainer)4 CheckboxTreeViewer (org.eclipse.jface.viewers.CheckboxTreeViewer)4 ICheckStateProvider (org.eclipse.jface.viewers.ICheckStateProvider)4