9 comments
Comment actions Permalink

Define a scope for classes from junit.framework, assign special coloring
and get highlighting of assertTrue/assertFalse etc. method calls in your
tests.

-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"

Huh, someone wanna explain that one a little?

R



0
Comment actions Permalink

Maxim

Define a scope for classes from junit.framework, assign special
coloring and get highlighting of assertTrue/assertFalse etc. method
calls in your tests.

>


We were supposed to get some good default in the box, to avoid questions
like these.

Alain

0
Comment actions Permalink

Hello Maxim,

MS> Define a scope for classes from junit.framework, assign special
MS> coloring and get highlighting of assertTrue/assertFalse etc. method
MS> calls in your tests.

Hmm, sounds like very complicated solution to highlight only methods usage...

Thanks


0
Comment actions Permalink

Hmm, sounds like very complicated solution to highlight only methods usage...


Had they come up with something simpler, we would have asked for more :)
I think that now they're just going all out :)

R

0
Comment actions Permalink

I'd say it's worth it if it also handled annotations, but at present I can't get it to work at all.

--Dave Griffith

0
Comment actions Permalink

Alexey

Hmm, sounds like very complicated solution to highlight only methods
usage...

>


The motivation behind the original request was to make
asserting/checking code look different from production and setup code,
when they are mixed in test methods, so you could easily see what you're
testing.
I'm afraid the scope-based solution doesn't work very well in this case,
because as soon as you extract a method around one assert, the scope
colouring is lost:
....
myAssertEquals(1,2); <---- NOT scope coloured
....
private void myAssertEquals (int i, int j) {
assertEquals(i , j ); <---- scope coloured
}


Once again, annotations look more and more like the silver bullet:

@Meta("junit.framework")
private void myAssertEquals (int i, int j) {
assertEquals(i , j );
}


Alain

0
Comment actions Permalink

Hello Dave,

DG> I'd say it's worth it if it also handled annotations, but at present
DG> I can't get it to work at all.

And also paths (links) to resources... :)


0
Comment actions Permalink

Hello Alain,

AR> Once again, annotations look more and more like the silver bullet:

All comming to:

@Highlight(color="#00ff00", underline=true)

:))))


0
Comment actions Permalink

What do you mean ?
For example, if you define new scope named "Jetbrains annotations" with
pattern org.jetbrains.annotations..*
and then assign it the yellow background, all @Nullable and @NotNull will be
shown yellow in your code.

--
regards,
--
Alexey Kudravtsev
Software Developer
JetBrains, Inc, http://www.jetbrains.com
"Develop with pleasure!"


"Dave Griffith" <dave.griffith@cnn.com> wrote in message
news:5415881.1118768351495.JavaMail.itn@is.intellij.net...

I'd say it's worth it if it also handled annotations, but at present I
can't get it to work at all.

>

--Dave Griffith



0

Please sign in to leave a comment.