<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ardublock &#187; Documentation</title>
	<atom:link href="http://ardublock.heqichen.cn/blog/en/category/documentation/feed/" rel="self" type="application/rss+xml" />
	<link>http://ardublock.heqichen.cn/blog/en</link>
	<description>A GRAPHICAL PROGRAMMING LANGUAGE FOR ARDUINO</description>
	<lastBuildDate>Fri, 11 Dec 2015 09:18:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.2</generator>
	<item>
		<title>Import ardublock to Eclipse</title>
		<link>http://ardublock.heqichen.cn/blog/en/import-ardublock-to-eclipse/</link>
		<comments>http://ardublock.heqichen.cn/blog/en/import-ardublock-to-eclipse/#comments</comments>
		<pubDate>Thu, 02 Jul 2015 18:45:23 +0000</pubDate>
		<dc:creator><![CDATA[heqichen]]></dc:creator>
				<category><![CDATA[Documentation]]></category>

		<guid isPermaLink="false">http://ardublock.heqichen.cn/blog/?p=37</guid>
		<description><![CDATA[Tools You need tools below to import ardublock source code to Eclipse. Git tools can find tools for your operating system from github: https://help.github.com/set-up-git-redirect Eclipse http://www.eclipse.org/ Maven We use maven to manage java packages. M2Eclipse I am very to recommend you install a maven plugin, if you develop openblocks. it will help you raising development efficiency. Prepare The code First, [&#8230;]<br/><a href="http://ardublock.heqichen.cn/blog/en/import-ardublock-to-eclipse/" class="more-link" >Continue reading...</a>]]></description>
				<content:encoded><![CDATA[<h2>Tools</h2>
<p>You need tools below to import ardublock source code to Eclipse.</p>
<ol>
<li>Git tools
<ul>
<li>can find tools for your operating system from github: <a href="https://help.github.com/set-up-git-redirect" target="_blank">https://help.github.com/set-up-git-redirect</a></li>
</ul>
</li>
<li>Eclipse
<ul>
<li><a href="http://www.eclipse.org/" target="_blank">http://www.eclipse.org/</a></li>
</ul>
</li>
<li>Maven
<ul>
<li>We use maven to manage java packages.</li>
</ul>
</li>
<li>M2Eclipse
<ul>
<li>I am very to recommend you install a maven plugin, if you develop openblocks. it will help you raising development efficiency.</li>
<li><img class="alignnone  wp-image-26" src="http://ardublock.heqichen.cn/blog/wp-content/uploads/2015/07/instll-m2e.png" alt="instll-m2e" width="307" height="281" /></li>
</ul>
</li>
</ol>
<h2>Prepare The code</h2>
<p>First, you need to clone the source code from github. Ardublock is depended on Openblocks. You can find these two repo here</p>
<p><a href="https://github.com/heqichen/ardublock.git" target="_blank">https://github.com/heqichen/ardublock.git</a><br />
<a href="https://github.com/heqichen/openblocks.git" target="_blank">https://github.com/heqichen/openblocks.git</a></p>
<p>you will find the git clone url on the right or page.<br />
then you need to clone this two repos.  for example ardublock clone url is <a href="https://github.com/heqichen/ardublock.git">https://github.com/heqichen/ardublock.git</a> and openblocks clone url is <a href="https://github.com/heqichen/openblocks.git">https://github.com/heqichen/openblocks.git</a></p>
<p>now open your terminal, and go to your development directory. For example, my development directory is ~/ardublock/</p><pre class="crayon-plain-tag">$ cd ~/ardublock/
$ git clone git@github.com:heqichen/ardublock.git
$ git clone git@github.com:heqichen/openblocks.git</pre><p><span id="more-37"></span></p>
<p>you will get something like this.</p>
<blockquote><p>Cloning into &#8216;openblocks&#8217;&#8230;<br />
remote: Counting objects: 2166, done.<br />
remote: Total 2166 (delta 0), reused 0 (delta 0), pack-reused 2166<br />
Receiving objects: 100% (2166/2166), 4.20 MiB | 6.00 KiB/s, done.<br />
Resolving deltas: 100% (863/863), done.<br />
Checking connectivity&#8230; done.</p></blockquote>
<p><img class="alignnone size-full wp-image-28" src="http://ardublock.heqichen.cn/blog/wp-content/uploads/2015/07/git-clone.png" alt="git-clone" width="692" height="127" /></p>
<p>and same as ardublock project. Finally got two repo in your local machine.</p>
<p><img class=" size-full wp-image-27 alignnone" src="http://ardublock.heqichen.cn/blog/wp-content/uploads/2015/07/git-folder.png" alt="git-folder" width="157" height="67" /></p>
<h2>Import to Eclispe</h2>
<p>Now Lets import the source code.</p><pre class="crayon-plain-tag">$ cd ardublock	# go into ardublock folder
$ mvn validate	# downlaod maven packages
$ mvn clean 	#
$ mvn eclipse:clean	# clean eclipse project
$ mvn eclipse:eclipse	# change project to eclipse project</pre><p>After these commands, Maven will download the required packages and make eclipse project.<br />
now we can import ardublock into elicpse<br />
open eclipse<br />
File -> Import -> Gernal -> Existing Projects into Workspace</p>
<p><img class="alignnone  wp-image-29" src="http://ardublock.heqichen.cn/blog/wp-content/uploads/2015/07/eclipse-inport.png" alt="eclipse-inport" width="351" height="516" /></p>
<p>you may find some error, because of missing openblocks package.</p>
<p><img class="alignnone size-full wp-image-36" src="http://ardublock.heqichen.cn/blog/wp-content/uploads/2015/07/06-ardublock-error1.png" alt="06-ardublock-error1" width="342" height="288" /></p>
<p><a href="http://ardublock.heqichen.cn/blog/wp-content/uploads/2015/07/07-ardublock-error2.png"><img class="alignnone size-large wp-image-35" src="http://ardublock.heqichen.cn/blog/wp-content/uploads/2015/07/07-ardublock-error2-1024x271.png" alt="07-ardublock-error2" width="615" height="163" /></a></p>
<p>there are two method to resolve this problem.</p>
<p>1. install the openblocks package locally.</p>
<p>go to openblocks folder and run</p><pre class="crayon-plain-tag">$ mvn clean
$ mvn install</pre><p>After these command, maven will compile and install openblocks package in your local machine.</p>
<p><img class="  wp-image-38 alignnone" src="http://ardublock.heqichen.cn/blog/wp-content/uploads/2015/07/08.png" alt="08" width="489" height="310" /></p>
<p>Now, no error any more.</p>
<p><a href="http://ardublock.heqichen.cn/blog/wp-content/uploads/2015/07/09-ok.png"><img class="alignnone  wp-image-33" src="http://ardublock.heqichen.cn/blog/wp-content/uploads/2015/07/09-ok.png" alt="09-ok" width="547" height="398" /></a></p>
<p>Another method is import openblocks in your eclipse.</p>
<p>run command as ardublock and import openblocks into your eclipse. Also can solve the problem.</p>
<p><a href="http://ardublock.heqichen.cn/blog/wp-content/uploads/2015/07/10-ok2.png"><img class="alignnone size-large wp-image-32" src="http://ardublock.heqichen.cn/blog/wp-content/uploads/2015/07/10-ok2-1024x576.png" alt="10-ok2" width="615" height="346" /></a>
<div class="pvc_clear"></div>
<p class="pvc_stats" element-id="37">45,713&nbsp;total views, no views today</p>
<div class="pvc_clear"></div>
]]></content:encoded>
			<wfw:commentRss>http://ardublock.heqichen.cn/blog/en/import-ardublock-to-eclipse/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>
