Global Inspections API questions


I'm finally getting a chance to play with the Global Inspections API I whined so long for, and I'm running into some issues. I believe I finally understand what the API is trying to provide, but am seeing some odd results that might be due to me not understanding something (or might be bugs).

1) If a global inspection returns true from it's isGraphNeeded() method, then when I try to run an inspection it seems to hang for a while on the first class analyzed. Eventually it completes, and everything goes well. Presumably this is the time taken building the graph, but in that case there needs to be some better progress visibility. Am I missing something, or is there an issue here?

2) As near as I can tell, the dependency graph doesn't include dependencies either too or from interfaces. Interfaces are represented in the graph, but they've got no connections. This makes a lot of potentially useful analyses completely unusable.

3) Will sample global inspections be published?

Help!

--Dave Griffith

3 comments

Anna? Anyone? This is kind of important...

--Dave Griffith

0

Hello Dave,

I'm finally getting a chance to play with the Global Inspections API I
whined so long for, and I'm running into some issues. I believe I
finally understand what the API is trying to provide, but am seeing
some odd results that might be due to me not understanding something
(or might be bugs).

1) If a global inspection returns true from it's isGraphNeeded()
method, then when I try to run an inspection it seems to hang for a
while on the first class analyzed. Eventually it completes, and
everything goes well. Presumably this is the time taken building the
graph, but in that case there needs to be some better progress
visibility. Am I missing something, or is there an issue here?


Do you mean some slowness in inspect code? If so - it is an issue.

2) As near as I can tell, the dependency graph doesn't include
dependencies either too or from interfaces. Interfaces are
represented in the graph, but they've got no connections. This makes
a lot of potentially useful analyses completely unusable.


What do you need exactly?


3) Will sample global inspections be published?


Already presents in InspectionGadgets ;)


Help!

--Dave Griffith


Sorry for late response.
Thank you!

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"


0

Do you mean some slowness in inspect code? If so - it is an issue.

No, not slowness, but lack of responsiveness or feedback during a long-running operation. Create a trivial global inspection that does nothing, but has "isGraphNeeded()" return true. Run this inspection on a large project. It will appear to hang, showing "checking ]]>" in the progress meter, while it constructs the graph. It should probably update the progress meter in some useful way while creating the graph.

Alternatively, I'm doing something wrong.

What do you need exactly?

I need interfaces to be treated exactly like concrete classes are, with dependencies to and from them calculated and available in the graph. I'm not sure why the API makes any distinction.

Alternatively, I'm doing something wrong.

Already present in InspectionGadgets

Excellent. This gives me a chance to figure out just what I'm doing.

--Dave Griffith

0

Please sign in to leave a comment.