當前位置: 首頁>>代碼示例>>Java>>正文


Java IDialogSettings.getArray方法代碼示例

本文整理匯總了Java中org.eclipse.jface.dialogs.IDialogSettings.getArray方法的典型用法代碼示例。如果您正苦於以下問題:Java IDialogSettings.getArray方法的具體用法?Java IDialogSettings.getArray怎麽用?Java IDialogSettings.getArray使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.dialogs.IDialogSettings的用法示例。


在下文中一共展示了IDialogSettings.getArray方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: restoreWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
/**
 * Restores control settings that were saved in the previous instance of this page.
 */
private void restoreWidgetValues() {
	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		String[] directoryNames = settings.getArray(getStoreDestinationNamesID());
		if (directoryNames == null) {
			return; // ie.- no settings stored
		}

		// destination
		setDestinationValue(directoryNames[0]);
		for (int i = 0; i < directoryNames.length; i++) {
			addDestinationItem(directoryNames[i]);
		}

		// options
		overwriteExistingFilesCheckbox.setSelection(settings.getBoolean(getStoreOverwriteExistingFilesID()));
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:22,代碼來源:AbstractExportToSingleFileWizardPage.java

示例2: saveWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
/**
 * Hook method for saving widget values for restoration by the next instance of this class.
 */
private void saveWidgetValues() {
	// update directory names history
	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		String[] directoryNames = settings.getArray(getStoreDestinationNamesID());
		if (directoryNames == null) {
			directoryNames = new String[0];
		}

		directoryNames = addToHistory(directoryNames, getTargetDirectory());
		settings.put(getStoreDestinationNamesID(), directoryNames);

		// options
		settings.put(getStoreOverwriteExistingFilesID(), overwriteExistingFilesCheckbox.getSelection());
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:20,代碼來源:AbstractExportToSingleFileWizardPage.java

示例3: internalSaveWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
@Override
protected void internalSaveWidgetValues() {

	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		// update directory names history
		String[] directoryNames = settings
				.getArray(STORE_EXPORT_DESTINATION_FOLDERS_ID);
		if (directoryNames == null) {
			directoryNames = new String[0];
		}

		directoryNames = addToHistory(directoryNames, getDestinationValue());
		settings.put(STORE_EXPORT_DESTINATION_FOLDERS_ID, directoryNames);

		// store checkbox - compress
		settings.put(STORE_EXPORT_COMPRESS_CONTENTS_ID, compressContentsCheckbox.getSelection());
	}

}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:21,代碼來源:ExportSelectionPage.java

示例4: restoreWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
@Override
protected void restoreWidgetValues() {
	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		String[] directoryNames = settings
				.getArray(STORE_EXPORT_DESTINATION_FOLDERS_ID);
		if (directoryNames == null || directoryNames.length == 0) {
			// ie.- no settings stored
		} else {

			// destination
			setDestinationValue(directoryNames[0]);
			for (int i = 0; i < directoryNames.length; i++) {
				addDestinationItem(directoryNames[i]);
			}
		}
		compressContentsCheckbox.setSelection(settings.getBoolean(STORE_EXPORT_COMPRESS_CONTENTS_ID));
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:20,代碼來源:ExportSelectionPage.java

示例5: internalSaveWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
/** save for next usage */
protected void internalSaveWidgetValues() {

	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		// update goals history
		String[] npmGoalLines = settings
				.getArray(STORE_NPM_GOAL);
		if (npmGoalLines == null) {
			npmGoalLines = new String[0];
		}

		npmGoalLines = addToHistory(npmGoalLines, getGoalValue());
		settings.put(STORE_NPM_GOAL, npmGoalLines);

		// store checkbox - compress
		settings.put(STORE_RUN_NPM_TOOL, runNpmCheckbox.getSelection());
	}

}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:21,代碼來源:NpmToolRunnerPage.java

示例6: restoreWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
@Override
protected void restoreWidgetValues() {
	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		String[] npmGoalLines = settings
				.getArray(STORE_NPM_GOAL);
		if (npmGoalLines == null || npmGoalLines.length == 0) {
			// ie.- no settings stored
		} else {

			// destination
			setGoalValue(npmGoalLines[0]);
			for (int i = 0; i < npmGoalLines.length; i++) {
				addGoalItem(npmGoalLines[i]);
			}
		}
		runNpmCheckbox.setSelection(settings.getBoolean(STORE_RUN_NPM_TOOL));
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:20,代碼來源:NpmToolRunnerPage.java

示例7: saveWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
/**
 * Saves the widget values for the next time
 */
private void saveWidgetValues() {
	// Update history
	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
	    if (showCredentials) {
			String[] userNames = settings.getArray(STORE_USERNAME_ID);
			if (userNames == null) userNames = new String[0];
			userNames = addToHistory(userNames, userCombo.getText());
			settings.put(STORE_USERNAME_ID, userNames);
	    }
		String[] hostNames = settings.getArray(STORE_URL_ID);
		if (hostNames == null) hostNames = new String[0];
		hostNames = addToHistory(hostNames, urlCombo.getText());
		settings.put(STORE_URL_ID, hostNames);
	}
}
 
開發者ID:subclipse,項目名稱:subclipse,代碼行數:20,代碼來源:ConfigurationWizardMainPage.java

示例8: restoreWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
private void restoreWidgetValues() {
  String descr = UIMessages.ImportSessionPage1Description_value;
  Object[] arg = new Object[] { new Date() };
  descriptiontext.setText(MessageFormat.format(descr, arg));
  IDialogSettings settings = getDialogSettings();
  boolean binaries = settings.getBoolean(STORE_BINARIES);
  scopeviewer.setIncludeBinaries(binaries);
  binariescheck.setSelection(binaries);
  String[] classes = settings.getArray(STORE_SCOPE);
  if (classes != null) {
    scopeviewer
        .setSelectedScope(ScopeUtils.readScope(Arrays.asList(classes)));
  }
}
 
開發者ID:eclipse,項目名稱:eclemma,代碼行數:15,代碼來源:SessionImportPage2.java

示例9: restoreCombo

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
/**
 * Restores the items of a combo box.
 *
 * @param settings
 *          dialog setting used to persist the history
 * @param key
 *          key used for this combo box
 * @param combo
 *          the combo box
 */
public static void restoreCombo(IDialogSettings settings, String key,
    Combo combo) {
  String[] destinations = settings.getArray(key);
  if (destinations != null) {
    combo.setItems(destinations);
    if (destinations.length > 0) {
      combo.setText(destinations[0]);
    }
  }
}
 
開發者ID:eclipse,項目名稱:eclemma,代碼行數:21,代碼來源:WidgetHistory.java

示例10: initializeValues

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
/**
 * Initializes states of the controls.
 */
private void initializeValues() {
	// Set remembered values
	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		String[] hostNames = settings.getArray(STORE_URL_ID);
		if (hostNames != null) {
			for (int i = 0; i < hostNames.length; i++) {
				urlCombo.add(hostNames[i]);
			}
		}
		if (showCredentials) {
			String[] userNames = settings.getArray(STORE_USERNAME_ID);
			if (userNames != null) {
				for (int i = 0; i < userNames.length; i++) {
					userCombo.add(userNames[i]);
				}
			}
		}
	}
	
	if(properties != null) {
	    if (showCredentials) {
			String user = properties.getProperty("user"); //$NON-NLS-1$
			if (user != null) {
				userCombo.setText(user);
			}
	
			String password = properties.getProperty("password"); //$NON-NLS-1$
			if (password != null) {
				passwordText.setText(password);
			}
	    }
		String host = properties.getProperty("url"); //$NON-NLS-1$
		if (host != null) {
			urlCombo.setText(host);
		}
	}
}
 
開發者ID:subclipse,項目名稱:subclipse,代碼行數:42,代碼來源:ConfigurationWizardMainPage.java

示例11: editPressed

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
private void editPressed() {
	if (getSelected() == null) return;
	
	String result = this.getSelected();
	IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
	String [] saveArray = settings.getArray(result);
	SootSavedConfiguration ssc = new SootSavedConfiguration(result, saveArray);
	setEditDefs(ssc.toHashMapFromArray());
	displayOptions(result, getMainClass(result));
	
			
}
 
開發者ID:flankerhqd,項目名稱:JAADAS,代碼行數:13,代碼來源:SootConfigManagerDialog.java


注:本文中的org.eclipse.jface.dialogs.IDialogSettings.getArray方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。