Improved JDT Filtered PackageExplorer (for Eclipse 4.2.1)

less than 1 minute read

I updated my JDT Filtered Package Explorer. It should now also work with ‘Top Level Elements > Working Sets’ as top level and should also the native “Cancel” button of the platform.

Just for reference to use the native cancel you can implement your text fields with the following flags.


filtertext= new Text(newParent, SWT.SEARCH | SWT.ICON\_CANCEL); 
filtertext.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));

filtertext.addSelectionListener(new SelectionAdapter() { 
	public void widgetDefaultSelected(SelectionEvent e) { 
		filtertext.setText(""); 
		fProjectFilter.setSearchText(filtertext.getText()); 
		fViewer.refresh(); 
	} 
}); 

I basically re-wrote the whole code to use a ViewerFilter, so you may want to de-install the old one before installing the new one.

p2 Update Site:

http://www.vogella.com/updatesite/jdt

Updated: