当前位置: 首页>>代码示例>>Java>>正文


Java PatternFilter类代码示例

本文整理汇总了Java中org.eclipse.ui.dialogs.PatternFilter的典型用法代码示例。如果您正苦于以下问题:Java PatternFilter类的具体用法?Java PatternFilter怎么用?Java PatternFilter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PatternFilter类属于org.eclipse.ui.dialogs包,在下文中一共展示了PatternFilter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createPartControl

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
/**
 * This is a callback that will allow us to create the viewer and initialize it.
 */
public void createPartControl(Composite parent) {
    PatternFilter filter = new PatternFilter();
    FilteredTree tree = new FilteredTree(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL, filter, true);
    viewer = tree.getViewer();
    drillDownAdapter = new DrillDownAdapter(viewer);
    viewer.setContentProvider(new ViewContentProvider());
    viewer.setLabelProvider(new ViewLabelProvider());
    viewer.setSorter(new NameSorter());
    viewer.setInput(getViewSite());
    makeActions();
    hookContextMenu();
    hookDoubleClickAction();
    contributeToActionBars();
    getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this);
}
 
开发者ID:mulesoft,项目名称:mule-tooling-incubator,代码行数:19,代码来源:TasksView.java

示例2: doCreateTreeViewer

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
protected TreeViewer doCreateTreeViewer(Composite parent, int style) {
	FilteredTree tree = new FilteredTree(parent, style, new PatternFilter(), true);
	tree.setLayoutData(new GridData(GridData.FILL_BOTH));

	applyDialogFont(tree);

	TreeViewer viewer = tree.getViewer();
	return viewer;
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:10,代码来源:WorkspaceResourceSelectionDialog.java

示例3: createControl

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
@Override
public void createControl(Composite parent) {
    patternFilter = new PatternFilter();
    filter = PyFilteredTree.create(parent, patternFilter, false);
    treeViewer = filter.getViewer();
    treeViewer.addSelectionChangedListener(this);
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:8,代码来源:ContentOutlinePageWithFilter.java

示例4: create

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
public static PyFilteredTree create(Composite parent, PatternFilter filter, boolean border) {
    int treeStyle = SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL;
    if (border) {
        treeStyle |= SWT.BORDER;
    }
    return create(parent, treeStyle, filter);
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:8,代码来源:PyFilteredTree.java

示例5: PaletteFilteredTree

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
public PaletteFilteredTree(Composite parent, int treeStyle, PatternFilter filter, boolean useNewLook) {
  super(parent, treeStyle, filter, useNewLook);
}
 
开发者ID:eclipse,项目名称:triquetrum,代码行数:4,代码来源:PaletteTreeViewer.java

示例6: createDialogArea

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite base) {
   Composite parent = (Composite) super.createDialogArea(base);
   Composite composite = new Composite(parent, SWT.NONE);
   
   GridLayout layout = new GridLayout();
   layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
   layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
   layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
   layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
   composite.setLayout(layout);
   composite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
   
   // Manage dialog tree content.
   FilteredTree tree = new FilteredTree(composite, SWT.SINGLE | SWT.BORDER,
         new PatternFilter(), true);

   projectTree = tree.getViewer();
   projectTree.setLabelProvider(new EIPModelTreeLabelProvider());
   projectTree.setContentProvider(new EIPModelTreeContentProvider());
   projectTree.setInput(ResourcesPlugin.getWorkspace().getRoot());
   
   GridDataFactory.fillDefaults().grab(true, true).hint(500, 300).applyTo(tree);
   
   // Manage dialog tree events.
   projectTree.addSelectionChangedListener(new ISelectionChangedListener() {
      @Override
      public void selectionChanged(SelectionChangedEvent event) {
         if (event.getSelection() instanceof TreeSelection) {
            TreeSelection tSelection = (TreeSelection)event.getSelection();
            if (tSelection.getFirstElement() instanceof IResource) {
               eipModel = (IResource) tSelection.getFirstElement();
            }
         }
      }
   });
   
   setTitle("Choose a target EIP model");
   setMessage("Select the EIP model for designing a new Route from Service");
   applyDialogFont(composite);
   
   return composite;
}
 
开发者ID:lbroudoux,项目名称:eip-designer,代码行数:44,代码来源:EIPModelAndRouteSelectionDialog.java

示例7: createDialogArea

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite base) {
   Composite parent = (Composite) super.createDialogArea(base);
   Composite composite = new Composite(parent, SWT.NONE);
   
   GridLayout layout = new GridLayout();
   layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
   layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
   layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
   layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
   composite.setLayout(layout);
   composite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
   
   // Manage dialog tree content.
   FilteredTree tree = new FilteredTree(composite, SWT.SINGLE | SWT.BORDER,
         new PatternFilter(), true);

   projectTree = tree.getViewer();
   projectTree.setLabelProvider(new RouteTreeLabelProvider());
   projectTree.setContentProvider(new RouteTreeContentProvider());
   projectTree.setInput(ResourcesPlugin.getWorkspace().getRoot());
   
   GridDataFactory.fillDefaults().grab(true, true).hint(500, 300).applyTo(tree);
   
   // Manage dialog tree events.
   projectTree.addSelectionChangedListener(new ISelectionChangedListener() {
      @Override
      public void selectionChanged(SelectionChangedEvent event) {
         if (event.getSelection() instanceof TreeSelection) {
            TreeSelection tSelection = (TreeSelection)event.getSelection();
            if (tSelection.getFirstElement() instanceof Route) {
               selectedRoute = (Route) tSelection.getFirstElement();
            }
         }
      }
   });
   
   setTitle("Compare '" + fileName + "' with an EIP Route model");
   setMessage("Select an EIP Route to compare the resource with");
   applyDialogFont(composite);
   
   return composite;
}
 
开发者ID:lbroudoux,项目名称:eip-designer,代码行数:44,代码来源:CompareTargetSelectionDialog.java

示例8: createDialogArea

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite base) {
   Composite parent = (Composite) super.createDialogArea(base);
   Composite composite = new Composite(parent, SWT.NONE);
   
   GridLayout layout = new GridLayout();
   layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
   layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
   layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
   layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
   composite.setLayout(layout);
   composite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
   
   // Manage dialog tree content.
   FilteredTree tree = new FilteredTree(composite, SWT.SINGLE | SWT.BORDER,
         new PatternFilter(), true);

   projectTree = tree.getViewer();
   projectTree.setLabelProvider(new EIPModelTreeLabelProvider());
   projectTree.setContentProvider(new EIPModelTreeContentProvider());
   projectTree.setInput(ResourcesPlugin.getWorkspace().getRoot());
   
   GridDataFactory.fillDefaults().grab(true, true).hint(500, 300).applyTo(tree);
   
   // Manage dialog tree events.
   projectTree.addSelectionChangedListener(new ISelectionChangedListener() {
      @Override
      public void selectionChanged(SelectionChangedEvent event) {
         if (event.getSelection() instanceof TreeSelection) {
            TreeSelection tSelection = (TreeSelection)event.getSelection();
            if (tSelection.getFirstElement() instanceof IResource) {
               selectedEIPModel = (IResource) tSelection.getFirstElement();
            }
         }
      }
   });
   
   setTitle("Parse and merge '" + fileName + "' with an EIP Model");
   setMessage("Select an EIP Model to persist the parsed resource within");
   applyDialogFont(composite);
   
   return composite;
}
 
