Execute run configuiration action
[fedora-idea.git] / lang-impl / src / com / intellij / execution / RunManagerConfig.java
blob560958e679c0dffbbd7bc5dca8488323401c814c
1 package com.intellij.execution;
3 import com.intellij.execution.impl.RunManagerImpl;
4 import com.intellij.execution.util.StoringPropertyContainer;
5 import com.intellij.ide.util.PropertiesComponent;
6 import org.jetbrains.annotations.NonNls;
8 public class RunManagerConfig {
9 public static final String MAKE = ExecutionBundle.message("before.run.property.make");
10 private final StoringPropertyContainer myProperties;
11 private final PropertiesComponent myPropertiesComponent;
12 @NonNls private static final String RECENTS_LIMIT = "recentsLimit";
14 public RunManagerConfig(PropertiesComponent propertiesComponent,
15 RunManagerImpl manager) {
16 myPropertiesComponent = propertiesComponent;
17 myProperties = new StoringPropertyContainer("RunManagerConfig.", propertiesComponent);
20 public int getRecentsLimit() {
21 try {
22 return Integer.valueOf(myPropertiesComponent.getOrInit(RECENTS_LIMIT, "5")).intValue();
24 catch (NumberFormatException e) {
25 return 5;
29 public void setRecentsLimit(int recentsLimit) {
30 myPropertiesComponent.setValue(RECENTS_LIMIT, Integer.toString(recentsLimit));