| !/////////////////////////////////////////////////////////////////////////////// |
| !// Copyright (c) 2000-2019 Ericsson Telecom AB // |
| !// // |
| !// All rights reserved. This program and the accompanying materials // |
| !// are made available under the terms of the Eclipse Public License v2.0 // |
| !// which accompanies this distribution, and is available at // |
| !// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html // |
| !/////////////////////////////////////////////////////////////////////////////// |
| ! Preferences file for NEdit |
| ! |
| ! Install with |
| ! nedit -import <name of this file> |
| ! |
| ! Updates for nedit to show coverage info for TTCN3 file. |
| ! |
| ! Usage: |
| ! Before the coverage info could be shown in nedit the |
| ! Coverage information has to be generated by the |
| ! TitanSim Coverage tool. |
| ! If the coverage info is successfully generated a |
| ! TTCN3Coverage.cov file should be present in the build |
| ! directory. |
| ! Now for any TTCN files the coverage info can be shown |
| ! by pressing the <Ctrl>-<Shift>-<Alt>-C keys or |
| ! by selecting the Macro/ShowCoverage from the menu. |
| ! A new file will be generated and opened automatically. |
| ! This file contains a number before each line meaning |
| ! how many times that line was executed. The lines |
| ! are shown in different colors according to this number. |
| ! The numbers are followed by the actual source code |
| ! copied from the original file. |
| ! |
| ! Since the generated file has a .log extension, all |
| ! generated files are removed by "make clean". |
| ! |
| |
| nedit.macroCommands: \ |
| ShowCoverage:Shift+Ctrl+Alt+C::: {\n\ |
| shell_command( "gawk -f coverage2nedit.awk TTCN3Coverage.cov "$file_name" > "$file_name"3cov.log","" )\n\ |
| open($file_name"3cov.log")\n\ |
| \n\ |
| lineNumber=$line\n\ |
| command = "nc -noask -line " lineNumber " " $file_name"3cov.log"\n\ |
| shell_command( command,"")\n\ |
| } |
| nedit.highlightPatterns: \ |
| TTCN3Cov:1:0{\n\ |
| Coverage0:"^[ ]*[0]{1}[ ]*:[ ]*":"$"::Coverage::\n\ |
| Coverage1:"^[ ]*[1-9]{1}[ ]*:[ ]*":"$"::Coverage1::\n\ |
| Coverage2:"^[ ]*[0-9]{2}[ ]*:[ ]*":"$"::Coverage2::\n\ |
| Coverage3:"^[ ]*[0-9]{3}[ ]*:[ ]*":"$"::Coverage3::\n\ |
| Coverage4:"^[ ]*[0-9]{4}[ ]*:[ ]*":"$"::Coverage4::\n\ |
| Coverage5:"^[ ]*[0-9]{5}[ ]*:[ ]*":"$"::Coverage5::\n\ |
| Coverage6:"^[ ]*[0-9]{6}[ ]*:[ ]*":"$"::Coverage6::\n\ |
| Coverage7:"^[ ]*[0-9]{7}[ ]*:[ ]*":"$"::Coverage7::\n\ |
| Coverage8:"^[ ]*[0-9]{8,}[ ]*:[ ]*":"$"::Coverage8::\n\ |
| } |
| nedit.languageModes: \ |
| TTCN3Cov:ttcn3cov:"^[ ]*[0..9]:[ ]+":::8:2:".,/\\`'!|@#%^&*()=+{}[]"":;<>?~-": |
| nedit.styles: \ |
| Coverage:black/grey:Plain\n\ |
| Coverage1:black/green:Plain\n\ |
| Coverage2:black/yellow:Plain\n\ |
| Coverage3:black/orange:Plain\n\ |
| Coverage4:black/red:Plain\n\ |
| Coverage5:lightgreen/purple:Plain\n\ |
| Coverage6:yellow/blue:Plain\n\ |
| Coverage7:orange/darkblue:Plain\n\ |
| Coverage8:darkred/cyan:Plain |