Define a scope for classes from junit.framework, assign special coloring and get highlighting of assertTrue/assertFalse etc. method calls in your tests.
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.
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...
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 ); }
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.
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!"
Maxim
>
We were supposed to get some good default in the box, to avoid questions
like these.
Alain
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
Had they come up with something simpler, we would have asked for more :)
I think that now they're just going all out :)
R
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
Alexey
>
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
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... :)
Hello Alain,
AR> Once again, annotations look more and more like the silver bullet:
All comming to:
@Highlight(color="#00ff00", underline=true)
:))))
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...
>