+ this.processNode = processNode;
+
+ EventListener listener = new LogListener(editor.getSite().getPage()
+ .getWorkbenchWindow().getWorkbench().getDisplay());
+
+ try {
+ String logBasePath = processNode.getPath() + '/' + SlcNames.SLC_LOG;
+ logPathLength = logBasePath.length();
+
+ Workspace ws = processNode.getSession().getWorkspace();
+
+ String statement = "SELECT * FROM ["
+ + SlcTypes.SLC_LOG_ENTRY
+ + "] as logEntry"
+ + " WHERE ISDESCENDANTNODE('"
+ + logBasePath
+ + "')"
+ + " ORDER BY logEntry.[slc:timestamp] ASC, NAME(logEntry) ASC";
+ StringBuffer buf = new StringBuffer("");
+ NodeIterator it = ws.getQueryManager()
+ .createQuery(statement, Query.JCR_SQL2).execute()
+ .getNodes();
+ while (it.hasNext())
+ appendLogEntry(buf, it.nextNode());
+ beforeTextInit = new StringBuffer(buf.toString());
+ // text.setText(buf.toString());
+ ws.getObservationManager().addEventListener(listener,
+ Event.NODE_ADDED, logBasePath, true, null, null, false);
+ } catch (RepositoryException e) {
+ throw new SlcException("Cannot register listener", e);
+ }