hyperlinks in console

Some error messages, or for example SVN log will show up in the Eclipse console with hyperlinks to methods/forms of the solution.
Is there anyway to create those from Servoy methods as well?

My goal: I’m busy writing some unit tests (Servoy 5) and would very much like to reference the ‘fail’ locations in the console.
This makes it much easier & faster to solve the problems.

Mark,

I think the servoy console interprets the outputed data and tries to create links from them, try this:

application.output("a\n\tat /home/rob/servoy_workspace/testsolution/globals.js:20")

Rob

thnkx Rob, this works!

Now I just have to find the active workspace location from eclipse… it’ll definitely be somewhere in a file… any idea?

why not just “throw ‘it fails because of this’” ?

jcompagner:
why not just “throw ‘it fails because of this’” ?

speed!
I’ve been implementing a few unit test methods to check certain properties of forms/elements based on the context they’re in.
Of course I already throw kind of ‘it fails because of this’ messages, but it would be very convenient to “just click” and be at the problem location…

I can just set a user property with the workspace location, but it will be nicer to have it determined on the fly.

but if you throw an exception
then hyperlinks are created… so you can quickly click on them.

hmmm have to investigate that a bit more.
I don’t think it will work, as I’m not really in a method on this particular location if this happens…

It’s more that I’m testing if ‘showInMenu’ is ticked for particular forms.
This is done by looping through all forms and using the solutionModel to get this property value.

function throwError(event)
{
throw “an error!!”;
}

will result in

an error!! (C:\servoy50\workspace\Test\forms\Test.js#66)
at C:\servoy50\workspace\Test\forms\Test.js:66 (throwError)