01: package org.drools.eclipse.dsl.editor;
02:
03: import org.drools.eclipse.editors.DRLDocumentProvider;
04: import org.eclipse.jface.text.IDocument;
05:
06: public class DSLtoDRLDocumentProvider extends DRLDocumentProvider {
07:
08: private DSLtoDRLRuleViewer drlViewer;
09: private IDocument document;
10:
11: public DSLtoDRLDocumentProvider(DSLtoDRLRuleViewer drlViewer) {
12: this .drlViewer = drlViewer;
13: }
14:
15: public IDocument getDocument(Object element) {
16: if (document == null) {
17: IDocument super Document = super .getDocument(element);
18: document = new DSLtoDRLDocument(super Document, drlViewer);
19: }
20: return document;
21: }
22:
23: public boolean isModifiable(Object element) {
24: return false;
25: }
26:
27: }
|