Setya wrote:
Hi all,
When I open 2nd editor I need it to be placed in different tab groups
than the 1st one. Is it possible ?
The current behaviour the 2nd editor always put in the same tab groups
as the 1st one than the 2nd editor can be separated by dragging it
outside the 1st editor area. I want this behaviour not by dragging but
by opening at the first time.
Once you have the second tabbed stack open, you can choose which stack
to open an editor in by making it active.
// editors in the 2 different tabbed stacks
IEditorPart last;
IEditorPart current;
// filenames to open in editors
IFile[] filename;
IWorkbenchPage fActivePage;
fActivePage = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage();
for (int i = 2; i < filename.length; ++i) {
fActivePage.activate(last);
last = current;
current = IDE.openEditor(fActivePage, filename[i], true);
}
There's some automated code in the unit tests that does this,
org.eclipse.ui.tests.api.Bug95357Test in the org.eclipse.ui.tests project.
Later,
Paul