Package org.eclipse.emf.edit.ui.celleditor

Examples of org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor


        selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
        selectionViewer.setInput(editingDomain.getResourceSet());
        selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
        viewerPane.setTitle(editingDomain.getResourceSet());

        new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);

        createContextMenuFor(selectionViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_SelectionPage_label"));
      }

      // Create a page for the parent tree view.
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), URMLEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              Tree tree = new Tree(composite, SWT.MULTI);
              TreeViewer newTreeViewer = new TreeViewer(tree);
              return newTreeViewer;
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());

        parentViewer = (TreeViewer)viewerPane.getViewer();
        parentViewer.setAutoExpandLevel(30);
        parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
        parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(parentViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ParentPage_label"));
      }

      // This is the page for the list viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), URMLEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new ListViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        listViewer = (ListViewer)viewerPane.getViewer();
        listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(listViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ListPage_label"));
      }

      // This is the page for the tree viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), URMLEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new TreeViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        treeViewer = (TreeViewer)viewerPane.getViewer();
        treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);

        createContextMenuFor(treeViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_TreePage_label"));
      }
View Full Code Here


        selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
        selectionViewer.setInput(editingDomain.getResourceSet());
        selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
        viewerPane.setTitle(editingDomain.getResourceSet());

        new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);

        createContextMenuFor(selectionViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_SelectionPage_label"));
      }

      // Create a page for the parent tree view.
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), OntoUMLEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              Tree tree = new Tree(composite, SWT.MULTI);
              TreeViewer newTreeViewer = new TreeViewer(tree);
              return newTreeViewer;
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());

        parentViewer = (TreeViewer)viewerPane.getViewer();
        parentViewer.setAutoExpandLevel(30);
        parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
        parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(parentViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ParentPage_label"));
      }

      // This is the page for the list viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), OntoUMLEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new ListViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        listViewer = (ListViewer)viewerPane.getViewer();
        listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(listViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ListPage_label"));
      }

      // This is the page for the tree viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), OntoUMLEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new TreeViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        treeViewer = (TreeViewer)viewerPane.getViewer();
        treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);

        createContextMenuFor(treeViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_TreePage_label"));
      }
View Full Code Here

        selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
        selectionViewer.setInput(editingDomain.getResourceSet());
        selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
        viewerPane.setTitle(editingDomain.getResourceSet());

        new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);

        createContextMenuFor(selectionViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_SelectionPage_label"));
      }

      // Create a page for the parent tree view.
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), SimpleGMFEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              Tree tree = new Tree(composite, SWT.MULTI);
              TreeViewer newTreeViewer = new TreeViewer(tree);
              return newTreeViewer;
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());

        parentViewer = (TreeViewer)viewerPane.getViewer();
        parentViewer.setAutoExpandLevel(30);
        parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
        parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(parentViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ParentPage_label"));
      }

      // This is the page for the list viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), SimpleGMFEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new ListViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        listViewer = (ListViewer)viewerPane.getViewer();
        listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(listViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ListPage_label"));
      }

      // This is the page for the tree viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), SimpleGMFEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new TreeViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        treeViewer = (TreeViewer)viewerPane.getViewer();
        treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);

        createContextMenuFor(treeViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_TreePage_label"));
      }
View Full Code Here

        selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
        selectionViewer.setInput(editingDomain.getResourceSet());
        selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
        viewerPane.setTitle(editingDomain.getResourceSet());

        new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);

        createContextMenuFor(selectionViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_SelectionPage_label"));
      }

      // Create a page for the parent tree view.
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), TurtleEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              Tree tree = new Tree(composite, SWT.MULTI);
              TreeViewer newTreeViewer = new TreeViewer(tree);
              return newTreeViewer;
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());

        parentViewer = (TreeViewer)viewerPane.getViewer();
        parentViewer.setAutoExpandLevel(30);
        parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
        parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(parentViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ParentPage_label"));
      }

      // This is the page for the list viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), TurtleEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new ListViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        listViewer = (ListViewer)viewerPane.getViewer();
        listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(listViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ListPage_label"));
      }

      // This is the page for the tree viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), TurtleEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new TreeViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        treeViewer = (TreeViewer)viewerPane.getViewer();
        treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);

        createContextMenuFor(treeViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_TreePage_label"));
      }
View Full Code Here

        selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
        selectionViewer.setInput(editingDomain.getResourceSet());
        selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
        viewerPane.setTitle(editingDomain.getResourceSet());

        new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);

        createContextMenuFor(selectionViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_SelectionPage_label"));
      }

      // Create a page for the parent tree view.
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), ClassifiersEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              Tree tree = new Tree(composite, SWT.MULTI);
              TreeViewer newTreeViewer = new TreeViewer(tree);
              return newTreeViewer;
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());

        parentViewer = (TreeViewer)viewerPane.getViewer();
        parentViewer.setAutoExpandLevel(30);
        parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
        parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(parentViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ParentPage_label"));
      }

      // This is the page for the list viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), ClassifiersEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new ListViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        listViewer = (ListViewer)viewerPane.getViewer();
        listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(listViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ListPage_label"));
      }

      // This is the page for the tree viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), ClassifiersEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new TreeViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        treeViewer = (TreeViewer)viewerPane.getViewer();
        treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);

        createContextMenuFor(treeViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_TreePage_label"));
      }
