Comment #3 by jake.pezaro:
i have a tool that does this
(http://code.google.com/p/maven-dependency-browser/) but
it is a separate app at the moment. it show raw (un-resolved or
hidden) dependencies
in a tree.
is q4e interested in incorporating this? if so i will make the core functionality
available
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Comment #4 by amuino:
Your application looks great. We had simpler functionality in mind, but
your tool
looks awesome for dependency analysis.
Why don't we discuss in the dev mailing list how your work can be
incorporated into q4e ?
Comment #5 by jake.pezaro:
sure. just point me in the direction of the mailing list please
Comment #6 by emantos:
The mailing list is at -> http://groups.google.com/group/q4e-dev
--
Abel Muiño - http://ramblingabout.wordpress.com/
i'm not that familiar with eclipse plugin development, so if you can
give me some suggestions as to where to start looking within your
codebase that would speed things up. i'll probably have some more
questions once I get started. you should probably hold off making any
branches until i have a bit better idea of your codebase & what i need
to do.
It builds a tree object of the dependencies and stores all the
information about them. The library and maven have been improved
lately to throw all the dependency handling events, so this library
has all the needed information.
I have used it in the bundle plugin and it's quite simple.
dependencyTree =
dependencyTreeBuilder.buildDependencyTree( project, localRepository,
factory,
artifactMetadataSource, null, collector );
--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
-- The Princess Bride
In the bundle plugin I did
node.getState() != DependencyNode.INCLUDED
thanks for the pointers
what i need to know is - is there a embedder/plexus container
somewhere that i can access from the action or do i need to
instantiate one myself?
the reason i asked is that eclipse telling me that the getEmbedder()
method is restricted when i try to access the embedder using
MavenCoreActivator.getDefault().getMavenInstance().getEmbedder();
Access restriction: The method getEmbedder() from the type
EclipseMaven is not accessible due to restriction on required library
D:\dev\eclipse\plugins\org.devzuz.q.maven.core_0.3.0.200711240237.jar
i haven't yet been able to work out why this is happening. if you
could give me a push in the right direction that would be very
helpful.
org.codehaus.plexus.embed.Embedder.lookup(String role)
the latest (2.0.4) Maven embedder does not allow access to the plexus
Embedder.lookup() method (i think it did in earlier versions but that
was changed).
issues outstanding
- colours and selection behaviour aren't quite right yet
- need to add the scope filtering
- code formatting does not match rest of project
- not very well tested yet
questions:
- should i submit it as is while i finish off the last bits or should
i wait until it is all done?
- should i submit it as a svn patch (in which case where to) or would
you rather i committed it myself (i would need commit access)?
- i have added the maven-dependency-tree 1.1 jar to the embedder
manually (added jar to /lib and altered manifest). is this ok? i
wasn't able to get the maven bundle plugin to work correctly (it
re-created the manifest differently to the copy in svn).
- it is currently using some java 1.5 features but they could be
removed easily. are we aiming for compatibility with a particular
java version?
issues outstanding- colours and selection behaviour aren't quite right yet- need to add the scope filtering
- code formatting does not match rest of project
- not very well tested yet
- should i submit it as is while i finish off the last bits or shouldi wait until it is all done?
- should i submit it as a svn patch (in which case where to) or wouldyou rather i committed it myself (i would need commit access)?
- i have added the maven-dependency-tree 1.1 jar to the embeddermanually (added jar to /lib and altered manifest). is this ok? iwasn't able to get the maven bundle plugin to work correctly (itre-created the manifest differently to the copy in svn).
- it is currently using some java 1.5 features but they could beremoved easily. are we aiming for compatibility with a particularjava version?
<dependency-browser-1.JPG>
the code from maven-dependency-tree jar must be executed inside the
plexus container (the code that executes it is in core..EclipseMaven).
as far as I can see (which is not very far in this case as my
understanding of OSGI is basic at best) there are 4 options for where
to put this:
1 - the embedder bundle (it's current location). dependency path:
embedder > core > dependency-browser
2 - the core bundle (i opted not to put it here as there are no other
jars in this bundle) dependency path: core > dependency-browser
3 - a new bundle (can't be the dependency-browser bundle as it depends
on core) which then becomes a dependency of the core bundle (seems a
bit complicated for no benefit). dependency path: embedder &
new-bundle > core > dependency-browser
4 - bundle the viewer together with the jar and allow it to start it's
own plexus container (probably a bad idea as it replicates core
functionality and creates a separate plexus container to boot)
dependency path: embedder > dependency-browser.
there is one other issue that i forgot to mention - initialisation of
the viewer takes place on the UI thread, which is not a satisfactory
long term solution as it will definitely be slow for large projects.
i will make this a background task but i need to get to grips with
eclipse job control first, so it might take a little while. does this
need to be done before i submit the initial patch?
dynamic reaction to changes in the workspace & following focus is not
implemented. i would rather leave this out for now as it would
require re-resolving the entire tree every time which takes upwards of
3 seconds (for a small project). we can talk about this more once the
other functionality is implemented and stable.
do we want to keep the old zest-based graph? it looks nice but i
never found it useful for solving real world problems, however if we
do want to keep it then where do we want to put the new functionality?
more options:
1 - delete the old zest display from the plugin.
2 - separate plugin. easiest code solution, but confusing as we would
then have 2 very similarly named plugins doing the same thing in a
different way
3 - two-in-one plugin (tabbed panes or something). means more code
Comment #7 by jake.pezaro:
have attached a patch containing the dependency analysis code. it is a zipfile
containing all the new and changed files.
Attachments:
dependency-analyser.tar.gz 79.5 KB
the long running dependency resolution task is now a background job.
dependencies are stilll in the embedder for now. i've been thinking
about how this can be moved into a separate plugin.
option 1 - separate instance of the embedder
option 2 - register the plugin as a buddy of core and expose the
MavenEmbedder.lookup() method in EclipseMaven ie public Object
lookup(String role, String hint).
option 3 - (kind of like option 2) register the plugin as a buddy of
core and expose the a method in EclipseMaven that returns a collection
of objects that the dependency analyser can then cast. the key
difference from 2) is that this method hard codes the roles that it
needs to lookup.
still to do
a) scope filtering
b) dynamic selection
c) selection colors are not right (SWT doesn't make it easy to change
appearance of the selected row in tables & trees) but this is a minor
issue
d) icons are stolen from the dependency viewer
e) multi-module projects don't work
let me know if, how and when you want to put this stuff into the codebase.
Comment #8 by jake.pezaro:
(No comment was entered for this change.)
Attachments:
patch-144.txt 147 KB
http://code.google.com/p/q4e/issues/attachment?aid=-3979520537390439624&name=patch-144.txt
Comment #9 by carlossg:
we are in the process of committing the code, more news soon
Comment #10 by amuino:
Merged in revision 927.
Issue attribute updates:
Status: Fixed
Owner: amuino
Labels: Milestone-0.5.0
http://code.google.com/p/q4e/issues/attachment?aid=-1671801451596983363&name=patch-144-1.txt
can you let me know when it's merged
Comment #12 by carlossg:
done, thanks
Comment #13 by jake.pezaro:
fixed problems with selected items hiding the highlighting
http://code.google.com/p/q4e/issues/attachment?aid=-1376065294850393332&name=patch-144-2.txt
Comment #14 by jake.pezaro:
fixed problems with selected items hiding the highlighting
Attachments:
patch-144-2.txt 5.3 KB