Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 2e9c43658e374d290a2de15d25134ac8 > files > 800

db4o-doc-8.0-1.fc15.i686.rpm

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="120" MadCap:lastWidth="624" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" MadCap:PathToHelpSystem="../../../../" MadCap:HelpSystemFileName="index.xml" MadCap:SearchType="Stem">
    <head><title>Creating A Plugin	</title>
        <script type="text/javascript">/* <![CDATA[ */
window.onload = function(){
	var pathToFlash = $('html').attr('MadCap:PathToHelpSystem') + 'Content/Resources/Code/ZeroClipboard.swf';
	ZeroClipboard.setMoviePath(pathToFlash);
			
	function bindToClipBord(element,content){
		var clip = new ZeroClipboard.Client();
		clip.setText(content);
		clip.glue(element);
	};
		
	if(location.protocol==='file:'){
		$('.copylink-marker').remove();
	} else{
			$('.copylink-marker').each(function(){
				var text = $(this).parent().parent().children('.prettyprint').html();
				$(this).hover(function(){
					bindToClipBord(this,text);
				},
				function(){});
			});	
	}		
	prettyPrint();	
};
                /* ]]> */</script>
        <link href="../../../Resources/Stylesheets/OnlineStyle.css" rel="stylesheet" />
        <script src="../../../Resources/Code/prettify.js">
        </script>
        <script src="../../../Resources/Code/lang-vb.js">
        </script>
        <script src="../../../Resources/Code/jquery.min.js">
        </script>
        <script src="../../../Resources/Code/ZeroClipboard.js">
        </script>
        <script src="../../../SkinSupport/MadCapAll.js" type="text/javascript">
        </script>
    </head>
    <body>
        <p class="MCWebHelpFramesetLink" style="display: none;"><a href="../../../../index_CSH.html#platform_specific_issues/database_for_osgi/eclipse_plug-in_with_db4o_service/creating_a_plugin.htm" style="">Open topic with navigation</a>
        </p>
        <p>
            <script type="text/javascript">/*<![CDATA[*/document.write('<a href="' + location.href +'">');
				document.write("Direct Link");
			document.write('</a>');/*]]>*/</script>
        </p>
        <p>
        </p>
        <h1>Creating A Plugin</h1>
        <p>First of all you will need to install db4o_osgi into the
Eclipse environment. You can do that by copying db4o_osgi.jar into
ECLIPSE_HOME\plugins folder, restart Eclipse, then switch to Plug-Ins view, select db4o-osgi plug-in, right-click and select "Import As-&gt;Source Project". </p>
        <p>If you do not want to do that, you can open
Eclipse and create a usual java project from the db4o_osgi sources.</p>
        <p>Now you are ready to create a new plug-in project.</p>
        <ul>
            <li value="1">Open Eclipse workspace if not yet opened. </li>
            <li value="2">Select File/New from the menu and select "Plug-in Project" as
the project type. </li>
            <li value="3">Select MemoPlugin as the project name, leave the default
values for the other settings and press "Next"</li>
            <li value="4">Leave all the default values and press "Next"</li>
            <li value="5">In the "Templates" screen select "Hello, World" template. This
template creates a menu in the Eclipse environment, which we will use for our
example. Click "Finish"</li>
        </ul>
        <p>You might be asked to switch to "Plug-in development"
perspective, which you can surely do.</p>
        <p>You should see a MemoPlugin window opened in the
environment. This window represents important plug-in properties and it can be
opened by double-clicking plugin.xml file in Package Explorer. </p>
        <p>You can use the tab-scroll at the bottom to navigate to
different pages. Please, open the "Overview" page of the plugin.xml window and
review the information presented there. Note, that this page can be used to
start testing and debugging (see Testing paragraph).</p>
        <p>Our plug-in will depend on db4o_osgi bundle; therefore we
must define this dependency somewhere. Select "Dependencies" hyperlink in the
"Plug-in Content" paragraph. (You can gain the same effect by selecting
"Dependencies" tab page.) In the "Required Plug-ins" list click "Add" and
select "db4o-osgi".</p>
        <p>Please, note that you should not specify Java Build path as
in a normal Java project, otherwise the environment will find duplicates in
your project dependencies.</p>
        <script type="text/javascript" src="../../../SkinSupport/MadCapBodyEnd.js">
        </script>
    </body>
</html>