Search in sources :

Example 1 with LeiningenProject

use of de.janthomae.leiningenplugin.project.LeiningenProject in project intellij-leiningen-plugin by derkork.

the class RunBuildAction method actionPerformed.

@Override
public void actionPerformed(AnActionEvent anActionEvent) {
    Project project = anActionEvent.getData(PlatformDataKeys.PROJECT);
    List<String> goals = anActionEvent.getData(LeiningenDataKeys.LEININGEN_GOALS);
    if (goals == null || goals.isEmpty()) {
        return;
    }
    LeiningenProject leiningenProject = anActionEvent.getData(LeiningenDataKeys.LEININGEN_PROJECT);
    if (leiningenProject == null) {
        return;
    }
    LeiningenRunnerParameters params = new LeiningenRunnerParameters(goals, leiningenProject.getWorkingDir());
    LeiningenRunConfigurationType.runConfiguration(project, params, anActionEvent.getDataContext());
}
Also used : LeiningenProject(de.janthomae.leiningenplugin.project.LeiningenProject) Project(com.intellij.openapi.project.Project) LeiningenRunnerParameters(de.janthomae.leiningenplugin.run.LeiningenRunnerParameters) LeiningenProject(de.janthomae.leiningenplugin.project.LeiningenProject)

Example 2 with LeiningenProject

use of de.janthomae.leiningenplugin.project.LeiningenProject in project intellij-leiningen-plugin by derkork.

the class LeiningenProjectStructure method update.

public void update() {
    myRoot.clear();
    final List<LeiningenProject> projects = myProjectsManager.getLeiningenProjects();
    for (LeiningenProject project : projects) {
        LeiningenProjectNode lpn = new LeiningenProjectNode(myRoot, project);
        myRoot.addProjectNode(lpn);
    }
    myTreeBuilder.updateFromRoot();
    myTreeBuilder.expand(myRoot, null);
}
Also used : LeiningenProject(de.janthomae.leiningenplugin.project.LeiningenProject)

Example 3 with LeiningenProject

use of de.janthomae.leiningenplugin.project.LeiningenProject in project intellij-leiningen-plugin by derkork.

the class RefreshProjectsAction method actionPerformed.

@Override
public void actionPerformed(AnActionEvent e) {
    final Project theProject = e.getData(PlatformDataKeys.PROJECT);
    final LeiningenProjectsManager manager = LeiningenProjectsManager.getInstance(theProject);
    final List<LeiningenProject> projects = manager.getLeiningenProjects();
    for (LeiningenProject project : projects) {
        try {
            project.reimport(theProject);
        } catch (LeiningenProjectException e1) {
        // Just ignore it for now
        }
    }
}
Also used : LeiningenProject(de.janthomae.leiningenplugin.project.LeiningenProject) Project(com.intellij.openapi.project.Project) LeiningenProjectsManager(de.janthomae.leiningenplugin.project.LeiningenProjectsManager) LeiningenProject(de.janthomae.leiningenplugin.project.LeiningenProject) LeiningenProjectException(de.janthomae.leiningenplugin.project.LeiningenProjectException)

Aggregations

LeiningenProject (de.janthomae.leiningenplugin.project.LeiningenProject)3 Project (com.intellij.openapi.project.Project)2 LeiningenProjectException (de.janthomae.leiningenplugin.project.LeiningenProjectException)1 LeiningenProjectsManager (de.janthomae.leiningenplugin.project.LeiningenProjectsManager)1 LeiningenRunnerParameters (de.janthomae.leiningenplugin.run.LeiningenRunnerParameters)1