Feedback from Matt (matt.heimer@oracle.com) on the Tutorial's displayCode.html page.
I was attempting to use the offline javatutorials.zip as obtained from http://www.oracle.com/technetwork/java/javase/java-tutorial-downloads-2005894.html but encountered some problems. Every link to download a .java file doesn't work because of JavaScript problems within displayCode.html. The heading isn't correctly set, the download link is broken and the code does not get displayed on the page.
The second problem with the offline copy is that even if the above error are fixed displayCode.html page will still not display the code when your readers are using Google Chrome as their web browser. Because of security concerns the Chrome developers block AJAX calls to file:// based URLs by default. As a backup action you can display the code using an iframe (without color highlighting) .
There is also some code that seems to serve no purpose because any effect the code has is overwritten a couple of lines later.
In general the code doesn't seem to follow modern practices (document.write, adding a prototype method to document,global vars, lots of inline JavaScript, etc) so it is probably due for an update.
I've fixed the bugs but not the style issues and I'm attaching a modified version of displayCode.html. It only addresses the bugs I've mentioned above and has nothing to do with my IDE project. If you search for "MATT" you can see where I've commented out some existing code.
One more issue that is not related to displayCode.html; On every page in the tutorial there is a gray banner at the top of the page. The background image is not designed to tile (repeat) correctly but it is tiled by default. On typical desktop monitor resolutions it gets messed up and the links on the right side are hard to read (see attached screenshot). My resolution width is 1920 which is the 4th most common resolution width. The problem will be worse on all the Apple Retina or similar monitors. There needs to be a graphic that is designed to be tiled and the CSS needs to be updated. But the CSS is inline on every pages so every single page would need to be updated unless there is some type of page generation that goes on that I'm not aware of. It would be better if the CSS was a single linked file so that clients could cache it instead of having to re-download the same CSS for every page in the tutorial.
I was attempting to use the offline javatutorials.zip as obtained from http://www.oracle.com/technetwork/java/javase/java-tutorial-downloads-2005894.html but encountered some problems. Every link to download a .java file doesn't work because of JavaScript problems within displayCode.html. The heading isn't correctly set, the download link is broken and the code does not get displayed on the page.
The second problem with the offline copy is that even if the above error are fixed displayCode.html page will still not display the code when your readers are using Google Chrome as their web browser. Because of security concerns the Chrome developers block AJAX calls to file:// based URLs by default. As a backup action you can display the code using an iframe (without color highlighting) .
There is also some code that seems to serve no purpose because any effect the code has is overwritten a couple of lines later.
In general the code doesn't seem to follow modern practices (document.write, adding a prototype method to document,global vars, lots of inline JavaScript, etc) so it is probably due for an update.
I've fixed the bugs but not the style issues and I'm attaching a modified version of displayCode.html. It only addresses the bugs I've mentioned above and has nothing to do with my IDE project. If you search for "MATT" you can see where I've commented out some existing code.
One more issue that is not related to displayCode.html; On every page in the tutorial there is a gray banner at the top of the page. The background image is not designed to tile (repeat) correctly but it is tiled by default. On typical desktop monitor resolutions it gets messed up and the links on the right side are hard to read (see attached screenshot). My resolution width is 1920 which is the 4th most common resolution width. The problem will be worse on all the Apple Retina or similar monitors. There needs to be a graphic that is designed to be tiled and the CSS needs to be updated. But the CSS is inline on every pages so every single page would need to be updated unless there is some type of page generation that goes on that I'm not aware of. It would be better if the CSS was a single linked file so that clients could cache it instead of having to re-download the same CSS for every page in the tutorial.