use of org.eclipse.jdt.ui.JavaElementComparator in project liferay-ide by liferay.
the class ProjectSelectionDialog method createDialogArea.
/**
* (non-Javadoc) Method declared on Dialog.
*/
protected Control createDialogArea(Composite parent) {
// page group
Composite composite = (Composite) super.createDialogArea(parent);
Font font = parent.getFont();
composite.setFont(font);
createMessageArea(composite);
fTableViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
fTableViewer.addPostSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
updateOKButtonState(event);
}
});
addSelectionButtons(composite);
GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
data.heightHint = _sizingSelectionWidgetHeight;
data.widthHint = _sizingSelectionWidgetWidth;
fTableViewer.getTable().setLayoutData(data);
fTableViewer.setLabelProvider(new JavaElementLabelProvider());
fTableViewer.setContentProvider(getContentProvider());
fTableViewer.setComparator(new JavaElementComparator());
fTableViewer.getControl().setFont(font);
updateFilter(true);
IJavaModel input = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
fTableViewer.setInput(input);
initialize();
_selectionChanged(new Object[0]);
Dialog.applyDialogFont(composite);
return composite;
}
use of org.eclipse.jdt.ui.JavaElementComparator 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();
}
});
}
use of org.eclipse.jdt.ui.JavaElementComparator 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();
}
});
}
use of org.eclipse.jdt.ui.JavaElementComparator in project whole by wholeplatform.
the class ClassBrowseChooser method createDialog.
protected Dialog createDialog() {
StandardJavaElementContentProvider provider = new StandardJavaElementContentProvider();
ILabelProvider labelProvider = new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT);
ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), labelProvider, provider);
dialog.setTitle("Package selection");
dialog.setMessage("Choose a package fragment");
dialog.setComparator(new JavaElementComparator());
dialog.addFilter(new JavaPackageFragmentFilter());
dialog.setValidator(new JavaPackageFragmentValidator());
dialog.setInput(JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()));
dialog.setHelpAvailable(false);
return dialog;
}
use of org.eclipse.jdt.ui.JavaElementComparator in project whole by wholeplatform.
the class PackageFragmentBrowseChooser method createDialog.
protected Dialog createDialog() {
StandardJavaElementContentProvider provider = new StandardJavaElementContentProvider();
ILabelProvider labelProvider = new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT);
ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), labelProvider, provider);
dialog.setTitle("Packcage selection");
dialog.setMessage("Choose a package fragment");
dialog.setComparator(new JavaElementComparator());
dialog.addFilter(new JavaPackageFragmentFilter());
dialog.setValidator(new JavaPackageFragmentValidator());
dialog.setInput(JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()));
dialog.setHelpAvailable(false);
return dialog;
}
Aggregations