Bug 25845 Support for manually attaching source to a class path container
From Dejan: There is a work item on the ability to manually attach source to classpath entries managed by classpath container. We discussed it and we have workable options but we would like if we can have it by M3 because we want to start self-hosting using classpath containers ourselves.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SourceAttachmentPropertyPage.java
private SourceAttachmentBlock fSourceAttachmentBlock;
	private IPackageFragmentRoot fJarRoot;
	public SourceAttachmentPropertyPage() {
	}
	
	/*
	 * @see PreferencePage#createContents
	 */
	protected Control createContents(Composite composite) {
		initializeDialogUnits(composite);
		WorkbenchHelp.setHelp(composite, IJavaHelpContextIds.SOURCE_ATTACHMENT_PROPERTY_PAGE);		
		fJarRoot= getJARPackageFragmentRoot();
		if (fJarRoot == null) {
			return createMessageContent(composite, PreferencesMessages.getString("SourceAttachmentPropertyPage.noarchive.message"));  
		}
		try {
			IClasspathEntry entry= fJarRoot.getRawClasspathEntry();
			if (entry == null) {
				
				entry= JavaCore.newLibraryEntry(fJarRoot.getPath(), null, null);
			} else if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
				IClasspathContainer container= JavaCore.getClasspathContainer(entry.getPath(), fJarRoot.getJavaProject());
				String containerName= container != null ? container.getDescription() : entry.getPath().toString();
				return createMessageContent(composite, PreferencesMessages.getFormattedString("SourceAttachmentPropertyPage.containerentry.message", containerName));  
			}
			IWorkspaceRoot wsroot= fJarRoot.getJavaModel().getWorkspace().getRoot();
			fSourceAttachmentBlock= new SourceAttachmentBlock(wsroot, this, entry);