Extending MapForce Plug-in for Eclipse
The MapForce plug-in for Eclipse provides an Eclipse extension point with the ID com.altova.mapforceeclipseplugin.MapForceAPI. You can use this extension point to adapt, or extend the functionality of the MapForce plug-in. The extension point gives you access to the COM-Interface of the MapForce control and the MapForce API.
The MapForce Eclipse installation package contains a simple example of a plug-in that uses this extension point. It checks for any file open events of any new MapForce mappings, and sets the zoom level of the mapping view to 70%.
The JavaDoc documentation of the extension point is available in the MapForce plug-in installation directory (C:\Program Files\Altova\MapForce2022\eclipse\docs\).
Before you install and run the sample MapForce plug-in, ensure that the following prerequisites are met:
•You are using 64-bit Java, 64-bit Eclipse, 64-bit MapForce and 64-bit MapForce Integration Package.
•The JDT (Java Development Tools) plug-in is installed.
•The Eclipse PDE (plug-in development environment) is installed.
To import the sample MapForce plug-in project into your workspace:
2.On the File menu, click Import.
3.Select General | Existing projects into Workspace, and click Next.
4.Click the Browse... button next to the "'Select root directory" field and choose the sample project directory e.g. C:\Program Files\Altova\MapForce2022\eclipse\workspace\MapForceExtension.
5.Select the Copy projects into workspace option, and then click Finish. A new project named "MapForceExtension" has been created in your workspace.
To run the sample extension plug-in:
1.Switch to the Java perspective.
2.In the Run menu, click Run Configurations.
3.Right click Eclipse Application and select New. (If you cannot see "Eclipse application" in the list, the Eclipse Plug-In Development Tools are not installed in your Eclipse environment. To install Eclipse Plug-in Development Tools, click Install New Software in the Help menu. and install "Eclipse Plugin Development Tools" from "The Eclipse Project Updates" download site.)
4.Enter a name for your new configuration (in this example, SampleMapForcePlugin), and then click Apply.
5.Check that the MapForceClient workspace plug-in is selected in the 'Plug-ins' tab.
6.Click Run. A new Eclipse Workbench opens.
7.Open any MapForce mapping in the new Workbench. It will now open with a zoom level of 70%.