src/main/java/seedu/address/ui/MainWindow.java
private CommandResult executeCommand(String commandText) throws CommandException, ParseException {
        try {
            CommandResult commandResult = logic.execute(commandText);
            logger.info("Result: " + commandResult.getFeedbackToUser());
            resultDisplay.setFeedbackToUser(commandResult.getFeedbackToUser());

            if (commandResult.isShowHelp()) {
                handleHelp();
            }

            if (commandResult.isExit()) {
                handleExit();
            }

            if (commandResult.isTabApplicant()) {
                handleListApplicant();
            }

            if (commandResult.isTabJob()) {
                handleListJob();
            }

            if (commandResult.isResetInfoPanel()) {
                handleRestInfoPanel();
            }

            return commandResult;
        } catch (CommandException | ParseException e) {
            logger.info("Invalid command: " + commandText);
            resultDisplay.setFeedbackToUser(e.getMessage());
            throw e;
        }
    }
/**
     * Executes the command and returns the result.
     *
     * @see seedu.address.logic.Logic#execute(String)
     */
Executes the command and returns the result.
Executes the command and returns the result .
private CommandResult executeCommand(String commandText) throws CommandException, ParseException {
        try {
            CommandResult commandResult = logic.execute(commandText);
            logger.info("Result: " + commandResult.getFeedbackToUser());
            resultDisplay.setFeedbackToUser(commandResult.getFeedbackToUser());
            if (commandResult.isShowHelp()) {
                handleHelp();
            }
            if (commandResult.isExit()) {
                handleExit();
            }
            if (commandResult.isTabApplicant()) {
                handleListApplicant();
            }
            if (commandResult.isTabJob()) {
                handleListJob();
            }
            if (commandResult.isResetInfoPanel()) {
                handleRestInfoPanel();
            }
            return commandResult;
        } catch (CommandException | ParseException e) {
            logger.info("Invalid command: " + commandText);
            resultDisplay.setFeedbackToUser(e.getMessage());
            throw e;
        }
    }
private CommandResult executeCommand ( String commandText ) throws CommandException , ParseException { try { CommandResult commandResult = logic . execute ( commandText ) ; logger . info ( "Result: " + commandResult . getFeedbackToUser ( ) ) ; resultDisplay . setFeedbackToUser ( commandResult . getFeedbackToUser ( ) ) ; if ( commandResult . isShowHelp ( ) ) { handleHelp ( ) ; } if ( commandResult . isExit ( ) ) { handleExit ( ) ; } if ( commandResult . isTabApplicant ( ) ) { handleListApplicant ( ) ; } if ( commandResult . isTabJob ( ) ) { handleListJob ( ) ; } if ( commandResult . isResetInfoPanel ( ) ) { handleRestInfoPanel ( ) ; } return commandResult ; } catch ( CommandException | ParseException e ) { logger . info ( "Invalid command: " + commandText ) ; resultDisplay . setFeedbackToUser ( e . getMessage ( ) ) ; throw e ; } }
Executes the command and returns the result.
Executes the command and returns the result .