mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SVN: one-click merge: show working copies -> to changes tool window tab
(cherry picked from commit 835743433991efc6330617fd3c0907e61a355744)
This commit is contained in:
@@ -132,6 +132,7 @@ public class SvnVcs extends AbstractVcs<CommittedChangeList> {
|
||||
|
||||
private ChangeProvider myChangeProvider;
|
||||
private MergeProvider myMergeProvider;
|
||||
private final WorkingCopiesContent myWorkingCopiesContent;
|
||||
|
||||
@NonNls public static final String LOG_PARAMETER_NAME = "javasvn.log";
|
||||
public static final String pathToEntries = SvnUtil.SVN_ADMIN_DIR_NAME + File.separatorChar + SvnUtil.ENTRIES_FILE_NAME;
|
||||
@@ -221,6 +222,7 @@ public class SvnVcs extends AbstractVcs<CommittedChangeList> {
|
||||
}
|
||||
|
||||
myFrameStateListener = new MyFrameStateListener(changeListManager, vcsDirtyScopeManager);
|
||||
myWorkingCopiesContent = new WorkingCopiesContent(this);
|
||||
}
|
||||
|
||||
public void postStartup() {
|
||||
@@ -228,6 +230,7 @@ public class SvnVcs extends AbstractVcs<CommittedChangeList> {
|
||||
myCopiesRefreshManager = new SvnCopiesRefreshManager(myProject, (SvnFileUrlMappingImpl) getSvnFileUrlMapping());
|
||||
|
||||
invokeRefreshSvnRoots(true);
|
||||
myWorkingCopiesContent.activate();
|
||||
}
|
||||
|
||||
public void invokeRefreshSvnRoots(final boolean asynchronous) {
|
||||
@@ -472,6 +475,7 @@ public class SvnVcs extends AbstractVcs<CommittedChangeList> {
|
||||
myAuthNotifier.clear();
|
||||
|
||||
mySvnBranchPointsCalculator = null;
|
||||
myWorkingCopiesContent.deactivate();
|
||||
}
|
||||
|
||||
public VcsShowConfirmationOption getAddConfirmation() {
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2000-2010 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jetbrains.idea.svn;
|
||||
|
||||
import com.intellij.openapi.vcs.changes.ui.ChangesViewContentManager;
|
||||
import com.intellij.ui.content.Content;
|
||||
import com.intellij.ui.content.ContentFactory;
|
||||
import org.jetbrains.idea.svn.dialogs.CopiesPanel;
|
||||
|
||||
public class WorkingCopiesContent {
|
||||
private final SvnVcs myVcs;
|
||||
private Content myShownContent;
|
||||
|
||||
public WorkingCopiesContent(SvnVcs vcs) {
|
||||
myVcs = vcs;
|
||||
}
|
||||
|
||||
public void activate() {
|
||||
final ChangesViewContentManager cvcm = ChangesViewContentManager.getInstance(myVcs.getProject());
|
||||
final ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
|
||||
|
||||
final CopiesPanel copiesPanel = new CopiesPanel(myVcs.getProject());
|
||||
myShownContent = contentFactory.createContent(copiesPanel.getComponent(), SvnBundle.message("dialog.show.svn.map.title"), true);
|
||||
myShownContent.setCloseable(false);
|
||||
cvcm.addContent(myShownContent);
|
||||
myShownContent.setPreferredFocusableComponent(copiesPanel.getPrefferedFocusComponent());
|
||||
}
|
||||
|
||||
public void deactivate() {
|
||||
if (myShownContent != null) {
|
||||
final ChangesViewContentManager cvcm = ChangesViewContentManager.getInstance(myVcs.getProject());
|
||||
cvcm.removeContent(myShownContent);
|
||||
myShownContent = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,7 @@ public class CopiesPanel {
|
||||
myRefreshLabel = new LinkLabel("Refresh", null, new LinkListener() {
|
||||
public void linkSelected(LinkLabel aSource, Object aLinkData) {
|
||||
if (myRefreshLabel.isEnabled()) {
|
||||
myVcs.invokeRefreshSvnRoots(false);
|
||||
myVcs.invokeRefreshSvnRoots(true);
|
||||
myRefreshLabel.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user