On 23-06-2013 18:40, Eclipse Explorer wrote:
> I have a TextEditor open and it displays text from several files.
> How can I programmatically close one of these files?
> Thanks for your help.
You dont have to write a program for that,
The have a build in key, just for that purpose
On 23-06-2013 19:29, Eclipse Explorer wrote:
> Thanks Luuk,
> I realize that I can use key combinations, or click the "x" in the
> editor. However, the logic for the code that I am writing requires that
> I close the file programmatically.
what language do you want to program this in?
and on what OS?
If its Windows, take look at AutoIt
It's not possible to close a single page of a MultiPageEditorPart without that editor having done a significant amount of work to allow it, and presumably, giving you an API of its own to do so. There's no standard way to do so.
It's not a multipage editor; it's an extension from org.eclipse.ui.editors.text.TextEditor.
An analogy is the Java Editor. If you have several java files open, and delete one of these files in the Package Explorer, "Eclipse" no longer displays the file that you deleted in the Java editor. I am attempting to accomplish this programmatically.