use of org.eclipse.jface.dialogs.IDialogSettings in project translationstudio8 by heartsome.
the class ImportProjectWizardPage method restoreWidgetValues.
/**
* 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() {
// First, check to see if we have resore settings, and
// take care of the checkbox
IDialogSettings settings = getDialogSettings();
if (settings != null) {
// checkbox
copyFiles = settings.getBoolean(STORE_COPY_PROJECT_ID);
lastCopyFiles = copyFiles;
} else // most relevant part (directory / archive name)
if (initialPath != null) {
boolean dir = new File(initialPath).isDirectory();
if (!dir) {
archivePathField.setText(initialPath);
archivePathField.setSelection(initialPath.length());
}
}
}
use of org.eclipse.jface.dialogs.IDialogSettings in project translationstudio8 by heartsome.
the class KeysPreferencePage method getDialogSettings.
protected IDialogSettings getDialogSettings() {
IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault().getDialogSettings();
IDialogSettings settings = workbenchSettings.getSection(TAG_DIALOG_SECTION);
if (settings == null) {
settings = workbenchSettings.addNewSection(TAG_DIALOG_SECTION);
}
return settings;
}
use of org.eclipse.jface.dialogs.IDialogSettings in project translationstudio8 by heartsome.
the class FindReplaceDialog method getDialogSettings.
private IDialogSettings getDialogSettings() {
IDialogSettings settings = Activator.getDefault().getDialogSettings();
IDialogSettings fDialogSettings = settings.getSection(getClass().getName());
if (fDialogSettings == null)
fDialogSettings = settings.addNewSection(getClass().getName());
return fDialogSettings;
}
use of org.eclipse.jface.dialogs.IDialogSettings in project translationstudio8 by heartsome.
the class FindReplaceDialog method readDialogSettings.
private void readDialogSettings() {
IDialogSettings ids = getDialogSettings();
boolean blnDirection = ids.getBoolean("nattable.FindReplaceDialog.direction");
forwardButton.setSelection(!blnDirection);
backwardButton.setSelection(blnDirection);
boolean blnRange = ids.getBoolean("nattable.FindReplaceDialog.range");
sourceButton.setSelection(!blnRange);
targetButton.setSelection(blnRange);
caseSensitiveButton.setSelection(ids.getBoolean("nattable.FindReplaceDialog.caseSensitive"));
wholeWordButton.setSelection(ids.getBoolean("nattable.FindReplaceDialog.wholeWord"));
regExButton.setSelection(ids.getBoolean("nattable.FindReplaceDialog.regEx"));
String[] arrFindHistory = ids.getArray("nattable.FindReplaceDialog.findHistory");
if (arrFindHistory != null) {
lstFindHistory.clear();
for (int i = 0; i < arrFindHistory.length; i++) {
lstFindHistory.add(arrFindHistory[i]);
}
}
String[] arrReplaceHistory = ids.getArray("nattable.FindReplaceDialog.replaceHistory");
if (arrReplaceHistory != null) {
lstReplaceHistory.clear();
for (int i = 0; i < arrReplaceHistory.length; i++) {
lstReplaceHistory.add(arrReplaceHistory[i]);
}
}
}
use of org.eclipse.jface.dialogs.IDialogSettings in project translationstudio8 by heartsome.
the class FindReplaceDialog method getDialogBoundsSettings.
protected IDialogSettings getDialogBoundsSettings() {
//$NON-NLS-1$
String sectionName = getClass().getName() + "_dialogBounds";
IDialogSettings settings = Activator.getDefault().getDialogSettings();
IDialogSettings section = settings.getSection(sectionName);
if (section == null)
section = settings.addNewSection(sectionName);
return section;
}
Aggregations