Java Code Examples for org.eclipse.ui.IMemento#putBoolean()
The following examples show how to use
org.eclipse.ui.IMemento#putBoolean() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestResultsView.java From n4js with Eclipse Public License 1.0 | 6 votes |
@Override public void saveState(IMemento memento) { if (sashForm == null) { // part has not been created if (storedMemento != null) // Keep the old state; storedMemento.putMemento(memento); return; } memento.putBoolean(TAG_TEST_HOVER, actionShowTestHover.isChecked()); memento.putBoolean(TAG_OMIT_COMMON_PREFIX, actionOmitCommonPrefix.isChecked()); memento.putBoolean(TAG_SCROLL, actionScrollLock.isChecked()); int weigths[] = sashForm.getWeights(); int ratio = (weigths[0] * 1000) / (weigths[0] + weigths[1]); memento.putInteger(TAG_RATIO, ratio); memento.putInteger(TAG_ORIENTATION, viewLayoutHelper.getOrientation()); memento.putInteger(TAG_SHOW_FILTER, viewFilterHelper.getFilter()); }
Example 2
Source File: FormatterProfile.java From xds-ide with Eclipse Public License 1.0 | 6 votes |
public void toMemento(IMemento memento) { cachedActiveProfile = null; // smth changed. drop cache cachedActiveProfileName = null; // memento.putString(NAME_UNICAL_KEY, name); memento.putBoolean("isDefProfile", isDefProfile); //$NON-NLS-1$ for (IndentSetting bs : IndentSetting.values()) { memento.putInteger(bs.name, hmIndentSettings.get(bs.name)); } for (WhiteSpaceSetting wss : WhiteSpaceSetting.values()) { memento.putInteger(wss.name(), hmWhiteSettings.get(wss)); } for (NewlineSetting ss : NewlineSetting.values()) { memento.putInteger(ss.name() + "_Before", hmStmtSettingsBefore.get(ss)); //$NON-NLS-1$ memento.putInteger(ss.name() + "_After", hmStmtSettingsAfter.get(ss)); //$NON-NLS-1$ } memento.putInteger(WRAPPING_WIDTH_MEMENTO_KEY, wrappingWidth); }
Example 3
Source File: SdkManager.java From xds-ide with Eclipse Public License 1.0 | 5 votes |
private static void saveTools(IMemento memento, Sdk sdk) { List<SdkTool> tools = sdk.getTools(); IMemento toolsMemento = memento.createChild(TAG_TOOL_COLLECTION); for (SdkTool tool : tools) { IMemento toolMemento = toolsMemento.createChild(TAG_TOOL); if (tool.isSeparator()) { toolMemento.putBoolean("isSeprator", true); //$NON-NLS-1$ toolMemento.putString(SdkTool.Property.MENU_GROUP.tag, tool.getPropertyValue(SdkTool.Property.MENU_GROUP)); } else { for (SdkTool.Property property: SdkTool.Property.values()) { toolMemento.putString(property.tag, tool.getPropertyValue(property)); } } } }
Example 4
Source File: StatechartDefinitionSection.java From statecharts with Eclipse Public License 1.0 | 5 votes |
protected void setMementoProperties(IMemento memento) { String sectionProperty = getSectionProperty(getContextObject()); if (previousWidths.length >= 2) { memento.putInteger(sectionProperty + MEM_FIRST_WEIGHT, previousWidths[0]); memento.putInteger(sectionProperty + MEM_SECOND_WEIGHT, previousWidths[1]); } memento.putBoolean(sectionProperty + MEM_EXPANDED, sectionExpanded); }