本文整理汇总了Java中com.intellij.ide.util.PropertiesComponent.getInt方法的典型用法代码示例。如果您正苦于以下问题:Java PropertiesComponent.getInt方法的具体用法?Java PropertiesComponent.getInt怎么用?Java PropertiesComponent.getInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ide.util.PropertiesComponent
的用法示例。
在下文中一共展示了PropertiesComponent.getInt方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: start
import com.intellij.ide.util.PropertiesComponent; //导入方法依赖的package包/类
public static void start () {
PropertiesComponent prop = PropertiesComponent.getInstance();
int interval = prop.getInt(Settings.INTERVAL, 0);
if (runningInterval == interval || interval == 0) {
return;
}
if (service != null) {
stop();
}
RandomBackgroundTask task = new RandomBackgroundTask();
service = Executors.newSingleThreadScheduledExecutor();
try {
int delay = prop.isValueSet(IdeBackgroundUtil.EDITOR_PROP)
? interval
: 0;
service.scheduleAtFixedRate(task, delay, interval, TimeUnit.MINUTES);
runningInterval = interval;
} catch (RejectedExecutionException e) {
stop();
}
}
示例2: applyAndSave
import com.intellij.ide.util.PropertiesComponent; //导入方法依赖的package包/类
public static void applyAndSave(@NotNull PropertiesComponent p,
@NotNull UISettings ui,
@NotNull EditorSettingsExternalizable.OptionSet eo,
@NotNull DaemonCodeAnalyzerSettings ds,
String before, String after, boolean value) {
// @formatter:off
p.setValue(before + "SHOW_STATUS_BAR", valueOf(ui.SHOW_STATUS_BAR)); ui.SHOW_STATUS_BAR = p.getBoolean(after + "SHOW_STATUS_BAR", value);
p.setValue(before + "SHOW_MAIN_TOOLBAR", valueOf(ui.SHOW_MAIN_TOOLBAR)); ui.SHOW_MAIN_TOOLBAR = p.getBoolean(after + "SHOW_MAIN_TOOLBAR", value);
p.setValue(before + "SHOW_NAVIGATION_BAR", valueOf(ui.SHOW_NAVIGATION_BAR)); ui.SHOW_NAVIGATION_BAR = p.getBoolean(after + "SHOW_NAVIGATION_BAR", value);
p.setValue(before + "IS_FOLDING_OUTLINE_SHOWN", valueOf(eo.IS_FOLDING_OUTLINE_SHOWN)); eo.IS_FOLDING_OUTLINE_SHOWN = p.getBoolean(after + "IS_FOLDING_OUTLINE_SHOWN", value);
p.setValue(before + "IS_WHITESPACES_SHOWN", valueOf(eo.IS_WHITESPACES_SHOWN)); eo.IS_WHITESPACES_SHOWN = p.getBoolean(after + "IS_WHITESPACES_SHOWN", value);
p.setValue(before + "ARE_LINE_NUMBERS_SHOWN", valueOf(eo.ARE_LINE_NUMBERS_SHOWN)); eo.ARE_LINE_NUMBERS_SHOWN = p.getBoolean(after + "ARE_LINE_NUMBERS_SHOWN", value);
p.setValue(before + "IS_RIGHT_MARGIN_SHOWN", valueOf(eo.IS_RIGHT_MARGIN_SHOWN)); eo.IS_RIGHT_MARGIN_SHOWN = p.getBoolean(after + "IS_RIGHT_MARGIN_SHOWN", value);
p.setValue(before + "IS_INDENT_GUIDES_SHOWN", valueOf(eo.IS_INDENT_GUIDES_SHOWN)); eo.IS_INDENT_GUIDES_SHOWN = p.getBoolean(after + "IS_INDENT_GUIDES_SHOWN", value);
p.setValue(before + "SHOW_BREADCRUMBS", valueOf(eo.SHOW_BREADCRUMBS)); eo.SHOW_BREADCRUMBS = p.getBoolean(after + "SHOW_BREADCRUMBS", value);
p.setValue(before + "SHOW_METHOD_SEPARATORS", valueOf(ds.SHOW_METHOD_SEPARATORS)); ds.SHOW_METHOD_SEPARATORS = p.getBoolean(after + "SHOW_METHOD_SEPARATORS", value);
p.setValue(before + "HIDE_TOOL_STRIPES", valueOf(ui.HIDE_TOOL_STRIPES)); ui.HIDE_TOOL_STRIPES = p.getBoolean(after + "HIDE_TOOL_STRIPES", !value);
p.setValue(before + "EDITOR_TAB_PLACEMENT", valueOf(ui.EDITOR_TAB_PLACEMENT)); ui.EDITOR_TAB_PLACEMENT = p.getInt(after + "EDITOR_TAB_PLACEMENT", value ? SwingConstants.TOP : UISettings.TABS_NONE);
// @formatter:on
}
示例3: intervalModified
import com.intellij.ide.util.PropertiesComponent; //导入方法依赖的package包/类
private boolean intervalModified (PropertiesComponent prop) {
int storedInterval = prop.getInt(INTERVAL, 0);
int uiInterval = ((SpinnerNumberModel) intervalSpinner.getModel()).getNumber().intValue();
return storedInterval != uiInterval;
}
示例4: createUIComponents
import com.intellij.ide.util.PropertiesComponent; //导入方法依赖的package包/类
private void createUIComponents() {
PropertiesComponent prop = PropertiesComponent.getInstance();
intervalSpinner = new JSpinner(new SpinnerNumberModel(prop.getInt(INTERVAL, 0), 0, 1000, 5));
}