@Override public DocumentRewriteSession startRewriteSession(DocumentRewriteSessionType sessionType) { if (getActiveRewriteSession() != null) throw new IllegalStateException(); fDocumentRewriteSession= new DocumentRewriteSession(sessionType); if (DEBUG) System.out.println("AbstractDocument: Starting rewrite session: " + fDocumentRewriteSession); //$NON-NLS-1$ fireRewriteSessionChanged(new DocumentRewriteSessionEvent(this, fDocumentRewriteSession, DocumentRewriteSessionEvent.SESSION_START)); startRewriteSessionOnPartitioners(fDocumentRewriteSession); ILineTracker tracker= getTracker(); if (tracker instanceof ILineTrackerExtension) { ILineTrackerExtension extension= (ILineTrackerExtension) tracker; extension.startRewriteSession(fDocumentRewriteSession); } if (DocumentRewriteSessionType.SEQUENTIAL == sessionType) startSequentialRewrite(false); else if (DocumentRewriteSessionType.STRICTLY_SEQUENTIAL == sessionType) startSequentialRewrite(true); return fDocumentRewriteSession; }
@Override public DocumentRewriteSession startRewriteSession(DocumentRewriteSessionType sessionType) { if (getActiveRewriteSession() != null) throw new IllegalStateException(); fDocumentRewriteSession= new DocumentRewriteSession(sessionType); if (DEBUG) System.out.println("AbstractDocument: Starting rewrite session: " + fDocumentRewriteSession); //$NON-NLS-1$ fireRewriteSessionChanged(new DocumentRewriteSessionEvent(this, fDocumentRewriteSession, DocumentRewriteSessionEvent.SESSION_START)); startRewriteSessionOnPartitioners(fDocumentRewriteSession); ILineTracker tracker= getTracker(); if (tracker instanceof ILineTrackerExtension) { ILineTrackerExtension extension= (ILineTrackerExtension) tracker; extension.startRewriteSession(fDocumentRewriteSession); } if (DocumentRewriteSessionType.SEQUENTIAL == sessionType) startSequentialRewrite(false); else if (DocumentRewriteSessionType.STRICTLY_SEQUENTIAL == sessionType) startSequentialRewrite(true); return fDocumentRewriteSession; }