Package org.eclipse.core.databinding.observable.list

Examples of org.eclipse.core.databinding.observable.list.WritableList


    super.refreshViewerOnChange();

    // lets restore the selection
    if (selectedIds != null) {
      List<Object> selected = new ArrayList<Object>();
      WritableList nodes = getNodes();
      for (Object object : nodes) {
        ComputeMetadata md = JClouds.asComputeMetadata(object);
        if (md != null) {
          String id = md.getId();
          if (selectedIds.contains(id)) {
View Full Code Here


          return ((ToolEnablement) element).getName();
        }
        return null;
      }
    });
    writableList = new WritableList(tools, ToolEnablement.class);
    checkboxTreeViewer.setInput(writableList);
    //
    return bindingContext;
  }
View Full Code Here

          if ("mapping".equals(element.getNodeName())) {
            IObservableList observableListField = SSEDOMObservables.observeNodeList(element, "field", null);
            IObservableList observableListFieldExclude = SSEDOMObservables.observeNodeList(element, "field-exclude", null);
           
            //FIXME does that reflect everything?
            observableList = new WritableList();
            observableList.addAll(observableListField);
            observableList.addAll(observableListFieldExclude);
          }
        }
       
View Full Code Here

    @Override
    public IObservableList createObservable(Object parent) {
      if( parent instanceof VirtualEntry ) {
        return ((VirtualEntry) parent).getList();
      } else if( parent instanceof MApplication ) {
        WritableList l = new WritableList();
        l.add(new VirtualEntry("Addons", (MApplicationElement) parent,ApplicationPackageImpl.Literals.APPLICATION__ADDONS));
        l.add(new VirtualEntry("Binding Contexts", (MApplicationElement) parent,CommandsPackageImpl.Literals.BINDING_TABLE_CONTAINER__ROOT_CONTEXT));
        l.add(new VirtualEntry("Binding Tables", (MApplicationElement) parent,CommandsPackageImpl.Literals.BINDING_TABLE_CONTAINER__BINDING_TABLES));
        l.add(new VirtualEntry("Handlers", (MApplicationElement) parent,CommandsPackageImpl.Literals.HANDLER_CONTAINER__HANDLERS));
        l.add(new VirtualEntry("Commands", (MApplicationElement) parent,ApplicationPackageImpl.Literals.APPLICATION__COMMANDS));
        l.add(new VirtualEntry("Command Categories", (MApplicationElement) parent,ApplicationPackageImpl.Literals.APPLICATION__CATEGORIES));
        l.add(new VirtualEntry("Part Descriptors", (MApplicationElement) parent,org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl.Literals.PART_DESCRIPTOR_CONTAINER__DESCRIPTORS));
        l.add(new VirtualEntry("Windows", (MApplicationElement) parent,UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN));
        l.add(new VirtualEntry("Snippets", (MApplicationElement) parent,UiPackageImpl.Literals.SNIPPET_CONTAINER__SNIPPETS));
        return l;
      } else if( parent instanceof MWindow ) {
        WritableList l = new WritableList();
        l.add(new VirtualEntry("Handlers", (MApplicationElement) parent,CommandsPackageImpl.Literals.HANDLER_CONTAINER__HANDLERS));
        l.add(new VirtualEntry("Windows", (MApplicationElement) parent,BasicPackageImpl.Literals.WINDOW__WINDOWS));
        l.add(new VirtualEntry("Controls", (MApplicationElement) parent,UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN));
        l.add(new VirtualEntry("Shared Elements", (MApplicationElement) parent,BasicPackageImpl.Literals.WINDOW__SHARED_ELEMENTS));
        if( parent instanceof MTrimmedWindow ) {
          l.add(new VirtualEntry("TrimBars", (MApplicationElement) parent,BasicPackageImpl.Literals.TRIMMED_WINDOW__TRIM_BARS));
        }
        return l;
      } else if( parent instanceof MPerspective ) {
        WritableList l = new WritableList();
        l.add(new VirtualEntry("Windows", (MApplicationElement) parent, AdvancedPackageImpl.Literals.PERSPECTIVE__WINDOWS));
        l.add(new VirtualEntry("Controls", (MApplicationElement) parent, UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN));
        return l;
      } else if( parent instanceof MPartSashContainer ) {
        return EMFProperties.list(UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN).observe(parent);
      } else if( parent instanceof MTrimBar ) {
        return EMFProperties.list(UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN).observe(parent);
View Full Code Here

TOP

Related Classes of org.eclipse.core.databinding.observable.list.WritableList

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.