Search in sources :

Example 1 with ResourceTreeAndListGroup

use of org.erlide.ui.util.ResourceTreeAndListGroup in project erlide_eclipse by erlang.

the class ErlangWizardResourceImportPage method createFileSelectionGroup.

/**
 * Create the import source selection widget
 */
protected void createFileSelectionGroup(final Composite parent) {
    // Just create with a dummy root.
    selectionGroup = new ResourceTreeAndListGroup(parent, // $NON-NLS-1$
    new FileSystemElement("Dummy", null, true), getFolderProvider(), new WorkbenchLabelProvider(), getFileProvider(), new WorkbenchLabelProvider(), SWT.NONE, DialogUtil.inRegularFontMode(parent));
    final ICheckStateListener listener = event -> updateWidgetEnablements();
    final WorkbenchViewerComparator comparator = new WorkbenchViewerComparator();
    selectionGroup.setTreeComparator(comparator);
    selectionGroup.setListComparator(comparator);
    selectionGroup.addCheckStateListener(listener);
}
Also used : Arrays(java.util.Arrays) ResourcesPlugin(org.eclipse.core.resources.ResourcesPlugin) ICheckStateListener(org.eclipse.jface.viewers.ICheckStateListener) BusyIndicator(org.eclipse.swt.custom.BusyIndicator) Event(org.eclipse.swt.widgets.Event) ArrayList(java.util.ArrayList) IWorkspaceRoot(org.eclipse.core.resources.IWorkspaceRoot) IContainer(org.eclipse.core.resources.IContainer) TypeFilteringDialog(org.eclipse.ui.dialogs.TypeFilteringDialog) IPath(org.eclipse.core.runtime.IPath) Composite(org.eclipse.swt.widgets.Composite) Map(java.util.Map) WizardPage(org.eclipse.jface.wizard.WizardPage) ITreeContentProvider(org.eclipse.jface.viewers.ITreeContentProvider) GridData(org.eclipse.swt.layout.GridData) IAdaptable(org.eclipse.core.runtime.IAdaptable) WorkbenchLabelProvider(org.eclipse.ui.model.WorkbenchLabelProvider) ResourceTreeAndListGroup(org.erlide.ui.util.ResourceTreeAndListGroup) FileSystemElement(org.eclipse.ui.dialogs.FileSystemElement) WorkbenchViewerComparator(org.eclipse.ui.model.WorkbenchViewerComparator) Group(org.eclipse.swt.widgets.Group) IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) IElementFilter(org.erlide.ui.util.IElementFilter) List(java.util.List) IResource(org.eclipse.core.resources.IResource) Path(org.eclipse.core.runtime.Path) SWT(org.eclipse.swt.SWT) DialogUtil(org.erlide.ui.util.DialogUtil) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) Collections(java.util.Collections) GridLayout(org.eclipse.swt.layout.GridLayout) WorkbenchLabelProvider(org.eclipse.ui.model.WorkbenchLabelProvider) ICheckStateListener(org.eclipse.jface.viewers.ICheckStateListener) FileSystemElement(org.eclipse.ui.dialogs.FileSystemElement) WorkbenchViewerComparator(org.eclipse.ui.model.WorkbenchViewerComparator) ResourceTreeAndListGroup(org.erlide.ui.util.ResourceTreeAndListGroup)

Aggregations

ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Collections (java.util.Collections)1 List (java.util.List)1 Map (java.util.Map)1 IContainer (org.eclipse.core.resources.IContainer)1 IResource (org.eclipse.core.resources.IResource)1 IWorkspaceRoot (org.eclipse.core.resources.IWorkspaceRoot)1 ResourcesPlugin (org.eclipse.core.resources.ResourcesPlugin)1 IAdaptable (org.eclipse.core.runtime.IAdaptable)1 IPath (org.eclipse.core.runtime.IPath)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 Path (org.eclipse.core.runtime.Path)1 ICheckStateListener (org.eclipse.jface.viewers.ICheckStateListener)1 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 ITreeContentProvider (org.eclipse.jface.viewers.ITreeContentProvider)1 WizardPage (org.eclipse.jface.wizard.WizardPage)1 SWT (org.eclipse.swt.SWT)1 BusyIndicator (org.eclipse.swt.custom.BusyIndicator)1 GridData (org.eclipse.swt.layout.GridData)1