Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Creating custom FileEditorInput?
Creating custom FileEditorInput? [message #152110] Sun, 02 November 2003 06:11
Eclipse UserFriend
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.
Previous Topic:anyone has experience on DBC tools like jass, jcontract and icontract with eclipse?
Next Topic:Setting Initial Perspective
Goto Forum:
  


Current Time: Sun Nov 09 11:22:14 EST 2025

Powered by FUDForum. Page generated in 0.02960 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top