| Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » [APPROVED] Two new Esc ide macros - GetLineLength() & Target()  (TheIDE API Improvments) Goto Forum:
	| 
		
			| [APPROVED] Two new Esc ide macros - GetLineLength() & Target()  [message #46951] | Mon, 26 September 2016 20:28 |  
			| 
				
				|  |  Klugier Messages: 1106
 Registered: September 2012
 Location: Poland, Kraków
 | Senior Contributor |  |  |  
	| Hello, 
 In the previous week, I was trying to implement simply test runner for Google Test using Esc. This task was hard - but possible with minor TheIDE modification. In this topic I proposed two methods in redmine topic - here is the link: #1540.
 
 GetLineLength(line) - Methods returns numbers of chars in concrete line - line parameters:
 
 Example:
 
 
myLine = 20;
myLineLength = GetLineLength(myLine); // <- Will obtain length of 20-th line.
currentLineValue = Get(GetLinePos(myLine), myLineLength); // <- Will obtain the whole line into the string
 Target() - Returns current target
 
 Exaple:
 
 
target = Target();
// Below line should work - however there is a bug in esc that i cannot equals to 0!!! (Should be fix in the near future)
if (count(target) == 0) {
    Echo("Target is unknown. You need to build your project first");
    return;
}
	
Execute(target + " " + "--gtest_filter=" + myFilter);
 The funniest thing here - is that it prints program output directly on TheIDE console
  
 What do you think about that? If you have any proposition about improvements in TheIDE API - you can post it here.
 
 Documentation:
 - TheIDE API - Documentation (I made small update here today - it should be updated in the next day)
 
 Sincerely,
 Klugier
 
 
 U++ - one framework to rule them all.
 [Updated on: Sun, 09 October 2016 20:10] Report message to a moderator |  
	|  |  | 
 
 
 Current Time: Thu Oct 30 02:10:43 CET 2025 
 Total time taken to generate the page: 0.03029 seconds |