GitInit, HgInit : update() does nothing, removed.

This commit is contained in:
Kirill Likhodedov
2011-04-05 16:11:58 +04:00
parent da15337046
commit b1835c394e
2 changed files with 1 additions and 33 deletions
@@ -17,7 +17,6 @@ package git4idea.actions;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.actionSystem.Presentation;
import com.intellij.openapi.fileChooser.FileChooser;
import com.intellij.openapi.fileChooser.FileChooserDescriptor;
import com.intellij.openapi.progress.ProgressIndicator;
@@ -47,9 +46,7 @@ import java.util.List;
* Initialize git repository action
*/
public class GitInit extends DumbAwareAction {
/**
* {@inheritDoc}
*/
public void actionPerformed(final AnActionEvent e) {
Project project = e.getData(PlatformDataKeys.PROJECT);
if (project == null) {
@@ -126,22 +123,4 @@ public class GitInit extends DumbAwareAction {
GitUtil.refreshFiles(project, Collections.singleton(root));
}
/**
* {@inheritDoc}
*/
@Override
public void update(AnActionEvent e) {
Project project = e.getData(PlatformDataKeys.PROJECT);
if (project == null) {
project = ProjectManager.getInstance().getDefaultProject();
}
Presentation presentation = e.getPresentation();
if (project == null) {
presentation.setEnabled(false);
presentation.setVisible(false);
return;
}
presentation.setEnabled(true);
presentation.setVisible(true);
}
}
@@ -103,17 +103,6 @@ public class HgInit extends DumbAwareAction {
}
}
@Override
public void update(AnActionEvent e) {
Project project = e.getData(PlatformDataKeys.PROJECT);
if (project == null) {
project = ProjectManager.getInstance().getDefaultProject();
}
final Presentation presentation = e.getPresentation();
presentation.setEnabled(project != null);
presentation.setVisible(project != null);
}
private boolean createRepository(VirtualFile selectedRoot) {
final boolean succeeded = (new HgInitCommand(myProject)).execute(selectedRoot);
Notifications.Bus.notify(new Notification(HgVcs.NOTIFICATION_GROUP_ID,