Project

General

Profile

« Previous | Next » 

Revision 5c1ec42c

Added by Andreas Müller about 3 years ago

improve performance by first checking preference then checking DB for classification

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/NewClassificationHandlerE4.java
47 47
    private boolean canExecute(MHandledMenuItem menuItem){
48 48
        boolean canExecute = false;
49 49

  
50
        canExecute = TaxonNodePropertyTester.noClassifiactionExists() || !PreferencesUtil.getBooleanValue(PreferencePredicate.DisableMultiClassification.getKey());
50
        //TODO Performance check for existing classification causes server call, this should be cached somehow
51
        canExecute = !PreferencesUtil.getBooleanValue(PreferencePredicate.DisableMultiClassification.getKey()) || TaxonNodePropertyTester.noClassifiactionExists();
51 52
        menuItem.setVisible(canExecute);
52 53
        return canExecute;
53 54
    }

Also available in: Unified diff