Extensions to Svetovid students - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Extensions to Svetovid students

Description:

Special Submission Environment for Students Assessment ... Row and column of the caret. Currently active language for highlighting. Toolbar ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 20
Provided by: Don7155
Category:

less

Transcript and Presenter's Notes

Title: Extensions to Svetovid students


1
Extensions to Svetovidstudents submission
environment
  • Doni Pracner, Ivan Pribela,Mirjana Ivanovic,
    Zoran Budimac

2
Presentation contents
  • Introduction
  • Overview of Svetovid
  • Motivation
  • Goals of the extension
  • New textual component
  • Overview of some of the new features
  • Conclusions

3
Svetovid
  • Special Submission Environment for Students
    Assessment
  • Developed at the Department of Mathematics and
    Informatics, Faculty of Science, Novi Sad
  • Written in Java cross platform
  • Successfully used in several courses

4
Svetovid architecture
  • Server
  • running on one computer
  • Any number of clients
  • running on other computers
  • Both server and clients are written in Java 5
  • Recommended server platform
  • Windows XP
  • Windows NT
  • any UNIX platform

5
Control (instructor) client
  • Prompts a login dialog
  • Set of configuration dialogs
  • Setting up courses
  • Managing students
  • Full control over the conduction of practical
    exercises
  • Groups, order, timing

6
Student client
  • Prompts a login dialog
  • IDE allowing the student comfortable work
  • The files owned by a student are contained in a
    virtual directory

7
Student client
8
Motivation
  • The text component should accommodate the needs
    of programming
  • A third party component was built in
  • Syntax highlight, parenthesis matching,
  • Main problems
  • No keyboard shortcuts while editing text
  • No automatic indention

9
Goals of the extension
  • Create a new text component
  • Usage of the Java Swing text package
  • Keep all of the previous features and add new ones

10
CodeEditorPane
  • New textual component
  • Extends JEditorPane
  • Main features
  • Syntax highlighting
  • Marking bracket pairs
  • Line numbering
  • Indent preservation
  • Measures against cheating
  • Convenience methods for applications

11
Syntax Highlight (1/2)
  • Done in a separate object representing the
    language
  • Interface ProgramLang
  • Language properties
  • Methods for syntax highlighting
  • Whole document
  • Segment
  • Expanded segment

12
Syntax Highlighting (2/2)
  • Class DefaultLang default implementation
  • an empty language
  • Flexible scanner, easy to extend into new
    languages
  • Currently supported languages Java, Scheme,
    Modula2 and TeX
  • PlainTextLang for simple textual files
  • Automatic detection of languages (extensions)

13
Parenthesis matching
  • Pairs of parenthesis usually have a meaning in
    program code
  • Usage of the Highlighter interface

14
Line numbering
  • Made as a separate text pane with line numbers
  • Should be built in a JScrollPane as a row header

15
Code indention
  • Helps to make more readable code
  • On line breaks, the indent from the previous line
    is copied

16
Measures against cheating
  • Usage of the system clipboard is forbidden
  • Overriding cut, copy and paste methods
  • Using a local static clipboard

17
Convenience methods for visual implementation
  • Status bar
  • Row and column of the caret
  • Currently active language for highlighting
  • Toolbar
  • Programming language selection
  • Manual syntax highlight refresh
  • Line numbering component
  • Fully set up JPanel with the component

18
Conclusion
  • CodeEditorPane
  • 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

19
Thank you for your attention
Write a Comment
User Comments (0)
About PowerShow.com