Package tool.navigator.cdf

Source Code of tool.navigator.cdf.ClassContentView

package tool.navigator.cdf;

import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.part.ViewPart;

import tool.navigator.common.LabelProvider;

public class ClassContentView extends ViewPart {

  public static final String ID = "tool.navigator.cdf.ClassContentView"; //$NON-NLS-1$

  public ClassContentView() {
  }

  /**
   * Create contents of the view part.
   * @param parent
   */
  @Override
  public void createPartControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    container.setLayout(new GridLayout(1, false));
   
    TreeViewer treeViewer = new TreeViewer(container, SWT.BORDER);
    Tree tree = treeViewer.getTree();
    tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
    treeViewer.setLabelProvider(new LabelProvider());
    treeViewer.setContentProvider(new CdfContentProvider());

    createActions();
    initializeToolBar();
    initializeMenu();
  }

  /**
   * Create the actions.
   */
  private void createActions() {
    // Create the actions
  }

  /**
   * Initialize the toolbar.
   */
  private void initializeToolBar() {
    IToolBarManager toolbarManager = getViewSite().getActionBars()
        .getToolBarManager();
  }

  /**
   * Initialize the menu.
   */
  private void initializeMenu() {
    IMenuManager menuManager = getViewSite().getActionBars()
        .getMenuManager();
  }

  @Override
  public void setFocus() {
    // Set the focus
  }
}
TOP

Related Classes of tool.navigator.cdf.ClassContentView

TOP
Copyright © 2018 www.massapi.com. 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.