NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
editor.cpp File Reference
#include <stdlib.h>
#include "../../common/CommonHeaders.h"
#include "../../kernel/core/ui/language.hpp"
#include "../../kernel/core/utils/tools.hpp"
#include <wx/datetime.h>
#include <wx/stdpaths.h>
#include <wx/tokenzr.h>
#include <wx/clipbrd.h>
#include <vector>
#include <string>
#include <set>
#include <memory>
#include "editor.h"
#include "../NumeReWindow.h"
#include "../NumeReNotebook.h"
#include "codeanalyzer.hpp"
#include "searchcontroller.hpp"
#include "codeformatter.hpp"
#include "../../common/datastructures.h"
#include "../../common/Options.h"
#include "../../common/vcsmanager.hpp"
#include "../../common/filerevisions.hpp"
#include "../dialogs/renamesymbolsdialog.hpp"
#include "../globals.hpp"
Include dependency graph for editor.cpp:

Go to the source code of this file.

Macros

#define CRTDBG_MAP_ALLOC
 
#define _ASSERT(expr)   ((void)0)
 
#define _ASSERTE(expr)   ((void)0)
 
#define MARGIN_FOLD   3
 
#define HIGHLIGHT   25
 
#define HIGHLIGHT_DBLCLK   26
 
#define HIGHLIGHT_MATCHING_BRACE   6
 
#define HIGHLIGHT_STRIKETHROUGH   7
 
#define HIGHLIGHT_MATCHING_BLOCK   8
 
#define HIGHLIGHT_NOT_MATCHING_BLOCK   9
 
#define HIGHLIGHT_DIFFERENCES   10
 
#define HIGHLIGHT_DIFFERENCE_SOURCE   11
 
#define HIGHLIGHT_ANNOTATION   12
 
#define HIGHLIGHT_LOCALVARIABLES   13
 
#define ANNOTATION_NOTE   wxSTC_NSCR_PROCEDURE_COMMANDS+1
 
#define ANNOTATION_WARN   wxSTC_NSCR_PROCEDURE_COMMANDS+2
 
#define ANNOTATION_ERROR   wxSTC_NSCR_PROCEDURE_COMMANDS+3
 
#define SEMANTICS_VAR   1
 
#define SEMANTICS_STRING   2
 
#define SEMANTICS_NUM   4
 
#define SEMANTICS_FUNCTION   8
 

Functions

int CompareInts (int n1, int n2)
 
static char applyFunctionHeuristics (const std::string &func)
 Apply the function heuristics to detect the current symbol's type. More...
 
static char applyCommandHeuristics (const std::string &command)
 Apply the command heuristics to detect the current symbol's type. More...
 
static char applyValueHeuristics (std::string val)
 Apply the value heuristics to detect the current symbol's type. More...
 
static bool isOnlyActiveBlock (int nBlockID, std::vector< int > vBlocks)
 Checks, if the selected block is the only block active. More...
 
static bool isEqualIgnoreWhitespace (wxString word1, wxString word2)
 

Variables

Language _guilang
 

Macro Definition Documentation

◆ _ASSERT

#define _ASSERT (   expr)    ((void)0)

Definition at line 26 of file editor.cpp.

◆ _ASSERTE

#define _ASSERTE (   expr)    ((void)0)

Definition at line 28 of file editor.cpp.

◆ ANNOTATION_ERROR

#define ANNOTATION_ERROR   wxSTC_NSCR_PROCEDURE_COMMANDS+3

Definition at line 71 of file editor.cpp.

◆ ANNOTATION_NOTE

#define ANNOTATION_NOTE   wxSTC_NSCR_PROCEDURE_COMMANDS+1

Definition at line 69 of file editor.cpp.

◆ ANNOTATION_WARN

#define ANNOTATION_WARN   wxSTC_NSCR_PROCEDURE_COMMANDS+2

Definition at line 70 of file editor.cpp.

◆ CRTDBG_MAP_ALLOC

#define CRTDBG_MAP_ALLOC

Definition at line 21 of file editor.cpp.

◆ HIGHLIGHT

#define HIGHLIGHT   25

Definition at line 59 of file editor.cpp.

