Skip to content

Commit a517298

Browse files
committed
working on internal web server for html help
1 parent 89540ad commit a517298

File tree

2 files changed

+213
-89
lines changed

2 files changed

+213
-89
lines changed

app/src/processing/app/Editor.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,25 @@ protected JMenu buildHelpMenu() {
861861
JMenu menu = new JMenu("Help");
862862
JMenuItem item;
863863

864+
item = new JMenuItem("Web Server Test");
865+
item.addActionListener(new ActionListener() {
866+
public void actionPerformed(ActionEvent e) {
867+
//WebServer ws = new WebServer();
868+
SwingUtilities.invokeLater(new Runnable() {
869+
public void run() {
870+
try {
871+
int port = WebServer.launch("/Users/fry/coconut/processing/build/shared/reference.zip");
872+
Base.openURL("http://127.0.0.1:" + port + "/reference/setup_.html");
873+
874+
} catch (IOException e1) {
875+
e1.printStackTrace();
876+
}
877+
}
878+
});
879+
}
880+
});
881+
menu.add(item);
882+
864883
/*
865884
item = new JMenuItem("Browser Test");
866885
item.addActionListener(new ActionListener() {

0 commit comments

Comments
 (0)