Package com.intellij.openapi.project

Examples of com.intellij.openapi.project.Project


*/
public class ShowUpdateIssuePopupAction extends AnAction
{
  public void actionPerformed(AnActionEvent e)
  {
    Project project = e.getData(PlatformDataKeys.PROJECT);
    Issue issue = e.getData(RevuDataKeys.ISSUE);

    if ((issue == null) || (project == null))
    {
      return;
View Full Code Here


{
  private final static Logger LOGGER = Logger.getInstance(ExportReviewAction.class.getName());

  public void actionPerformed(AnActionEvent e)
  {
    Project project = e.getData(PlatformDataKeys.PROJECT);
    JList liReviews = (JList) e.getData(PlatformDataKeys.CONTEXT_COMPONENT);
    if ((project == null) || (liReviews == null))
    {
      return;
    }

    Review review = (Review) liReviews.getSelectedValue();
    if (!review.isExternalizable())
    {
      String errorTitle = RevuBundle.message("friendlyError.notExternalizableReview.title.text", review.getName());
      String errorDetails = RevuBundle.message("friendlyError.notExternalizableReview.details.details.text", review.getName());
      StatusBarComponent.showMessageInPopup(project, new StatusBarMessage(StatusBarMessage.Type.ERROR, errorTitle, errorDetails), true);
      return;
    }

    ExportDialog exportDialog = new ExportDialog(project);
    exportDialog.show(review);
    if (!exportDialog.isOK())
    {
      return;
    }

    File f = exportDialog.getFile();
    if (f != null)
    {
      try
      {
        project.getComponent(IReviewExternalizer.class).save(review, f);
      }
      catch (Exception ex)
      {
        LOGGER.warn("Failed to close exported review file", ex);
        String errorTitle = RevuBundle.message("friendlyError.exportFailed.title.text", review.getName());
View Full Code Here

        return node;
      }

      Module module = moduleRoots.get(vFile);

      Project project = RevuUtils.getProject();
      DefaultMutableTreeNode parentNode;
      if (module == null)
      {
        parentNode = addNode(rootNode, vFile.getParent());
View Full Code Here

        {
          editor.getCaretModel().moveToOffset(editor.getDocument().getLineStartOffset(lineStart));
        }

        // Could also be managed through a listener...
        Project project = e.getData(PlatformDataKeys.PROJECT);
        if (project != null)
        {
          IssueBrowsingPane browsingPane =
            project.getComponent(RevuToolWindowManager.class).getSelectedReviewBrowsingForm();
          if ((browsingPane != null) && (browsingPane.getContentPane().isShowing()))
          {
            browsingPane.getIssueTree().selectIssue(issues.keySet().iterator().next());
          }
        }
View Full Code Here

*/
public class ShowProjectSettingsAction extends AnAction
{
  public void actionPerformed(AnActionEvent e)
  {
    Project project = e.getData(PlatformDataKeys.PROJECT);

    if (project != null)
    {
      RevuUtils.editProjectSettings(project, e.getData(RevuDataKeys.REVIEW));
    }
View Full Code Here

*/
public class ToggleFilterIssuesAction extends ToggleAction
{
  public void setSelected(AnActionEvent e, boolean state)
  {
    Project project = e.getData(PlatformDataKeys.PROJECT);

    if (project != null)
    {
      RevuWorkspaceSettingsComponent workspaceSettingsComponent =
        project.getComponent(RevuWorkspaceSettingsComponent.class);
      RevuWorkspaceSettings workspaceSettings = workspaceSettingsComponent.getState();
      workspaceSettings.setFilterFilesWithIssues(!workspaceSettings.isFilterFilesWithIssues());
      workspaceSettingsComponent.loadState(workspaceSettings);
    }
  }
View Full Code Here

    }
  }

  public boolean isSelected(AnActionEvent e)
  {
    Project project = e.getData(PlatformDataKeys.PROJECT);

    return (project != null) && RevuUtils.getWorkspaceSettings(project).isFilterFilesWithIssues();
  }
View Full Code Here

    fileScopeManager = ApplicationManager.getApplication().getComponent(FileScopeManager.class);
  }

  protected AbstractVcs getVcs(AnActionEvent e)
  {
    Project project = e.getData(PlatformDataKeys.PROJECT);
    VirtualFile vFile = e.getData(PlatformDataKeys.VIRTUAL_FILE);
    if ((project == null) || (vFile == null))
    {
      return null;
    }
View Full Code Here

  @Override
  public void actionPerformed(AnActionEvent e)
  {
    AbstractVcs vcs = getVcs(e);

    Project project = e.getData(PlatformDataKeys.PROJECT);
    VirtualFile vFile = e.getData(PlatformDataKeys.VIRTUAL_FILE);

    final FilePath filePath = VcsContextFactory.SERVICE.getInstance().createFilePathOn(vFile);
    if ((filePath == null) || (!vcs.fileIsUnderVcs(filePath)))
    {
View Full Code Here

  }

  @Override
  public void update(AnActionEvent e)
  {
    Project project = e.getData(PlatformDataKeys.PROJECT);
    if (project == null)
    {
      return;
    }
View Full Code Here

TOP

Related Classes of com.intellij.openapi.project.Project

Copyright © 2018 www.massapicom. 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.