Type Parameter Color Scheme Option

Issue #2012 resolved
Oleh Berehovskyi created an issue

Hi!

I really enjoy the latest 2.1.9.7 update since it brings additional Apex color scheme options. But I'd like to share an issue with

Type Parameter options since, I believe, it doesn’t work as expected. For langs such as Java or C# Type Parameter color option defines the color for generic type T, but not for the specific types passed. For instance how it looks in Java:

But in Apex we don't have generic types so specific types look like generic types:

In the previous version 2.1.9.6 the color of specified types was displayed correctly. Maybe it is better to postpone the Type Parameter color option until we have Generics in Apex or at least to make it possible to deactivate this rule.

Once again, I really like the latest update and, apart from this issue, I’d like to see color options for virtual classes, virtual, overridden methods, and reassigned local vars.

Comments (16)

  1. Scott Wells repo owner

    Ah...makes total sense. You're correct that I got a little ahead of myself on that one. I'll back it out, or perhaps I'll change it to an Apex-specific config param that doesn't automatically inherit from type params elsewhere in case some users want to see type params in a signature distinctly. Thanks for bringing this to my attention!

  2. Scott Wells repo owner

    Fix committed for inclusion in the next build. It's still possible to style concrete type params distinctly, but that setting now defaults to "Identifier" instead of "Parameter" so that it won't pick up the IDE's broader generic type parameter code style settings.

  3. Oleh Berehovskyi reporter

    Unfortunately, the 2.1.9.8+ version doesn't fix the issue. Regardless of the Param Type, it is colored the same way defined in the 'Identifier' color option. E.G:

    In JAVA (and in Apex before 2.1.9.7 )

    In Apex after 2.1.9.7

  4. Scott Wells repo owner

    I'm not sure that I follow. The original change made the styling of concrete type parameters use the styling of Parameter by default. With the updated change, you can still change the styling of concrete type parameters but they default to what they did previously which is Identifier. Can you please explain how you've configured things, the expected results, and the actual results?

  5. Oleh Berehovskyi reporter

    Sure. For instance, I have configured things this way:

    Since my Identifier is configured with white color, everything between <> has inherited white foreground. And I’d like to have it colored differently depending on its entity type just (like it was in earlier versions of IC2). Or maybe I’m missing something?

    So the expected result is described on the first screenshot of the previous comment, and the actual one is displayed on the second screenshot below the first one.

  6. Scott Wells repo owner

    Ah, I see. Yes, it's not showing up as class, interface, or enum name as-configured. There's really not a good way to have it behave that way AND be configurable, so it might just be best to remove it. I'll chew on it...

  7. Scott Wells repo owner

    Oleh, at this point I won't be releasing a new build until after the holidays, but this will be in the next released build.

  8. Scott Wells repo owner
    • changed status to open

    Reopening and will re-resolve when I release a build that removes this configuration option.

  9. Log in to comment