本文整理汇总了Java中com.intellij.openapi.vcs.CheckoutProvider类的典型用法代码示例。如果您正苦于以下问题:Java CheckoutProvider类的具体用法?Java CheckoutProvider怎么用?Java CheckoutProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CheckoutProvider类属于com.intellij.openapi.vcs包,在下文中一共展示了CheckoutProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createAction
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
@NotNull
@Override
protected AnAction createAction(CheckoutProvider provider) {
return new CheckoutAction(provider) {
@Override
protected CheckoutProvider.Listener getListener(Project project) {
return new CheckoutProvider.Listener() {
@Override
public void directoryCheckedOut(File directory, VcsKey vcs) {
final VirtualFile dir = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(directory);
if (dir != null) {
PlatformProjectOpenProcessor.getInstance().doOpenProject(dir, null, false);
}
}
@Override
public void checkoutCompleted() {
}
};
}
};
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:NewProjectFromVCSGroup.java
示例2: computeChildren
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
@NotNull
@Override
protected AnAction[] computeChildren(@NotNull ActionManager manager) {
CheckoutProvider[] providers = CheckoutProvider.EXTENSION_POINT_NAME.getExtensions();
if (providers.length == 0) {
return EMPTY_ARRAY;
}
Arrays.sort(providers, new CheckoutProvider.CheckoutProviderComparator());
AnAction[] children = new AnAction[providers.length];
for (int i = 0; i < providers.length; i++) {
CheckoutProvider provider = providers[i];
children[i] = createAction(provider);
}
return children;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:CheckoutActionGroup.java
示例3: perform
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
@Override
public void perform(String vcsId, Map<String, String> parameters) {
String repository = parameters.get(REPOSITORY_NAME_KEY);
if (StringUtil.isEmpty(repository)) {
return;
}
for (CheckoutProvider provider : CheckoutProvider.EXTENSION_POINT_NAME.getExtensions()) {
if (provider instanceof CheckoutProviderEx) {
CheckoutProviderEx providerEx = (CheckoutProviderEx)provider;
if (providerEx.getVcsId().equals(vcsId)) {
Project project = ProjectManager.getInstance().getDefaultProject();
CheckoutProvider.Listener listener = ProjectLevelVcsManager.getInstance(project).getCompositeCheckoutListener();
providerEx.doCheckout(project, listener, repository);
break;
}
}
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:JBProtocolCheckoutCommand.java
示例4: UpdateVersionControlSystem
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
private void UpdateVersionControlSystem(final Project project, String parentDirectory, String directoryName, final VirtualFile destinationParent, CheckoutProvider.Listener listener) {
// Add our new directory to IntelliJ's project
DvcsUtil.addMappingIfSubRoot(project, FileUtil.join(new String[]{parentDirectory, directoryName}), TFSVcs.TFVC_NAME);
// Check the folder for any dirty files
destinationParent.refresh(true, true, new Runnable() {
public void run() {
if (project.isOpen() && !project.isDisposed() && !project.isDefault()) {
VcsDirtyScopeManager mgr = VcsDirtyScopeManager.getInstance(project);
mgr.fileDirty(destinationParent);
}
}
});
// Trigger our listener events
listener.directoryCheckedOut(new File(parentDirectory, directoryName), TFSVcs.getKey());
listener.checkoutCompleted();
}
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:20,代码来源:TfvcCheckoutModel.java
示例5: SimpleCheckoutModel
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
protected SimpleCheckoutModel(final Project project, final CheckoutProvider.Listener listener, final String gitUrl, final String ref) {
super();
this.project = project;
this.listener = listener;
this.gitUrl = gitUrl;
this.ref = ref;
this.parentDirectory = PluginServiceProvider.getInstance().getPropertyService().getProperty(PropertyService.PROP_REPO_ROOT);
// use default root if no repo root is found
if (StringUtils.isEmpty(this.parentDirectory)) {
this.parentDirectory = DEFAULT_SOURCE_PATH;
}
// try and parse for the repo name to use as the directory name
final Matcher matcher = GIT_URL_PATTERN.matcher(gitUrl);
if (matcher.find() && matcher.groupCount() == 1) {
this.directoryName = matcher.group(1);
} else {
this.directoryName = StringUtils.EMPTY;
}
}
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:22,代码来源:SimpleCheckoutModel.java
示例6: processCommand
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
/**
* Kicks off the SimpleCheckout workflow with the Git Url passed
*/
public void processCommand() {
final Project project = DefaultProjectFactory.getInstance().getDefaultProject();
final CheckoutProvider.Listener listener = ProjectLevelVcsManager.getInstance(project).getCompositeCheckoutListener();
try {
launchApplicationWindow();
final SimpleCheckoutController controller = new SimpleCheckoutController(project, listener, gitUrl, ref);
controller.showModalDialog();
} catch (Throwable t) {
//unexpected error occurred while doing simple checkout
logger.warn("VSTS commandline checkout failed due to an unexpected error", t);
VcsNotifier.getInstance(project).notifyError(TfPluginBundle.message(TfPluginBundle.KEY_CHECKOUT_DIALOG_TITLE),
TfPluginBundle.message(TfPluginBundle.KEY_CHECKOUT_ERRORS_UNEXPECTED, t.getMessage()));
}
}
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:20,代码来源:SimpleCheckoutStarter.java
示例7: notifyListenerIfNeeded
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
private static void notifyListenerIfNeeded(final File target, final CheckoutProvider.Listener listener) {
if (listener != null) {
final LocalFileSystem lfs = LocalFileSystem.getInstance();
final VirtualFile vf = lfs.refreshAndFindFileByIoFile(target);
if (vf != null) {
vf.refresh(true, true, new Runnable() {
public void run() {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
notifyListener(listener, target);
}
});
}
});
}
else {
notifyListener(listener, target);
}
}
}
开发者ID:irengrig,项目名称:fossil4idea,代码行数:22,代码来源:CloneAndOpenAction.java
示例8: fillActions
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
protected void fillActions(DefaultActionGroup group) {
final CheckoutProvider[] providers = Extensions.getExtensions(CheckoutProvider.EXTENSION_POINT_NAME);
Arrays.sort(providers, new CheckoutProvider.CheckoutProviderComparator());
for (CheckoutProvider provider : providers) {
group.add(new CheckoutAction(provider));
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:GetFromVcsAction.java
示例9: update
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
@Override
public void update(AnActionEvent e) {
e.getPresentation().setEnabled(Extensions.getExtensions(CheckoutProvider.EXTENSION_POINT_NAME).length > 0);
if (NewWelcomeScreen.isNewWelcomeScreen(e)) {
e.getPresentation().setIcon(AllIcons.Welcome.FromVCS);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:GetFromVcsAction.java
示例10: doCheckout
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
public void doCheckout(@NotNull final Project project, final CheckoutProvider.Listener listener) {
final CheckoutWizard checkoutWizard = new CheckoutWizard(project);
if (!checkoutWizard.showAndGet()) {
return;
}
final boolean useAlternateCheckoutPath = checkoutWizard.useAlternativeCheckoutLocation();
final File checkoutDirectory = checkoutWizard.getCheckoutDirectory();
final CvsElement[] selectedElements = checkoutWizard.getSelectedElements();
final CvsHandler checkoutHandler = CommandCvsHandler.createCheckoutHandler(
checkoutWizard.getConfigurationWithDateOrRevisionSettings(),
collectCheckoutPaths(selectedElements),
checkoutDirectory,
useAlternateCheckoutPath,
CvsApplicationLevelConfiguration.getInstance().MAKE_CHECKED_OUT_FILES_READONLY,
VcsConfiguration.getInstance(project).getCheckoutOption());
final CvsOperationExecutor executor = new CvsOperationExecutor(null);
executor.performActionSync(checkoutHandler, new CvsOperationExecutorCallback() {
public void executionFinished(boolean successfully) {
if (!executor.hasNoErrors()) {
Messages.showErrorDialog(CvsBundle.message("message.error.checkout", executor.getResult().composeError().getLocalizedMessage()),
CvsBundle.message("operation.name.check.out.project"));
}
refreshAfterCheckout(listener, selectedElements, checkoutDirectory, useAlternateCheckoutPath);
}
public void executionFinishedSuccessfully() {
}
public void executeInProgressAfterAction(ModalityContext modaityContext) {
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:37,代码来源:CvsCheckoutProvider.java
示例11: doCheckout
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
@Override
public void doCheckout(final Project project, final CheckoutProvider.Listener listener,
final ServerContext context, final VirtualFile destinationParent,
final String directoryName, final String parentDirectory, final boolean isAdvancedChecked) {
final String gitRepositoryStr = context.getUsableGitUrl();
final Git git = ServiceManager.getService(Git.class);
git4idea.checkout.GitCheckoutProvider.clone(project, git, listener,
destinationParent,
gitRepositoryStr,
directoryName,
parentDirectory);
}
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:13,代码来源:GitCheckoutModel.java
示例12: SimpleCheckoutController
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
public SimpleCheckoutController(final Project project, final CheckoutProvider.Listener listener, final String gitUrl, final String ref) {
this(new SimpleCheckoutDialog(
project,
TfPluginBundle.message(TfPluginBundle.KEY_CHECKOUT_DIALOG_TITLE),
TfPluginBundle.message(TfPluginBundle.KEY_CHECKOUT_DIALOG_CLONE_BUTTON),
TfPluginBundle.KEY_CHECKOUT_DIALOG_TITLE),
new SimpleCheckoutModel(project, listener, gitUrl, ref));
}
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:9,代码来源:SimpleCheckoutController.java
示例13: CheckoutModel
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
@VisibleForTesting
public CheckoutModel(final Project project, final CheckoutProvider.Listener listener, final VcsSpecificCheckoutModel specificCheckoutModel,
final CheckoutPageModel vsoModel, final CheckoutPageModel tfsModel, final boolean autoLoad) {
this.project = project;
this.listener = listener;
this.specificCheckoutModel = specificCheckoutModel;
this.vsoModel = vsoModel == null ? new VsoCheckoutPageModel(this, autoLoad) : vsoModel;
this.tfsModel = tfsModel == null ? new TfsCheckoutPageModel(this) : tfsModel;
updateCloneEnabled();
}
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:11,代码来源:CheckoutModel.java
示例14: CheckoutController
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
public CheckoutController(final Project project, final CheckoutProvider.Listener listener, final VcsSpecificCheckoutModel specificCheckoutModel) {
this(new BaseDialogImpl(project,
TfPluginBundle.message(TfPluginBundle.KEY_CHECKOUT_DIALOG_TITLE),
specificCheckoutModel.getButtonText(),
TfPluginBundle.KEY_CHECKOUT_DIALOG_TITLE),
new CheckoutPageImpl(new VsoLoginForm(), new CheckoutForm(true, specificCheckoutModel.getRepositoryType())),
new CheckoutPageImpl(new TfsLoginForm(), new CheckoutForm(false, specificCheckoutModel.getRepositoryType())),
new CheckoutModel(project, listener, specificCheckoutModel));
}
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:10,代码来源:CheckoutController.java
示例15: executeMe
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
public static void executeMe(final Project project, final CheckoutProvider.Listener listener) {
final UIWorker uiWorker = new UIWorker();
uiWorker.showDialog(project, new Runnable() {
@Override
public void run() {
ProgressManager.getInstance().run(new Task.Backgroundable(project, "Clone Fossil Repository", false, PerformInBackgroundOption.ALWAYS_BACKGROUND) {
@Override
public void run(@NotNull ProgressIndicator progressIndicator) {
try {
progressIndicator.setText("Cloning Fossil Repository...");
final String localRepoFile = uiWorker.getLocalRepoFile();
new CheckoutUtil(project).cloneRepo(uiWorker.getUrl(), localRepoFile);
VcsBalloonProblemNotifier.showOverVersionControlView(project, "Fossil clone successful: " + localRepoFile, MessageType.INFO);
progressIndicator.checkCanceled();
progressIndicator.setText("Opening Fossil Repository...");
final String checkoutPath = uiWorker.getLocalPath();
final File target = new File(checkoutPath);
new CheckoutUtil(project).checkout(new File(localRepoFile), target, null);
VcsBalloonProblemNotifier.showOverVersionControlView(project, "Fossil repository successfully opened: " + checkoutPath, MessageType.INFO);
notifyListenerIfNeeded(target, listener);
} catch (VcsException e) {
VcsBalloonProblemNotifier.showOverVersionControlView(project, "Fossil clone and open failed: " + e.getMessage(), MessageType.ERROR);
}
}
});
}
});
}
开发者ID:irengrig,项目名称:fossil4idea,代码行数:29,代码来源:CloneAndOpenAction.java
示例16: update
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
public void update(AnActionEvent e) {
super.update(e);
final CheckoutProvider[] providers = Extensions.getExtensions(CheckoutProvider.EXTENSION_POINT_NAME);
if (providers.length == 0) {
e.getPresentation().setVisible(false);
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:CheckoutActionGroup.java
示例17: getChildren
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
@NotNull
public AnAction[] getChildren(@Nullable AnActionEvent e) {
if (myChildren == null) {
final CheckoutProvider[] providers = Extensions.getExtensions(CheckoutProvider.EXTENSION_POINT_NAME);
Arrays.sort(providers, new CheckoutProvider.CheckoutProviderComparator());
myChildren = new AnAction[providers.length];
for (int i = 0; i < providers.length; i++) {
CheckoutProvider provider = providers[i];
myChildren[i] = new CheckoutAction(provider);
}
}
return myChildren;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:14,代码来源:CheckoutActionGroup.java
示例18: doCheckout
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
public void doCheckout(@NotNull final Project project, final CheckoutProvider.Listener listener) {
final CheckoutWizard checkoutWizard = new CheckoutWizard(project);
checkoutWizard.show();
if (!checkoutWizard.isOK()) return;
final boolean useAlternateCheckoutPath = checkoutWizard.useAlternativeCheckoutLocation();
final File checkoutDirectory = checkoutWizard.getCheckoutDirectory();
final CvsElement[] selectedElements = checkoutWizard.getSelectedElements();
final CvsHandler checkoutHandler = CommandCvsHandler.createCheckoutHandler(
checkoutWizard.getSelectedConfiguration(),
collectCheckoutPaths(selectedElements),
checkoutDirectory,
useAlternateCheckoutPath,
CvsApplicationLevelConfiguration.getInstance().MAKE_CHECKED_OUT_FILES_READONLY, VcsConfiguration.getInstance(project).getCheckoutOption());
final CvsOperationExecutor executor = new CvsOperationExecutor(null);
executor.performActionSync(checkoutHandler, new CvsOperationExecutorCallback() {
public void executionFinished(boolean successfully) {
if (!executor.hasNoErrors()) {
Messages.showErrorDialog(CvsBundle.message("message.error.checkout", executor.getResult().composeError().getLocalizedMessage()),
CvsBundle.message("operation.name.check.out.project"));
}
refreshAfterCheckout(listener, selectedElements, checkoutDirectory, useAlternateCheckoutPath);
}
public void executionFinishedSuccessfully() {
}
public void executeInProgressAfterAction(ModalityContext modaityContext) {
}
});
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:33,代码来源:CvsCheckoutProvider.java
示例19: doCheckout
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
public static void doCheckout(Project project, File target, String url, SVNRevision revision,
Depth depth, boolean ignoreExternals, CheckoutProvider.Listener listener) {
try {
Class<?> clazz = Class.forName("org.jetbrains.idea.svn.checkout.SvnCheckoutProvider");
Method method = clazz.getMethod("doCheckout", Project.class, File.class, String.class, SVNRevision.class, Depth.class, boolean.class, CheckoutProvider.Listener.class);
method.invoke(null, project, target, url, revision, depth, ignoreExternals, listener);
} catch(Exception e) {
Messages.showErrorDialog("Failed to complete the operation. Please checkout the source code from the following subversion repository and invoke the project wizard manually:\n\n "+
"SVN URL: "+url, "Operation failed");
}
}
开发者ID:janotav,项目名称:ali-idea-plugin,代码行数:12,代码来源:SvnCheckoutProvider.java
示例20: update
import com.intellij.openapi.vcs.CheckoutProvider; //导入依赖的package包/类
@RequiredDispatchThread
@Override
public void update(@Nonnull AnActionEvent e) {
e.getPresentation().setEnabledAndVisible(Extensions.getExtensions(CheckoutProvider.EXTENSION_POINT_NAME).length > 0);
if (WelcomeFrame.isFromWelcomeFrame(e)) {
e.getPresentation().setIcon(AllIcons.Welcome.FromVCS);
}
}
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:GetFromVcsAction.java
注:本文中的com.intellij.openapi.vcs.CheckoutProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论