MapEditor in MultiPageEditorPart

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

MapEditor in MultiPageEditorPart

Mark Hammond
This post has NOT been accepted by the mailing list yet.
Hi guys,

I've had a search around on adding a MapEditor into a MultiPageEditorPart and had a go myself but i have got stuck.

So far I have managed to add a MapEditor into a multi editor part along with other tabs and the initial map renders.

My problem is that I cannot seem to use any of the tools in the map editor toolbar as they don't seemed to be linked in anyway to the map editor. I had to add the MapEditorActionBarContributor class to my multi editor in the plugin.xml to get the actions to appear in the first place. Also i cannot seem to be able to simply zoom in on the map using the mouse wheel.

If anyone has any suggestions I would be most grateful.

Thanks,

Mark.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MapEditor in MultiPageEditorPart

Mark Hammond
This post has NOT been accepted by the mailing list yet.
I have solved my problem. I have abandoned the MultiPageEditorPart and have instead used CTabFolder's instead, so i now have the map in a tab along with my other editor tab. If anyone is interested and wanted to do a similar thing here is a snippet:

CTabFolder cTabFolder = new CTabFolder(top, SWT.BOTTOM);
cTabFolder.setSimple(false);

// pass cTabFolder into MapEditor's createPartControl method
super.createPartControl(cTabFolder);

cTabFolder.setLayout(new FillLayout());

// creates my custom properties composte
createMyPropertiesComposite(cTabFolder);

// Create Map Tab
CTabItem cTabItem = new CTabItem(cTabFolder, SWT.NONE);
cTabItem.setText("Map");
// MapEditor Composite is added to tab item
cTabItem.setControl(this.getComposite());

// Create Properties Tab
CTabItem cTabItem2 = new CTabItem(cTabFolder, SWT.NONE);
cTabItem2.setText("Properties");
cTabItem2.setControl(myPropertiesComposite);


Mark.
Loading...