Now that you have created a plug-in it is time to play the set up game. We are going to be setting up the following:
Setting up plugin.xmlThe plugin.xml file is known as the manifest and provides all the hooks used to tie together the Eclipse framework. Some of these entries were filled out for you during 1 Creating a Plugin.
<?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.0"?> <plugin id="org.geotools.udig.ui" name="%pluginName" version="0.1" provider-name="%providerName"> <runtime> <library name="udig-ui.jar"> <export name="*"/> </library> </runtime> <requires> <import plugin="org.eclipse.core.runtime"/> <import plugin="org.eclipse.ui"/> </requires> <extension id="UDigApplication" point="org.eclipse.core.runtime.applications"> <application> <run class="org.geotools.udig.ui.UDigApplication"> </run> </application> </extension> <extension point="org.eclipse.ui.perspectives"> <perspective name="%perspectiveName" class="org.geotools.udig.ui.CatalogPerspective" id="org.geotools.udig.ui.CatalogPerspective"> </perspective> </extension> </plugin> Setting up plugin.propertiesThe plugin.properties file is used to externalize strings from the plugin.xml manifest. This is good practice and will allow us to pluginName = UDig Application Plug-in providerName = Refractions Research, Inc. perspectiveName = Local Catalog For more information: Setting up build.propertiesThe build.properties file is used when bundling up the plug-in for use: bin.includes = plugin.xml,\ *.jar,\ udig-core.jar,\ plugin.properties source.udig-core.jar = src/ Setting up build.xmlUse of an ANT build.xml file for plug-in bundling is optional (although it does save you from using the wizard everytime). If you want to create an ANT build file to build your plug-in:
When we set up nightly builds this step will be mandatory. Dependency Hack To set up proper dependencies, do the following: Set up proper classpath:
Reference
|
(c) Copyright (c) 2004,2005 Refractions Research Inc. and others. |