• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IWizardCategory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: removeDefaultNewWizards

import org.eclipse.ui.wizards.IWizardCategory; //导入依赖的package包/类
/**
 * Remove the wizard category 'General'.
 */
private void removeDefaultNewWizards()
{
    // based on:
    // http://stackoverflow.com/questions/11307367/how-to-remove-default-wizards-from-file-new-menu-in-rcp-application
    // http://www.eclipse.org/forums/index.php/t/261462

    AbstractExtensionWizardRegistry wizardRegistry = (AbstractExtensionWizardRegistry) PlatformUI.getWorkbench().getNewWizardRegistry();
    IWizardCategory[] categories = PlatformUI.getWorkbench().getNewWizardRegistry().getRootCategory().getCategories();

    for (IWizardDescriptor wizard : getAllWizards(categories))
    {
        if(wizard.getCategory().getId().matches("org.eclipse.ui.Basic"))
        {
            WorkbenchWizardElement wizardElement = (WorkbenchWizardElement) wizard;
            wizardRegistry.removeExtension(wizardElement.getConfigurationElement().getDeclaringExtension(), new Object[] { wizardElement });
        }
    }
}
 
开发者ID:vobject,项目名称:maru,代码行数:22,代码来源:ApplicationWorkbenchWindowAdvisor.java


示例2: ensureGroupExists

