本文整理匯總了Java中com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx.getInstanceEx方法的典型用法代碼示例。如果您正苦於以下問題:Java ProjectLevelVcsManagerEx.getInstanceEx方法的具體用法?Java ProjectLevelVcsManagerEx.getInstanceEx怎麽用?Java ProjectLevelVcsManagerEx.getInstanceEx使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx
的用法示例。
在下文中一共展示了ProjectLevelVcsManagerEx.getInstanceEx方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: 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;
}
示例2: 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())));
}
}
示例3: 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);
}
示例4: 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;
}
示例5: 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();
}
});
}
}
示例6: 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
}
示例7: 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);
}
示例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<>();
myUpdateSessions = new ArrayList<>();
// create from outside without any context; context is created by vcses
myContextInfo = new HashMap<>();
myUpdateNumber = 1;
}
示例9: hyperlinkUpdate
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入方法依賴的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());
}
}
}
示例10: notifyRootManagerIfUnderProject
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入方法依賴的package包/類
private static void notifyRootManagerIfUnderProject(final Project project, final File directory) {
if (project.isDefault()) return;
final ProjectLevelVcsManagerEx plVcsManager = ProjectLevelVcsManagerEx.getInstanceEx(project);
final SvnVcs vcs = (SvnVcs) plVcsManager.findVcsByName(SvnVcs.VCS_NAME);
final VirtualFile[] files = vcs.getSvnFileUrlMapping().getNotFilteredRoots();
for (VirtualFile file : files) {
if (FileUtil.isAncestor(new File(file.getPath()), directory, false)) {
// todo: should be done like auto detection
plVcsManager.fireDirectoryMappingsChanged();
return;
}
}
}
示例11: hyperlinkUpdate
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx; //導入方法依賴的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());
}
}
}