mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
reverted to not register Disposable for each order entry
This commit is contained in:
@@ -19,6 +19,7 @@ import com.intellij.debugger.impl.DebuggerContextImpl;
|
||||
import com.intellij.debugger.impl.DebuggerContextListener;
|
||||
import com.intellij.debugger.impl.DebuggerStateManager;
|
||||
import com.intellij.debugger.ui.DebuggerView;
|
||||
import com.intellij.openapi.CompositeDisposable;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
@@ -28,13 +29,12 @@ import com.intellij.openapi.util.Disposer;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public abstract class UpdatableDebuggerView extends JPanel implements DebuggerView {
|
||||
private final Project myProject;
|
||||
private final DebuggerStateManager myStateManager;
|
||||
private volatile boolean myRefreshNeeded = true;
|
||||
private final java.util.List<Disposable> myDisposables = new ArrayList<Disposable>();
|
||||
private final CompositeDisposable myDisposables = new CompositeDisposable();
|
||||
private volatile boolean myUpdateEnabled;
|
||||
|
||||
protected UpdatableDebuggerView(final Project project, final DebuggerStateManager stateManager) {
|
||||
@@ -104,10 +104,7 @@ public abstract class UpdatableDebuggerView extends JPanel implements DebuggerVi
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
for (Disposable disposable : myDisposables) {
|
||||
Disposer.dispose(disposable);
|
||||
}
|
||||
myDisposables.clear();
|
||||
Disposer.dispose(myDisposables);
|
||||
}
|
||||
|
||||
protected void overrideShortcut(final JComponent forComponent, final String actionId, final ShortcutSet shortcutSet) {
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.intellij.execution.ui.actions.CloseAction;
|
||||
import com.intellij.execution.ui.layout.PlaceInGrid;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.actions.ContextHelpAction;
|
||||
import com.intellij.openapi.CompositeDisposable;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
@@ -56,7 +57,7 @@ public class RunContentBuilder implements LogConsoleManager, Disposable {
|
||||
|
||||
private final ProgramRunner myRunner;
|
||||
private final Project myProject;
|
||||
private final ArrayList<Disposable> myDisposeables = new ArrayList<Disposable>();
|
||||
private final CompositeDisposable myDisposeables = new CompositeDisposable();
|
||||
private final ArrayList<AnAction> myRunnerActions = new ArrayList<AnAction>();
|
||||
private final Icon myRerunIcon = DEFAULT_RERUN_ICON;
|
||||
private final boolean myReuseProhibited = false;
|
||||
@@ -96,10 +97,9 @@ public class RunContentBuilder implements LogConsoleManager, Disposable {
|
||||
myRunnerActions.add(action);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
for (Disposable disposable : myDisposeables) {
|
||||
disposable.dispose();
|
||||
}
|
||||
Disposer.dispose(myDisposeables);
|
||||
}
|
||||
|
||||
private RunContentDescriptor createDescriptor() {
|
||||
@@ -168,8 +168,10 @@ public class RunContentBuilder implements LogConsoleManager, Disposable {
|
||||
consoleContent.setActions(consoleActions, ActionPlaces.UNKNOWN, console.getComponent());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addLogConsole(final String name, final String path, final long skippedContent) {
|
||||
final LogConsoleImpl log = new LogConsoleImpl(myProject, new File(path), skippedContent, name, false){
|
||||
@Override
|
||||
public boolean isActive() {
|
||||
final Content content = myUi.findContent(path);
|
||||
return content != null && content.isSelected();
|
||||
@@ -182,12 +184,14 @@ public class RunContentBuilder implements LogConsoleManager, Disposable {
|
||||
addAdditionalTabComponent(log, path);
|
||||
|
||||
myUi.addListener(new ContentManagerAdapter() {
|
||||
@Override
|
||||
public void selectionChanged(final ContentManagerEvent event) {
|
||||
log.stateChanged(new ChangeEvent(myUi));
|
||||
}
|
||||
}, log);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeLogConsole(final String path) {
|
||||
final Content content = myUi.findContent(path);
|
||||
if (content != null) {
|
||||
@@ -203,6 +207,7 @@ public class RunContentBuilder implements LogConsoleManager, Disposable {
|
||||
restartAction.registerShortcut(component);
|
||||
actionGroup.add(restartAction);
|
||||
contentDescriptor.setRestarter(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
restartAction.restart();
|
||||
}
|
||||
@@ -257,6 +262,7 @@ public class RunContentBuilder implements LogConsoleManager, Disposable {
|
||||
return descriptor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addAdditionalTabComponent(final AdditionalTabComponent tabComponent, final String id) {
|
||||
final Content content = myUi.createContent(id, (ComponentWithActions)tabComponent, tabComponent.getTabTitle(),
|
||||
AllIcons.Debugger.Console, tabComponent.getPreferredFocusableComponent());
|
||||
@@ -267,6 +273,7 @@ public class RunContentBuilder implements LogConsoleManager, Disposable {
|
||||
myAdditionalContent.put(tabComponent, content);
|
||||
|
||||
myDisposeables.add(new Disposable(){
|
||||
@Override
|
||||
public void dispose() {
|
||||
if (!myUi.isDisposed()) {
|
||||
removeAdditionalTabComponent(tabComponent);
|
||||
@@ -275,9 +282,9 @@ public class RunContentBuilder implements LogConsoleManager, Disposable {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAdditionalTabComponent(AdditionalTabComponent component) {
|
||||
Disposer.dispose(component);
|
||||
myDisposeables.remove(component);
|
||||
final Content content = myAdditionalContent.remove(component);
|
||||
myUi.removeContent(content, true);
|
||||
}
|
||||
@@ -292,10 +299,12 @@ public class RunContentBuilder implements LogConsoleManager, Disposable {
|
||||
myAdditionalDisposable = additionalDisposable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isContentReuseProhibited() {
|
||||
return myReuseProhibited;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
Disposer.dispose(myAdditionalDisposable);
|
||||
super.dispose();
|
||||
|
||||
+9
-7
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.intellij.openapi.roots.ui.configuration;
|
||||
|
||||
import com.intellij.openapi.CompositeDisposable;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.module.ModuleConfigurationEditor;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
@@ -25,8 +26,6 @@ import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.ui.navigation.History;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
@@ -36,7 +35,7 @@ import java.util.List;
|
||||
public abstract class ModuleElementsEditor implements ModuleConfigurationEditor {
|
||||
protected final Project myProject;
|
||||
protected JComponent myComponent;
|
||||
private final List<Disposable> myDisposables = new ArrayList<Disposable>();
|
||||
private final CompositeDisposable myDisposables = new CompositeDisposable();
|
||||
|
||||
protected History myHistory;
|
||||
private final ModuleConfigurationState myState;
|
||||
@@ -50,6 +49,7 @@ public abstract class ModuleElementsEditor implements ModuleConfigurationEditor
|
||||
myHistory = history;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModified() {
|
||||
return getModel() != null && getModel().isChanged();
|
||||
}
|
||||
@@ -63,19 +63,21 @@ public abstract class ModuleElementsEditor implements ModuleConfigurationEditor
|
||||
}
|
||||
|
||||
public void canApply() throws ConfigurationException {}
|
||||
@Override
|
||||
public void apply() throws ConfigurationException {}
|
||||
@Override
|
||||
public void reset() {}
|
||||
@Override
|
||||
public void moduleStateChanged() {}
|
||||
public void moduleCompileOutputChanged(final String baseUrl, final String moduleName){}
|
||||
|
||||
@Override
|
||||
public void disposeUIResources() {
|
||||
for (Disposable disposable : myDisposables) {
|
||||
Disposer.dispose(disposable);
|
||||
}
|
||||
myDisposables.clear();
|
||||
Disposer.dispose(myDisposables);
|
||||
}
|
||||
|
||||
// caching
|
||||
@Override
|
||||
public final JComponent createComponent() {
|
||||
if (myComponent == null) {
|
||||
myComponent = createComponentImpl();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.intellij.openapi.roots.impl;
|
||||
|
||||
import com.intellij.openapi.CompositeDisposable;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.extensions.Extensions;
|
||||
@@ -62,7 +63,7 @@ public class RootModelImpl extends RootModelBase implements ModifiableRootModel
|
||||
|
||||
private final ProjectRootManagerImpl myProjectRootManager;
|
||||
// have to register all child disposables using this fake object since all clients just call ModifiableModel.dispose()
|
||||
private final Disposable myDisposable = Disposer.newDisposable();
|
||||
private final CompositeDisposable myDisposable = new CompositeDisposable();
|
||||
|
||||
RootModelImpl(@NotNull ModuleRootManagerImpl moduleRootManager,
|
||||
ProjectRootManagerImpl projectRootManager,
|
||||
@@ -776,12 +777,15 @@ public class RootModelImpl extends RootModelBase implements ModifiableRootModel
|
||||
@Override
|
||||
public <T> T getModuleExtension(@NotNull final Class<T> klass) {
|
||||
for (ModuleExtension extension : myExtensions) {
|
||||
if (klass.isAssignableFrom(extension.getClass())) return (T)extension;
|
||||
if (klass.isAssignableFrom(extension.getClass())) {
|
||||
//noinspection unchecked
|
||||
return (T)extension;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
void registerOnDispose(@NotNull Disposable disposable) {
|
||||
Disposer.register(myDisposable, disposable);
|
||||
myDisposable.add(disposable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright 2000-2012 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 com.intellij.openapi;
|
||||
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Like {@link com.intellij.openapi.Disposable}, you register instance of this class in {@link com.intellij.openapi.util.Disposer}.
|
||||
* Call {@link #add(Disposable)} to request automatic disposal of additional objects.
|
||||
* Comparing to registering these additional disposables with Disposer one by one,
|
||||
* this class improves on the memory usage by not creating temporary objects inside Disposer.
|
||||
*/
|
||||
public class CompositeDisposable implements Disposable {
|
||||
private final List<Disposable> myDisposables = new ArrayList<Disposable>();
|
||||
private boolean disposed;
|
||||
|
||||
public void add(@NotNull Disposable disposable) {
|
||||
assert !disposed : "Already disposed";
|
||||
myDisposables.add(disposable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
//assert !disposed : "Already disposed";
|
||||
|
||||
for (int i = myDisposables.size() - 1; i >= 0; i--) {
|
||||
Disposable disposable = myDisposables.get(i);
|
||||
Disposer.dispose(disposable);
|
||||
}
|
||||
myDisposables.clear();
|
||||
disposed = true;
|
||||
}
|
||||
}
|
||||
+28
-63
@@ -15,11 +15,8 @@
|
||||
*/
|
||||
package org.jetbrains.idea.svn.treeConflict;
|
||||
|
||||
import com.intellij.openapi.CompositeDisposable;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.Application;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diff.impl.patch.*;
|
||||
import com.intellij.openapi.diff.impl.patch.formove.PatchApplier;
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
import com.intellij.openapi.progress.BackgroundTaskQueue;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
@@ -27,33 +24,27 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.MessageType;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.vcs.AbstractVcsHelper;
|
||||
import com.intellij.openapi.vcs.FilePath;
|
||||
import com.intellij.openapi.vcs.FilePathImpl;
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
import com.intellij.openapi.vcs.changes.*;
|
||||
import com.intellij.openapi.vcs.changes.patch.*;
|
||||
import com.intellij.openapi.vcs.changes.AbstractRefreshablePanel;
|
||||
import com.intellij.openapi.vcs.changes.BackgroundFromStartOption;
|
||||
import com.intellij.openapi.vcs.changes.Change;
|
||||
import com.intellij.openapi.vcs.changes.ChangesUtil;
|
||||
import com.intellij.openapi.vcs.history.*;
|
||||
import com.intellij.openapi.vcs.ui.VcsBalloonProblemNotifier;
|
||||
import com.intellij.openapi.vcs.versionBrowser.ChangeBrowserSettings;
|
||||
import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.util.BeforeAfter;
|
||||
import com.intellij.util.SmartList;
|
||||
import com.intellij.util.containers.Convertor;
|
||||
import com.intellij.util.containers.MultiMap;
|
||||
import com.intellij.util.continuation.*;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.intellij.util.ui.VcsBackgroundTask;
|
||||
import gnu.trove.TLongArrayList;
|
||||
import org.jetbrains.idea.svn.*;
|
||||
import org.jetbrains.idea.svn.history.SvnChangeList;
|
||||
import org.jetbrains.idea.svn.ConflictedSvnChange;
|
||||
import org.jetbrains.idea.svn.SvnRevisionNumber;
|
||||
import org.jetbrains.idea.svn.SvnVcs;
|
||||
import org.jetbrains.idea.svn.history.SvnHistoryProvider;
|
||||
import org.jetbrains.idea.svn.history.SvnHistorySession;
|
||||
import org.jetbrains.idea.svn.history.SvnRepositoryLocation;
|
||||
import org.tmatesoft.svn.core.SVNException;
|
||||
import org.tmatesoft.svn.core.SVNNodeKind;
|
||||
import org.tmatesoft.svn.core.internal.wc.SVNConflictVersion;
|
||||
@@ -67,8 +58,6 @@ import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@@ -84,7 +73,7 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
private final SvnVcs myVcs;
|
||||
private SvnRevisionNumber myCommittedRevision;
|
||||
private FilePath myPath;
|
||||
private final List<Disposable> myChildDisposables;
|
||||
private final CompositeDisposable myChildDisposables = new CompositeDisposable();
|
||||
private final TLongArrayList myRightRevisionsList;
|
||||
|
||||
public TreeConflictRefreshablePanel(Project project, String loadingTitle, BackgroundTaskQueue queue, Change change) {
|
||||
@@ -93,7 +82,6 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
assert change instanceof ConflictedSvnChange;
|
||||
myChange = (ConflictedSvnChange) change;
|
||||
myPath = ChangesUtil.getFilePath(myChange);
|
||||
myChildDisposables = new ArrayList<Disposable>();
|
||||
myRightRevisionsList = new TLongArrayList();
|
||||
}
|
||||
|
||||
@@ -108,7 +96,7 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean descriptionsEqual(SVNTreeConflictDescription d1, SVNTreeConflictDescription d2) {
|
||||
private static boolean descriptionsEqual(SVNTreeConflictDescription d1, SVNTreeConflictDescription d2) {
|
||||
if (d1.isPropertyConflict() != d2.isPropertyConflict()) return false;
|
||||
if (d1.isTextConflict() != d2.isTextConflict()) return false;
|
||||
if (d1.isTreeConflict() != d2.isTreeConflict()) return false;
|
||||
@@ -123,9 +111,9 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean compareConflictVersion(SVNConflictVersion v1, SVNConflictVersion v2) {
|
||||
private static boolean compareConflictVersion(SVNConflictVersion v1, SVNConflictVersion v2) {
|
||||
if (v1 == null && v2 == null) return true;
|
||||
if (v1 == null && v2 != null || v1 != null && v2 == null) return false;
|
||||
if (v1 == null || v2 == null) return false;
|
||||
if (! v1.getKind().equals(v2.getKind())) return false;
|
||||
if (! v1.getPath().equals(v2.getPath())) return false;
|
||||
if (v1.getPegRevision() != v2.getPegRevision()) return false;
|
||||
@@ -168,7 +156,7 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
}
|
||||
else {
|
||||
long committed = description.getSourceLeftVersion().getPegRevision();
|
||||
if (myCommittedRevision != null && (myCommittedRevision.getRevision().getNumber() < committed) &&
|
||||
if (myCommittedRevision != null && myCommittedRevision.getRevision().getNumber() < committed &&
|
||||
myCommittedRevision.getRevision().isValid()) {
|
||||
committed = myCommittedRevision.getRevision().getNumber();
|
||||
}
|
||||
@@ -192,16 +180,15 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
return new BeforeAfter<ConflictSidePresentation>(leftSide, rightSide);
|
||||
}
|
||||
|
||||
private boolean isDifferentURLs(SVNTreeConflictDescription description) {
|
||||
private static boolean isDifferentURLs(SVNTreeConflictDescription description) {
|
||||
return description.getSourceLeftVersion() != null && description.getSourceRightVersion() != null &&
|
||||
! Comparing.equal(description.getSourceLeftVersion().getPath(), description.getSourceRightVersion().getPath());
|
||||
}
|
||||
|
||||
private ConflictSidePresentation createSide(SVNConflictVersion version, final SVNRevision untilThisOther, final boolean isLeft) throws VcsException {
|
||||
if (version == null) return EmptyConflictSide.getInstance();
|
||||
SvnRevisionNumber number = null;
|
||||
if (myChange.getBeforeRevision() != null && myCommittedRevision != null) {
|
||||
number = (SvnRevisionNumber) myCommittedRevision;
|
||||
SvnRevisionNumber number = myCommittedRevision;
|
||||
if (isLeft && number.getRevision().isValid() && number.getRevision().getNumber() == version.getPegRevision()) {
|
||||
return EmptyConflictSide.getInstance();
|
||||
}
|
||||
@@ -228,9 +215,11 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
final GridBagConstraints gb = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
|
||||
new Insets(1, 1, 1, 1), 0, 0);
|
||||
final String pathComment = myCommittedRevision == null ? "" :
|
||||
(new StringBuilder(" (current: ")
|
||||
.append(myChange.getBeforeRevision().getRevisionNumber().asString()).append(", committed: ")
|
||||
.append(myCommittedRevision.asString()).append(")").toString());
|
||||
" (current: " +
|
||||
myChange.getBeforeRevision().getRevisionNumber().asString() +
|
||||
", committed: " +
|
||||
myCommittedRevision.asString() +
|
||||
")";
|
||||
final JLabel name = new JLabel(myPath.getName() + pathComment);
|
||||
name.setFont(name.getFont().deriveFont(Font.BOLD));
|
||||
gb.insets.top = 5;
|
||||
@@ -407,28 +396,6 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
};
|
||||
}
|
||||
|
||||
private boolean isUnderOldDir(Change change, FilePath path) {
|
||||
if (change.getBeforeRevision() != null) {
|
||||
final boolean isUnder = FileUtil.isAncestor(path.getIOFile(), change.getBeforeRevision().getFile().getIOFile(), true);
|
||||
if (isUnder) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (change.getAfterRevision() != null) {
|
||||
final boolean isUnder = FileUtil.isAncestor(path.getIOFile(), change.getAfterRevision().getFile().getIOFile(), true);
|
||||
if (isUnder) {
|
||||
return isUnder;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private FilePath rebasePath(final FilePath oldBase, final FilePath newBase, final FilePath path) {
|
||||
final String relativePath = FileUtil.getRelativePath(oldBase.getPath(), path.getPath(), File.separatorChar);
|
||||
//if (StringUtil.isEmptyOrSpaces(relativePath)) return path;
|
||||
return ((FilePathImpl) newBase).createChild(relativePath, path.isDirectory());
|
||||
}
|
||||
|
||||
public static String filePath(FilePath newFilePath) {
|
||||
return newFilePath.getName() +
|
||||
" (" +
|
||||
@@ -436,11 +403,11 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
")";
|
||||
}
|
||||
|
||||
private ActionListener createBoth(SVNTreeConflictDescription description) {
|
||||
private static ActionListener createBoth(SVNTreeConflictDescription description) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void enableAndSetListener(final ActionListener al, final JButton b) {
|
||||
private static void enableAndSetListener(final ActionListener al, final JButton b) {
|
||||
if (al == null) {
|
||||
b.setEnabled(false);
|
||||
}
|
||||
@@ -455,7 +422,7 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
SVNConflictVersion leftVersion, final String name, boolean directory) {
|
||||
final String leftPresentation = leftVersion == null ? name + ": (" + (directory ? "directory" : "file") +
|
||||
(myChange.getBeforeRevision() == null ? ") added" : ") unversioned") :
|
||||
(name + ": " + FileUtil.toSystemIndependentName(SVNTreeConflictUtil.getHumanReadableConflictVersion(leftVersion)));
|
||||
name + ": " + FileUtil.toSystemIndependentName(SVNTreeConflictUtil.getHumanReadableConflictVersion(leftVersion));
|
||||
gb.insets.top = 10;
|
||||
main.add(new JLabel(leftPresentation), gb);
|
||||
++ gb.gridy;
|
||||
@@ -474,9 +441,7 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
|
||||
@Override
|
||||
protected void disposeImpl() {
|
||||
for (Disposable disposable : myChildDisposables) {
|
||||
Disposer.dispose(disposable);
|
||||
}
|
||||
Disposer.dispose(myChildDisposables);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -489,7 +454,7 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
}
|
||||
|
||||
private static class EmptyConflictSide implements ConflictSidePresentation {
|
||||
private final static EmptyConflictSide ourInstance = new EmptyConflictSide();
|
||||
private static final EmptyConflictSide ourInstance = new EmptyConflictSide();
|
||||
|
||||
public static EmptyConflictSide getInstance() {
|
||||
return ourInstance;
|
||||
@@ -509,7 +474,7 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
}
|
||||
}
|
||||
|
||||
private static abstract class AbstractConflictSide<T> implements ConflictSidePresentation, Convertor<T, VcsRevisionNumber> {
|
||||
private abstract static class AbstractConflictSide<T> implements ConflictSidePresentation, Convertor<T, VcsRevisionNumber> {
|
||||
protected final Project myProject;
|
||||
protected final SVNConflictVersion myVersion;
|
||||
|
||||
@@ -591,8 +556,8 @@ public class TreeConflictRefreshablePanel extends AbstractRefreshablePanel {
|
||||
}
|
||||
VcsFileRevision last = null;
|
||||
if (! list.isEmpty() && myPeg == null && list.size() == LIMIT ||
|
||||
(myPeg != null && myPeg.getNumber() > 0 &&
|
||||
myPeg.equals(((SvnRevisionNumber) list.get(list.size() - 1).getRevisionNumber()).getRevision()))) {
|
||||
myPeg != null && myPeg.getNumber() > 0 &&
|
||||
myPeg.equals(((SvnRevisionNumber) list.get(list.size() - 1).getRevisionNumber()).getRevision())) {
|
||||
last = list.remove(list.size() - 1);
|
||||
}
|
||||
myFileHistoryPanel = new FileHistoryPanelImpl(myVcs, myPath, session, myProvider, null, new FileHistoryRefresherI() {
|
||||
|
||||
Reference in New Issue
Block a user