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


Java IDialogSettings.get方法代碼示例

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


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

示例1: initializeWidgetState

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
/**
 * Initialize any state related to the widgetry that should be set up each
 * time widgets are created.
 */
private void initializeWidgetState() {
	menuManager = null;
	dialogArea = null;
	titleLabel = null;
	titleSeparator = null;
	infoSeparator = null;
	infoLabel = null;
	toolBar = null;

	// If the menu item for persisting bounds is displayed, use the stored
	// value to determine whether any persisted bounds should be honored at
	// all.
	if (showDialogMenu && showPersistActions) {
		IDialogSettings settings = getDialogSettings();
		if (settings != null) {
			String key = getClass().getName() + DIALOG_USE_PERSISTED_SIZE;
			if (settings.get(key) != null || !isUsing34API)
				persistSize = settings.getBoolean(key);
			key = getClass().getName() + DIALOG_USE_PERSISTED_LOCATION;
			if (settings.get(key) != null || !isUsing34API)
				persistLocation = settings.getBoolean(key);
		}
	}
}
 
開發者ID:sergueik,項目名稱:SWET,代碼行數:29,代碼來源:PopupDialog.java

示例2: migrateBoundsSetting

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
private void migrateBoundsSetting() {
	IDialogSettings settings = getDialogSettings();
	if (settings == null)
		return;

	final String className = getClass().getName();

	String key = className + DIALOG_USE_PERSISTED_BOUNDS;
	String value = settings.get(key);
	if (value == null || DIALOG_VALUE_MIGRATED_TO_34.equals(value))
		return;

	boolean storeBounds = settings.getBoolean(key);
	settings.put(className + DIALOG_USE_PERSISTED_LOCATION, storeBounds);
	settings.put(className + DIALOG_USE_PERSISTED_SIZE, storeBounds);
	settings.put(key, DIALOG_VALUE_MIGRATED_TO_34);
}
 
開發者ID:sergueik,項目名稱:SWET,代碼行數:18,代碼來源:PopupDialog.java

