intellij-colors-solarized icon indicating copy to clipboard operation
intellij-colors-solarized copied to clipboard

Make static methods italic

Open turbanoff opened this issue 6 years ago • 6 comments

TIL by default IntelliJ shows static methods with italic font. image I find it's useful to see that when method is static or not. I suggest to make it italic in solarized theme too.

turbanoff avatar Sep 05 '17 12:09 turbanoff

Yes, this is definitely a bug with static methods.

Also, some static variables also have this bug, if the are assigned another value (pay attention to the variable laksa, which can be found in 2 places):

  1. CORRECT, Default theme:

screen shot 2017-11-02 at 13 20 04 2. CORRECT, solarized theme:

screen shot 2017-11-02 at 13 20 53 3. BUG, solarized theme (italic suddenly disappeared):

screen shot 2017-11-02 at 13 20 42

soshial avatar Nov 02 '17 11:11 soshial

@soshial , bug where, in this project (theme) or the IntelliJ IDEA?

If something is italic in default theme, but not this theme, then it's not a bug in theme.

If something is set italic in theme, but it doesn't work, then bug is on IntelliJ IDEA side.

aik099 avatar Nov 02 '17 12:11 aik099

Sveiks :) Well, I thought, that if something was italic in default theme, but not in this theme, then IT IS a bug in solarized theme.

soshial avatar Nov 02 '17 12:11 soshial

Some time ago I also thought like that, but on many occasions since then I've seen that decisions made during this theme development do not always need to be mapped into default theme of the IDE.

As for italic for static I vote :-1: because that would mean $this->assertEquals(...) would be in italic because PHPUnit assertion methods are defined as static.

aik099 avatar Nov 02 '17 13:11 aik099

First, what is so wrong to be italic? In all JetBrains products static methods are italic, including PHP: image Second, static methods in PHP should be used with ::, i.e. self::assertThat().

soshial avatar Nov 10 '17 16:11 soshial

I addressed this issue in this pull request: #179.

soshial avatar Jan 25 '21 05:01 soshial

I've now made a commit that makes the changes suggested in #179. It seems reasonable to follow the behaviour of the default IntelliJ color schemes when it comes to italics for static fields and methods.

jkaving avatar Jan 04 '24 22:01 jkaving