package ts.eclipse.swt;

import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Text;

import ts.resources.AbstractTypeScriptFile;
import ts.resources.ITypeScriptProject;

public class SWTTextTypeScriptFile extends AbstractTypeScriptFile {

	private final String name;
	private final Text text;

	public SWTTextTypeScriptFile(String name, Text text, ITypeScriptProject tsProject) {
		super(tsProject);
		this.name = name;
		this.text = text;
		text.addModifyListener(new ModifyListener() {

			@Override
			public void modifyText(ModifyEvent e) {
				setDirty(true);
			}
		});
	}

	@Override
	public String getName() {
		return name;
	}

	public void dispose() {
		// TODO Auto-generated method stub

	}

	@Override
	public String getPrefix(int position) {
		return null;
	}

	@Override
	public String getContents() {
		return text.getText();
	}

}

@@ -733,80 +733,8 @@
 %0D%0A%0D%0A
-%09public void dispose() %7B%0D%0A%09%09// TODO Auto-generated method stub%0D%0A%0D%0A%09%7D%0D%0A%0D%0A
 %09@Ov

Remove dispose method