View Full Code Here

        selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
        selectionViewer.setInput(editingDomain.getResourceSet());
        selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
        viewerPane.setTitle(editingDomain.getResourceSet());

        new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);

        createContextMenuFor(selectionViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_SelectionPage_label"));
      }

      // Create a page for the parent tree view.
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), AnnotationsEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              Tree tree = new Tree(composite, SWT.MULTI);
              TreeViewer newTreeViewer = new TreeViewer(tree);
              return newTreeViewer;
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());

        parentViewer = (TreeViewer)viewerPane.getViewer();
        parentViewer.setAutoExpandLevel(30);
        parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
        parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(parentViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ParentPage_label"));
      }

      // This is the page for the list viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), AnnotationsEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new ListViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        listViewer = (ListViewer)viewerPane.getViewer();
        listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(listViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ListPage_label"));
      }

      // This is the page for the tree viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), AnnotationsEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new TreeViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        treeViewer = (TreeViewer)viewerPane.getViewer();
        treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);

        createContextMenuFor(treeViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_TreePage_label"));
      }
View Full Code Here

        selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
        selectionViewer.setInput(editingDomain.getResourceSet());
        selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
        viewerPane.setTitle(editingDomain.getResourceSet());

        new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);

        createContextMenuFor(selectionViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_SelectionPage_label"));
      }

      // Create a page for the parent tree view.
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), ImportsEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              Tree tree = new Tree(composite, SWT.MULTI);
              TreeViewer newTreeViewer = new TreeViewer(tree);
              return newTreeViewer;
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());

        parentViewer = (TreeViewer)viewerPane.getViewer();
        parentViewer.setAutoExpandLevel(30);
        parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
        parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(parentViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ParentPage_label"));
      }

      // This is the page for the list viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), ImportsEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new ListViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        listViewer = (ListViewer)viewerPane.getViewer();
        listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(listViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ListPage_label"));
      }

      // This is the page for the tree viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), ImportsEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new TreeViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        treeViewer = (TreeViewer)viewerPane.getViewer();
        treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);

        createContextMenuFor(treeViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_TreePage_label"));
      }
View Full Code Here

        selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
        selectionViewer.setInput(editingDomain.getResourceSet());
        selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
        viewerPane.setTitle(editingDomain.getResourceSet());

        new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);

        createContextMenuFor(selectionViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_SelectionPage_label"));
      }

      // Create a page for the parent tree view.
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), InstantiationsEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              Tree tree = new Tree(composite, SWT.MULTI);
              TreeViewer newTreeViewer = new TreeViewer(tree);
              return newTreeViewer;
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());

        parentViewer = (TreeViewer)viewerPane.getViewer();
        parentViewer.setAutoExpandLevel(30);
        parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
        parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(parentViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ParentPage_label"));
      }

      // This is the page for the list viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), InstantiationsEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new ListViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        listViewer = (ListViewer)viewerPane.getViewer();
        listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(listViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ListPage_label"));
      }

      // This is the page for the tree viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), InstantiationsEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new TreeViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        treeViewer = (TreeViewer)viewerPane.getViewer();
        treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);

        createContextMenuFor(treeViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_TreePage_label"));
      }
View Full Code Here

        selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
        selectionViewer.setInput(editingDomain.getResourceSet());
        selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
        viewerPane.setTitle(editingDomain.getResourceSet());

        new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);

        createContextMenuFor(selectionViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_SelectionPage_label"));
      }

      // Create a page for the parent tree view.
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), LiteralsEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              Tree tree = new Tree(composite, SWT.MULTI);
              TreeViewer newTreeViewer = new TreeViewer(tree);
              return newTreeViewer;
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());

        parentViewer = (TreeViewer)viewerPane.getViewer();
        parentViewer.setAutoExpandLevel(30);
        parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
        parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(parentViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ParentPage_label"));
      }

      // This is the page for the list viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), LiteralsEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new ListViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        listViewer = (ListViewer)viewerPane.getViewer();
        listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(listViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ListPage_label"));
      }

      // This is the page for the tree viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), LiteralsEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new TreeViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        treeViewer = (TreeViewer)viewerPane.getViewer();
        treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);

        createContextMenuFor(treeViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_TreePage_label"));
      }
View Full Code Here

        selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
        selectionViewer.setInput(editingDomain.getResourceSet());
        selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
        viewerPane.setTitle(editingDomain.getResourceSet());

        new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);

        createContextMenuFor(selectionViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_SelectionPage_label"));
      }

      // Create a page for the parent tree view.
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), VariablesEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              Tree tree = new Tree(composite, SWT.MULTI);
              TreeViewer newTreeViewer = new TreeViewer(tree);
              return newTreeViewer;
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());

        parentViewer = (TreeViewer)viewerPane.getViewer();
        parentViewer.setAutoExpandLevel(30);
        parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
        parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(parentViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ParentPage_label"));
      }

      // This is the page for the list viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), VariablesEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new ListViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        listViewer = (ListViewer)viewerPane.getViewer();
        listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        createContextMenuFor(listViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_ListPage_label"));
      }

      // This is the page for the tree viewer
      //
      {
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), VariablesEditor.this) {
            @Override
            public Viewer createViewer(Composite composite) {
              return new TreeViewer(composite);
            }
            @Override
            public void requestActivation() {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        treeViewer = (TreeViewer)viewerPane.getViewer();
        treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);

        createContextMenuFor(treeViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_TreePage_label"));
      }
View Full Code Here

TOP

Related Classes of org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor

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.