Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  refactoring: graph of import dependencies?  (Read 1501 times)
0 Members and 1 Guest are viewing this topic.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Posted 2004-09-12 11:29:01 »

We've got three packages that, over time, have become inter-dependent to the extent that all three have to be compiled simultaneously to resolve dependencies (i.e. you cannot compile one, then add it's output to the next and compile that, etc - you cannot compile any without having the source or precompiled versions of the others!).

This begs to be refactored, but each package has around 30 classes with very non-trivial interdependencies.

Every class only importst what it absolutely has to (eclipse's auto import-management), so if I could get a graph showing exactly which classes had import dependencies on external packages I could relatively quickly make decisions on package-level refactoring (should we collapse into one package? Could we split into 2? 3? 4? etc).

Has anyone seen a free tool that will do this? I've got a nagging feeling I've seen it in a UML editor before (assuming correct class diagrams with explicit package delimiting, it would be theoretically possible for a UML editor to abstract out only the dependencies, and generate the graph I'm looking for), but can't remember where.

It would be very useful for refactoring large projects. I've got a horrible feeling it might only be available in large commercial pacakges Sad.

malloc will be first against the wall when the revolution comes...
Offline Giddy

Senior Newbie




Java games rock!


« Reply #1 - Posted 2004-09-12 11:53:24 »

Try this

http://metrics.sourceforge.net/
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #2 - Posted 2004-09-12 12:27:20 »

Quote


You have to read most of the way down the page until you get to the good parts.

Unfortunately, it's eclipse v3 only Sad Sad Sad. And the debian maintainers are still (3 months after 3 went live) faffing about failing to upgrade their packages. Grr.

But...this is the coolest (free) tool I've seen in bloody ages. Assuming it works, that dependency graph is just waht I've been looking for! For system-arch work, it's perfect. Thanks!

malloc will be first against the wall when the revolution comes...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #3 - Posted 2004-09-12 16:19:37 »

Quote


Sob! This doesn't work - at all - on eclipse 3, fresh virgin install with JDT etc. It apparently *only* works on Eclipse 3.0 M8.

So...now I'm still looking for a tool, but hopefully one that *actually works* and isn't Eclipse-2 only (which would make me very sad having just spent more than 3 fscking hours getting eclipse 3 to work just to try and use this tool).

EDIT: Ah, actually, one of the developers cleverly disabled the only documented way you could enable the metrics. There is also a bug so that the the secondary method doesn't work in 2 cases out of 3. Eventually, mainly through pure luck, I discovered the one way of getting it to run (although all the documentation on the site, and in the plugin, is wrong and won't work if you try and follow it).

Unfortunately, for no apparent reason, the dependency graph never works. So, I'm still looking for a tool that works Sad.

EDIT2: The same developer has hard-coded the dependency graph to be windows-only. What a moron! He writes a java-tool plugin for a java IDE in java, and he hardcodes it to only run on MS-windows. And despite admitting to that mistake 3 months ago, he hasn't got around to fixing it.

malloc will be first against the wall when the revolution comes...
Offline Argoyle

Senior Newbie





« Reply #4 - Posted 2004-09-15 21:00:46 »

I installed Metrics in my Eclipse 3.0 on Debian Sarge from this link http://metrics.sourceforge.net/update by going via Help - Software updates - Find and install and adding the above site as a new remote site. Everything seems to work ok for me after I enabled metrics for the project in the project properties and then rebuilt the project.

Best regards,
Joakim
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #5 - Posted 2004-09-15 21:26:26 »

Quote
I installed Metrics in my Eclipse 3.0 on Debian Sarge


You're saying that the dependency graph which according to the developer doesn't work except on windows is actually working on debian for you?

EDIT: I'm using debian too, so ought to be able to do anything you can do...although of course because the debian maintainer still hasn't packaged eclipse 3.0, I'm now running a manually installed copy of eclipse, so dependencies are a little less certain.

malloc will be first against the wall when the revolution comes...
Offline Argoyle

Senior Newbie





« Reply #6 - Posted 2004-09-16 05:52:45 »

At least I got a graph that looked like the screenshots on the homepage. I could click around the different packages and the graph was updated.

I also use a manually installed Eclipse for the same reason.
Offline pepe

Junior Member




Nothing unreal exists


« Reply #7 - Posted 2004-09-16 07:56:34 »

have a look at refactorit.
http://refactorit.com.
iirc, the free version gives you the possibility to work with 50 classes max, which might be okay for you.

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #8 - Posted 2004-09-16 09:00:19 »

Quote
At least I got a graph that looked like the screenshots on the homepage. I could click around the different packages and the graph was updated.

I also use a manually installed Eclipse for the same reason.


Argh. So, it does work, contrary to the author's support messages. But we don't know why. Shrug. I give up. Clearly, this is software that could break at any moment (c.f. the last few versions - has and does), so even if I managed to work out hte magic combination to make it work it's probably going to die on me at some critical point in the future Tongue. Thanks anyway.

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #9 - Posted 2004-09-16 09:01:03 »

Quote
have a look at refactorit.
http://refactorit.com.
iirc, the free version gives you the possibility to work with 50 classes max, which might be okay for you.



Thanks. However...50 is *just* too small Sad. Ah well. Guess I just have to keep searching...

malloc will be first against the wall when the revolution comes...
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (24 views)
2014-04-15 18:08:23

BurntPizza (19 views)
2014-04-15 03:46:01

UprightPath (33 views)
2014-04-14 17:39:50

UprightPath (17 views)
2014-04-14 17:35:47

Porlus (33 views)
2014-04-14 15:48:38

tom_mai78101 (59 views)
2014-04-10 04:04:31

BurntPizza (117 views)
2014-04-08 23:06:04

tom_mai78101 (217 views)
2014-04-05 13:34:39

trollwarrior1 (184 views)
2014-04-04 12:06:45

CJLetsGame (191 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!