Package com.boxysystems.scriptmonkey.intellij.util

Source Code of com.boxysystems.scriptmonkey.intellij.util.ProjectUtil

package com.boxysystems.scriptmonkey.intellij.util;

import com.intellij.ide.DataManager;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.actionSystem.DataKeys;
import com.intellij.openapi.project.Project;

/**
* Created by IntelliJ IDEA.
* User: shameed
* Date: Nov 14, 2008
* Time: 9:41:07 AM
*/
public class ProjectUtil {

  public static Project getProject(AnActionEvent anActionEvent) {
    return DataKeys.PROJECT.getData(anActionEvent.getDataContext());
  }

  public static Project getProject() {
    DataContext dataContext = DataManager.getInstance().getDataContext();
    return DataKeys.PROJECT.getData(dataContext);
  }
}
TOP

Related Classes of com.boxysystems.scriptmonkey.intellij.util.ProjectUtil

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.