CommonNavigator with large files [message #328362] |
Fri, 23 May 2008 09:55 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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
|
|
|
|
Re: CommonNavigator with large files [message #328581 is a reply to message #328362] |
Tue, 27 May 2008 21:25 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Francis Upton IV![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=francisu%40ieee.org) Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
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
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Powered by
FUDForum. Page generated in 0.03520 seconds