really fix IDEA-83542

This commit is contained in:
Bas Leijdekkers
2012-04-03 12:04:56 +02:00
parent 9bc95d9460
commit 3cb06cb9b1
7 changed files with 12 additions and 38 deletions
@@ -78,19 +78,10 @@ public class CvsWizard extends AbstractWizard<WizardStep> {
final int numberOfSteps = getNumberOfSteps();
if (numberOfSteps == 0) return;
final WizardStep currentStep = getCurrentStepObject();
if (!currentStep.setActive()){
doPreviousAction();
return;
}
if (!currentStep.nextIsEnabled()) {
getNextButton().setEnabled(false);
getFinishButton().setEnabled(false);
}
else {
final boolean enableFinish = (getCurrentStep() + 1) == numberOfSteps;
getFinishButton().setEnabled(enableFinish);
getNextButton().setEnabled(!enableFinish);
}
currentStep.activate();
final boolean enableNext = currentStep.nextIsEnabled();
getNextButton().setEnabled(enableNext && (!isLastStep() || SystemInfo.isMac));
getFinishButton().setEnabled(enableNext && isLastStep());
}
public void disableNextAndFinish() {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* 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.
@@ -53,11 +53,6 @@ public class SelectCVSConfigurationStep extends WizardStep{
return mySelectCvsConfigurationPanel.getSelectedConfiguration() != null;
}
@Override
public boolean setActive() {
return true;
}
@Override
protected JComponent createComponent() {
return mySelectCvsConfigurationPanel;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* 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.
@@ -109,11 +109,6 @@ public class SelectCvsElementStep extends WizardStep {
return logged;
}
@Override
public boolean setActive() {
return true;
}
@Override
protected void dispose() {
if (myCvsTree != null) {
@@ -59,7 +59,7 @@ public abstract class SelectLocationStep extends WizardStep {
private final JPanel myNorthPanel = new JPanel(new BorderLayout());
private final JComponent myPathTextFieldWrapper;
private TextFieldAction myTextFieldAction;
private final TextFieldAction myTextFieldAction;
private ActionToolbar myFileSystemToolBar;
private VirtualFile mySelectedFile;
private boolean myShowPath = CvsApplicationLevelConfiguration.getInstance().SHOW_PATH;
@@ -160,10 +160,6 @@ public abstract class SelectLocationStep extends WizardStep {
return selectedFiles.length == 1 && selectedFiles[0].isDirectory();
}
public boolean setActive() {
return true;
}
private DefaultActionGroup createFileSystemActionGroup() {
final DefaultActionGroup group = FileSystemTreeFactory.SERVICE.getInstance().createDefaultFileSystemActions(myFileSystemTree);
final AnAction[] actions = getActions();
@@ -41,7 +41,7 @@ public abstract class WizardStep extends StepAdapter{
}
public abstract boolean nextIsEnabled();
public abstract boolean setActive();
public void activate() {}
protected abstract JComponent createComponent();
protected void dispose() {}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* 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.
@@ -133,7 +133,7 @@ public class ChooseCheckoutMode extends WizardStep {
}
@Override
public boolean setActive() {
public void activate() {
final File selectedLocation = myWizard.getSelectedLocation();
final Collection<File> cvsPaths = getSelectedFiles();
@@ -158,8 +158,6 @@ public class ChooseCheckoutMode extends WizardStep {
else if (selectedLocation == null) {
getWizard().disableNextAndFinish();
}
return true;
}
private StringBuilder composeLocationsMessage() {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* 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.
@@ -134,7 +134,7 @@ public class ImportSettingsStep extends WizardStep {
}
@Override
public boolean setActive() {
public void activate() {
if (!myIsInitialized) {
myIsInitialized = true;
myReleaseTag.setText(myImportConfiguration.RELEASE_TAG);
@@ -154,7 +154,6 @@ public class ImportSettingsStep extends WizardStep {
myModuleName.setText(myDirectoryToImport.getName());
myModuleName.selectAll();
}
return true;
}
private void selectAll() {