[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] Re: CommonNavigator with large files
|
- From: "Francis Upton (News)" <francisu@xxxxxxxx>
- Date: Tue, 27 May 2008 14:25:15 -0700
- Newsgroups: eclipse.platform
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.14 (X11/20080501)
The navigators work with resources, how you manage the models is your
own affair. In my application, I keep a hash from the IFile to my model
object so I will find the open file if it's already in memory.
In my editor, I have some code like this:
@Override
public void init(IEditorSite site, IEditorInput input)
throws PartInitException
{
IFile file;
if (input instanceof IFileEditorInput)
{
file = ((IFileEditorInput)input).getFile();
_mainNode = _editor.getRuntime().findMainNode(file);
}
You can see that last method looks up the file.
HTH,
Francis
Ola Spjuth wrote:
Hi,
I have some large files I'd like to expand in CommonNavigator, and since
parse takes quite a while I naturally don't want to duplicate this parse
in the editor. Could someone recommend a way where I can only parse
once, and use the same parsed model in my Editor as in my
ContentProvider for the Navigator? Where should this model be placed?
Thanks,
/Ola