else { fSourceContainerPage= new SourceContainerWorkbookPage(fWorkspaceRoot, fClassPathList, fBuildPathDialogField); item.setData(fSourceContainerPage); item.setControl(fSourceContainerPage.getControl(folder)); }
item.setData(fSourceContainerPage); item.setControl(fSourceContainerPage.getControl(folder));
	public Control createControl(Composite parent) {		fSWTWidget= parent;				PixelConverter converter= new PixelConverter(parent);				Composite composite= new Composite(parent, SWT.NONE);					GridLayout layout= new GridLayout();		layout.marginWidth= 0;		layout.numColumns= 1;				composite.setLayout(layout);				TabFolder folder= new TabFolder(composite, SWT.NONE);		folder.setLayout(new TabFolderLayout());			folder.setLayoutData(new GridData(GridData.FILL_BOTH));				TabItem item;        item= new TabItem(folder, SWT.NONE);        item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.source")); //$NON-NLS-1$        item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_PACKFRAG_ROOT));		        if (fUseNewPage) {            fNewSourceContainerPage= new NewSourceContainerWorkbookPage(fClassPathList, fBuildPathDialogField, fRunnableContext);            item.setData(fNewSourceContainerPage);                 item.setControl(fNewSourceContainerPage.getControl(folder));        }        else {            fSourceContainerPage= new SourceContainerWorkbookPage(fWorkspaceRoot, fClassPathList, fBuildPathDialogField);            item.setData(fSourceContainerPage);                 item.setControl(fSourceContainerPage.getControl(folder));        }				IWorkbench workbench= JavaPlugin.getDefault().getWorkbench();			Image projectImage= workbench.getSharedImages().getImage(IDE.SharedImages.IMG_OBJ_PROJECT);				fProjectsPage= new ProjectsWorkbookPage(fClassPathList);				item= new TabItem(folder, SWT.NONE);		item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.projects")); //$NON-NLS-1$		item.setImage(projectImage);		item.setData(fProjectsPage);		item.setControl(fProjectsPage.getControl(folder));				fLibrariesPage= new LibrariesWorkbookPage(fWorkspaceRoot, fClassPathList);				item= new TabItem(folder, SWT.NONE);		item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.libraries")); //$NON-NLS-1$		item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_LIBRARY));		item.setData(fLibrariesPage);		item.setControl(fLibrariesPage.getControl(folder));				// a non shared image		Image cpoImage= JavaPluginImages.DESC_TOOL_CLASSPATH_ORDER.createImage();		composite.addDisposeListener(new ImageDisposer(cpoImage));					ClasspathOrderingWorkbookPage ordpage= new ClasspathOrderingWorkbookPage(fClassPathList);				item= new TabItem(folder, SWT.NONE);		item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.order")); //$NON-NLS-1$		item.setImage(cpoImage);		item.setData(ordpage);		item.setControl(ordpage.getControl(folder));						if (fCurrJProject != null) {            if (fSourceContainerPage != null)                fSourceContainerPage.init(fCurrJProject);            else                fNewSourceContainerPage.init(fCurrJProject);			fLibrariesPage.init(fCurrJProject);			fProjectsPage.init(fCurrJProject);		}										Composite editorcomp= new Composite(composite, SWT.NONE);				DialogField[] editors= new DialogField[] { fBuildPathDialogField };		LayoutUtil.doDefaultLayout(editorcomp, editors, true, 0, 0);				int maxFieldWidth= converter.convertWidthInCharsToPixels(40);		LayoutUtil.setWidthHint(fBuildPathDialogField.getTextControl(null), maxFieldWidth);		LayoutUtil.setHorizontalGrabbing(fBuildPathDialogField.getTextControl(null));			editorcomp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));				folder.setSelection(fPageIndex);		fCurrPage= (BuildPathBasePage) folder.getItem(fPageIndex).getData();		folder.addSelectionListener(new SelectionAdapter() {			public void widgetSelected(SelectionEvent e) {				tabChanged(e.item);			}			});				PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.BUILD_PATH_BLOCK);						Dialog.applyDialogFont(composite);		return composite;	}