The action is now available for folders as well as files, but it still does
nothing when a folder is selected. There's several things you'll need to do
to get past this.
First of all, ViewGraphAction currently checks to make sure the selected
resource is an IFile and ignores it if it is not. You'll obviously have to
remove that check.
Then, since your editor input will not necessarily be a file, you'll have to
open your editor using something other than FileEditorInput for input. This
means that you'll probably have to create your own editor input class (i.e.
RevisionGraphEditorInput) that implements IEditorInput. This class will
contain the selected IResource (just like FileEditorInput contains an
IFile). You can probably model most of your class on the FileEditorInput
class. And, of course, you'll need to fix your editor to work with the new
Let me know if you need help with any of this.
On 7/3/08 6:30 AM, "Alberto Gimeno" <gimenete_at_gmail.com> wrote:
> Ok. I didn't see any advantage in implementing it as an Editor. Now I
> see: we can have several instances, each one showing a different
> So, I have just commited the changes I've made to make it work as an
> editor. So now I don't listen to selection changes. And I have moved
> the popup menu action to the "team" group.
Received on 2008-07-03 16:37:08 CEST