| Creating custom FileEditorInput? [message #152110] |
Sun, 02 November 2003 06:11 |
Eclipse User |
|
|
|
Originally posted by: mkasovic.inet.hr
I'm trying to create text based editor (as plugin). MyEditor extends
TextEditor. File in the local filesystem is actualy serialized object of
class MySerObject that i want to read, interpret it as text using my own
parser and display it in the text editor.
This is the method from MyEditor class:
public void init(IEditorSite site, IEditorInput input) throws
PartInitException {
super.init(site, input);
if (input.getClass().equals(FileEditorInput.class)) {
FileEditorInput fei = (FileEditorInput) input;
IFile fInputDataFile = fei.getFile();
String fullPath = fInputDataFile.getLocation().toOSString();
String myObjectAsText = MySerObject.parseAndReturnAsText(fullPath);
} else {
throw new PartInitException( "Not a file");
}
}
I can print myObjectAsText to the console and it's fine.
What I don't know is how to make my text editor display it.
|
|
|
Powered by
FUDForum. Page generated in 0.02960 seconds