import com.intellij.openapi.progress.Task;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;
+import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vcs.*;
import com.intellij.openapi.vcs.changes.BackgroundFromStartOption;
myLocation = location;
myShouldBeCalledOnDispose = new ArrayList<Runnable>();
myBrowser = new CommittedChangesTreeBrowser(project, new ArrayList<CommittedChangeList>());
+ Disposer.register(this, myBrowser);
add(myBrowser, BorderLayout.CENTER);
myErrorLabel.setForeground(Color.red);
}
public void dispose() {
- myBrowser.dispose();
for (Runnable runnable : myShouldBeCalledOnDispose) {
runnable.run();
}
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.project.Project;
+import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.vcs.RepositoryLocation;
import com.intellij.openapi.vcs.VcsBundle;
import com.intellij.openapi.vcs.VcsException;
public void disposeContent() {
myConnection.disconnect();
+ Disposer.dispose(myBrowser);
myBrowser = null;
}
import com.intellij.openapi.Disposable;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.fileEditor.OpenFileDescriptor;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import java.util.List;
public class UpdateInfoTree extends PanelWithActionsAndCloseButton implements Disposable {
- private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.vcs.update.UpdateInfoTree");
-
private VirtualFile mySelectedFile;
private String mySelectedUrl;
private final Tree myTree = new Tree();
protected JComponent createCenterPanel() {
myCenterPanel.add(CARD_STATUS, ScrollPaneFactory.createScrollPane(myTree));
myTreeBrowser = new CommittedChangesTreeBrowser(myProject, Collections.<CommittedChangeList>emptyList());
+ Disposer.register(this, myTreeBrowser);
myTreeBrowser.setHelpId(getHelpId());
myCenterPanel.add(CARD_CHANGES, myTreeBrowser);
return myCenterPanel;