IDEADEV-41380: Artifacts: results of manual editing of "Build artifacts" setting...
[fedora-idea.git] / platform / lang-api / src / com / intellij / execution / BeforeRunTaskProvider.java
blob8409fbc80c6524b846e341c010fbd114366c390f
1 /*
2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * Created by IntelliJ IDEA.
19 * User: Vladislav.Kaznacheev
20 * Date: Jul 4, 2007
21 * Time: 12:33:18 AM
23 package com.intellij.execution;
25 import com.intellij.execution.configurations.RunConfiguration;
26 import com.intellij.openapi.actionSystem.DataContext;
27 import com.intellij.openapi.extensions.ExtensionPointName;
28 import com.intellij.openapi.util.Key;
29 import org.jetbrains.annotations.Nullable;
31 public abstract class BeforeRunTaskProvider<T extends BeforeRunTask> {
32 public static final ExtensionPointName<BeforeRunTaskProvider<BeforeRunTask>> EXTENSION_POINT_NAME = new ExtensionPointName<BeforeRunTaskProvider<BeforeRunTask>>("com.intellij.stepsBeforeRunProvider");
34 public abstract Key<T> getId();
36 public abstract String getDescription(final RunConfiguration runConfiguration, T task);
38 public abstract boolean hasConfigurationButton();
40 /**
41 * @return 'before run' task for the configuration or null, if the task from this provider is not applicable to the specified configuration
43 @Nullable
44 public abstract T createTask(final RunConfiguration runConfiguration);
46 /**
47 * @return <code>true</code> if task configuration is changed
49 public abstract boolean configureTask(final RunConfiguration runConfiguration, T task);
51 public abstract boolean executeTask(DataContext context, RunConfiguration configuration, T task);