Some preliminary hints on using dependency viewer.
One actually allows triggering right or wrong dependencies.
Press "settings" icon on dep.viewer toolbar (edit rules), then add rule and use the following rules to form source and
target file sets:
The syntax is much AspectJ like. Thus, for example
com.intellij.psi.* means all files in com.intellij.psi package and com.intellij.psi..* all files there indeep.
Generally * means any identifier chars, .. means any identifier chars plus dot sequence that starts and ends with dot.
You can also control origin of the classes like tests, source or libraries by prefixing fileset with
lib:.. - any classes that come from libraries
test:.. - any test classes
src:.. - any source classes
File sets allow mathematical sets operations like !lib:.. any non-library classes (complement), com.intellij.psi..* ||
com.intellij.openapi.. - union, and && for intersection.
You can also use named package sets for common rules:
Use any identifier prefixed with $ sign for set name.
More dedicated help and/or more intuitive UI yet to follow.
--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Please sign in to leave a comment.
P.S.: Press filter icon to filter illegal dependencies only and use Settings/Errors panel for on-the-fly detection in
editor.
--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Are there any plans for an actual visual graph of package dependencies? Maybe this wouldn't be that useful but it would be cool.
On Sat, 27 Mar 2004 22:51:00 +0300, Maxim Shafirov (JetBrains) wrote:
Will it be possible export dependancies to HTML, and run off-line
dependancies. Much like offline inspections.
Could make a good addition for an automated build to generate...
--
Always code as if the guy who ends up maintaining your code will be a
violent psychopath who knows where you live.
Mark Derricutt --- mark@ talios.com --- http://www.talios.com
Even without a visual graph, some way of showing cyclic dependencies and levels would be very useful.
I missed the error settings for this. Very sweet. As always, you guys are ahead of the curve.
--Dave Griffith
Having illegal dependencies being reported as part of the existing code inspection mechanism would be nice.
Johannes Graham wrote:
Sure. Just haven't implemented this yet.
--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Any ideas for UI configuring named sets and dependency rules are welcome. I think I somewhat stuck here.
BTW there's an idea to use this language for configuring scope elsewhere in the IDE like find usages or structural search.
--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
You might want to look at what http://innig.net/macker/ has done.
--Tim
Hmm, so this issues are
1) Need to be able filter by arbitrary package/class name, with arbitrary wildcarding
2) Need to be able to specify src|test|lib, or any combination thereof.
3) Ideally would need to be able to specify modules, with wildcarding.
4) Arguably need to be able to specify individual directories, with wildcarding. I would personally would veto this, if I was you. Module|source type|fully-qualified name should be an adequate triple for this space.
Ugly. I'm afraid I don't see any real UI choice beyond what you've got going.
<Macker's author here> I would welcome any suggestions people have about Macker in general, or making it work nicely with IDEA. One could integrate Macker's pattern syntax with the dependency viewer -- e.g. grouping classes by pattern, show dependencies between layers as described by patterns, and so forth....
(Aside: At one point, IntelliJ was considering giving copies of IDEA to open source developers. Does anybody know if that went anywhere? I'd be interested in using it to work on Macker instead of Eclipse, which is fine but not nearly as nice (especially on OS X).)
Hi Max,
Maybe I just did not found it, but the current implementation just
shows, on what classes the current class the depends, but not what
classes depend on the current class. Is this also planned to implement
(maybe everything displayed in a more compact way)?
Tom
I've got a tracker item open for that (although I assume it was in plan anyway).
--Dave Griffith
Thomas Singer (MoTJ) wrote:
Not for the moment right now. As the matter of fact this is quite easy to implement but yet has to scann all the project
before show up. Not a good way IMO.
--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
>
Michael H. Kay the author of the Saxon xslt processor has received a
license: http://saxon.sourceforge.net/saxon7.9.1/index.html
Don't know what the requisites are for receiving one though.
Would you expect this to make it into the final Pallada release?
Johannes Graham wrote:
Already done actually. Corresponding inspection avaliable in General group under Settings/Errors
--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
I found it there - I was hoping that these problems could also be reported using the "Inspect Code" feature (or more specifically, the command-line version thereof)
Johannes Graham wrote:
Huh, that's not for pallada I'm affraid.
--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"