本文整理汇总了Java中org.jetbrains.idea.svn.SvnBundle类的典型用法代码示例。如果您正苦于以下问题:Java SvnBundle类的具体用法?Java SvnBundle怎么用?Java SvnBundle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SvnBundle类属于org.jetbrains.idea.svn包,在下文中一共展示了SvnBundle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadContent
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
public byte[] loadContent() throws IOException, VcsException {
ContentLoader loader = new ContentLoader(myURL, myRevision, myPegRevision);
if (ApplicationManager.getApplication().isDispatchThread() &&
!myRevision.isLocal()) {
ProgressManager.getInstance().runProcessWithProgressSynchronously(loader, SvnBundle.message("progress.title.loading.file.content"),
false, myVCS.getProject());
}
else {
loader.run();
}
VcsException exception = loader.getException();
if (exception == null) {
final byte[] contents = loader.getContents();
ContentRevisionCache.checkContentsSize(myURL, contents.length);
return contents;
}
else {
LOG.info("Failed to load file '" + myURL + "' content at revision: " + myRevision + "\n" + exception.getMessage(), exception);
throw exception;
}
}
示例2: createCenterPanel
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
@Nullable
@Override
protected JComponent createCenterPanel() {
JPanel parentPanel = new JPanel(new BorderLayout());
final JPanel labelPanel = new JPanel(new GridBagLayout());
final JLabel label1 = new JLabel(SvnBundle.message("svn.edit.commit.message.attention"));
parentPanel.setMinimumSize(new Dimension(label1.getPreferredSize().width + 50, 150));
final GridBagConstraints gb = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
new Insets(1, 1, 1, 1), 0, 0);
label1.setFont(label1.getFont().deriveFont(Font.BOLD));
labelPanel.add(label1, gb);
++ gb.gridy;
gb.insets.top = 5;
gb.insets.bottom = 3;
final JLabel label2 = new JLabel(SvnBundle.message("svn.edit.commit.message.prompt"));
labelPanel.add(label2, gb);
final JPanel wrapper = new JPanel(new BorderLayout());
wrapper.add(labelPanel, BorderLayout.WEST);
parentPanel.add(wrapper, BorderLayout.NORTH);
myCommitMessage = new CommitMessage(myProject, false);
myCommitMessage.setCheckSpelling(true);
myCommitMessage.setText(myOldText);
parentPanel.add(myCommitMessage, BorderLayout.CENTER);
return parentPanel;
}
示例3: chooseCommittedChangeList
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
@Nullable
public static SvnChangeList chooseCommittedChangeList(final Project project, final SvnRepositoryLocation location,
final VirtualFile root) {
try {
final SvnCommittedChangesTableModel model = new SvnCommittedChangesTableModel(location, project, root,
SvnVcs.getInstance(project)
.getCommittedChangesProvider().getColumns());
final ChangesBrowserDialog dlg = new ChangesBrowserDialog(project, model, ChangesBrowserDialog.Mode.Choose, null);
if (dlg.showAndGet()) {
return (SvnChangeList)dlg.getSelectedChangeList();
}
model.onBeforeClose();
}
catch (VcsException e) {
Messages.showErrorDialog(e.getMessage(), SvnBundle.message("error.cannot.load.revisions"));
}
return null;
}
示例4: handleWorkingCopyRoot
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
public void handleWorkingCopyRoot(File root, ProgressIndicator progress) {
if (progress != null) {
showProgressMessage(progress, root);
}
myHandler.startUpdate();
try {
long rev = doUpdate(root);
if (rev < 0 && !isMerge()) {
throw new SvnBindException(SvnBundle.message("exception.text.root.was.not.properly.updated", root));
}
}
catch (VcsException e) {
LOG.info(e);
myExceptions.add(e);
}
finally {
myHandler.finishUpdate();
}
}
示例5: apply
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
public void apply(SvnConfiguration conf) throws ConfigurationException {
if (myMergeText1.getText().trim().length() == 0) {
myMergeText1.getTextField().requestFocus();
throw new ConfigurationException(SvnBundle.message("source.url.could.not.be.empty.error.message"));
}
if (myMergeText2.getText().trim().length() == 0) {
myMergeText2.getTextField().requestFocus();
throw new ConfigurationException(SvnBundle.message("source.url.could.not.be.empty.error.message"));
}
if (myMergeText1.getText().equals(myMergeText2.getText()) && myRevision1.getRevisionText().equals(myRevision2.getRevisionText())) {
throw new ConfigurationException(SvnBundle.message("no.differences.between.sources.error.message"));
}
final MergeRootInfo rootInfo = conf.getMergeRootInfo(myRoot.getIOFile(), myVcs);
rootInfo.setUrl1(myMergeText1.getText());
rootInfo.setUrl2(myMergeText2.getText());
rootInfo.setRevision1(myRevision1.getRevision());
rootInfo.setRevision2(myRevision2.getRevision());
}
示例6: showMe
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
public static void showMe(final Project project, final SvnFileRevision revision, final VirtualFile file) {
if (ModalityState.NON_MODAL.equals(ModalityState.current())) {
ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.VCS);
final ContentManager contentManager = toolWindow.getContentManager();
final MyDialog dialog = new MyDialog(project, revision, file);
// TODO: Temporary memory leak fix - rewrite this part not to create dialog if only createCenterPanel(), but not show() is invoked
Disposer.register(project, dialog.getDisposable());
Content content = ContentFactory.SERVICE.getInstance().createContent(dialog.createCenterPanel(),
SvnBundle.message("merge.source.details.title", (file == null) ? revision.getURL() : file.getName(), revision.getRevisionNumber().asString()), true);
ContentsUtil.addOrReplaceContent(contentManager, content, true);
toolWindow.activate(null);
} else {
new MyDialog(project, revision, file).show();
}
}
示例7: actionPerformed
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
final MyLocallyDeletedChecker locallyDeletedChecker = new MyLocallyDeletedChecker(e);
if (! locallyDeletedChecker.isEnabled()) return;
final String markText = SvnBundle.message("action.mark.tree.conflict.resolved.confirmation.title");
final Project project = locallyDeletedChecker.getProject();
final int result = Messages.showYesNoDialog(project,
SvnBundle.message("action.mark.tree.conflict.resolved.confirmation.text"), markText,
Messages.getQuestionIcon());
if (result == Messages.YES) {
final Ref<VcsException> exception = new Ref<VcsException>();
ProgressManager
.getInstance().run(new Task.Backgroundable(project, markText, true, BackgroundFromStartOption.getInstance()) {
public void run(@NotNull ProgressIndicator indicator) {
resolveLocallyDeletedTextConflict(locallyDeletedChecker, exception);
}
});
if (! exception.isNull()) {
AbstractVcsHelper.getInstance(project).showError(exception.get(), markText);
}
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:MarkLocallyDeletedTreeConflictResolvedAction.java
示例8: loadContent
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
@NotNull
protected ByteArrayOutputStream loadContent() throws VcsException {
final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ContentLoader loader = new ContentLoader(myPath, buffer, myRevision);
if (ApplicationManager.getApplication().isDispatchThread()) {
ProgressManager.getInstance()
.runProcessWithProgressSynchronously(loader, SvnBundle.message("progress.title.loading.file.content"), false, null);
}
else {
loader.run();
}
final Exception exception = loader.getException();
if (exception != null) {
throw new VcsException(exception);
}
ContentRevisionCache.checkContentsSize(myPath, buffer.size());
return buffer;
}
示例9: actionPerformed
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
public void actionPerformed(final AnActionEvent e) {
final Project project = e.getData(CommonDataKeys.PROJECT);
if (project == null) {
return;
}
final CopiesPanel copiesPanel = new CopiesPanel(project);
ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.VCS);
final ContentManager contentManager = toolWindow.getContentManager();
Content content = ContentFactory.SERVICE.getInstance().createContent(copiesPanel.getComponent(), SvnBundle.message("dialog.show.svn.map.title"), true);
ContentsUtil.addOrReplaceContent(contentManager, content, true);
toolWindow.activate(new Runnable() {
public void run() {
IdeFocusManager.getInstance(project).requestFocus(copiesPanel.getPreferredFocusedComponent(), true);
}
});
/*SwingUtilities.invokeLater(new Runnable() {
public void run() {
IdeFocusManager.getInstance(project).requestFocus(copiesPanel.getPrefferedFocusComponent(), true);
}
});*/
}
示例10: update
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
public void update(final AnActionEvent e) {
final Project project = CommonDataKeys.PROJECT.getData(e.getDataContext());
final Presentation presentation = e.getPresentation();
if (project == null) {
presentation.setEnabled(false);
presentation.setVisible(false);
return;
}
presentation.setText(SvnBundle.message("configure.branches.item"));
presentation.setDescription(SvnBundle.message("configure.branches.item"));
presentation.setIcon(SvnIcons.ConfigureBranches);
presentation.setVisible(true);
final ChangeList[] cls = e.getData(VcsDataKeys.CHANGE_LISTS);
presentation.setEnabled((cls != null) && (cls.length > 0) &&
(SvnVcs.getInstance(project).getName().equals(((CommittedChangeList) cls[0]).getVcs().getName())) &&
(((SvnChangeList) cls[0]).getRoot() != null));
}
示例11: createCenterPanel
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
@Override
protected JComponent createCenterPanel() {
JPanel panel = new JPanel(new BorderLayout(5,5));
final JPanel wrapper = new JPanel();
final BoxLayout boxLayout = new BoxLayout(wrapper, BoxLayout.Y_AXIS);
wrapper.setLayout(boxLayout);
final JLabel label = new JLabel(SvnBundle.message("label.ssh.server.provided.fingerprints", myHost));
wrapper.add(label);
final JLabel label2 = new JLabel(SvnBundle.message("label.ssh.server.provided.fingerprints2", myAlgorithm));
wrapper.add(label2);
final JTextField textField = new JTextField(myFingerprints);
textField.setEditable(false);
textField.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
wrapper.add(textField);
final JLabel label3 = new JLabel(SvnBundle.message("label.ssh.server.provided.fingerprints3"));
label3.setBorder(BorderFactory.createEmptyBorder(0,0,5,0));
wrapper.add(label3);
panel.add(wrapper, BorderLayout.CENTER);
myJCheckBox = new JCheckBox(SvnBundle.message("checkbox.svn.ssh.cache.fingerprint"));
myJCheckBox.setSelected(myStore);
myJCheckBox.setEnabled(myStore);
panel.add(myJCheckBox, BorderLayout.SOUTH);
return panel;
}
示例12: getSkippedMessage
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
@Nullable
public static String getSkippedMessage(@NotNull List<CommittedChangeList> changeLists) {
String result = null;
if (!changeLists.isEmpty()) {
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < changeLists.size(); i++) {
CommittedChangeList list = changeLists.get(i);
if (i != 0) {
sb.append(',');
}
sb.append(list.getNumber()).append(" (").append(list.getComment().replace('\n', '|')).append(')');
}
result = SvnBundle.message("action.Subversion.integrate.changes.warning.skipped.lists.text", sb.toString());
}
return result;
}
示例13: update
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
private void update() {
RepositoryTreeNode baseNode = myBrowser.getSelectedNode();
if (baseNode == null) {
myErrorLabel.setText(SvnBundle.message("diff.options.no.url.error"));
getOKAction().setEnabled(false);
return;
}
if (myURL.equals(getTargetURL())) {
myErrorLabel.setText(SvnBundle.message("diff.options.same.url.error"));
getOKAction().setEnabled(false);
return;
}
if (myUnifiedDiffButton.isSelected() && (myFileBrowser.getText().length() == 0 || getTargetFile().getParentFile() == null)) {
myErrorLabel.setText(SvnBundle.message("diff.options.no.patch.file.error"));
getOKAction().setEnabled(false);
return;
}
myErrorLabel.setText(" ");
getOKAction().setEnabled(true);
}
示例14: actionPerformed
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
public void actionPerformed(AnActionEvent e) {
RepositoryTreeNode node = myBrowserComponent.getSelectedNode();
if (node == null) {
return;
}
SVNURL url = node.getURL();
if (url != null) {
int rc = Messages.showYesNoDialog(myBrowserComponent.getProject(), SvnBundle.message("repository.browser.discard.location.prompt", url.toString()),
SvnBundle.message("repository.browser.discard.location.title"), Messages.getQuestionIcon());
if (rc != Messages.YES) {
return;
}
SvnApplicationSettings.getInstance().removeCheckoutURL(url.toString());
myBrowserComponent.removeURL(url.toString());
}
}
示例15: getChangeListsBefore
import org.jetbrains.idea.svn.SvnBundle; //导入依赖的package包/类
@NotNull
private List<Pair<SvnChangeList, LogHierarchyNode>> getChangeListsBefore(long revision) throws VcsException {
ChangeBrowserSettings settings = new ChangeBrowserSettings();
if (revision > 0) {
settings.CHANGE_BEFORE = String.valueOf(revision);
settings.USE_CHANGE_BEFORE_FILTER = true;
}
final ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
ProgressManager.progress2(
SvnBundle.message("progress.text2.collecting.history", myMergeContext.getSourceUrl() + (revision > 0 ? ("@" + revision) : "")));
final List<Pair<SvnChangeList, LogHierarchyNode>> result = ContainerUtil.newArrayList();
((SvnCommittedChangesProvider)myMergeContext.getVcs().getCommittedChangesProvider())
.getCommittedChangesWithMergedRevisons(settings, new SvnRepositoryLocation(myMergeContext.getSourceUrl()),
myBunchSize + (revision > 0 ? 2 : 1),
new PairConsumer<SvnChangeList, LogHierarchyNode>() {
public void consume(SvnChangeList svnList, LogHierarchyNode tree) {
indicator.setText2(
SvnBundle.message("progress.text2.processing.revision", svnList.getNumber()));
result.add(Pair.create(svnList, tree));
}
});
return result;
}