Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.IStructuredContentProvider


     *
     * @param resources
     */
    public void setSelectedResources(List<IResource> resources) {
        CheckboxTreeViewer checkboxTreeViewer = (CheckboxTreeViewer) this.viewer;
        IStructuredContentProvider structuredContentProvider = (IStructuredContentProvider) checkboxTreeViewer
            .getContentProvider();

        Object[] allElements = structuredContentProvider
            .getElements(checkboxTreeViewer.getInput());
        Object[] checkedElements = checkboxTreeViewer.getCheckedElements();

        List<IResource> allResources = ArrayUtils.getAdaptableObjects(
            allElements, IResource.class);
View Full Code Here


     *
     * @param projects
     */
    public void setSelectedProjects(List<IProject> projects) {
        CheckboxTableViewer checkboxTableViewer = (CheckboxTableViewer) this.viewer;
        IStructuredContentProvider structuredContentProvider = (IStructuredContentProvider) checkboxTableViewer
            .getContentProvider();

        Object[] allElements = structuredContentProvider
            .getElements(checkboxTableViewer.getInput());
        Object[] checkedElements = checkboxTableViewer.getCheckedElements();

        List<IProject> allProjects = ArrayUtils.getAdaptableObjects(
            allElements, IProject.class);
View Full Code Here

        getTableViewer().setSorter(new ResourceSorter(ResourceSorter.NAME));
        return area;
      }
    };
    dialog.setMessage(SSEUIMessages.PropertyPreferencePage_02);
    dialog.setContentProvider(new IStructuredContentProvider() {
      public void dispose() {
      }

      public Object[] getElements(Object inputElement) {
        return ((IWorkspace) inputElement).getRoot().getProjects();
View Full Code Here

          onOpen(sel.getFirstElement());
        }
      });
      viewer.setLabelProvider(new ConfigurableTableProvider());
      viewer.setContentProvider(new IStructuredContentProvider() {

        public void inputChanged(Viewer viewer, Object oldInput,
            Object newInput) {

        }
View Full Code Here

        getTableViewer().setSorter(new ResourceSorter(ResourceSorter.NAME));
        return area;
      }
    };
    dialog.setMessage(SSEUIMessages.PropertyPreferencePage_02);
    dialog.setContentProvider(new IStructuredContentProvider() {
      public void dispose() {
      }

      public Object[] getElements(Object inputElement) {
        return ((IWorkspace) inputElement).getRoot().getProjects();
View Full Code Here

        getTableViewer().setSorter(new ResourceSorter(ResourceSorter.NAME));
        return area;
      }
    };
    dialog.setMessage(SSEUIMessages.PropertyPreferencePage_02);
    dialog.setContentProvider(new IStructuredContentProvider() {
      public void dispose() {
      }

      public Object[] getElements(Object inputElement) {
        return ((IWorkspace) inputElement).getRoot().getProjects();
View Full Code Here

          onOpen(sel.getFirstElement());
        }
      });
      viewer.setLabelProvider(new ConfigurableTableProvider());
      viewer.setContentProvider(new IStructuredContentProvider() {

        public void inputChanged(Viewer viewer, Object oldInput,
            Object newInput) {

        }
View Full Code Here

        TableColumn valueColumn = new TableColumn( contextEntryTable, SWT.LEFT, 1 );
        valueColumn.setText( "Value" );
        valueColumn.setWidth( 100 );
        contextEntryTable.setHeaderVisible( true );
        contextEntryTableViewer = new TableViewer( contextEntryTable );
        contextEntryTableViewer.setContentProvider( new IStructuredContentProvider()
        {
            public Object[] getElements( Object inputElement )
            {
                List<AttributeValueObject> elements = new ArrayList<AttributeValueObject>();
View Full Code Here

        TableColumn valueColumn = new TableColumn( contextEntryTable, SWT.LEFT, 1 );
        valueColumn.setText( "Value" );
        valueColumn.setWidth( 100 );
        contextEntryTable.setHeaderVisible( true );
        contextEntryTableViewer = new TableViewer( contextEntryTable );
        contextEntryTableViewer.setContentProvider( new IStructuredContentProvider()
        {
            public Object[] getElements( Object inputElement )
            {
                List<AttributeValueObject> elements = new ArrayList<AttributeValueObject>();
View Full Code Here

    _tabvDp.createMMI();

    // Replace the default content provider by a filtered one
    // Must be done after the createMMI
    _tabvDp.setContentProvider(new IStructuredContentProvider()
      {
        @SuppressWarnings("unchecked")
        public Object[] getElements(Object inputElement)
          {
          List<DataPath> ldp = (List<DataPath>) inputElement;
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.IStructuredContentProvider

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.