public EventPackage DocumentEventToEventPackage(DocumentEvent e) {
		DefaultDocumentEvent ee = (DefaultDocumentEvent) e;
		if (ee.getType() == DocumentEvent.EventType.INSERT) {
			String inserted = "";
			try {
				inserted = ee.getDocument().getText(ee.getOffset(),
						ee.getLength());
			} catch (BadLocationException e1) {
				e1.printStackTrace();
			}
			return new EventPackage(docNum, ee.getType().toString(),
					ee.getLength(), ee.getOffset(), inserted, doc.getLength());
		} else if (ee.getType() == DocumentEvent.EventType.REMOVE) {
			return new EventPackage(docNum, ee.getType().toString(),
					ee.getLength(), ee.getOffset(), "", doc.getLength());
		}
		return new EventPackage(docNum, ee.getType().toString(),
				ee.getLength(), ee.getOffset(), "", doc.getLength());
	}