[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: Listener for Editor Closing Action

Thanks David,

that did the trick.

Marcio.

"David Kyle" <davidk@xxxxxxxxxx> wrote in message 
news:f3n5mg$r9r$1@xxxxxxxxxxxxxxxxxxxx
> Marcio,
>
> In your navigator view try adding the following to your 
> createPartControl(Composite) method:
>
>    getSite().getPage().addPartListener(new IPartListener2() {
>        public void partActivated(IWorkbenchPartReference...) {}
>        public void partClosed(IWorkbenchPartReference...) {}
>        etc....
>    });
>
> David Kyle
>
> "Marcio DeBarros" <marcio.debarros@xxxxxxxxx> wrote in message 
> news:f3n3f5$rer$1@xxxxxxxxxxxxxxxxxxxx
>> Hi,
>>
>> I have a MultiPageEditor, that has a navigator view (ViewPart) on the 
>> left that lists all the files that are currently opened on an editor. I 
>> used ActionFactory.CLOSE to add an action to the MenuBar to close the 
>> editor. Right now, when I have more than one file opened, and select it 
>> on the navigator view, if I close it from the File->Close the editor gets 
>> closed. However the file is not removed from the list of files from the 
>> Navigator View
>>
>> What kind of action listener should the ViewPart add to be able to 
>> receive notifications of the closing file ?
>>
>> Thanks,
>>
>> --MD.
>>
>
>