jean
jean

Reputation: 11

only one editor at a time? RCP

I was wondering if there is a manner to make it impossible to open more than 1 editor at a time? what I have now is a button that each time it is pressed gives a new editor. I am using eclipse RCP

thanks

Upvotes: 1

Views: 441

Answers (1)

Tonny Madsen
Tonny Madsen

Reputation: 12718

You could add an IPartListener on the IPartService of the IWorkbenchWindow that close all other editors when a new editor is opened. You find the current set of editors via IWorkbenchPage.getEditorReferences().

Upvotes: 1

Related Questions