开发者ID:lbroudoux,项目名称:eip-designer,代码行数:44,代码来源:PersistTargetSelectionDialog.java

示例9: CheckboxFilteredTree

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public CheckboxFilteredTree(Composite parent, int treeStyle, PatternFilter filter) {
	super(parent, treeStyle, filter);
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:5,代码来源:InPlaceCheckBoxTreeDialog.java

示例10: createFilterControls

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
/**
 * 创建包含过滤文本的 TreeViewer
 * @param parent
 *            顶层容器 ;
 */
private void createFilterControls(Composite parent) {

	fFilteredTree = new FilteredTree(parent, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION, new PatternFilter(), true);

	GridData gridData;
	final GridLayout layout = new GridLayout(1, false);
	layout.marginWidth = 0;
	fFilteredTree.setLayout(layout);
	gridData = new GridData();
	gridData.grabExcessHorizontalSpace = true;
	gridData.grabExcessVerticalSpace = true;
	gridData.horizontalAlignment = SWT.FILL;
	gridData.verticalAlignment = SWT.FILL;
	fFilteredTree.setLayoutData(gridData);

	final TreeViewer viewer = fFilteredTree.getViewer();
	// 确保 filtered tree 有显示 ITEMS_TO_SHOW 的高度
	final Tree tree = viewer.getTree();
	tree.setHeaderVisible(true);
	tree.setLinesVisible(true);
	final Object layoutData = tree.getLayoutData();
	if (layoutData instanceof GridData) {
		gridData = (GridData) layoutData;
		gridData.heightHint = parent.getSize().y; // 适应大小
	}

	LanguageCodeComparator comparator = new LanguageCodeComparator();

	final TreeColumn codeColumn = new TreeColumn(tree, SWT.LEFT, LANGUAGE_CODE_COLUMN);
	codeColumn.setText(Messages.getString("languagecode.LanguageCodesPreferencePage.codeColumn"));
	tree.setSortColumn(codeColumn);
	tree.setSortColumn(codeColumn);
	tree.setSortDirection(SWT.UP);
	codeColumn.addSelectionListener(new ResortColumn(comparator, codeColumn, viewer, LANGUAGE_CODE_COLUMN));

	final TreeColumn nameColumn = new TreeColumn(tree, SWT.LEFT, LANGUAGE_NAME_COLUMN);
	nameColumn.setText(Messages.getString("languagecode.LanguageCodesPreferencePage.nameColumn"));
	nameColumn.addSelectionListener(new ResortColumn(comparator, nameColumn, viewer, LANGUAGE_NAME_COLUMN));

	final TreeColumn bidiColumn = new TreeColumn(tree, SWT.LEFT, LANGUAGE_BIDI_COLUMN);
	bidiColumn.setText(Messages.getString("languagecode.LanguageCodesPreferencePage.bidiColumn"));
	bidiColumn.addSelectionListener(new ResortColumn(comparator, bidiColumn, viewer, LANGUAGE_BIDI_COLUMN));

	viewer.setContentProvider(new LanguageCodeContentProvider());
	viewer.setLabelProvider(new LanguageCodeLabelProvider());
	viewer.setComparator(comparator);
	viewer.addDoubleClickListener(new IDoubleClickListener() {

		public void doubleClick(DoubleClickEvent event) {
			verifyCurrentSelected(EDIT);
		}
	});

	fFilteredTree.getPatternFilter().setIncludeLeadingWildcard(true);
	final TreeColumn[] columns = viewer.getTree().getColumns();

	columns[LANGUAGE_CODE_COLUMN].setWidth(100);
	columns[LANGUAGE_NAME_COLUMN].setWidth(240);
	columns[LANGUAGE_BIDI_COLUMN].setWidth(100);
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:66,代码来源:LanguageCodesPreferencePage.java

示例11: createControl

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
/**
 * Create contents of the wizard.
 * @param parent
 */
public void createControl(Composite parent) {
    
    final Composite container = new Composite(parent, SWT.NULL);
    container.setLayout(new GridLayout(8, false));
    init();
    FilteredTree filteredTree = new FilteredTree(container, SWT.MULTI
            | SWT.H_SCROLL | SWT.V_SCROLL, new PatternFilter(), true);

    filteredTree.getFilterControl().setText("");
    GridData gd_filteredTree = new GridData(SWT.FILL, SWT.FILL, true,
            true, 8, 1);
    gd_filteredTree.heightHint = 138;
    gd_filteredTree.widthHint = 300;
    filteredTree.setLayoutData(gd_filteredTree);
    treeViewer = filteredTree.getViewer();
    treeViewer.setContentProvider(new TreeViewerContentProvider());
    treeViewer.setLabelProvider(new TreeViewerLabelProvider());
    Map<String, List<String>> filesUrl = manager.getApiUrls();
    treeViewer.setInput(DataFactory.getList(iProject, filesUrl));
    treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent event) {
            ISelection iSelection = treeViewer.getSelection();
            
           
            dialogChanged();
            if (iSelection != null) {
                Object selectItem = ((TreeSelection) iSelection)
                        .getFirstElement();
                if (selectItem instanceof RestFulApi) {
                    isChosed = true;
                   
                  

                    RestFulApi api = (RestFulApi) selectItem;
                    changeIsUseInnerOps(api.getParent().getParent());
                    if (isUseInnerSchema) {
                        currentUrlBean = new UrlBean(manager.getApiManager().getRestApiJsonByUrl(api.getName()));
                    } else {
                        currentUrlBean = new UrlBean(manager.getUserApiManager().getRestApiJsonByUrl(api.getName()));
                    }
                    IWizardPage page = getNextPage();
                    if(page instanceof AddPostBodyPage2){
                        ((AddPostBodyPage2)page).createItem(currentUrlBean);
                    }
                   
                } else {
                    isChosed = false;
                }
                if (selectItem instanceof SchemaFile) {
                    SchemaFile file = (SchemaFile) selectItem;

                    changeIsUseInnerOps(file.getParent());
                    isChosed = false;

                }
            }
            dialogChanged();
        }
    });

    setControl(container);
    new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);

    Label label_1 = new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);
}
 
