Bug 60257 SearchPattern API: R_CASE_SENSITIVE vs. boolean isCaseSensitive
The SearchPattern API for stringPattern searches to java elements is somewhat odd: There's a public constant R_CASE_SENSITIVE, which is not mentioned in the javadoc of createPattern(String stringPattern, int searchFor, int limitTo, int matchMode, boolean isCaseSensitive) , and there's also an extra boolean parameter isCaseSensitive. I don't see why R_CASE_SENSITIVE is made public if it should not be used by clients. On the other hand, it could also be turned into an official bit-flag and the boolean isCaseSensitive removed. To have both options seems strange to me.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/PackageSelectionDialog.java
return CANCEL;
		}
		
		if (packageList.isEmpty()) {
			String title= JavaUIMessages.getString("PackageSelectionDialog.nopackages.title"); 
			String message= JavaUIMessages.getString("PackageSelectionDialog.nopackages.message"); 
			MessageDialog.openInformation(getShell(), title, message);
			return CANCEL;
		}
		
		setElements(packageList.toArray());
		return super.open();
	}
	
	
	/*
	 * @see org.eclipse.jface.window.Window#configureShell(Shell)
	 */
	protected void configureShell(Shell newShell) {
		super.configureShell(newShell);
		WorkbenchHelp.setHelp(newShell, IJavaHelpContextIds.OPEN_PACKAGE_DIALOG);
	}
	/*
	 * @see Window#close()
	 */
	public boolean close() {
		writeSettings();
		return super.close();
	}