Bug 93105 Remove unnecessary APIs on BindingKey
I20050426-1700 After discussions with JDT/UI, we came to conclusion that the following 3.1 APIs on BindingKey are not suitable; since they may cache element structural information into keys, leaving clients with difficult decisions as to whether to trust the key or the element. - BindingKey#getDeclaringTypeSignature() - BindingKey#toSignature() The only interest for having these APIs on the key is to cache some information avoiding populating the model, and is not mandated by the normal binding key contract, i.e. identify uniquely a type binding. Therefore, they should not be added . If such information was requested again, it should end up in a different spot. Something we could imagine post 3.1 is to precache this information directly into Java elements (pre/partially initialized element infos), and hiding the complexity to clients who could blindly trust the elements to reflect reality.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabels.java
}
	
	private static String getPkgNamePatternForPackagesView() {
		IPreferenceStore store= PreferenceConstants.getPreferenceStore();
		if (!store.getBoolean(PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES))
			return ""; 
		return store.getString(PreferenceConstants.APPEARANCE_PKG_NAME_PATTERN_FOR_PKG_VIEW);
	}
	
	/**
	 * Returns the label of a classpath container
	 * @param containerPath The path of the container.
	 * @param project The project the contaienr is resolved in.
	 * @return Returns the label of the classpath container
	 * @throws JavaModelException Thrown when the resolving of the container failed.
	 */
	public static String getContainerEntryLabel(IPath containerPath, IJavaProject project) throws JavaModelException {
		IClasspathContainer container= JavaCore.getClasspathContainer(containerPath, project);
		if (container != null) {
			return container.getDescription();
		}
		ClasspathContainerInitializer initializer= JavaCore.getClasspathContainerInitializer(containerPath.segment(0));
		if (initializer != null) {
			return initializer.getDescription(containerPath, project);
		}
		return containerPath.toString();
	}
	
}