/** * Creates a new empty document. */ public Document() { super(); setTextStore(new CopyOnWriteTextStore(new GapTextStore())); setLineTracker(new DefaultLineTracker()); completeInitialization(); }
/** * Creates a new empty document. */ public Document() { super(); setTextStore(new CopyOnWriteTextStore(new GapTextStore())); setLineTracker(new DefaultLineTracker()); completeInitialization(); }
/** * Creates a new document with the given initial content. * * @param initialContent the document's initial content */ public Document(String initialContent) { super(); setTextStore(new CopyOnWriteTextStore(new GapTextStore())); setLineTracker(new DefaultLineTracker()); getStore().set(initialContent); getTracker().set(initialContent); completeInitialization(); }
/** * Creates a new document with the given initial content. * * @param initialContent the document's initial content */ public Document(String initialContent) { super(); setTextStore(new CopyOnWriteTextStore(new GapTextStore())); setLineTracker(new DefaultLineTracker()); getStore().set(initialContent); getTracker().set(initialContent); completeInitialization(); }
masterDocument.addDocumentListener(this); setTextStore(new CopyOnWriteTextStore(new GapTextStore())); setLineTracker(new DefaultLineTracker()); getStore().set(masterDocument.get());
public LogDocument(LogFile file, String encoding) throws SecurityException, IllegalArgumentException, ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException, PartInitException { super(); if (file.getEncoding() == null) { file.setEncoding(encoding); } this.file = file; this.encoding = file.getEncoding(); this.charset = Charset.forName(file.getEncoding()); IPreferenceStore store = LogViewerPlugin.getDefault().getPreferenceStore(); store.addPropertyChangeListener(new PropertyChangeListener()); backlogLines = store.getInt(ILogViewerConstants.PREF_BACKLOG); setTextStore(new GapTextStore(50, 300, 1f)); setLineTracker(new DefaultLineTracker()); completeInitialization(); reader = new BackgroundReader(file.getType(), file.getPath(), file.getNamePattern(), charset,this); }