Bug 305161 Dynamic Path Variable ui.ide API review
Dynamic Path Variable ui.ide API review
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ImportTypeDialog.java
CompositeImageDescriptor desc = new AlignedCompositeImageDescriptor(fileDescriptor, folderDescriptor);
		folderAndFileImage = desc.createImage();
		desc = new AlignedCompositeImageDescriptor(linkedFileDescriptor, virtualFolderDescriptor);
		virtualFolderAndFileImage = desc.createImage();
		desc = new AlignedCompositeImageDescriptor(linkedFileDescriptor, linkedFolderDescriptor);
		linkedFolderAndFileImage = desc.createImage();
		
		IPreferenceStore store = IDEWorkbenchPlugin.getDefault().getPreferenceStore();
		if (store.getBoolean(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_RELATIVE))
			variable = preferredVariable;
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jface.dialogs.TrayDialog#close()
	 */
	public boolean close() {
		fileImage.dispose();
		linkedFileImage.dispose();
		folderAndFileImage.dispose();
		virtualFolderAndFileImage.dispose();
		linkedFolderAndFileImage.dispose();
		return super.close();
	}
	
	/**
	 * Get the user selection from the dialog.
	 * @return The current selection (one of IMPORT_COPY, IMPORT_VIRTUAL_FOLDERS_AND_LINKS, IMPORT_LINK and IMPORT_MOVE)
	 */
	public int getSelection() {
		return currentSelection;