public void appendText(String text, long type) { if (m_Text.isDisposed()) return; // This is needed because the text control (on Windows) stores newlines // as \r\n and selections and character counts will get out of synch if // we // work in the text control but reason about the text and they have // different newlines. // (We still use \n everywhere else as the newline marker because that's // what Soar uses) text = text.replaceAll(AbstractView.kLineSeparator, AbstractView.kSystemLineSeparator); boolean show = true; int recordIndex = -1; if (m_FilteringEnabled) { // Record the text in our master filter document. // Also decide if we should show this particular line of text. recordIndex = m_FilterDoc.addRecord(text, false, type); show = m_FilterDoc.show(type); } if (show) { appendTextInternal(text, false, recordIndex); // Decide if we have caused the window to scroll or not if (m_LastTopIndex != m_Text.getTopIndex()) { scrolled(); m_LastTopIndex = m_Text.getTopIndex(); } } }
public void changeExclusionFilter(long type, boolean add, boolean regenerateDisplay) { long filter = m_FilterDoc.getExcludeFilter(); // Add or remove the given type from the exclusion filter if (add) filter = filter | type; else filter = filter & (~type); m_FilterDoc.setExcludeFilter(filter); // If asked, recompute the entire display (this is a lot of work) if (regenerateDisplay) m_FilterDoc.regenerateDisplay(); }
public void setExclusionFilter(long type, boolean regenerateDisplay) { m_FilterDoc.setExcludeFilter(type); // If asked, recompute the entire display (this is a lot of work) if (regenerateDisplay) m_FilterDoc.regenerateDisplay(); }
public boolean isTypeVisible(long type) { return m_FilterDoc.show(type); }
public long getExclusionFilter() { return m_FilterDoc.getExcludeFilter(); }
public void clear() { m_FilterDoc.clear(); m_FoldingDoc.clear(); m_Text.setText(""); m_IconBar.redraw(); }