import org.eclipse.ui.wizards.IWizardCategory; //导入依赖的package包/类
private void ensureGroupExists(ProjectTemplate template) {
	if (template.getGroup() == null) {
		return;
	}

	IWizardCategory category = wizardRegistry.findCategory(template.getGroup());
	if (category == null) {
		String id = "project.template." + template.getGroup();
		String label = template.getGroup();
		ConfigurationElementDescription description = createGroupDescription(template);
		addExtension(id, label, description);
	}
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:14,代码来源:ProjectTemplateExtensionLoader.java


示例3: getAllWizards

import org.eclipse.ui.wizards.IWizardCategory; //导入依赖的package包/类
static private IWizardDescriptor[] getAllWizards(final IWizardCategory[] categories) {
	final List<IWizardDescriptor> results = new ArrayList<IWizardDescriptor>();
	for (final IWizardCategory wizardCategory : categories) {

		results.addAll(Arrays.asList(wizardCategory.getWizards()));
		results.addAll(Arrays.asList(getAllWizards(wizardCategory.getCategories())));
	}
	return results.toArray(new IWizardDescriptor[0]);
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:10,代码来源:CleanupHelper.java


示例4: addNewWizards

import org.eclipse.ui.wizards.IWizardCategory; //导入依赖的package包/类
private static void addNewWizards(IPageLayout layout) {
    Collection<String> cooperateWizardIds = Optional
            .ofNullable(PlatformUI.getWorkbench().getNewWizardRegistry().findCategory(WIZARD_CATEGORY_ID))
            .map(IWizardCategory::getWizards).map(Arrays::asList).map(Collection::stream)
            .map(s -> s.map(IWizardDescriptor::getId).collect(Collectors.toList())).orElse(Collections.emptyList());
    cooperateWizardIds.forEach(layout::addNewWizardShortcut);
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:8,代码来源:CooperatePerspective.java


示例5: getAllWizards

import org.eclipse.ui.wizards.IWizardCategory; //导入依赖的package包/类
private IWizardDescriptor[] getAllWizards(IWizardCategory... categories) {
	List<IWizardDescriptor> results = new ArrayList<IWizardDescriptor>();
	for (IWizardCategory wizardCategory : categories) {
		results.addAll(Arrays.asList(wizardCategory.getWizards()));
		results.addAll(Arrays.asList(getAllWizards(wizardCategory.getCategories())));
	}
	return results.toArray(new IWizardDescriptor[0]);
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:9,代码来源:ApplicationWorkbenchWindowAdvisor.java


示例6: hasExamples

import org.eclipse.ui.wizards.IWizardCategory; //导入依赖的package包/类
/**
 * Return whether or not any examples are in the current install.
 * 
 * @return True if there exists a full examples wizard category.
 */
private boolean hasExamples() {
	IWizardRegistry newRegistry = PlatformUI.getWorkbench().getNewWizardRegistry();
	IWizardCategory category = newRegistry.findCategory(FULL_EXAMPLES_WIZARD_CATEGORY);
	return category != null;

}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:12,代码来源:NewActionProvider.java


示例7: getAllWizards

import org.eclipse.ui.wizards.IWizardCategory; //导入依赖的package包/类
private static IWizardDescriptor[] getAllWizards(IWizardCategory[] categories) {
  List<IWizardDescriptor> results = new ArrayList<IWizardDescriptor>();
  for(IWizardCategory wizardCategory : categories){
    results.addAll(Arrays.asList(wizardCategory.getWizards()));
    results.addAll(Arrays.asList(getAllWizards(wizardCategory.getCategories())));
  }
  return results.toArray(new IWizardDescriptor[0]);
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:9,代码来源:CloudScaleBranding.java


示例8: getAllWizards

import org.eclipse.ui.wizards.IWizardCategory; //导入依赖的package包/类
private List<IWizardDescriptor> getAllWizards(IWizardCategory[] categories)
{
    List<IWizardDescriptor> results = new ArrayList<>();

    for (IWizardCategory wizardCategory : categories)
    {
        results.addAll(Arrays.asList(wizardCategory.getWizards()));
        results.addAll(getAllWizards(wizardCategory.getCategories()));
    }
    return results;
}
 
开发者ID:vobject,项目名称:maru,代码行数:12,代码来源:ApplicationWorkbenchWindowAdvisor.java


示例9: removeWizards

import org.eclipse.ui.wizards.IWizardCategory; //导入依赖的package包/类
private static void removeWizards ()
{	
	AbstractExtensionWizardRegistry wizardRegistry = (AbstractExtensionWizardRegistry)PlatformUI.getWorkbench().getNewWizardRegistry();
	IWizardCategory[] categories = PlatformUI.getWorkbench().getNewWizardRegistry().getRootCategory().getCategories();
	for(IWizardDescriptor wizard : getAllWizards(categories)){
		
		
		//System.out.println("ID: " + wizard.getId());
		//System.out.println("	Label: " + wizard.getLabel()); 
		//System.out.println("	Category label: " + wizard.getCategory().getLabel()); 
		//System.out.println("	Category ID: " + wizard.getCategory().getId());
	    
	    
		if(
	    		!wizard.getCategory().getId().equals("org.eclipse.ui.Basic") && 
	    		!wizard.getCategory().getId().equals("org.eclipse.ui.Examples") && 
	    		
	    		!wizard.getCategory().getId().startsWith("org.scaledl") && 
	    		!wizard.getId().startsWith("org.scaledl") && 
	    		
	    		!wizard.getCategory().getId().startsWith("de.uka") && 
	    		!wizard.getCategory().getId().startsWith("org.palladiosimulator") && 
	    		!wizard.getId().startsWith("de.uka") && 
	    		!wizard.getId().startsWith("org.palladiosimulator") && 

	    		!wizard.getCategory().getId().startsWith("org.reclipse") && 
	    		!wizard.getId().startsWith("org.reclipse") && 

	    		
	    		!wizard.getCategory().getId().startsWith("org.spotter") && 
	    		!wizard.getId().startsWith("org.spotter") && 
	    		
	    		!wizard.getCategory().getId().toLowerCase().contains("cloudscale") &&
	    		!wizard.getId().toLowerCase().contains("cloudscale") &&
	    		
	    		!wizard.getCategory().getId().contains("dlim") 

	    		
	    		/*
	    		!wizard.getLabel().contains("ServicelevelObjective Model") &&
	    		!wizard.getLabel().contains("Pms Model") &&
	    		!wizard.getLabel().contains("Experiments Model") &&
	    		!wizard.getLabel().contains("Measuringpoint Model") &&
	    		!wizard.getLabel().contains("Resourceenvironment Model") &&
	    		!wizard.getLabel().contains("Seff Model") &&
	    		!wizard.getLabel().contains("Repository Model") &&
	    		!wizard.getLabel().contains("Usage Model") &&
	    		!wizard.getLabel().contains("Variation Model") &&
	    		!wizard.getLabel().contains("Allocation Model") &&
				*/
	    		 		)
	    		
	    {
	        // TODO: removed for now when new stuff are integrated on daily bases -- fix-it
	        WorkbenchWizardElement wizardElement = (WorkbenchWizardElement) wizard;
	        wizardRegistry.removeExtension(wizardElement.getConfigurationElement().getDeclaringExtension(), new Object[]{wizardElement});
	    }
	}
	
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:61,代码来源:CloudScaleBranding.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StatusLineLayoutData类代码示例发布时间:2022-05-23
下一篇:
Java SurfaceView类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap