Search in sources :

Example 16 with Tag

use of org.eclipse.equinox.internal.p2.discovery.model.Tag in project epp.mpc by eclipse.

the class CheckboxTagFilter method updateUi.

@Override
protected void updateUi() {
    for (Control control : buttonContainer.getChildren()) {
        final Object data = control.getData();
        if (data instanceof Tag) {
            if (control instanceof Button) {
                Button checkbox = (Button) control;
                checkbox.setSelection(getSelected().contains(data));
            }
        }
    }
    super.updateUi();
}
Also used : Control(org.eclipse.swt.widgets.Control) Button(org.eclipse.swt.widgets.Button) Tag(org.eclipse.equinox.internal.p2.discovery.model.Tag)

Aggregations

Tag (org.eclipse.equinox.internal.p2.discovery.model.Tag)14 CatalogFilter (org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogFilter)5 ArrayList (java.util.ArrayList)4 ICategory (org.eclipse.epp.mpc.core.model.ICategory)4 CoreException (org.eclipse.core.runtime.CoreException)3 IMarket (org.eclipse.epp.mpc.core.model.IMarket)3 CatalogItem (org.eclipse.equinox.internal.p2.discovery.model.CatalogItem)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 HashSet (java.util.HashSet)2 IStatus (org.eclipse.core.runtime.IStatus)2 INode (org.eclipse.epp.mpc.core.model.INode)2 SelectionEvent (org.eclipse.swt.events.SelectionEvent)2 SelectionListener (org.eclipse.swt.events.SelectionListener)2 IOException (java.io.IOException)1 Field (java.lang.reflect.Field)1 MalformedURLException (java.net.MalformedURLException)1 URISyntaxException (java.net.URISyntaxException)1 NoSuchElementException (java.util.NoSuchElementException)1 Set (java.util.Set)1 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)1