Closed
Bug 568195
Opened 16 years ago
Closed 7 years ago
MXR should provide dependency tree
Categories
(Webtools Graveyard :: MXR, enhancement)
Webtools Graveyard
MXR
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: tessarakt, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.4) Gecko/20100513 Firefox/3.5b4pre
Build Identifier:
From a page like http://mxr.mozilla.org/comm-1.9.2/source/mail/base/content/messenger.xul, there should be a link to a view with the dependency tree, i.e. all included overlayed .xuls and Javascripts, recursively.
This would make it much more easy to get an overview ...
Reproducible: Always
| Reporter | ||
Updated•16 years ago
|
Component: Server Operations: Projects → MXR
Product: mozilla.org → Webtools
Updated•16 years ago
|
QA Contact: mrz → mxr
so, i'm not really sure what to do....
consider
http://mxr.mozilla.org/comm-1.9.2/source/mozilla/browser/base/content/browser.xul
1 #filter substitution
51 <?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
52 <?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
53 <?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
55 <?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
56 <?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
57 <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
61 #include browser-doctype.inc
94 #include global-scripts.inc
95 <script type="application/x-javascript" src="chrome://browser/content/nsContextMenu.js"/>
97 #ifdef MOZ_SAFE_BROWSING
98 <script type="application/x-javascript" src="chrome://browser/content/safebrowsing/sb-loader.js"/>
99 #endif
100 <script type="application/x-javascript" src="chrome://global/content/contentAreaUtils.js"/>
102 <script type="application/javascript" src="chrome://browser/content/places/editBookmarkOverlay.js"/>
106 #include browser-sets.inc
321 #include browser-menubar.inc
so, here we have a couple of interesting things, although it doesn't cover all possible interesting things (none of the lines i've identified used substitution, although other lines in the file did)
* #filter substitution
* xml-stylesheet
* xul-overlay
* #include
* #ifdef
* script
your file has:
56 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
57 %brandDTD;
58 <!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd" >
59 %messengerDTD;
60 <!ENTITY % customizeToolbarDTD SYSTEM "chrome://global/locale/customizeToolbar.dtd">
* entity [declaration]
* %entity [use]
some files are easy, e.g.:
http://mxr.mozilla.org/comm-1.9.2/find?string=/quickFilterBar.xul&hint=messenger
yields only one result:
http://mxr.mozilla.org/comm-1.9.2/source/mail/base/content/quickFilterBar.xul
some are mildly ambiguous:
http://mxr.mozilla.org/comm-1.9.2/find?string=/mailOverlay.xul&hint=messenger
yields two:
http://mxr.mozilla.org/comm-1.9.2/source/mail/base/content/mailOverlay.xul
http://mxr.mozilla.org/comm-1.9.2/source/suite/mailnews/mailOverlay.xul
some are painful:
http://mxr.mozilla.org/comm-central/find?string=/brand.dtd&hint=branding
yields *nine*.
It's probably possible to improve the hinting algorithm to include the whole path of the current file (I'm currently running with that on konigsberg, the results are better, but in one case i'm getting slightly unexpected results).
There used to be a tool (doxygen) which would generate dependency views for .idl/.cpp/.h files, and mxr would integrate with that.
I considered trying to parse .xul files for a bit and then remembered just how painful it is. You have to apply some flavor of the preprocessor _first_ because then you have to start treating the content as xml. And you can't blindly look for things, because especially for the entity case, you get various patterns of nesting <>"'....
I guess the big question I have is:
why do you want an overview? how would you use it, how would it help you?
there are a couple of tasks I need to look into for mxr wrt parsing, they include: parsing Python, parsing Ruby, source highlighting Ruby. I'm also considering trying to analyze XUL as JavaScript, but, I need to select priorities and an algorithm. The Python and Ruby stuff should be much easier than any attempt at handling XUL...
Comment 2•7 years ago
|
||
mxr is gone, mass closing.
https://searchfox.org/ is a much better alternative.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Updated•6 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•