1 / 62

Editing and Debugging Mumps with VistA and the Eclipse IDE

Editing and Debugging Mumps with VistA and the Eclipse IDE. Joel L. Ivey, Ph.D. Dept. of Veteran Affairs OI&T, Veterans Health IT Infrastructure & Security Service. Objectives. What is Eclipse? Do I need to know any Java? (NO!) A functional MUMPS (or M) editor with syntax coloring.

lotus
Download Presentation

Editing and Debugging Mumps with VistA and the Eclipse IDE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Editing and Debugging Mumps with VistA and the Eclipse IDE Joel L. Ivey, Ph.D. Dept. of Veteran Affairs OI&T, Veterans Health IT Infrastructure & Security Service

  2. Objectives • What is Eclipse? • Do I need to know any Java? (NO!) • A functional MUMPS (or M) editor with syntax coloring. • Setting it up • Options & Features • Examples of its use 15th VistA Community Meeting

  3. What Is Eclipse? • Eclipse is an Integrated Development Environment (IDE). • It is written in Java, and was originally a Java development environment. • It uses a plug-in architecture to provide for extension of the capabilities. • It is now used as an editor and development environment for many languages. 15th VistA Community Meeting

  4. Do I have to know any Java? NO!! 15th VistA Community Meeting

  5. How do I get and Install Eclipse? • Eclipse was originally developed by IBM, but was converted to an open source project. • The most recent version can be downloaded as a zip file from http://www.eclipse.org. • Simply unziping the file (with ‘use folder names’ checked) into a desired directory such as C:\ or C:\Prog results in Eclipse being put into C:\Eclipse or C:\Prog\Eclipse. • Start Eclipse by double clicking on the Eclipse.exe program in the Eclipse directory. 15th VistA Community Meeting

  6. The Eclipse Editor on first use 15th VistA Community Meeting

  7. The Basic Eclipse Editor (after clicking on the ‘Go To Workbench’ arrow) 15th VistA Community Meeting

  8. Unzipping the VistALink Plug-in 15th VistA Community Meeting

  9. The M icon and VistA menu added by the M-Editor Plug-in 15th VistA Community Meeting

  10. The VistA menu Items 15th VistA Community Meeting

  11. Setting VistA Preferences -1 15th VistA Community Meeting

  12. Setting Preferences for the VistALink Connection 15th VistA Community Meeting

  13. Setting Preferences for the M-Editor functionality 15th VistA Community Meeting

  14. After Clicking OK for the Preferences and then Clicking on the Green ‘M’ icon 15th VistA Community Meeting

  15. After Selecting the Routine, You have to sign on to the server 15th VistA Community Meeting

  16. And the routine is loaded 15th VistA Community Meeting

  17. The center section is the editing area, and multiple routines may be open at one time (tabs) 15th VistA Community Meeting

  18. The Left Panel contains projects – only files which are in a project may be edited – the default is mcode. An ‘m’ extension is used for the files. 15th VistA Community Meeting

  19. The right panel contains an outline of routine tags. Selecting one of these will jump to that location in the routine. 15th VistA Community Meeting

  20. Adding a new section of code. The error is intentional. 15th VistA Community Meeting

  21. The left gutter is marked where lines have been added or changed. The tab is also marked to indicate a modified routine. 15th VistA Community Meeting

  22. The outline also shows the added tag. 15th VistA Community Meeting

  23. On saving the routine (cntrl-S or the icon), it indicates an error encountered. 15th VistA Community Meeting

  24. The problems are identified in the M-Editor Console at the bottom. It points out the error, and several variables which are at risk (neither arguments or newed). 15th VistA Community Meeting

  25. On saving a routine • The routine is written to the project (mcode by default). • The server is checked to insure that the routine on the server hasn’t changed since it was loaded into Eclipse. • If the server version hasn’t changed (or you approve the write over), the routine is saved on the server. • The part of XINDEX checking for errors is run with the routine. Any warnings or errors cause a dialog box to pop-up to insure that the user is aware of the problems. 15th VistA Community Meeting

  26. On Saving A Routine - 2 • The routine is checked for variables which are not arguments and which have not been newed. In most cases, you probably want to protect them. • Variables which are expected to be visible outside the routine can be identified with a special comment e.g. ; ZEXCEPT: IO,DUZ KERNEL VARIABLES • If an M-Unit test has been identified for the routine, the unit test is run and the roll & scroll results are shown (periods for passed tests, Texts for failures or errors). 15th VistA Community Meeting

  27. On Saving A Routine - 3 • The default action on saving is to enter or update the routine in the ROUTINE file, and to update the date and time for the routine on the first line. 15th VistA Community Meeting

  28. So, I fixed the error and NEWed the variables. 15th VistA Community Meeting

  29. On Saving again • A dialog box appeared indicating no problems identified. 15th VistA Community Meeting

  30. Some Benefits of the Project Entries • The mcode project in the left panel now contains the most recent version of the routine that was edited. • Right Click on the routine, and a number of options are available. • Properties – An M-Editor section allows an M-Unit routine to be specified. • Compare With local history allows the current routine to be compared with prior versions (the length of time the routines are saved is determined by a preference (General – Workspace – Local History)) • Replace With allows the current routine to be replaced with an earlier version. 15th VistA Community Meeting

  31. M-EditorProperties for XTMDUTIL 15th VistA Community Meeting

  32. Compare with Local History lets you walk through the changes. You can then use the Replace With to restore a prior version. 15th VistA Community Meeting

  33. If a routine is specified for loading that doesn’t exist on the server, it provides a place to generate the comments for the first two lines (and specify an M-Unit routine for the new routine) 15th VistA Community Meeting

  34. And then opens the new routine in the editor for further editing 15th VistA Community Meeting

  35. There are other functions on the VistA menu available as well • A listing of routines with names beginning with specified characters • A listing of globals with names beginning with specified characters • A listing of global values (both a simple listing and a listing which can be copied and pasted into another account). • These are all non-editable, but can be copied for editing elsewhere. 15th VistA Community Meeting

  36. A request for a Routine Directory listing 15th VistA Community Meeting

  37. Generates the listing below 15th VistA Community Meeting

  38. A request for a global directory listing 15th VistA Community Meeting

  39. And a list of global names beginning with X 15th VistA Community Meeting

  40. A request for a global listing – note the “Setup for copying” check box 15th VistA Community Meeting

  41. A normal global listing 15th VistA Community Meeting

  42. And a global listing setup for copying 15th VistA Community Meeting

  43. Work in progress – In addition to the Red M on Green, there is a bug on an M 15th VistA Community Meeting

  44. Selecting the Option or the M-bug icon displays a dialog box for the code to be processed 15th VistA Community Meeting

  45. An OK on the dialog box causes the Eclipse to change to a debugging perspective for M 15th VistA Community Meeting

  46. The upper left section displays the stack, the current line of code, the last command executed and the next to be executed, it also contains the icons for controlling progress. 15th VistA Community Meeting

  47. The upper right area has panels for breakpoints in the code, variable values, setting watch variables, and their display, and initialization values 15th VistA Community Meeting

  48. The middle and bottom portions contain the code being processed and the console for text display and input 15th VistA Community Meeting

  49. Debugging • Initially, the debugger displays only the line to be processed. • The debugger can be set to step over commands or to run (in the latter case, stops will be made when watch variables change or when a line of code specified as a breakpoint is reached). 15th VistA Community Meeting

  50. The code that will be processed 15th VistA Community Meeting

More Related