Eclipse juno compatibility issue [message #1069154] |
Mon, 15 July 2013 09:29 |
prabuddha singh Messages: 4 Registered: December 2012 |
Junior Member |
|
|
Hi,
i was using some api's for splitting the editor area into two with eclipse indigo but now i have migrated to juno so i am facing compatibility issues.the jars required
org.eclipse.ui.internal.ilayoutcontainer,org.eclipse.ui.internal.editorsashcontainer org.eclipse.ui.internal.LayoutPart are not being resolved, maybe these plugins have been moved to some other jar in juno which i need to add.
all these plugins alongwith org.eclipse.ui.internal.PartPane,org.eclipse.ui.internal.PartSite,org.eclipse.ui.internal.WorkbenchPage;were being resolved in indigo from the bundle org.eclipse.ui but in juno these cant be resolved through org.eclipse.ui. so in juno is there a different bundle which i need to add?
please help.
here is the code.
the classes in bold cant be resolved
private void splitEditorArea() {
IWorkbenchPage workbenchPage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IWorkbenchPart part = workbenchPage.getActivePart();
PartPane partPane = ((PartSite) part.getSite()).getPane();
LayoutPart layoutPart = partPane.getPart();
try {
IDE.openEditor(workbenchPage, wsdlFile);
} catch (PartInitException e1) {
e1.printStackTrace();
}
IEditorReference[] editorReferences = workbenchPage.getEditorReferences();
// Do it only if we have more that one editor
if (editorReferences.length > 1) {
// Get PartPane that correspond to the active editor
PartPane currentEditorPartPane = ((PartSite) workbenchPage.getActiveEditor().getSite()).getPane();
EditorSashContainer editorSashContainer = null;
ILayoutContainer rootLayoutContainer = layoutPart.getContainer();
if (rootLayoutContainer instanceof LayoutPart) {
ILayoutContainer editorSashLayoutContainer = ((LayoutPart) rootLayoutContainer).getContainer();
if (editorSashLayoutContainer instanceof EditorSashContainer) {
editorSashContainer = ((EditorSashContainer) editorSashLayoutContainer);
}
}
/*
* Create a new part stack (i.e. a workbook) to home the
* currentEditorPartPane which hold the active editor
*/
PartStack newPart = createStack(editorSashContainer);
editorSashContainer.stack(currentEditorPartPane, newPart);
if (rootLayoutContainer instanceof LayoutPart) {
ILayoutContainer cont = ((LayoutPart) rootLayoutContainer).getContainer();
if (cont instanceof PartSashContainer) {
// "Split" the editor area by adding the new part
((PartSashContainer) cont).add(newPart);
}
}
}
}
thanks and regards,
prabuddha
[Updated on: Mon, 15 July 2013 09:40] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01754 seconds