Created
June 18, 2015 13:33
-
-
Save matthiaswenz/1215a63780212a4df328 to your computer and use it in GitHub Desktop.
Base Action subclass for IntelliJ plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SignInAction extends AnAction { | |
@Override | |
public void actionPerformed(AnActionEvent event) { | |
Project project = event.getProject(); | |
// do your sign in work... | |
} | |
@Override | |
public void update(AnActionEvent e) { | |
e.getPresentation().setEnabledAndVisible(!isAuthenticated()); | |
} | |
private boolean isAuthenticated() { | |
// something to determine whether the user is authenticated... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment