Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] MemoryEditorInput?

I've already though about doing so :)
But then I also though that such a basic thing probably already existed. maybe it would be an good idea to add it to cdt I will probably not be the last one who would like to present some text in an editor without connection to file, but then there is allways hard to keep the balance of what to add without bloating.

/Jimmie

2008/5/21 Leherbauer, Anton <Anton.Leherbauer@xxxxxxxxxxxxx>:
It is possible, you just need to implement IStorage and IStorageEditorInput accordingly.
 
HTH
Toni
 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Jimmie Eriksson
Sent: Wednesday, May 21, 2008 11:19 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] MemoryEditorInput?

Hi

Is it possible to open an editor without connecting it to a file? I would like to present a String in an IEditorInput, but can't find any suitable way to do this.

IFile file = root.getFile(new Path("myfile.txt"));
FileEditorInput fileEditorInput = new FileEditorInput(file);
ITextEditor editor = (ITextEditor)page.openEditor(fileEditorInput, desc.getId());

/Jimmie

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top