开发者ID:HuaweiSNC,项目名称:OpsDev,代码行数:77,代码来源:AddPostBodyPage.java

示例12: createControl

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
/**
 * Create contents of the wizard.
 * @param parent
 */
public void createControl(Composite parent) {
    
    final Composite container = new Composite(parent, SWT.NULL);
    container.setLayout(new GridLayout(8, false));
    init();
    FilteredTree filteredTree = new FilteredTree(container, SWT.MULTI
            | SWT.H_SCROLL | SWT.V_SCROLL, new PatternFilter(), true);

    filteredTree.getFilterControl().setText("");
    GridData gd_filteredTree = new GridData(SWT.FILL, SWT.FILL, true,
            true, 8, 1);
    gd_filteredTree.heightHint = 138;
    gd_filteredTree.widthHint = 300;
    filteredTree.setLayoutData(gd_filteredTree);
    treeViewer = filteredTree.getViewer();
    treeViewer.setContentProvider(new TreeViewerContentProvider());
    treeViewer.setLabelProvider(new TreeViewerLabelProvider());
    Map<String, List<String>> filesUrl = manager.getApiUrls();
    treeViewer.setInput(DataFactory.getList(iProject, filesUrl));
    treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent event) {
            ISelection iSelection = treeViewer.getSelection();
            
           
            dialogChanged();
            if (iSelection != null) {
                Object selectItem = ((TreeSelection) iSelection)
                        .getFirstElement();
                if (selectItem instanceof RestFulApi) {
                    isChosed = true;
                   
                  

                    RestFulApi api = (RestFulApi) selectItem;
                    choseUrl = api.getName();
                    changeIsUseInnerOps(api.getParent().getParent());
                    if (isUseInnerSchema) {
                        currentUrlBean = new UrlBean(manager.getApiManager().getRestApiJsonByUrl(api.getName()));
                    } else {
                        currentUrlBean = new UrlBean(manager.getUserApiManager().getRestApiJsonByUrl(api.getName()));
                    }
                    IWizardPage page = getNextPage();
                    if(page instanceof AddPostBodyPage2){
                        ((AddPostBodyPage2)page).createItem(currentUrlBean,choseUrl);
                    }
                   
                } else {
                    isChosed = false;
                }
                if (selectItem instanceof SchemaFile) {
                    SchemaFile file = (SchemaFile) selectItem;

                    changeIsUseInnerOps(file.getParent());
                    isChosed = false;

                }
            }
            dialogChanged();
        }
    });

    setControl(container);
    new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);

    Label label_1 = new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);
    new Label(container, SWT.NONE);
}
 
