Extensions to Svetovid students submission environment Doni Pracner
Extensions to Svetovid students’ submission environment Doni Pracner, Ivan Pribela, Mirjana Ivanović, Zoran Budimac
Presentation contents n n n n Introduction Overview of Svetovid Motivation Goals of the extension New textual component Overview of some of the new features Conclusions
Svetovid n Special Submission Environment for Students Assessment Developed at the Department of Mathematics and Informatics, Faculty of Science, Novi Sad Written in Java – cross platform n Successfully used in several courses n n
Svetovid architecture n Server n n Any number of clients n n n running on one computer running on other computers Student Both server and clients are written in Java 5 Recommended server platform n n n Windows XP Windows NT any UNIX platform Instructor Student Server Student
Control (instructor) client n n Prompts a login dialog Set of configuration dialogs n n n Setting up courses Managing students Full control over the conduction of practical exercises n Groups, order, timing
Student client n n n Prompts a login dialog IDE allowing the student comfortable work The files owned by a student are contained in a virtual directory
Student client
Motivation n n The text component should accommodate the needs of programming A third party component was built in n n Syntax highlight, parenthesis matching, … Main problems: n n No keyboard shortcuts while editing text No automatic indention
Goals of the extension n Create a new text component Usage of the ‘Java Swing’ text package Keep all of the previous features and add new ones
Code. Editor. Pane n n n New textual component Extends JEditor. Pane Main features n n n Syntax highlighting Marking bracket pairs Line numbering Indent preservation Measures against cheating Convenience methods for applications
Syntax Highlight (1/2) n n Done in a separate object representing the language Interface Program. Lang n n Language properties Methods for syntax highlighting Whole document n Segment n Expanded segment n
Syntax Highlighting (2/2) n Class Default. Lang – default implementation n n an empty language Flexible scanner, easy to extend into new languages Currently supported languages: Java, Scheme, Modula 2 and Te. X Plain. Text. Lang – for simple textual files Automatic detection of languages (extensions)
Parenthesis matching n n Pairs of parenthesis usually have a meaning in program code Usage of the Highlighter interface
Line numbering n n Made as a separate text pane with line numbers Should be built in a JScroll. Pane as a row header
Code indention n n Helps to make more readable code On line breaks, the indent from the previous line is copied
Measures against cheating n n n Usage of the system clipboard is forbidden Overriding cut, copy and paste methods Using a local static clipboard
Convenience methods for visual implementation n Status bar n n n Toolbar n n Row and column of the caret Currently active language for highlighting Programming language selection Manual syntax highlight refresh Line numbering component Fully set up JPanel with the component
Conclusion n Code. Editor. Pane n n n Support for all existing features, adding new ones Flexible syntax highlight system Simple to build in into existing applications Does not break existing ‘Swing’ text mechanisms Unfortunately the new component has not yet been implemented into Svetovid
Thank you for your attention
- Slides: 19