Search in sources :

Example 1 with JavaClassFileFilter

use of org.whole.lang.ui.controls.JavaClassFileFilter in project whole by wholeplatform.

the class WizardPojoModelImportPage1 method createSourceGroup.

@Override
protected void createSourceGroup(Composite parent) {
    resourceChooser = new TreeViewer(parent);
    GridLayout listAreaLayout = new GridLayout();
    listAreaLayout.marginWidth = 0;
    parent.setLayout(listAreaLayout);
    resourceChooser.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
    resourceChooser.setContentProvider(new StandardJavaElementContentProvider());
    resourceChooser.setLabelProvider(new JavaElementLabelProvider());
    resourceChooser.setComparator(new JavaElementComparator());
    resourceChooser.addFilter(new JavaClassFileFilter());
    resourceChooser.setInput(JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()));
    resourceChooser.addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent event) {
            updatePageCompletion();
        }
    });
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) StandardJavaElementContentProvider(org.eclipse.jdt.ui.StandardJavaElementContentProvider) TreeViewer(org.eclipse.jface.viewers.TreeViewer) JavaClassFileFilter(org.whole.lang.ui.controls.JavaClassFileFilter) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) GridData(org.eclipse.swt.layout.GridData) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) JavaElementComparator(org.eclipse.jdt.ui.JavaElementComparator) JavaElementLabelProvider(org.eclipse.jdt.ui.JavaElementLabelProvider)

Example 2 with JavaClassFileFilter

use of org.whole.lang.ui.controls.JavaClassFileFilter in project whole by wholeplatform.

the class WizardJavaModelImportPage1 method createSourceGroup.

@Override
protected void createSourceGroup(Composite parent) {
    resourceChooser = new TreeViewer(parent, SWT.SINGLE);
    GridLayout listAreaLayout = new GridLayout();
    listAreaLayout.marginWidth = 0;
    parent.setLayout(listAreaLayout);
    resourceChooser.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
    resourceChooser.setContentProvider(new StandardJavaElementContentProvider());
    resourceChooser.setLabelProvider(new JavaElementLabelProvider());
    resourceChooser.setComparator(new JavaElementComparator());
    resourceChooser.addFilter(new JavaClassFileFilter());
    resourceChooser.setInput(JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()));
    resourceChooser.addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent event) {
            updatePageCompletion();
        }
    });
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) StandardJavaElementContentProvider(org.eclipse.jdt.ui.StandardJavaElementContentProvider) TreeViewer(org.eclipse.jface.viewers.TreeViewer) JavaClassFileFilter(org.whole.lang.ui.controls.JavaClassFileFilter) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) GridData(org.eclipse.swt.layout.GridData) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) JavaElementComparator(org.eclipse.jdt.ui.JavaElementComparator) JavaElementLabelProvider(org.eclipse.jdt.ui.JavaElementLabelProvider)

Aggregations

JavaElementComparator (org.eclipse.jdt.ui.JavaElementComparator)2 JavaElementLabelProvider (org.eclipse.jdt.ui.JavaElementLabelProvider)2 StandardJavaElementContentProvider (org.eclipse.jdt.ui.StandardJavaElementContentProvider)2 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)2 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)2 TreeViewer (org.eclipse.jface.viewers.TreeViewer)2 GridData (org.eclipse.swt.layout.GridData)2 GridLayout (org.eclipse.swt.layout.GridLayout)2 JavaClassFileFilter (org.whole.lang.ui.controls.JavaClassFileFilter)2