protected void addPages ( ) { try { textEditor = new DRLRuleEditor ( ) { public void close ( boolean save ) { super . close ( save ) ; DRLRuleEditor2 . this . close ( save ) ; } protected void setPartName ( String partName ) { super . setPartName ( partName ) ; DRLRuleEditor2 . this . setPartName ( partName ) ; } } ; reteViewer = new ReteViewer ( textEditor ) ; int text = addPage ( textEditor , getEditorInput ( ) ) ; int rete = addPage ( reteViewer , getEditorInput ( ) ) ; setPageText ( text , "Text Editor" ) ; setPageText ( rete , "Rete Tree" ) ; textEditor . getDocumentProvider ( ) . getDocument ( getEditorInput ( ) ) . addDocumentListener ( new IDocumentListener ( ) { public void documentAboutToBeChanged ( DocumentEvent event ) { } public void documentChanged ( DocumentEvent event ) { reteViewer . fireDocumentChanged ( ) ; } } ) ; } catch ( PartInitException e ) { DroolsEclipsePlugin . log ( e ) ; } }
Adds Text Editor for rules and Rete graph viewer