module-based highlighting

Answered

This would be an easy to implement yet powerful feature.
Usage scenario:

We have a bunch of modules (>100), and every module is either j2se or j2me. When I open some unknown class, first thing I do is a best guess what type of code is that? Is that for j2se or j2me? It may not be straightforward what java does the class use, because there are many classes that are named the same (e.g. java.util.Vector), and time should be spend on getting a really basic context information.

A name of the module doesn't say me much. My suggestion would be to have a different highlighting for modules. Just a different background for every module will do. Or these colors may be assigned depending on 'module type'. E.g. modules could be 'classified' by the project subsystem ("Frontend", "Backend".. ) or by some other criteria, and every 'type' would have its features like background. That's enough to carry information and save a lot of time! Why not assign an icon to the module/module type? A project view would be more informative...

Any chance to see something like that?

(Clarification: in my case, j2me parts are set up as 'java modules with no JDK' and therefore have the same icons in project view. It cannot be done the other way because of the very special java we use which can not be set up as JDK in Idea)

3
5 comments
Avatar
Permanently deleted user

I'm using scope based highligting but it does not solve this particular problem/wish. I'll try to expand more on that

Java classes used in particular file may belong to j2me or j2se and scope-base highlighting will not differentiate between classes in packages like java.util. And it would not be exactly what I need. Scope-based hilighting shows what scopes the particular symbols belong to, but not in what module I'm "in".

Scope-based highlighting is only applicable to symbols, I cannot setup it so that an entire file's background is different for files belonging to different modules (scopes). In other words, General|Default text|Background can not be configured per-scope, or it just should be taken from the Scope background and not from General|Default text|Background.

My idea is to have different background dependent on scope for entire text of the file. If some symbols in the file in hand are from different scopes, I would like to assign a different background to them, so the symbols with the same background are perceived as "local" and with different backgrounds as "foreign". When I open the file from different scope it all changes, the background indicates that I'm in different scope, and as the symbols in this scope have the same color, they would not attact attention and be perceived as "local". So I'm changing my "mental scope"

2
Avatar
Permanently deleted user

Exactly what I was looking for also. We have a small service written with just 3 layers of Uncle Bob's clean architecture - and its still easy to get lost with where you are in the "onion" when navigating code.

1
Avatar
Permanently deleted user

In Settings|Fonts and colors|Scope based you can configure classes that
belong to particular library be highlighted distinctly.

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

"Igor Karpov" <igor.karpov@mail.ru> wrote in message
news:27230989.1133975449704.JavaMail.javamailuser@localhost...

This would be an easy to implement yet powerful feature.
Usage scenario:

>

We have a bunch of modules (>100), and every module is either j2se or
j2me. When I open some unknown class, first thing I do is a best guess
what type of code is that? Is that for j2se or j2me? It may not be
straightforward what java does the class use, because there are many
classes that are named the same (e.g. java.util.Vector), and time should
be spend on getting a really basic context information.

>

A name of the module doesn't say me much. My suggestion would be to have a
different highlighting for modules. Just a different background for every
module will do. Or these colors may be assigned depending on 'module
type'. E.g. modules could be 'classified' by the project subsystem
("Frontend", "Backend".. ) or by some other criteria, and every 'type'
would have its features like background. That's enough to carry
information and save a lot of time! Why not assign an icon to the
module/module type? A project view would be more informative...

>

Any chance to see something like that?

>

(Clarification: in my case, j2me parts are set up as 'java modules with no
JDK' and therefore have the same icons in project view. It cannot be done
the other way because of the very special java we use which can not be set
up as JDK in Idea)



0

I would like this feature also.

When working on multiple services / modules.

0

Dragoslav Petrovic You can achieve the mentioned feature using scopes. "Background" option is now available for any scope (Preferences | Editor | Color Scheme | By Scope). Also, you can highlight the files in tabs and project view based on scope (Preferences | Appearance & Behavior | File Colors). 

If both of that does not fit your needs, please submit new YouTrack Feature request via https://youtrack.jetbrains.com/newIssue?project=IDEA

 

0

Please sign in to leave a comment.