本文整理匯總了Java中com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx類的典型用法代碼示例。如果您正苦於以下問題:Java ProjectLevelVcsManagerEx類的具體用法?Java ProjectLevelVcsManagerEx怎麽用?Java ProjectLevelVcsManagerEx使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ProjectLevelVcsManagerEx類屬於com.intellij.openapi.vcs.ex包,在下文中一共展示了ProjectLevelVcsManagerEx類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: projectOpened
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
@Override
public void projectOpened() {
StartupManager.getInstance(myProject).registerPostStartupActivity(new DumbAwareRunnable() {
@Override
public void run() {
if (myUpdateInfo != null && !myUpdateInfo.isEmpty() && ProjectReloadState.getInstance(myProject).isAfterAutomaticReload()) {
ActionInfo actionInfo = myUpdateInfo.getActionInfo();
if (actionInfo != null) {
ProjectLevelVcsManagerEx.getInstanceEx(myProject).showUpdateProjectInfo(myUpdateInfo.getFileInformation(),
VcsBundle.message("action.display.name.update"), actionInfo,
false);
CommittedChangesCache.getInstance(myProject).refreshIncomingChangesAsync();
}
}
myUpdateInfo = null;
}
});
}
示例2: Updater
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public Updater(final Project project, final FilePath[] roots, final Map<AbstractVcs, Collection<FilePath>> vcsToVirtualFiles) {
super(project, getTemplatePresentation().getText(), true, VcsConfiguration.getInstance(project).getUpdateOption());
myProject = project;
myProjectLevelVcsManager = ProjectLevelVcsManagerEx.getInstanceEx(project);
myDirtyScopeManager = VcsDirtyScopeManager.getInstance(myProject);
myChangeListManager = (ChangeListManagerEx)ChangeListManager.getInstance(myProject);
myRoots = roots;
myVcsToVirtualFiles = vcsToVirtualFiles;
myUpdatedFiles = UpdatedFiles.create();
myGroupedExceptions = new HashMap<HotfixData, List<VcsException>>();
myUpdateSessions = new ArrayList<UpdateSession>();
// create from outside without any context; context is created by vcses
myContextInfo = new HashMap<AbstractVcs, SequentialUpdatesContext>();
myUpdateNumber = 1;
}
示例3: updateAvailableOptions
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public void updateAvailableOptions(final Collection<AbstractVcs> activeVcses) {
for (VcsShowOptionsSettingImpl setting : myPromptOptions.keySet()) {
final JCheckBox checkBox = myPromptOptions.get(setting);
checkBox.setEnabled(setting.isApplicableTo(activeVcses) || myProject.isDefault());
if (!myProject.isDefault()) {
checkBox.setToolTipText(VcsBundle.message("tooltip.text.action.applicable.to.vcses", composeText(setting.getApplicableVcses())));
}
}
if (!myProject.isDefault()) {
final ProjectLevelVcsManagerEx vcsManager = ProjectLevelVcsManagerEx.getInstanceEx(myProject);
final VcsShowConfirmationOptionImpl addConfirmation = vcsManager.getConfirmation(VcsConfiguration.StandardConfirmation.ADD);
UIUtil.setEnabled(myAddConfirmationPanel, addConfirmation.isApplicableTo(activeVcses), true);
myAddConfirmationPanel.setToolTipText(
VcsBundle.message("tooltip.text.action.applicable.to.vcses", composeText(addConfirmation.getApplicableVcses())));
final VcsShowConfirmationOptionImpl removeConfirmation = vcsManager.getConfirmation(VcsConfiguration.StandardConfirmation.REMOVE);
UIUtil.setEnabled(myRemoveConfirmationPanel, removeConfirmation.isApplicableTo(activeVcses), true);
myRemoveConfirmationPanel.setToolTipText(
VcsBundle.message("tooltip.text.action.applicable.to.vcses", composeText(removeConfirmation.getApplicableVcses())));
}
}
示例4: showSkipped
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
/**
* Show skipped commits
*
* @param project the context project
* @param skippedCommits the skipped commits
*/
public static void showSkipped(final Project project, final SortedMap<VirtualFile, List<GitRebaseUtils.CommitInfo>> skippedCommits) {
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
ContentManager contentManager = ProjectLevelVcsManagerEx.getInstanceEx(project).getContentManager();
if (contentManager == null) {
return;
}
GitSkippedCommits skipped = new GitSkippedCommits(contentManager, project, skippedCommits);
Content content = ContentFactory.SERVICE.getInstance().createContent(skipped, "Skipped Commits", true);
ContentsUtil.addContent(contentManager, content, true);
ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.VCS).activate(null);
}
});
}
示例5: SvnIntegrateChangesTask
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public SvnIntegrateChangesTask(final SvnVcs vcs, @NotNull WorkingCopyInfo info, final MergerFactory mergerFactory,
final SVNURL currentBranchUrl, final String title, final boolean dryRun, String branchName) {
super(vcs.getProject(), title, true, VcsConfiguration.getInstance(vcs.getProject()).getUpdateOption());
myDryRun = dryRun;
myTitle = title;
myProjectLevelVcsManager = ProjectLevelVcsManagerEx.getInstanceEx(myProject);
myVcs = vcs;
myInfo = info;
myAccumulatedFiles = new UpdatedFilesReverseSide(UpdatedFiles.create());
myExceptions = new ArrayList<VcsException>();
myHandler = new IntegrateEventHandler(myVcs, ProgressManager.getInstance().getProgressIndicator());
myMerger = mergerFactory.createMerger(myVcs, new File(myInfo.getLocalPath()), myHandler, currentBranchUrl, branchName);
}
示例6: imitUpdate
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
protected static void imitUpdate(final Project project) {
ProjectLevelVcsManagerEx.getInstanceEx(project).getOptions(VcsConfiguration.StandardOption.UPDATE).setValue(false);
final CommonUpdateProjectAction action = new CommonUpdateProjectAction();
action.getTemplatePresentation().setText("1");
action.actionPerformed(new AnActionEvent(null,
new DataContext() {
@Nullable
@Override
public Object getData(@NonNls String dataId) {
if (CommonDataKeys.PROJECT.is(dataId)) {
return project;
}
return null;
}
}, "test", new Presentation(), ActionManager.getInstance(), 0));
final ChangeListManager clManager = ChangeListManager.getInstance(project);
clManager.ensureUpToDate(false);
clManager.ensureUpToDate(false); // wait for after-events like annotations recalculation
sleep(100); // zipper updater
}
示例7: projectOpened
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public void projectOpened() {
StartupManager.getInstance(myProject).registerPostStartupActivity(new DumbAwareRunnable() {
public void run() {
if (myUpdateInfo != null && !myUpdateInfo.isEmpty() && ProjectReloadState.getInstance(myProject).isAfterAutomaticReload()) {
ActionInfo actionInfo = myUpdateInfo.getActionInfo();
if (actionInfo != null) {
ProjectLevelVcsManagerEx.getInstanceEx(myProject).showUpdateProjectInfo(myUpdateInfo.getFileInformation(),
VcsBundle.message("action.display.name.update"), actionInfo,
false);
CommittedChangesCache.getInstance(myProject).refreshIncomingChangesAsync();
}
myUpdateInfo = null;
}
else {
myUpdateInfo = null;
}
}
});
}
示例8: Updater
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public Updater(final Project project, final FilePath[] roots, final Map<AbstractVcs, Collection<FilePath>> vcsToVirtualFiles) {
super(project, getTemplatePresentation().getText(), true, VcsConfiguration.getInstance(project).getUpdateOption());
myProject = project;
myProjectLevelVcsManager = ProjectLevelVcsManagerEx.getInstanceEx(project);
myDirtyScopeManager = VcsDirtyScopeManager.getInstance(myProject);
myRoots = roots;
myVcsToVirtualFiles = vcsToVirtualFiles;
myUpdatedFiles = UpdatedFiles.create();
myGroupedExceptions = new HashMap<HotfixData, List<VcsException>>();
myUpdateSessions = new ArrayList<UpdateSession>();
// create from outside without any context; context is created by vcses
myContextInfo = new HashMap<AbstractVcs, SequentialUpdatesContext>();
myUpdateNumber = 1;
}
示例9: createOptionsDialog
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public UpdateOrStatusOptionsDialog createOptionsDialog(final Project project,
LinkedHashMap<Configurable, AbstractVcs> envToConfMap,
final String scopeName) {
return new UpdateOrStatusOptionsDialog(project, envToConfMap) {
protected String getRealTitle() {
return VcsBundle.message("action.display.name.update.scope", scopeName);
}
@Override
protected String getActionNameForDimensions() {
return "update";
}
protected boolean isToBeShown() {
return ProjectLevelVcsManagerEx.getInstanceEx(project).getOptions(VcsConfiguration.StandardOption.UPDATE).getValue();
}
protected void setToBeShown(boolean value, boolean onOk) {
if (onOk) {
ProjectLevelVcsManagerEx.getInstanceEx(project).getOptions(VcsConfiguration.StandardOption.UPDATE).setValue(value);
}
}
};
}
示例10: readExternal
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
@Override
public void readExternal(Element element) throws InvalidDataException {
DefaultJDOMExternalizer.readExternal(this, element);
final ProjectLevelVcsManagerImpl vcsManager = (ProjectLevelVcsManagerImpl)ProjectLevelVcsManagerEx.getInstanceEx(myModule.getProject());
if (!USE_PROJECT_VCS) {
final VirtualFile[] roots = ModuleRootManager.getInstance(myModule).getContentRoots();
StartupManager.getInstance(myModule.getProject()).runWhenProjectIsInitialized(new Runnable() {
@Override
public void run() {
for(VirtualFile file: roots) {
vcsManager.setDirectoryMapping(file.getPath(), ACTIVE_VCS_NAME);
}
vcsManager.cleanupMappings();
}
});
}
}
示例11: imitInternalUpdate
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
private void imitInternalUpdate() {
final ProjectLevelVcsManagerEx ex = ProjectLevelVcsManagerEx.getInstanceEx(myProject);
ex.setDirectoryMappings(Collections.singletonList(
new VcsDirectoryMapping(FileUtil.toSystemIndependentName(myWorkingCopyDir.getPath()), GitVcs.NAME)));
ex.getOptions(VcsConfiguration.StandardOption.UPDATE).setValue(false);
final CommonUpdateProjectAction action = new CommonUpdateProjectAction();
action.getTemplatePresentation().setText("1");
action.actionPerformed(new AnActionEvent(null,
new DataContext() {
@Nullable
@Override
public Object getData(@NonNls String dataId) {
if (PlatformDataKeys.PROJECT.is(dataId)) {
return myProject;
}
return null;
}
}, "test", new Presentation(), null, 0));
myChangeListManager.ensureUpToDate(false);
myChangeListManager.ensureUpToDate(false); // wait for after-events like annotations recalculation
sleep(100); // zipper updater
}
示例12: SvnIntegrateChangesTask
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public SvnIntegrateChangesTask(final SvnVcs vcs, final WorkingCopyInfo info, final MergerFactory mergerFactory,
final SVNURL currentBranchUrl, final String title, final boolean dryRun, String branchName) {
super(vcs.getProject(), title, true, VcsConfiguration.getInstance(vcs.getProject()).getUpdateOption());
myMergerFactory = mergerFactory;
myCurrentBranchUrl = currentBranchUrl;
myDryRun = dryRun;
myTitle = title;
myBranchName = branchName;
myProjectLevelVcsManager = ProjectLevelVcsManagerEx.getInstanceEx(myProject);
myVcs = vcs;
myInfo = info;
myAccomulatedFiles = new UpdatedFilesReverseSide(UpdatedFiles.create());
myExceptions = new ArrayList<VcsException>();
myHandler = new IntegrateEventHandler(myVcs, ProgressManager.getInstance().getProgressIndicator());
myMerger = myMergerFactory.createMerger(myVcs, new File(myInfo.getLocalPath()), myHandler, myCurrentBranchUrl, myBranchName);
}
示例13: imitUpdate
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
protected static void imitUpdate(final Project project) {
ProjectLevelVcsManagerEx.getInstanceEx(project).getOptions(VcsConfiguration.StandardOption.UPDATE).setValue(false);
final CommonUpdateProjectAction action = new CommonUpdateProjectAction();
action.getTemplatePresentation().setText("1");
action.actionPerformed(new AnActionEvent(null,
new DataContext() {
@Nullable
@Override
public Object getData(@NonNls String dataId) {
if (PlatformDataKeys.PROJECT.is(dataId)) {
return project;
}
return null;
}
}, "test", new Presentation(), null, 0));
final ChangeListManager clManager = ChangeListManager.getInstance(project);
clManager.ensureUpToDate(false);
clManager.ensureUpToDate(false); // wait for after-events like annotations recalculation
sleep(100); // zipper updater
}
示例14: projectOpened
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
@Override
public void projectOpened() {
StartupManager.getInstance(myProject).registerPostStartupActivity(new DumbAwareRunnable() {
@Override
public void run() {
if (myUpdateInfo != null && !myUpdateInfo.isEmpty() && ProjectReloadState.getInstance(myProject).isAfterAutomaticReload()) {
ActionInfo actionInfo = myUpdateInfo.getActionInfo();
if (actionInfo != null) {
ProjectLevelVcsManagerEx.getInstanceEx(myProject).showUpdateProjectInfo(myUpdateInfo.getFileInformation(),
VcsBundle.message("action.display.name.update"), actionInfo,
false);
CommittedChangesCache.getInstance(myProject).refreshIncomingChangesAsync();
}
myUpdateInfo = null;
}
else {
myUpdateInfo = null;
}
}
});
}
示例15: Updater
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入依賴的package包/類
public Updater(final Project project, final FilePath[] roots, final Map<AbstractVcs, Collection<FilePath>> vcsToVirtualFiles) {
super(project, getTemplatePresentation().getText(), true, VcsConfiguration.getInstance(project).getUpdateOption());
myProject = project;
myProjectLevelVcsManager = ProjectLevelVcsManagerEx.getInstanceEx(project);
myDirtyScopeManager = VcsDirtyScopeManager.getInstance(myProject);
myRoots = roots;
myVcsToVirtualFiles = vcsToVirtualFiles;
myUpdatedFiles = UpdatedFiles.create();
myGroupedExceptions = new HashMap<>();
myUpdateSessions = new ArrayList<>();
// create from outside without any context; context is created by vcses
myContextInfo = new HashMap<>();
myUpdateNumber = 1;
}