mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CVS: check authorization inside doNext() before actually doNext() for default project CVS browsing to work
This commit is contained in:
@@ -41,6 +41,17 @@ public class CvsWizard extends AbstractWizard<WizardStep> {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doNextAction() {
|
||||
if ((myCurrentStep + 1) >= mySteps.size()) return;
|
||||
final WizardStep nextStep = mySteps.get(myCurrentStep + 1);
|
||||
if (! nextStep.preNextCheck()) {
|
||||
return;
|
||||
}
|
||||
|
||||
super.doNextAction();
|
||||
}
|
||||
|
||||
public void updateStep() {
|
||||
super.updateStep();
|
||||
if (getNumberOfSteps() == 0) return;
|
||||
|
||||
+9
-3
@@ -77,18 +77,24 @@ public class SelectCvsElementStep extends WizardStep {
|
||||
errors.set(Boolean.TRUE);
|
||||
}
|
||||
});
|
||||
final boolean logged = performer.loginAll(
|
||||
new ModalityContextImpl(ModalityState.stateForComponent(mySelectCVSConfigurationStep.getComponent()), false), false);
|
||||
/*final boolean logged = performer.loginAll(
|
||||
new ModalityContextImpl(ModalityState.stateForComponent(mySelectCVSConfigurationStep.getComponent()), false), false);*/
|
||||
final boolean logged = performer.loginAll(new ModalityContextImpl(ModalityState.current(), false), false);
|
||||
if ((! logged) || (! errors.isNull())) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean preNextCheck() {
|
||||
CvsRootConfiguration selectedConfiguration = mySelectCVSConfigurationStep.getSelectedConfiguration();
|
||||
return isLogged(selectedConfiguration);
|
||||
}
|
||||
|
||||
public boolean setActive() {
|
||||
CvsRootConfiguration selectedConfiguration =
|
||||
mySelectCVSConfigurationStep.getSelectedConfiguration();
|
||||
if (! isLogged(selectedConfiguration)) return false;
|
||||
|
||||
if (myCvsTree == null || !Comparing.equal(myConfiguration, selectedConfiguration)) {
|
||||
myConfiguration = selectedConfiguration;
|
||||
|
||||
@@ -53,6 +53,10 @@ public abstract class WizardStep extends StepAdapter{
|
||||
|
||||
}
|
||||
|
||||
public boolean preNextCheck() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public abstract boolean nextIsEnabled();
|
||||
public abstract boolean setActive();
|
||||
protected abstract JComponent createComponent();
|
||||
|
||||
Reference in New Issue
Block a user