[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Projects Conflicting with Custom Editor

Hello,

I am frustrated trying to figure this one out, so ill see if anyone else has encountered it.

I created a view that displays a tree of resources. These resources can be opened in an editor that I have also created by:
1)right click->open from within the my view (my own action), or
2)adding the resource to a project (of custom nature) and right click->open from within the Project Explorer (Project Explorer functionality).


Both options work great, unless I attempt to open a resource from within my view when it is currently part of a project as well. When I do this, my editor's document is returned as null and I get a NullPointerException during creation of the editor. If I delete the resource from the project and then try to open it from my view, it works fine again.

The resources are linked (not actual files on my PC), and therefore the same openInputStream method is called when they are opened from within my view and from within a project. I am using a TextFileDocumentProvider in my custom editor. Any ideas as to why this is happening?

Thanks,
Derek