Search in sources :

Example 6 with ManifestItem

use of org.talend.designer.camel.dependencies.core.model.ManifestItem in project tesb-studio-se by Talend.

the class CheckedCamelDependenciesPanel method selectAll.

private void selectAll(boolean state) {
    boolean hasChanged = false;
    Collection<? extends ManifestItem> input = getInput();
    for (ManifestItem bcp : input) {
        if (bcp.isBuiltIn() || !bcp.isOptional() == state) {
            continue;
        }
        hasChanged = true;
        bcp.setOptional(!state);
        ((CheckboxTableViewer) tableViewer).setChecked(bcp, state);
    }
    if (hasChanged) {
        //((CheckboxTableViewer) tableViewer).setAllChecked(state);
        fireDependenciesChangedListener();
    }
}
Also used : ManifestItem(org.talend.designer.camel.dependencies.core.model.ManifestItem) CheckboxTableViewer(org.eclipse.jface.viewers.CheckboxTableViewer)

Aggregations

ManifestItem (org.talend.designer.camel.dependencies.core.model.ManifestItem)6 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)3 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)3 List (java.util.List)2 NewOrEditDependencyDialog (org.talend.camel.designer.ui.editor.dependencies.dialog.NewOrEditDependencyDialog)2 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 CheckboxTableViewer (org.eclipse.jface.viewers.CheckboxTableViewer)1 ManifestElement (org.eclipse.osgi.util.ManifestElement)1 BundleException (org.osgi.framework.BundleException)1