Sophie

Sophie

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

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="Community|Working With Source Code|Sharpen" MadCap:InPreviewMode="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" MadCap:PathToHelpSystem="../../../../" MadCap:HelpSystemFileName="index.xml" MadCap:SearchType="Stem">
    <head><title>How to Setup Sharpen</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="../../../SkinSupport/MadCap.css" rel="stylesheet" />
        <link href="../../../Resources/Stylesheets/OnlineStyle.css" rel="stylesheet" />
        <script src="../../../SkinSupport/MadCapAll.js">
        </script>
        <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>
    </head>
    <body>
        <p class="MCWebHelpFramesetLink" style="display: none;"><a href="../../../../index_CSH.html#community/working_with_source/sharpen/how_to_setup_sharpen.htm" style="">Open topic with navigation</a>
        </p>
        <div class="MCBreadcrumbsBox"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="../../../community.htm">Community</a><span class="MCBreadcrumbsDivider"> &gt; </span><a class="MCBreadcrumbsLink" href="../../working_with_source_code.htm">Working With Source Code</a><span class="MCBreadcrumbsDivider"> &gt; </span><a class="MCBreadcrumbsLink" href="../sharpen.htm">Sharpen</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">How To Setup Sharpen</span>
        </div>
        <p>
            <script type="text/javascript">/*<![CDATA[*/document.write('<a href="' + location.href +'">');
				document.write("Direct Link");
			document.write('</a>');/*]]>*/</script>
        </p>
        <p>
        </p>
        <h1>How to Setup Sharpen</h1>
        <p> You can obtain sharpen source from db4o svn repository at:</p>
        <p><a href="https://source.db4o.com/db4o/trunk/sharpen">https://source.db4o.com/db4o/trunk/sharpen</a>
        </p>
        <p>For the ease of use check-out sharpen projects:</p>
        <ul>
            <li value="1">sharpen.builder</li>
            <li value="2">sharpen.core</li>
            <li value="3">sharpen.ui</li>
            <li value="4">sharpen.ui.tests</li>
        </ul>
        <p>Additionally <span class="MCTextPopup"><a href="javascript:void(0);" class="MCTextPopupSpot" onclick="FMCTextPopup( event, this ); return false;">Sharpen<img style="border: none;margin-left: 5px;" src="../../../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../../../SkinSupport/ExpandingOpen.gif" class="MCExpandingIcon" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../../../SkinSupport/ExpandingOpen.gif' ); }" /></a><span class="MCTextPopupBody" style="display: none; ">Sharpen is a tool to translate Java source code to C# source code</span></span> requires a valid <a href="http://eclipse.org/">Eclipse</a> installation to run. Install Eclipse on your machine or reuse an existing installation. Check out the four projects into the same workspace as your java project which you want
to convert. This is not required is easier to use and maintain. </p>
        <p>The first step is to  build sharpen. For that we can use Apache Ant:</p>
        <div class="codesnippet" MadCap:conditions="">
            <pre class="prettyprint" xml:space="preserve">&lt;target name="build-sharpen"&gt;
    &lt;property name="sharpen.core.dir" location="${dir.workspace}/sharpen.core"/&gt;
    &lt;reset-dir dir="${dir.dist.classes.sharp}"/&gt;

    &lt;javac fork="true"
           debug="true"
           target="1.5"
           source="1.5"
           destdir="${dir.dist.classes.sharp}"
           srcdir="${sharpen.core.dir}/src"
           encoding="UTF-8"&gt;
        &lt;classpath&gt;
            &lt;fileset dir="${eclipse.home}/plugins"&gt;
                &lt;include name="org.eclipse.osgi_*.jar"/&gt;
                &lt;include name="org.eclipse.core.resources_*.jar"/&gt;
                &lt;include name="org.eclipse.core.runtime_*.jar"/&gt;
                &lt;include name="org.eclipse.jdt.core_*.jar"/&gt;
                &lt;include name="org.eclipse.jdt.launching_*.jar"/&gt;
                &lt;include name="org.eclipse.equinox.*.jar"/&gt;
                &lt;include name="org.eclipse.core.jobs_*.jar"/&gt;
            &lt;/fileset&gt;
        &lt;/classpath&gt;
    &lt;/javac&gt;
    &lt;jar destfile="${dir.dist.classes.sharp}/sharpen.core_1.0.0.jar" basedir="${dir.dist.classes.sharp}"&gt;
        &lt;fileset dir="${sharpen.core.dir}"&gt;
            &lt;include name="plugin.xml"/&gt;
        &lt;/fileset&gt;
    &lt;/jar&gt;
&lt;/target&gt;</pre>
            <div class="codesnippet-meta">sharpen-install.xml: Build Sharpen
			<div class="codedownload"><a href="../../../CodeExamples/sharpen/Example-db4odoc-sharpen-.zip" class="codedownload" MadCap:conditions="Primary.Online">Download Code</a></div><div class="codedownload copylink-marker" MadCap:conditions="Primary.Online"><a href="#copy">Copy Code</a></div></div>
        </div>
        <p>To run Sharpen you should install it to an Eclipse instance:</p>
        <div class="codesnippet" MadCap:conditions="">
            <pre class="prettyprint" xml:space="preserve">&lt;target name="install-sharpen-plugin" depends="build-sharpen"&gt;
    &lt;copyfile src="${dir.dist.classes.sharp}/sharpen.core_1.0.0.jar" dest="${plugins.home}/sharpen.core_1.0.0.jar"/&gt;
&lt;/target&gt;</pre>
            <div class="codesnippet-meta">sharpen-install.xml: Install Sharpen to Eclipse
			<div class="codedownload"><a href="../../../CodeExamples/sharpen/Example-db4odoc-sharpen-.zip" class="codedownload" MadCap:conditions="Primary.Online">Download Code</a></div><div class="codedownload copylink-marker" MadCap:conditions="Primary.Online"><a href="#copy">Copy Code</a></div></div>
        </div>
        <p>Put the paths for the build in a property file, so that you can easily change them. Here's a example of the property file. You have to configure the JDK-path, the Eclipse path and the path to the Sharpen source.</p>
        <div class="codesnippet" MadCap:conditions="">
            <pre class="prettyprint" xml:space="preserve">#The workspace where the sharpen projects are
dir.workspace=C:/Users/Gamlor/Develop/db4o/sharpenProject
# Java executable
jdk.home=${env.JAVA_HOME}
jdk.home.java=${jdk.home}/bin/java.exe
# Eclipse home directory
eclipse.home=C:/progs/eclipse
# Sandcastle can be used to convert javadoc to .NET xml comments
# dir.lib.sandcastle=e:/sandcastle/
# sharpen compile directory
dir.dist.classes.sharp=${dir.workspace}/dist/
# Eclipse plugins home
plugins.home=${eclipse.home}/plugins</pre>
            <div class="codesnippet-meta">sharpen.properties: The configuration for building sharpen
			<div class="codedownload"><a href="../../../CodeExamples/sharpen/Example-db4odoc-sharpen-.zip" class="codedownload" MadCap:conditions="Primary.Online">Download Code</a></div><div class="codedownload copylink-marker" MadCap:conditions="Primary.Online"><a href="#copy">Copy Code</a></div></div>
        </div>
        <p>After that Sharpen is set up to run. <span MadCap:conditions="Primary.Online">Download the example <a href="../../../CodeExamples/sharpen/Example-db4odoc-sharpen-.zip">build script here</a>.</span></p>
        <script type="text/javascript" src="../../../SkinSupport/MadCapBodyEnd.js">
        </script>
    </body>
</html>