本文整理汇总了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;未经允许,请勿转载。 |
请发表评论