Skip to content

Commit

Permalink
enable Dev Motive actions for Agile Manager only
Browse files Browse the repository at this point in the history
  • Loading branch information
Vojtech Janota committed Apr 8, 2015
1 parent fc237d6 commit c53dbec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import com.hp.alm.ali.idea.content.AliContentFactory;
import com.hp.alm.ali.idea.rest.RestService;
import com.hp.alm.ali.idea.rest.ServerType;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.Presentation;
import com.intellij.openapi.project.Project;
Expand Down Expand Up @@ -58,7 +59,7 @@ protected void update(VcsContext context, Presentation presentation) {
Project project = context.getProject();
boolean visible = project != null && ProjectLevelVcsManager.getInstance(project).hasActiveVcss();
presentation.setVisible(visible);
presentation.setEnabled(visible && isEnabled(context) && project.getComponent(RestService.class).getServerTypeIfAvailable().isConnected());
presentation.setEnabled(visible && isEnabled(context) && ServerType.AGM.equals(project.getComponent(RestService.class).getServerTypeIfAvailable()));
}

private static VirtualFile getSelectedFile(VcsContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void update(AnActionEvent e) {
Project project = getEventProject(e);
if (project != null) {
ServerType serverType = project.getComponent(RestService.class).getServerTypeIfAvailable();
e.getPresentation().setEnabled(serverType.isConnected());
e.getPresentation().setEnabled(ServerType.AGM.equals(serverType));
}
}
}

0 comments on commit c53dbec

Please sign in to comment.