2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org
.jetbrains
.idea
.svn
.dialogs
;
18 import com
.intellij
.openapi
.project
.Project
;
19 import com
.intellij
.openapi
.help
.HelpManager
;
20 import org
.jetbrains
.idea
.svn
.SvnBundle
;
22 import javax
.swing
.event
.TreeSelectionEvent
;
23 import javax
.swing
.event
.TreeSelectionListener
;
25 public class ImportDialog
extends RepositoryBrowserDialog
{
26 public ImportDialog(Project project
) {
32 setTitle(SvnBundle
.message("import.dialog.title"));
33 setOKButtonText(SvnBundle
.message("import.dialog.button"));
34 getRepositoryBrowser().addChangeListener(new TreeSelectionListener() {
35 public void valueChanged(TreeSelectionEvent e
) {
36 if (getOKAction() != null) {
45 protected String
getHelpId() {
46 return "vcs.subversion.import";
49 private void updateOKAction() {
50 getOKAction().setEnabled(getRepositoryBrowser().getSelectedURL() != null);
53 protected void doOKAction() {
60 protected void doHelpAction() {
61 HelpManager
.getInstance().invokeHelp("vcs.subversion.import");
65 protected boolean showImportAction() {