开发者ID:HuaweiSNC,项目名称:OpsDev,代码行数:78,代码来源:AddPostBodyPage.java

示例13: PatternFilteredTree

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
PatternFilteredTree(Composite parent, int treeStyle, PatternFilter filter) {
    super(parent, treeStyle, filter);
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:4,代码来源:FilterBugsDialog.java

示例14: PyFilteredTree

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
private PyFilteredTree(Composite parent, int treeStyle, PatternFilter filter, boolean useNewLook) {
    super(parent, treeStyle, filter, useNewLook);
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:4,代码来源:PyFilteredTree.java

示例15: createTreeControl

import org.eclipse.ui.dialogs.PatternFilter; //导入依赖的package包/类
/**
 * Creates the default tree and sets it as the control. The default styles will show scrollbars as needed, and allows
 * for multiple selection.
 * <p>
 * Doesn't use the default createControl method name, as that one is made final in the ScrollingGraphicalViewer base
 * class...
 * </p>
 *
 * @param parent
 *          The parent for the Tree
 * @return the control
 */
public Control createTreeControl(Composite parent) {
  PatternFilter filter = new PatternFilter();
  FilteredTree tree = new PaletteFilteredTree(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL, filter, true);
  tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
  tree.getViewer().setContentProvider(new PaletteTreeProvider(tree.getViewer()));
  tree.getViewer().setLabelProvider(new PaletteLabelProvider(this));
  setControl(tree);
  addDropTargetListener(new UserLibraryTransferDropListener(this));
  return tree;
}
 
开发者ID:eclipse,项目名称:triquetrum,代码行数:23,代码来源:PaletteTreeViewer.java


注:本文中的org.eclipse.ui.dialogs.PatternFilter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。