Examples of NestedCalculateFormulaException


Examples of org.woped.metrics.exceptions.NestedCalculateFormulaException

        if((!ErrorList.getInstance().isEmpty()) && syntaxCheck){
             ArrayList<CalculateFormulaException> errorList =
             (ArrayList<CalculateFormulaException>)ErrorList.getInstance().getErrorList().clone();
    
            ErrorList.getInstance().clear();
            throw new NestedCalculateFormulaException(errorList);
           }
       
       
        return result;
    }
View Full Code Here

Examples of org.woped.metrics.exceptions.NestedCalculateFormulaException

          boolean showErrorFrame = true;

          // This logic should check if there is an enhancement
          // available
          if (cfe instanceof NestedCalculateFormulaException) {
            NestedCalculateFormulaException ncfe = (NestedCalculateFormulaException) cfe;

            if (ncfe.hasEnhancementExceptions()) {
              String newLine = System
                  .getProperty("line.separator"); //$NON-NLS-1$

              int answer = JOptionPane
                  .showConfirmDialog(
                      null,
                      Messages.getString("Metrics.Builder.ConsistencyCheck.ErrorsCanBeReducedByUsingTheFormula") + newLine + //$NON-NLS-1$
                          "\""
                          + ncfe.getEnhancementExceptions()
                              .get(0)
                              .getEnhancedFormula()
                          + "\""
                          + newLine
                          + Messages
                              .getString("Metrics.Builder.ConsistencyCheck.DoYouWantToUseThisFormula"), //$NON-NLS-1$

                      Messages.getString("Metrics.Builder.ConsistencyCheck.EnhancementAvailable"), //$NON-NLS-1$
                      JOptionPane.YES_NO_OPTION,
                      JOptionPane.QUESTION_MESSAGE);

              // Check if Yes is clicked
              if (answer == JOptionPane.YES_OPTION) {
                // Writing the new Formula into the Text-Field
                MetricsBuilderPanel.jMetricsFormulaTextField
                    .setText(ncfe
                        .getEnhancementExceptions()
                        .get(0).getEnhancedFormula());

                // Disable that the original error-screen
                showErrorFrame = false;

                // Run the check process a second time for
                // getting the errors for the new formula
                try {
                  // Run the checker
                  MetricsCalculator.checkFormula(ncfe
                      .getEnhancementExceptions().get(0)
                      .getEnhancedFormula());

                  // Show the successful Dialog if no errors
                  // appear
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.