Bug 29805 Resolve end symbol problem in Open Type dialog
Build I20030115 Here is the proposal we want to implement (it is pretty much what Randy Hudson proposed): The user must explicitly disable the adding of the wildcard by using a special end symbol. But instead of using the '.' JDT proposes to use the % character. Here are the reasons: - '.' is used in fully qualified name as a separator. The open type dialog already supports entering qualified names (e.g. junit.framework.* shows all types in the framework package). So it will be confusing if we use it as the end symbol as well. - '$' is used by various Unix tools (grep, ...) to denote the end symbol, but it is as legal character inside a Java identifier. Some generated classes inside rt.jar contain a $ character. - so we have to use a character that is not a legal character for Java identifiers. We tried several operators and we decide to go for the % since it is easy to recognize and easy to type. I have opened the bug to further track this issue. Please add comments to this bug instead of replying to this post since bugs are easier trackable.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
int result= leftString.compareToIgnoreCase(rightString);			
			if (result == 0)
				result= leftString.compareTo(rightString);
			return result;
	    }
	}
	private IRunnableContext fRunnableContext;
	private IJavaSearchScope fScope;
	private int fElementKinds;
	
	/**
	 * Constructs a type selection dialog.
	 * @param parent  the parent shell.
	 * @param context the runnable context.
	 * @param elementKinds <code>IJavaSearchConstants.CLASS</code>, <code>IJavaSearchConstants.INTERFACE</code>
	 * or <code>IJavaSearchConstants.TYPE</code>
	 * @param scope   the java search scope.
	 */
	public TypeSelectionDialog(Shell parent, IRunnableContext context, int elementKinds, IJavaSearchScope scope) {
		super(parent, new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_TYPE_ONLY),
			new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_TYPE_CONTAINER_ONLY + TypeInfoLabelProvider.SHOW_ROOT_POSTFIX));
		Assert.isNotNull(context);
		Assert.isNotNull(scope);
		fRunnableContext= context;
		fScope= scope;
		fElementKinds= elementKinds;
		
		setUpperListLabel(JavaUIMessages.getString("TypeSelectionDialog.upperLabel")); 
		setLowerListLabel(JavaUIMessages.getString("TypeSelectionDialog.lowerLabel")); 
	}