ScriptMonkeyProjectComponent.java :  » Scripting » scriptmonkey » com » boxysystems » scriptmonkey » intellij » Java Open Source

Java Open Source » Scripting » scriptmonkey 
scriptmonkey » com » boxysystems » scriptmonkey » intellij » ScriptMonkeyProjectComponent.java
package com.boxysystems.scriptmonkey.intellij;

import com.boxysystems.scriptmonkey.intellij.ui.PluginScript;
import com.intellij.openapi.components.ProjectComponent;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;

/**
 * Created by IntelliJ IDEA.
 * User: shameed
 * Date: Oct 17, 2008
 * Time: 3:24:06 PM
 */
public class ScriptMonkeyProjectComponent implements ProjectComponent {

  private PluginScriptRunner pluginScriptRunner = null;
  private Project project;

  public ScriptMonkeyProjectComponent(Project project) {
    this.project = project;
    pluginScriptRunner = new PluginScriptRunner(project, ScriptMonkeyPlugin.getInstance(project));
  }

  public void projectOpened() {
    pluginScriptRunner.runPluginScripts(PluginScript.RUN_MODE.PROJECT_OPEN);
  }

  public void projectClosed() {
    pluginScriptRunner.runPluginScriptsSynchronously(PluginScript.RUN_MODE.PROJECT_CLOSE);
  }

  @NonNls
  @NotNull
  public String getComponentName() {
    return this.getClass().getName();
  }

  public void initComponent() {

  }

  public void disposeComponent() {

  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.