◆ HIGHLIGHT_ANNOTATION

#define HIGHLIGHT_ANNOTATION   12

Definition at line 67 of file editor.cpp.

◆ HIGHLIGHT_DBLCLK

#define HIGHLIGHT_DBLCLK   26

Definition at line 60 of file editor.cpp.

◆ HIGHLIGHT_DIFFERENCE_SOURCE

#define HIGHLIGHT_DIFFERENCE_SOURCE   11

Definition at line 66 of file editor.cpp.

◆ HIGHLIGHT_DIFFERENCES

#define HIGHLIGHT_DIFFERENCES   10

Definition at line 65 of file editor.cpp.

◆ HIGHLIGHT_LOCALVARIABLES

#define HIGHLIGHT_LOCALVARIABLES   13

Definition at line 68 of file editor.cpp.

◆ HIGHLIGHT_MATCHING_BLOCK

#define HIGHLIGHT_MATCHING_BLOCK   8

Definition at line 63 of file editor.cpp.

◆ HIGHLIGHT_MATCHING_BRACE

#define HIGHLIGHT_MATCHING_BRACE   6

Definition at line 61 of file editor.cpp.

◆ HIGHLIGHT_NOT_MATCHING_BLOCK

#define HIGHLIGHT_NOT_MATCHING_BLOCK   9

Definition at line 64 of file editor.cpp.

◆ HIGHLIGHT_STRIKETHROUGH

#define HIGHLIGHT_STRIKETHROUGH   7

Definition at line 62 of file editor.cpp.

◆ MARGIN_FOLD

#define MARGIN_FOLD   3

Definition at line 58 of file editor.cpp.

◆ SEMANTICS_FUNCTION

#define SEMANTICS_FUNCTION   8

Definition at line 76 of file editor.cpp.

◆ SEMANTICS_NUM

#define SEMANTICS_NUM   4

Definition at line 75 of file editor.cpp.

◆ SEMANTICS_STRING

#define SEMANTICS_STRING   2

Definition at line 74 of file editor.cpp.

◆ SEMANTICS_VAR

#define SEMANTICS_VAR   1

Definition at line 73 of file editor.cpp.

Function Documentation

◆ applyCommandHeuristics()

static char applyCommandHeuristics ( const std::string &  command)
static

Apply the command heuristics to detect the current symbol's type.

Parameters
commandconst std::string&
Returns
char

Definition at line 2534 of file editor.cpp.

References _guilang, Language::get(), Language::getKey(), and toUpperCase().

Referenced by NumeReEditor::fixSymbolName().

Here is the call graph for this function:

◆ applyFunctionHeuristics()

static char applyFunctionHeuristics ( const std::string &  func)
static

Apply the function heuristics to detect the current symbol's type.

Parameters
funcconst std::string&
Returns
char

Definition at line 2499 of file editor.cpp.

References _guilang, func, Language::get(), Language::getKey(), and toUpperCase().

Referenced by NumeReEditor::fixSymbolName().

Here is the call graph for this function:

◆ applyValueHeuristics()

static char applyValueHeuristics ( std::string  val)
static

Apply the value heuristics to detect the current symbol's type.

Parameters
valstd::string
Returns
char

Definition at line 2569 of file editor.cpp.

References getMatchingParenthesis(), getNextArgument(), StripSpaces(), and validateParenthesisNumber().

Referenced by NumeReEditor::fixSymbolName().

Here is the call graph for this function:

◆ CompareInts()

int CompareInts ( int  n1,
int  n2 
)

Definition at line 122 of file editor.cpp.

Referenced by NumeReEditor::GetBreakpoints().

◆ isEqualIgnoreWhitespace()

static bool isEqualIgnoreWhitespace ( wxString  word1,
wxString  word2 
)
static

◆ isOnlyActiveBlock()

static bool isOnlyActiveBlock ( int  nBlockID,
std::vector< int >  vBlocks 
)
static

Checks, if the selected block is the only block active.

Parameters
nBlockIDint
vBlocksstd::vector<int>
Returns
bool

Definition at line 3019 of file editor.cpp.

Referenced by NumeReEditor::BlockMatchNSCR().

Variable Documentation

◆ _guilang