home *** CD-ROM | disk | FTP | other *** search
- !!script
- // Copyright ⌐ 1997-1998 - Modelworks Software
-
- function DoCommand()
- {
- var file = chooseFile("Choose an applet that needs a HTML test file",
- "*.java", "*.java");
- if (file)
- {
- CreateHtmlTestFile(file);
- }
- }
-
- function CreateHtmlTestFile(file)
- {
- var htmlFile = file.newType(".html");
- var classTitle = file.title;
- var editor = newEditor(htmlFile.path, true);
- if (editor)
- {
- editor.removeAll();
-
- editor.append("<html>\n");
- editor.append("<head>\n");
- editor.append("<meta name=\"generator\" content=\"Modelworks IDE\">\n");
- editor.append("<title>" + classTitle +"</title>\n");
- editor.append("</head>\n");
- editor.append("<body>\n");
- editor.append("<h1>Test page for "+ classTitle + " Class</h1><hr>\n");
- editor.append("<applet code="+ classTitle +".class width=300 height=300></applet>\n");
- editor.append("<hr></body>\n");
- editor.append("</html>\n");
- editor.setActive("Insert HTML Test Code");
- editor.save();
- }
- }
-
- !!/script
-
-