plugins/org.wso2.developerstudio.eclipse.distribution.project/src/org/wso2/developerstudio/eclipse/distribution/project/ui/wizard/ProjectsImportPage.java
/**
	 * Use the dialog store to restore widget values to the values that they held
	 * last time this wizard was used to completion, or alternatively, if an initial
	 * path is specified, use it to select values.
	 * 
	 * Method declared public only for use of tests.
	 */
Use the dialog store to restore widget values to the values that they held
last time this wizard was used to completion, or alternatively, if an initial
path is specified, use it to select values.

Method declared public only for use of tests.
Use the dialog store to restore widget values to the values that they held last time this wizard was used to completion or alternatively if an initial path is specified use it to select values . Method declared public only for use of tests .
public void restoreWidgetValues() {
		IDialogSettings settings = getDialogSettings();
		if (settings != null) {
			copyFiles = settings.getBoolean(STORE_COPY_PROJECT_ID);
			copyCheckbox.setSelection(copyFiles);
		}
		if (initialPath == null && settings != null) {
			boolean archiveSelected = settings.getBoolean(STORE_ARCHIVE_SELECTED);
			projectFromDirectoryRadio.setSelection(!archiveSelected);
			projectFromArchiveRadio.setSelection(archiveSelected);
			if (archiveSelected) {
				archiveRadioSelected();
			} else {
				directoryRadioSelected();
			}
		}
		else if (initialPath != null) {
			boolean dir = new File(initialPath).isDirectory();
			projectFromDirectoryRadio.setSelection(dir);
			projectFromArchiveRadio.setSelection(!dir);
			if (dir) {
				directoryPathField.setText(initialPath);
				directoryPathField.setSelection(initialPath.length());
				directoryRadioSelected();
			} else {
				archivePathField.setText(initialPath);
				archivePathField.setSelection(initialPath.length());
				archiveRadioSelected();
			}
		}
	}
public void restoreWidgetValues ( ) { IDialogSettings settings = getDialogSettings ( ) ; if ( settings != null ) { copyFiles = settings . getBoolean ( STORE_COPY_PROJECT_ID ) ; copyCheckbox . setSelection ( copyFiles ) ; } if ( initialPath == null && settings != null ) { boolean archiveSelected = settings . getBoolean ( STORE_ARCHIVE_SELECTED ) ; projectFromDirectoryRadio . setSelection ( ! archiveSelected ) ; projectFromArchiveRadio . setSelection ( archiveSelected ) ; if ( archiveSelected ) { archiveRadioSelected ( ) ; } else { directoryRadioSelected ( ) ; } } else if ( initialPath != null ) { boolean dir = new File ( initialPath ) . isDirectory ( ) ; projectFromDirectoryRadio . setSelection ( dir ) ; projectFromArchiveRadio . setSelection ( ! dir ) ; if ( dir ) { directoryPathField . setText ( initialPath ) ; directoryPathField . setSelection ( initialPath . length ( ) ) ; directoryRadioSelected ( ) ; } else { archivePathField . setText ( initialPath ) ; archivePathField . setSelection ( initialPath . length ( ) ) ; archiveRadioSelected ( ) ; } } }
Use the dialog store to restore widget values to the values that they held
 last time this wizard was used to completion, or alternatively, if an initial
 path is specified, use it to select values.
Use the dialog store to restore widget values to the values that they held last time this wizard was used to completion or alternatively if an initial path is specified use it to select values .
// First, check to see if we have resore settings, and // take care of the checkbox // checkbox // Second, check to see if we don't have an initial path, // and if we do have restore settings. If so, set the // radio selection properly to restore settings // radio selection // Third, if we do have an initial path, set the proper // path and radio buttons to the initial value. Move // cursor to the end of the path so user can see the // most relevant part (directory / archive name)