Exemplo n.º 1
0
 private static BaseCreatePolicy choosePolicy(final ConfigurationContext context) {
   final RunnerAndConfigurationSettings configuration = context.findExisting();
   if (configuration == null) return CREATE_AND_EDIT;
   final RunManagerEx runManager = context.getRunManager();
   if (runManager.getSelectedConfiguration() != configuration) return SELECT;
   if (runManager.isTemporary(configuration.getConfiguration())) return SAVE;
   return SELECTED_STABLE;
 }
Exemplo n.º 2
0
 protected void updateIcon(final Presentation presentation, final ConfigurationContext context) {
   final RunnerAndConfigurationSettingsImpl configuration = context.findExisting();
   if (configuration != null) {
     presentation.setIcon(configuration.getType().getIcon());
   } else {
     super.updateIcon(presentation, context);
   }
 }
Exemplo n.º 3
0
 public void perform(final ConfigurationContext context) {
   RunnerAndConfigurationSettings settings = context.findExisting();
   if (settings != null) context.getRunManager().makeStable(settings.getConfiguration());
 }
Exemplo n.º 4
0
 public void perform(final ConfigurationContext context) {
   final RunnerAndConfigurationSettingsImpl configuration = context.findExisting();
   if (configuration == null) return;
   context.getRunManager().setActiveConfiguration(configuration);
 }