示例3: LinkDialog

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
public LinkDialog(
    final Shell parentShell,
    final WorkItem workItem,
    final LinkUIRegistry linkUiRegistry,
    final WIFormLinksControlOptions linksControlOptions) {
    super(parentShell);
    this.workItem = workItem;
    this.linkCollection = workItem.getLinks();
    this.linkUiRegistry = linkUiRegistry;
    this.linksControlOptions = linksControlOptions;

    final IDialogSettings uiSettings = TFSCommonUIClientPlugin.getDefault().getDialogSettings();
    final IDialogSettings dialogSettings = uiSettings.getSection(DIALOG_SETTINGS_SECTION_KEY);
    if (dialogSettings != null) {
        initialLinkTypeName = dialogSettings.get(DIALOG_SETTINGS_LINK_TYPE_KEY);
    }
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:18,代碼來源:LinkDialog.java

示例4: NewLinkedWorkItemDialog

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
public NewLinkedWorkItemDialog(
    final Shell shell,
    final WorkItem hostWorkItem,
    final WIFormLinksControlOptions linksControlOptions) {
    super(shell);
    this.hostWorkItem = hostWorkItem;
    client = hostWorkItem.getClient();
    this.linksControlOptions = linksControlOptions;
    witVersionSupportsWILinks = client.supportsWorkItemLinkTypes();

    final IDialogSettings uiSettings = TFSCommonUIClientPlugin.getDefault().getDialogSettings();
    final IDialogSettings dialogSettings = uiSettings.getSection(DIALOG_SETTINGS_SECTION_KEY);
    if (dialogSettings != null) {
        initialLinkTypeName = dialogSettings.get(DIALOG_SETTINGS_LINK_TYPE_KEY);
        initialWorkItemTypeName = dialogSettings.get(DIALOG_SETTINGS_WORKITEM_TYPE_KEY);
    }
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:18,代碼來源:NewLinkedWorkItemDialog.java

示例5: runPressed

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
private void runPressed() {
	super.okPressed();
	if (getSelected() == null) return;
	
	IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
	String mainClass = settings.get(getSelected()+"_mainClass");
	
	if (getLauncher() instanceof SootConfigProjectLauncher) {
		((SootConfigProjectLauncher)getLauncher()).launch(getSelected(), mainClass);
	}
	else if (getLauncher() instanceof SootConfigJavaProjectLauncher){
		((SootConfigJavaProjectLauncher)getLauncher()).launch(getSelected(), mainClass);
	}
	else if (getLauncher() instanceof SootConfigFileLauncher) {
		((SootConfigFileLauncher)getLauncher()).launch(getSelected(), mainClass);
	}
	else if (getLauncher() instanceof SootConfigFromJavaFileLauncher){
		((SootConfigFromJavaFileLauncher)getLauncher()).launch(getSelected(), mainClass);
	}
	
	
}
 
開發者ID:flankerhqd,項目名稱:JAADAS,代碼行數:23,代碼來源:SootConfigManagerDialog.java

示例6: createPageControls

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
@Override
public void createPageControls(Composite pageContainer) {
	super.createPageControls(pageContainer);

	IDialogSettings dialogSettings = this.getDialogSettings();

	if (null != dialogSettings.get(CREATE_GREETER_SETTINGS_KEY)) {
		projectInfo.setCreateGreeterFile(dialogSettings.getBoolean(CREATE_GREETER_SETTINGS_KEY));
	}
	if (null != dialogSettings.get(VENDOR_ID_SETTINGS_KEY)) {
		projectInfo.setVendorId(dialogSettings.get(VENDOR_ID_SETTINGS_KEY));
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:14,代碼來源:SimpleN4MFNewProjectWizard.java

示例7: readFormat

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
private ExportFormat readFormat(IDialogSettings settings) {
  final String format = settings.get(STORE_FORMAT);
  if (format != null) {
    try {
      return ExportFormat.valueOf(format);
    } catch (IllegalArgumentException e) {
      // we fall-back to default
    }
  }
  return ExportFormat.HTML;
}
 
開發者ID:eclipse,項目名稱:eclemma,代碼行數:12,代碼來源:SessionExportPage1.java

示例8: getInitialInput

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
private SootConfiguration getInitialInput() {
	
	IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
	int numConfig = 0;
	try {
		numConfig = settings.getInt(Messages.getString("SootConfigManagerDialog.config_count")); //$NON-NLS-1$
	}
	catch(NumberFormatException e) {
	}

	SootConfiguration root = new SootConfiguration(""); //$NON-NLS-1$
	
	if (numConfig != 0) {		
		String [] configNames = new String[numConfig];
		
			
		for (int i = 0; i < numConfig; i++) {
			configNames[i] = settings.get(Messages.getString("SootConfigManagerDialog.soot_run_config")+(i+1)); //$NON-NLS-1$
			root.addChild(new SootConfiguration(configNames[i]));
		}
	
		
	}
	setTreeRoot(root);

	return root;
}
 
開發者ID:flankerhqd,項目名稱:JAADAS,代碼行數:28,代碼來源:SootConfigManagerDialog.java

示例9: getMainClass

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
private String getMainClass(String configName){
 IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
 String mainClass = settings.get(configName+"_mainClass");
 if ((mainClass == null) || (mainClass.length() == 0)){
 	return "soot.Main";
 }
 else {
 	return mainClass;
 }	
}
 
開發者ID:flankerhqd,項目名稱:JAADAS,代碼行數:11,代碼來源:SootConfigManagerDialog.java

示例10: restoreDialog

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
/**
 * Restores dialog using persisted settings. The default implementation
 * restores the status of the details line and the selection history.
 *
 * @param settings
 *            settings used to restore dialog
 */
protected void restoreDialog(IDialogSettings settings) {
	boolean toggleStatusLine = true;

	if (settings.get(SHOW_STATUS_LINE) != null) {
		toggleStatusLine = settings.getBoolean(SHOW_STATUS_LINE);
	}

	toggleStatusLineAction.setChecked(toggleStatusLine);

	details.setVisible(toggleStatusLine);

	String setting = settings.get(HISTORY_SETTINGS);
	if (setting != null) {
		try {
			IMemento memento = XMLMemento.createReadRoot(new StringReader(
					setting));
			this.contentProvider.loadHistory(memento);
		} catch (WorkbenchException e) {
			// Simply don't restore the settings
			StatusManager
					.getManager()
					.handle(
							new Status(
									IStatus.ERROR,
									PlatformUI.PLUGIN_ID,
									IStatus.ERROR,
									WorkbenchMessages.FilteredItemsSelectionDialog_restoreError,
									e));
		}
	}
}
 
開發者ID:tlaplus,項目名稱:tlaplus,代碼行數:39,代碼來源:FilteredItemsSelectionDialog.java

示例11: getDialogSettings

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
protected IDialogSettings getDialogSettings() {
	final IDialogSettings settings = Activator.getDefault().getDialogSettings();
	if (settings.get(SHOW_CONSTANTS) == null) {
		// Show constants by default
		settings.put(SHOW_CONSTANTS, true);
	}
	return settings;
}
 
開發者ID:tlaplus,項目名稱:tlaplus,代碼行數:9,代碼來源:TLAFilteredItemsSelectionDialog.java

示例12: ProjectImportWizardController

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
public ProjectImportWizardController(IWizard projectImportWizard) {
    // assemble configuration object that serves as the data model of the wizard
    Validator<File> projectDirValidator = Validators.and(
            Validators.requiredDirectoryValidator("Project root directory"),
            Validators.nonWorkspaceFolderValidator("Project root directory"));
    Validator<GradleDistributionWrapper> gradleDistributionValidator = GradleDistributionValidator.gradleDistributionValidator();
    Validator<Boolean> applyWorkingSetsValidator = Validators.nullValidator();
    Validator<List<String>> workingSetsValidator = Validators.nullValidator();
    Validator<File> gradleUserHomeValidator = Validators.optionalDirectoryValidator("Gradle user home");

    this.configuration = new ProjectImportConfiguration(projectDirValidator, gradleDistributionValidator, gradleUserHomeValidator, applyWorkingSetsValidator, workingSetsValidator);

    // initialize values from the persisted dialog settings
    IDialogSettings dialogSettings = projectImportWizard.getDialogSettings();
    Optional<File> projectDir = FileUtils.getAbsoluteFile(dialogSettings.get(SETTINGS_KEY_PROJECT_DIR));
    Optional<String> gradleDistributionType = Optional.fromNullable(Strings.emptyToNull(dialogSettings.get(SETTINGS_KEY_GRADLE_DISTRIBUTION_TYPE)));
    Optional<String> gradleDistributionConfiguration = Optional.fromNullable(Strings.emptyToNull(dialogSettings.get(SETTINGS_KEY_GRADLE_DISTRIBUTION_CONFIGURATION)));
    Optional<File> gradleUserHome = FileUtils.getAbsoluteFile(dialogSettings.get(SETTINGS_KEY_GRADLE_USER_HOME));
    boolean applyWorkingSets = dialogSettings.get(SETTINGS_KEY_APPLY_WORKING_SETS) != null && dialogSettings.getBoolean(SETTINGS_KEY_APPLY_WORKING_SETS);
    List<String> workingSets = ImmutableList.copyOf(CollectionsUtils.nullToEmpty(dialogSettings.getArray(SETTINGS_KEY_WORKING_SETS)));
    boolean buildScansEnabled = dialogSettings.getBoolean(SETTINGS_KEY_BUILD_SCANS);
    boolean offlineMode = dialogSettings.getBoolean(SETTINGS_KEY_OFFLINE_MODE);

    this.configuration.setProjectDir(projectDir.orNull());
    this.configuration.setOverwriteWorkspaceSettings(false);
    this.configuration.setGradleDistribution(createGradleDistribution(gradleDistributionType, gradleDistributionConfiguration));
    this.configuration.setGradleUserHome(gradleUserHome.orNull());
    this.configuration.setApplyWorkingSets(applyWorkingSets);
    this.configuration.setWorkingSets(workingSets);
    this.configuration.setBuildScansEnabled(buildScansEnabled);
    this.configuration.setOfflineMode(offlineMode);

    // store the values every time they change
    saveFilePropertyWhenChanged(dialogSettings, SETTINGS_KEY_PROJECT_DIR, this.configuration.getProjectDir());
    saveGradleWrapperPropertyWhenChanged(dialogSettings, this.configuration.getGradleDistribution());
    saveFilePropertyWhenChanged(dialogSettings, SETTINGS_KEY_GRADLE_USER_HOME, this.configuration.getGradleUserHome());
    saveBooleanPropertyWhenChanged(dialogSettings, SETTINGS_KEY_APPLY_WORKING_SETS, this.configuration.getApplyWorkingSets());
    saveStringArrayPropertyWhenChanged(dialogSettings, SETTINGS_KEY_WORKING_SETS, this.configuration.getWorkingSets());
    saveBooleanPropertyWhenChanged(dialogSettings, SETTINGS_KEY_BUILD_SCANS, this.configuration.getBuildScansEnabled());
    saveBooleanPropertyWhenChanged(dialogSettings, SETTINGS_KEY_OFFLINE_MODE, this.configuration.getOfflineMode());
}
 
開發者ID:gluonhq,項目名稱:ide-plugins,代碼行數:42,代碼來源:ProjectImportWizardController.java

示例13: getDebugInfo

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
public static String getDebugInfo(final String dialogSettingsKey) {
    final IDialogSettings settings = getDialogSettings(dialogSettingsKey);

    long averageOpenTime = -1;
    long timeCounts = 0;

    try {
        timeCounts = settings.getInt(TIME_COUNTS);
        averageOpenTime = settings.getLong(ACCUMULATED_OPEN_TIME) / timeCounts;
    } catch (final NumberFormatException ex) {
        averageOpenTime = -1;
    }

    return

    "stored origin (" //$NON-NLS-1$
        + settings.get(DIALOG_ORIGIN_X)
        + "," //$NON-NLS-1$
        + settings.get(DIALOG_ORIGIN_Y)
        + ")" //$NON-NLS-1$
        + NEWLINE
        + "stored size (" //$NON-NLS-1$
        + settings.get(DIALOG_WIDTH)
        + "," //$NON-NLS-1$
        + settings.get(DIALOG_HEIGHT)
        + ")" //$NON-NLS-1$
        + NEWLINE
        + "views: " //$NON-NLS-1$
        + settings.get(VIEWS)
        + NEWLINE
        +

    ((averageOpenTime != -1) ? "average display time: " //$NON-NLS-1$
        + averageOpenTime
        + " ms (" //$NON-NLS-1$
        + timeCounts
        + " records)" //$NON-NLS-1$
        + NEWLINE : "") //$NON-NLS-1$
        + "since " //$NON-NLS-1$
        + settings.get(SINCE);
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:42,代碼來源:DialogSettingsHelper.java

示例14: restoreViewFromPreviousSession

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
/**
 * Allows to restore the plugin's view as it was in a previous session of Eclipse.
 */
private void restoreViewFromPreviousSession() {
	IDialogSettings settings = Notepad4e.getDefault().getDialogSettings();
	IDialogSettings section = settings.getSection(ID);
	if (section == null) {
		section = settings.addNewSection(ID);
	}

	int numOfTabs = 0;
	String numOfTabsString = section.get(STORE_COUNT_KEY);
	// numOfTabsString can be null if plugin was not previously launched in this working environment.
	if (numOfTabsString != null) {
		numOfTabs = Integer.parseInt(numOfTabsString);
	}

	if (numOfTabs == 0) {
		// No notes were previously opened: create new one.
		String prefixName = preferences.get(PreferenceConstants.PREF_NAME_PREFIX,
				PreferenceConstants.PREF_NAME_PREFIX_DEFAULT);
		addNewNoteTab(prefixName + " 1", "", null, true, null);
		// Set selection on this tab.
		tabFolder.setSelection(0);
	} else {
		// Populate with tabs opened in previous session.
		for (int tabIndex = 0; tabIndex < numOfTabs; ++tabIndex) {
			String tabTitle = section.get(STORE_TITLE_PREFIX_KEY + tabIndex);
			boolean editable = section.get(STORE_EDITABLE_PREFIX_KEY + tabIndex) == null ? true
					: section.getBoolean(STORE_EDITABLE_PREFIX_KEY + tabIndex);
			String noteText = section.get(STORE_TEXT_PREFIX_KEY + tabIndex);
			String noteStyle = section.get(STORE_STYLE_PREFIX_KEY + tabIndex);
			String noteBullets = section.get(STORE_BULLETS_PREFIX_KEY + tabIndex);
			if (tabTitle != null && noteText != null) {
				addNewNoteTab(tabTitle, noteText, noteStyle, editable, noteBullets);
			}
		}
		// Set selection on the last tab.
		tabFolder.setSelection(tabFolder.getItemCount() - 1);
		if (!getSelectedNote().getEditable()) {
			tabFolder.getSelection().setText(LOCK_PREFIX + tabFolder.getSelection().getText());
		}
	}
}
 
開發者ID:PyvesB,項目名稱:Notepad4e,代碼行數:45,代碼來源:NotepadView.java

示例15: load

import org.eclipse.jface.dialogs.IDialogSettings; //導入方法依賴的package包/類
public static GroupSet load() {
    final GroupSet columnGroups = new GroupSet();

    try {
        final IDialogSettings settings = new DialogSettings("column_group_list");
        String database = settings.get("database");
        if (database == null) {
            database = DBManagerFactory.getAllDBList().get(0);
        }
        columnGroups.setDatabase(database);

        final String path = getPath();
        final File columnGroupListFile = new File(path);

        if (columnGroupListFile.exists()) {
            settings.load(path);

            final UniqueWordDictionary dictionary = new UniqueWordDictionary();

            for (final IDialogSettings columnGroupSection : settings.getSections()) {
                final ColumnGroup columnGroup = new ColumnGroup();

                columnGroup.setGroupName(columnGroupSection.get("group_name"));

                for (final IDialogSettings columnSection : columnGroupSection.getSections()) {
                    final String physicalName = columnSection.get("physical_name");
                    final String logicalName = columnSection.get("logical_name");
                    final SqlType sqlType = SqlType.valueOfId(columnSection.get("type"));
                    final String defaultValue = columnSection.get("default_value");
                    final String description = columnSection.get("description");
                    final String constraint = columnSection.get("constraint");
                    final boolean notNull = Boolean.valueOf(columnSection.get("not_null")).booleanValue();
                    final boolean unique = Boolean.valueOf(columnSection.get("unique")).booleanValue();
                    final Integer length = toInteger(columnSection.get("length"));
                    final Integer decimal = toInteger(columnSection.get("decimal"));
                    final boolean array = Boolean.valueOf(columnSection.get("array")).booleanValue();
                    final Integer arrayDimension = toInteger(columnSection.get("array_dimension"));
                    final boolean unsigned = Boolean.valueOf(columnSection.get("unsigned")).booleanValue();
                    final boolean zerofill = Boolean.valueOf(columnSection.get("zerofill")).booleanValue();
                    final boolean binary = Boolean.valueOf(columnSection.get("binary")).booleanValue();
                    final String args = columnSection.get("args");
                    final boolean charSemantics = Boolean.valueOf(columnSection.get("char_semantics")).booleanValue();

                    final TypeData typeData = new TypeData(length, decimal, array, arrayDimension, unsigned, zerofill, binary, args, charSemantics);

                    Word word = new Word(physicalName, logicalName, sqlType, typeData, description, database);
                    word = dictionary.getUniqueWord(word, true);

                    final NormalColumn column = new NormalColumn(word, notNull, false, unique, false, defaultValue, constraint, null, null, null);

                    columnGroup.addColumn(column);
                }

                columnGroups.add(columnGroup);
            }
        }
    } catch (final IOException e) {
        ERDiagramActivator.showExceptionDialog(e);
    }

    return columnGroups;
}
 
開發者ID:roundrop,項目名稱:ermasterr,代碼行數:63,代碼來源:GlobalGroupSet.java


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