dia r4333 - trunk/plug-ins/python



Author: hans
Date: Tue Mar 24 19:28:26 2009
New Revision: 4333
URL: http://svn.gnome.org/viewvc/dia?rev=4333&view=rev

Log:
wdeps.py : 2006-05-04 - better demangling, less dependent of command line parameters order


Modified:
   trunk/plug-ins/python/wdeps.py

Modified: trunk/plug-ins/python/wdeps.py
==============================================================================
--- trunk/plug-ins/python/wdeps.py	(original)
+++ trunk/plug-ins/python/wdeps.py	Tue Mar 24 19:28:26 2009
@@ -206,8 +206,7 @@
 		else :
 			if not bHaveComponents :
 				components = string.split(arg, ",")
-				for s in components:
-					GetDeps (s, deps, nMaxDepth)
+				# don't GetDeps here cause we need to first evaluate *all* parameters
 				bHaveComponents = 1
 			else :
 				sOutFilename = arg
@@ -237,18 +236,35 @@
 depth while searching, like --depth=2 which cuts everything below 
 the second dependency level.
 
+The most useful switch to anaylze parts of a highly coupled system is
+--dont-follow=random.dll (accepting a list as above). This will show
+random.dll in the resulting graph in gray. But it will not drag in 
+any dependencies below.
+
+If you have a small graph it may be useful to not only show the 
+number of symbols used but their name. Giving --symbols=n all edges 
+with n or less symbols will have the (mostly demangled) name of the 
+symbols printed as text.
+
+Finally there is the switch --dump for people prefering the textual
+representation over some graph.
+
 For more information read the source.
 """
 		sys.exit(0)
 
-	Remove (deps, dllsToRemove)
 	# output ...
 	if not sOutFilename :
 		f = sys.stdout
 	else :
 		# ... dot
 		f = open(sOutFilename, "w")
-	
+
+	for s in components:
+		GetDeps (s, deps, nMaxDepth)
+
+	Remove (deps, dllsToRemove)
+
 	if bDump :
 		Symbols = {}
 		Modules = {}
@@ -278,7 +294,10 @@
 		# symbols used by many modules are good candidates for refactoring
 		print "***** Modules with users (symbols) *****"
 		for s, i in Sorted (Imports) :
-			print s, "(" + str(i) + ") :" , string.join (Modules[s], ",")
+			if Modules.has_key (s) :
+				print s, "(" + str(i) + ") :" , string.join (Modules[s], ",")
+			else :
+				print s, "(0) : <no users>"
 		# no diagram at all
 		sys.exit(0)
 	f.write ('digraph "' + components[0] + '" {\n')



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]