/*******************************************************************************
* Copyright (c) 2009 Tasktop Technologies and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Tasktop Technologies - initial API and implementation
*******************************************************************************/
package org.eclipse.mylyn.tasks.tests.ui;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.TextViewer;
/**
* @author Steffen Pingel
*/
public class MockTextViewer extends TextViewer {
private String text;
public MockTextViewer() {
}
public MockTextViewer(String text) {
this.text = text;
}
@Override
public IDocument getDocument() {
return new Document(text);
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
}