本文整理汇总了Java中com.intellij.openapi.vcs.update.ActionInfo类的典型用法代码示例。如果您正苦于以下问题:Java ActionInfo类的具体用法?Java ActionInfo怎么用?Java ActionInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ActionInfo类属于com.intellij.openapi.vcs.update包,在下文中一共展示了ActionInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showUpdateProjectInfo
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
public UpdateInfoTree showUpdateProjectInfo(UpdatedFiles updatedFiles, String displayActionName, ActionInfo actionInfo, boolean canceled) {
if (! myProject.isOpen() || myProject.isDisposed()) return null;
ContentManager contentManager = getContentManager();
if (contentManager == null) {
return null; // content manager is made null during dispose; flag is set later
}
final UpdateInfoTree updateInfoTree = new UpdateInfoTree(contentManager, myProject, updatedFiles, displayActionName, actionInfo);
Content content = ContentFactory.SERVICE.getInstance().createContent(updateInfoTree, canceled ?
VcsBundle.message("toolwindow.title.update.action.canceled.info", displayActionName) :
VcsBundle.message("toolwindow.title.update.action.info", displayActionName), true);
Disposer.register(content, updateInfoTree);
ContentsUtil.addContent(contentManager, content, true);
ToolWindowManager.getInstance(myProject).getToolWindow(ToolWindowId.VCS).activate(null);
updateInfoTree.expandRootChildren();
return updateInfoTree;
}
示例2: showUpdateProjectInfo
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
@Override
public UpdateInfoTree showUpdateProjectInfo(UpdatedFiles updatedFiles, String displayActionName, ActionInfo actionInfo, boolean canceled) {
if (!myProject.isOpen() || myProject.isDisposed()) return null;
ContentManager contentManager = getContentManager();
if (contentManager == null) {
return null; // content manager is made null during dispose; flag is set later
}
final UpdateInfoTree updateInfoTree = new UpdateInfoTree(contentManager, myProject, updatedFiles, displayActionName, actionInfo);
ContentUtilEx.addTabbedContent(contentManager, updateInfoTree, "Update Info", DateFormatUtil.formatDateTime(System.currentTimeMillis()), true, updateInfoTree);
ToolWindowManager.getInstance(myProject).getToolWindow(ToolWindowId.VCS).activate(null);
updateInfoTree.expandRootChildren();
return updateInfoTree;
}
示例3: hyperlinkUpdate
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
@Override
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
if (event.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) {
if (event.getDescription().equals("UpdatedFiles")) {
ProjectLevelVcsManagerEx vcsManager = ProjectLevelVcsManagerEx.getInstanceEx(myProject);
UpdateInfoTree tree = vcsManager.showUpdateProjectInfo(myUpdatedFiles, "Update", ActionInfo.UPDATE, false);
tree.setBefore(myBeforeUpdateLabel);
tree.setAfter(myAfterUpdateLabel);
}
else {
BrowserUtil.browse(event.getDescription());
}
}
}
示例4: handleResult
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
private void handleResult(GitCommandResult result,
Project project,
GitSimpleEventDetector mergeConflictDetector,
GitLocalChangesWouldBeOverwrittenDetector localChangesDetector,
GitUntrackedFilesOverwrittenByOperationDetector untrackedFilesDetector,
GitRepository repository,
GitRevisionNumber currentRev,
Set<VirtualFile> affectedRoots,
Label beforeLabel) {
GitRepositoryManager repositoryManager = GitUtil.getRepositoryManager(project);
VirtualFile root = repository.getRoot();
if (result.success() || mergeConflictDetector.hasHappened()) {
VfsUtil.markDirtyAndRefresh(false, true, false, root);
List<VcsException> exceptions = new ArrayList<VcsException>();
GitMergeUtil.showUpdates(this, project, exceptions, root, currentRev, beforeLabel, getActionName(), ActionInfo.UPDATE);
repositoryManager.updateRepository(root);
runFinalTasks(project, GitVcs.getInstance(project), affectedRoots, getActionName(), exceptions);
}
else if (localChangesDetector.wasMessageDetected()) {
LocalChangesWouldBeOverwrittenHelper.showErrorNotification(project, repository.getRoot(), getActionName(),
localChangesDetector.getRelativeFilePaths());
}
else if (untrackedFilesDetector.wasMessageDetected()) {
GitUntrackedFilesHelper.notifyUntrackedFilesOverwrittenBy(project, root, untrackedFilesDetector.getRelativeFilePaths(),
getActionName(), null);
}
else {
GitUIUtil.notifyError(project, "Git " + getActionName() + " Failed", result.getErrorOutputAsJoinedString(), true, null);
repositoryManager.updateRepository(root);
}
}
示例5: hyperlinkUpdate
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
@Override
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
if (event.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) {
if (event.getDescription().equals("UpdatedFiles")) {
ProjectLevelVcsManagerEx vcsManager = ProjectLevelVcsManagerEx.getInstanceEx(myProject);
UpdateInfoTree tree = vcsManager.showUpdateProjectInfo(myUpdatedFiles, "Update", ActionInfo.UPDATE, false);
tree.setBefore(myBeforeUpdateLabel);
tree.setAfter(LocalHistory.getInstance().putSystemLabel(myProject, "After push"));
}
else {
BrowserUtil.launchBrowser(event.getDescription());
}
}
}
示例6: showUpdateProjectInfo
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
@CalledInAwt
@Nullable
@Override
public UpdateInfoTree showUpdateProjectInfo(UpdatedFiles updatedFiles, String displayActionName, ActionInfo actionInfo, boolean canceled) {
if (!myProject.isOpen() || myProject.isDisposed()) return null;
ContentManager contentManager = getContentManager();
if (contentManager == null) {
return null; // content manager is made null during dispose; flag is set later
}
final UpdateInfoTree updateInfoTree = new UpdateInfoTree(contentManager, myProject, updatedFiles, displayActionName, actionInfo);
ContentUtilEx.addTabbedContent(contentManager, updateInfoTree, "Update Info", DateFormatUtil.formatDateTime(System.currentTimeMillis()), false, updateInfoTree);
updateInfoTree.expandRootChildren();
return updateInfoTree;
}
示例7: showUpdateProjectInfo
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
public abstract UpdateInfoTree showUpdateProjectInfo(UpdatedFiles updatedFiles,
String displayActionName,
ActionInfo actionInfo,
boolean canceled);
示例8: showProjectOperationInfo
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
@Override
public void showProjectOperationInfo(final UpdatedFiles updatedFiles, String displayActionName) {
showUpdateProjectInfo(updatedFiles, displayActionName, ActionInfo.STATUS, false);
}
示例9: GetCommittedChangelistAction
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
public GetCommittedChangelistAction() {
super(ActionInfo.UPDATE, CHANGELIST, false);
}
示例10: getRoots
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
@Override
public FilePath[] getRoots(final VcsContext context, final ActionInfo actionInfo) {
final Collection<FilePath> filePaths = getFilePaths(context);
return filePaths.toArray(new FilePath[filePaths.size()]);
}
示例11: getScopeName
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
@Override
public String getScopeName(final VcsContext dataContext, final ActionInfo actionInfo) {
return "Changelist";
}
示例12: createVcsHandler
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
@NotNull
@Override
protected CheckinHandler createVcsHandler(final CheckinProjectPanel panel) {
final Project project = panel.getProject();
final Collection<VirtualFile> commitRoots = panel.getRoots();
return new CheckinHandler() {
private Collection<Change> myChanges = panel.getSelectedChanges();
@Override
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
return null;
}
@Override
public ReturnResult beforeCheckin(@Nullable CommitExecutor executor, PairConsumer<Object, Object> additionalDataConsumer) {
if (executor instanceof LocalCommitExecutor) return ReturnResult.COMMIT;
final SvnVcs vcs = SvnVcs.getInstance(project);
final MultiMap<String, WorkingCopyFormat> copiesInfo = splitIntoCopies(vcs, myChanges);
final List<String> repoUrls = new ArrayList<String>();
for (Map.Entry<String, Collection<WorkingCopyFormat>> entry : copiesInfo.entrySet()) {
if (entry.getValue().size() > 1) {
repoUrls.add(entry.getKey());
}
}
if (! repoUrls.isEmpty()) {
final String join = StringUtil.join(repoUrls, ",\n");
final int isOk = Messages.showOkCancelDialog(project,
SvnBundle.message("checkin.different.formats.involved", repoUrls.size() > 1 ? 1 : 0, join),
"Subversion: Commit Will Split", Messages.getWarningIcon());
return Messages.OK == isOk ? ReturnResult.COMMIT : ReturnResult.CANCEL;
}
return ReturnResult.COMMIT;
}
@Override
public void includedChangesChanged() {
myChanges = panel.getSelectedChanges();
}
@Override
public void checkinSuccessful() {
if (SvnConfiguration.getInstance(project).isAutoUpdateAfterCommit()) {
final VirtualFile[] roots = ProjectLevelVcsManager.getInstance(project).getRootsUnderVcs(SvnVcs.getInstance(project));
final List<FilePath> paths = new ArrayList<FilePath>();
for (VirtualFile root : roots) {
boolean take = false;
for (VirtualFile commitRoot : commitRoots) {
if (VfsUtilCore.isAncestor(root, commitRoot, false)) {
take = true;
break;
}
}
if (take) {
paths.add(VcsUtil.getFilePath(root));
}
}
if (paths.isEmpty()) return;
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
AutoSvnUpdater.run(new AutoSvnUpdater(project, paths.toArray(new FilePath[paths.size()])), ActionInfo.UPDATE.getActionName());
}
}, ModalityState.NON_MODAL);
}
}
};
}
示例13: showProjectOperationInfo
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
public void showProjectOperationInfo(final UpdatedFiles updatedFiles, String displayActionName) {
showUpdateProjectInfo(updatedFiles, displayActionName, ActionInfo.STATUS, false);
}
示例14: getRoots
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
public FilePath[] getRoots(final VcsContext context, final ActionInfo actionInfo) {
final Collection<FilePath> filePaths = getFilePaths(context);
return filePaths.toArray(new FilePath[filePaths.size()]);
}
示例15: getScopeName
import com.intellij.openapi.vcs.update.ActionInfo; //导入依赖的package包/类
public String getScopeName(final VcsContext dataContext, final ActionInfo actionInfo) {
return "Changelist";
}