Hi Roy: Thank you for collecting the enhancements you thought of in a document. I have a question below about how to generate an HTMLVisitor (in analogy to a PrintVisitor). Would all terminals (keywords and Ident-objects and String-objects etc.) be hyperlinks? -- Karl >From roberhau@cup.hp.com Mon Jan 5 17:22:04 1998 >From: "Roy Oberhauser" >To: lieber@ccs.neu.edu >Subject: HTML project additions > >Hi Karl, > >I was glad to get your feedback. Looks like email is working again. I've >updated under /proj/demsys/com3360/f97/roberhau: > >FUTURE (what's included below) >USER_MANUAL (with your doc issues) >samples/visitor-by-hand/html (alternative simpler program to understand and >load initially - maybe add it to overview.html?) > >Below are some ideas for future enhancements, including yours. Wish I had had >the time. Thanks for your support. > >Regards, > >Roy >-- >Roy Oberhauser > /_ _ Application Delivery Lab, HP-UX System Technology Center > / / /_/ HP, 19447 Pruneridge Ave., MS 47LA1, Cupertino, CA 95014 > / roberhau@cup.hp.com, Telnet/(408)447-0589, FAX (408)447-4960 > >========================FUTURE======================================= >The following features could be added to the Demeter/Java HTML enhancement: > >- Integrate, document, and deliver in next demjava release >It is designed to be a part of the demjava tool. >If it is not integrated, the tool will become outdated and it is >large and cumbersome if used only for generating HTML. >Files modified in demjava 0.6.4: >GNUmakefile, demjava.cd, main.beh, gencode.beh, genhtml.beh, htmlvis.beh > >- Reference file: Easier filename usage >Sort filenames within a category (cd files, beh files, java files, >input files) and separate and place a header on each category. > >- References to class definition instead of first reference >Click on a class in .beh or .java file will take cd file to the class >definition. If click on a class in the cd file, should the cd file >also move to class def (this could be annoying if you don't want it >to move)? This can be implemented by adding a boolean flag to indicate >if a reference is a definition, or a pointer to the index that is the >definition. Modify HtmlClassIndex for this purpose. > >- Bold the Class Definition in the Class List >Using the above technique to detect the definition as you generate >the list of references, bold and maybe capitalize the C1 or whatever >reference that is the definition. > >- Inform user of files being viewed >Maybe JavaScript could be used to detect which frame the mouse is on >and dynamically update the Status bar informing the user of the file >in that frame (the way the status is update when mouse passes over a >hyperlink). >Alternative would be a separate frame that is dynamically updated >with the filenames being used. > >- Inform user what was clicked last >Maybe on the status bar using the above technique. > >- Hyperlink input file >Parse and hyperlink the input file to the other file types. >Currently just the text of the input file is shown. > >- create a generic "-htmlvisitor" >Why not allow an alternative to PrintVisitor for those who would like >to create a browsable output file. > An interesting idea. Would the generic html visitor make all terminals hyperlinks? Or would should the generic hyperlinks be? RESP: | An interesting idea. Would the generic html visitor make all terminals | hyperlinks? Or would should the generic hyperlinks be? | The purpose would be to assist in understanding the adaptive program. The TraceVisitor output could be used in conjunction to hyperlink edges and class names to the cd and to the input file, etc. Or with the PrintVisitor, the terminals would be linked to the appropriate cd location. Additional support and an extra frame for *.output files would need to be created. Regards, Roy > >- Support for beh methods to/from Java hyperlinking >A Java class dictionary exists. We could parse the java files and link >the behavior methods and classes within "(@" and "@)" to the Java files. >Would this be useful or would the HTML files created be too large? I think that something like this would be useful to report Java compiler error messages at the adaptive level. > >- Support for multiple cd files >A simplifying assumption was made that there was only 1 cd file. > >- Cleaner integration with demjava >Code was duplicated in order to partition the additions. >I tried to keep my code changes partitioned from demjava as much as >possible, and therefore some code was duplicated, such as modifying >an existing method's arguments to make it more flexible (e.g. ensureDirectory >and ensureOutputDirectory). This was done to keep from breaking >any behavior in demjava and to allow the enhancement to be more easily >reused elsewhere. If ensureOutputDirectory() took an argument, I >wouldn't have had to duplicate it. > >- generate an HtmlVisitor.beh as PrintVisitor.beh is generated >This will allow more flexibility if demeter syntax is changed. >htmlvis.beh is brittle in this respect. > >- Output during HTML generation >Probably don't want to list each file on a separate line. > >- GNUmakefile.template >Should html generation be the default in the makefile? > >- Test on Windows platform >Does it even work in generating HTML on Windows? > >- Cleanup/Optimization >HtmlClassIndex should also track the java files. >htmlTagBeg should remove duplication and use smaller methods. >HtmlVisitor gains access to Hashtables and Vectors stored in Program >and modifies them directly. Methods for this access should be >created in Program. >Java files are traversed twice, once to gen and once to create html - >maybe do it in parallel? >Traversals could be optimized. >generateCode() duplicates the code there so any logic changes would >hopefully also be updated for html. This could be integrated. >Create separate visitors to handle the various tasks during traversals, >HtmlVisitor is not only writing HTML code, but also gathering classnames. > >- Support for aspects >Don't know much about this but do know it wasn't supported. > >- Run the java code in the browser >Browsers have a Java Virtual Machine. We are generating Java code. >Why don't we run it within the browser? > >- HTML support for C++, Perl, etc. >This support could be extended to other language tools. >