Search in sources :

Example 1 with IWizardCategory

use of org.eclipse.ui.wizards.IWizardCategory in project tdi-studio-se by Talend.

the class TalendExportPage method restoreWidgetValues.

protected void restoreWidgetValues() {
    IWizardCategory exportRoot = WorkbenchPlugin.getDefault().getExportWizardRegistry().getRootCategory();
    expandPreviouslyExpandedCategories(STORE_EXPANDED_EXPORT_CATEGORIES, exportRoot, exportTree.getViewer());
    selectPreviouslySelected(STORE_SELECTED_EXPORT_WIZARD_ID, exportRoot, exportTree.getViewer());
}
Also used : IWizardCategory(org.eclipse.ui.wizards.IWizardCategory)

Example 2 with IWizardCategory

use of org.eclipse.ui.wizards.IWizardCategory in project translationstudio8 by heartsome.

the class NewActionProvider method hasExamples.

/**
	 * 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;
}
Also used : IWizardRegistry(org.eclipse.ui.wizards.IWizardRegistry) IWizardCategory(org.eclipse.ui.wizards.IWizardCategory)

Example 3 with IWizardCategory

use of org.eclipse.ui.wizards.IWizardCategory in project translationstudio8 by heartsome.

the class ApplicationWorkbenchWindowAdvisor method getAllWizards.

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]);
}
Also used : IWizardDescriptor(org.eclipse.ui.wizards.IWizardDescriptor) ArrayList(java.util.ArrayList) IWizardCategory(org.eclipse.ui.wizards.IWizardCategory)

Example 4 with IWizardCategory

use of org.eclipse.ui.wizards.IWizardCategory in project tdi-studio-se by Talend.

the class TalendExportPage method createTreeViewer.

protected Composite createTreeViewer(Composite parent) {
    IWizardCategory root = WorkbenchPlugin.getDefault().getExportWizardRegistry().getRootCategory();
    // exportTree = new TalendCategorizedWizardSelectionTree(root,
    // WorkbenchMessages.ExportWizard_selectDestination);
    exportTree = new TalendCategorizedWizardSelectionTree(root, //$NON-NLS-1$
    Messages.getString("WorkbenchMessages.ExportWizard_selectDestination"));
    Composite exportComp = exportTree.createControl(parent);
    exportTree.getViewer().addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent event) {
            listSelectionChanged(event.getSelection());
        }
    });
    exportTree.getViewer().addDoubleClickListener(new IDoubleClickListener() {

        public void doubleClick(DoubleClickEvent event) {
            treeDoubleClicked(event);
        }
    });
    setTreeViewer(exportTree.getViewer());
    return exportComp;
}
Also used : Composite(org.eclipse.swt.widgets.Composite) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) IDoubleClickListener(org.eclipse.jface.viewers.IDoubleClickListener) IWizardCategory(org.eclipse.ui.wizards.IWizardCategory) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) DoubleClickEvent(org.eclipse.jface.viewers.DoubleClickEvent)

Aggregations

IWizardCategory (org.eclipse.ui.wizards.IWizardCategory)4 ArrayList (java.util.ArrayList)1 DoubleClickEvent (org.eclipse.jface.viewers.DoubleClickEvent)1 IDoubleClickListener (org.eclipse.jface.viewers.IDoubleClickListener)1 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)1 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)1 Composite (org.eclipse.swt.widgets.Composite)1 IWizardDescriptor (org.eclipse.ui.wizards.IWizardDescriptor)1 IWizardRegistry (org.eclipse.ui.wizards.IWizardRegistry)1