The EWD.js IDE application is distributed in two parts,
a MUMPS %RO file and a tar archive.


0. This application requires EWD.js and an EWD.js supported database.
   http://ec2.mgateway.com/ewd/ws/index.html

   As presently distributed this IDE application uses Linux commands
   for some functions and therefore cannot be used with a Windows
   implementation of EWD.js.




1. Load and Install the %RO to a selected development environment.
   This file contains two routines ^SISEWD and ^SISEWD0, and
   was saved in Linux end-of-line format.

2. Extract files from the TAR archive and place them in the
   appropriate destination folders, as indicated below.
 
   The file named my_IDE.js should be restored to the
   ~ewdjs/node_modules folder and all other files should be
   placed in a new folder named ~ewdjs/www/ewd/my_IDE
   (the standard structure for an EWD.js application).

   The simplest way to restore to the correct destination
   folder is to cd to the ~ewdjs folder then 

	tar -xvf <filename> --skip 3

   from that folder.

   --skip 3 causes the extractor to bypass the first 3
   directories, i.e. /home/[user]/ewdjs

   Otherwise tar -xvf will restore a long path with undesired
   folders home/[user]/ewdjs on the left and it will be necessary
   to move the extracted files afterward.

3. In order to use the IDE without modifying any HTML file or app.js,
   it is necessary to download and install code mirror.
   Paths specified in the application expect code mirror to
   be found in sub-folder cm of the my_IDE folder.

   If using code mirror without ckEditor, open the application from:
   http://address:port/ewd/my_IDE/noFrames.html

4. if ckEditor is installed, paths specified in the application expect
   it to be installed in the ~ewdjs/www folder.  To be clear, the
   first ckEditor sub-folder under www is ckeditor (all lowercase).

   If using ckEditor, open the application from:
   http://address:port/ewd/my_IDE/index.html
 
5. To use both code mirror and ckEditor together for the HTML text area,
   download and configure the code mirror plugin for ckEditor.
   The application opens the same as with ckEditor alone (i.e., as index.html).

6. By default the application uses code mirror mixed mode for the HTML
   text area, javascript mode for the node_module and application javascript
   areas and mumps mode for the routine editor text area.  It is necessary
   either to install these modes or edit code mirror configuration settings
   in the specific HTML file that you are using.

   Look for the section that begins -


		//  Code mirror	
 	      CodeMirror.commands.autocomplete = function(cm) {
	        CodeMirror.showHint(cm, CodeMirror.hint.htmlmixed);
	      };

	      window.nodeEditor = CodeMirror.fromTextArea(nodeModuleTextArea, {
	        mode: "javascript",
	        lineNumbers: true,
	        lineWrapping: true,
	        extraKeys: {"Ctrl-Space": "autocomplete"}
	      });

		. . .
		. . .

   Language mode is specified for each code-mirror window separately.
 
   If using ckEditor for the HTML text area, the ckEditor default
   configuration should be fine.  However, the configuration may be tweaked
   to suit user preferences, for example -

        // Custom for my_IDE -
        config.startupMode = 'source';
        config.extraPlugins = 'codemirror';
        config.uiColor = '8e8ead'; //Darker shade of right <div> color
        config.height = 196; // Match vertical dimension of node_module area

7. For functions that write data, such as save routine, save file, export
   project, etc. it is necessary to establish a password.

   The password is checked in app.js by a function at the very end of the
   file -

    function checkPassword() {
    var hash = CryptoJS.MD5(document.getElementById('pwd').value);
    if (hash == "8d3693998e5b852bf56410c092df0fcc") return true;
    else return false;
    }

    Select a password and run it through MD5.  Replace the MD5 hash in
    the checkPassword() function (quoted hex string) with your hash.

    Alternatively, if your application is not exposed anywhere, just have the
    function return true.

------------------------------------------------------------------------------
%RO contents:

	SISEWD
	SISEWD0

------------------------------------------------------------------------------
TAR file contents:

~ewdjs/node_modules/my_IDE.js
~ewdjs/www/ewd/my_IDE/ckIndex.html
~ewdjs/www/ewd/my_IDE/cmIndex.html
~ewdjs/www/ewd/my_IDE/deprecatedFramesIndex.html
~ewdjs/www/ewd/my_IDE/frame_bottom.html
~ewdjs/www/ewd/my_IDE/frame_left.html
~ewdjs/www/ewd/my_IDE/frame_left_margin.html
~ewdjs/www/ewd/my_IDE/frame_middle.html
~ewdjs/www/ewd/my_IDE/frame_right.html
~ewdjs/www/ewd/my_IDE/frame_top.html
~ewdjs/www/ewd/my_IDE/index.html
~ewdjs/www/ewd/my_IDE/noFrames.html
~ewdjs/www/ewd/my_IDE/app.js


------------------------------------------------------------------------------
PS. The frames version of this application is not implemented.


