private String buildMacroCall() {
        // Assemble the file to get the available macros
        MacroStatement[] macros = new SyntaxAnalyser(editor.getSourceFile()).getMacroStatements();
        
        if(macros.length == 0) {
            // No macros are available
            UIUtilities.showErrorDialog(this, "No macros found");
            
            return null;
        }
        
        // Show a dialog to allow the user to select a macro
        MacroStatement selectedMacro = (MacroStatement) JOptionPane.showInputDialog(
                this, // owner
                "Select macro to use", // Message
                "MacroCall Builder", // Title
                JOptionPane.QUESTION_MESSAGE, // Dialog type
                null, // Icon
                macros, // Selection values
                macros[0]); // Initial selection
            
        // Check the dialog wasn't cancelled
        if(selectedMacro == null) {
            return null;
        }
        
        // Build the macro call statement
        StringBuilder statement = new StringBuilder(selectedMacro.getName());   
                
        // Loop through arguments and show input dialog to get the operand
        for(String argumentLabel : selectedMacro.getArgumentLabels()) {
            String argumentValue = (String) JOptionPane.showInputDialog(
                    this, // owner
                    "Enter operand for argument '" + argumentLabel + "'", // Message
                    "Macro Builder", // Title
                     JOptionPane.PLAIN_MESSAGE);
            
            // If the dialog was cancell / nothing entered return null
            if(argumentValue == null || argumentValue.equals("")) {
                return null;
            }
            
            statement.append(" " + argumentValue);
        }
        
        return statement.toString();
    }