<?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>Ahmet Sayar &#187; eclipse java</title>
	<atom:link href="http://www.ahmetsayar.com/tag/eclipse-java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ahmetsayar.com</link>
	<description>Personal Web Page</description>
	<lastBuildDate>Fri, 26 Aug 2011 15:18:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Some hints making your life easier with Eclipse</title>
		<link>http://www.ahmetsayar.com/some-hints-making-your-life-easier-with-eclipse/</link>
		<comments>http://www.ahmetsayar.com/some-hints-making-your-life-easier-with-eclipse/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 00:15:15 +0000</pubDate>
		<dc:creator>ahmet</dc:creator>
				<category><![CDATA[academic]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[eclipse java]]></category>

		<guid isPermaLink="false">http://www.ahmetsayar.com/?p=109</guid>
		<description><![CDATA[//======== Scrapbook: Funtions similar to JUnit test classes. Creating Scrapbook page: Right click on the project name + new + Other+ Java + JavaRun/Debug + Scrapbook Page Examle: write down 2+2 and then Run+Inspect -&#62; see the answer When you work on scrapbook page its default tools will be shown in toolbar. You can also [...]]]></description>
			<content:encoded><![CDATA[<p>//========<br />
Scrapbook: Funtions similar to JUnit test classes.</p>
<p>Creating Scrapbook page:<br />
Right click on the project name + new + Other+ Java + JavaRun/Debug + Scrapbook Page</p>
<p>Examle: write down 2+2 and then Run+Inspect -&gt; see the answer<br />
When you work on scrapbook page its default tools will be shown in toolbar.</p>
<p>You can also run Java statements without needing main function/statement.<br />
In order to run a java class or parts of it, you need to import the related package.<br />
select import package button and import the package</p>
<p>In order to run a specific part of java statement<br />
just select the code you want to run and select &#8220;execute the selected text&#8221; from Scrapbook toolbars.</p>
<p>//========<br />
Keep the seperate source folder for the test classes such as JUnit and scrapbook pages</p>
<p>To do this:<br />
File-new-source folder-name it &#8220;test&#8221;-finish<br />
we want test classes to  be in the same package as the classes to be tested</p>
<p>after creating test foulder, create a package with the same name in which there are classes to be tested.</p>
<p>Now lets create first JUnit test class:<br />
Right click on package-new-JUnit Test case-name it to class being tested_Test-<br />
You might need to add the path to the JUnit library&#8230;.</p>
<p>Class under test&#8217;e de test edilecek class ismini yaz</p>
<p>How to run JUnit test class:<br />
Run-Run As- JUnit Test</p>
<p>Not: you have to implement test methods before running actual tests. In other case, you will get error messages.</p>
<p> </p>
<p>//=======For Java<br />
Source + &lt;generate setters and getters methods&gt;<br />
Automatically creates get and set methods for all the predefined variables.<br />
//=========quick fix<br />
problems tabinda (asagida) problemin uzerinde right clik yap sec<br />
Ctrl+1 enable you to fix the problem in the edit page &#8211; during coding.<br />
//=======how to configure add/edit project&#8217;s build path<br />
right clik on the name of the project  &#8211; Build path &#8211; Configure Build path -<br />
//==========Object initialization in shortcut<br />
Write &#8220;New&#8221; then Ctrl+spacebar, then update the Object&#8217;s type and name.<br />
//==========creating main method in shortcut<br />
Write &#8220;main&#8221; then Ctrl+spacebar</p>
<p>//===========System.out in shortcut<br />
after writing the text/statement to be displayed, highlight it and then Ctrl+Spacebar<br />
//========== creating jar from the source files<br />
File-export-Java-Jar file</p>
<p> </p>
<p>//============Importing a project<br />
Since eclipse is based on standards we can work on any project developed by someone else<br />
File-Import-General-Existing projects into Workspace-(select archive file)-open<br />
//==========How to open multiple files at once<br />
Select the files from the project pane and then drag&amp;drop in to the edit pane.<br />
//======finding out the places where commands are defined or set<br />
Ctrl+3<br />
ex. write Web Services and see all the related settings wizards and etc.</p>
<p>It is a very handy way to quickly find commands, menu choces or resources.<br />
//=============Keyboard shurtcuts<br />
Window-preferences-Keys<br />
OR<br />
Ctrl+Shift+L : keyboard shurtcut key assist<br />
ex.<br />
Ctrl+S  Save the document<br />
Ctrl+F : Find / replace<br />
CTRL+Space : yardimci menuyu acar kelimeyi tamamlamak icin<br />
Ctrl+D: Delete the current line<br />
Ctrl+Shift+Delete:<br />
Ctrl+Z: Undo<br />
Ctrl+right: move to the next word<br />
Ctrl+left: move to the prev word<br />
Ctrl+Shift+right: add next word to selection<br />
Ctrl+Shift+left: add prev word to selection<br />
Ctrl+J: Incremental Find next<br />
Alt + /: word completion<br />
Ctrl_Shift+F: Format  &lt;default formats are defined in Windows-preferences. for ex. xml file: XML-XML Files-Editor&gt;</p>
<p>//=========Creating your own shurtcut<br />
Window-preferences-Keys-&lt;click on &#8220;include unbound comments&#8221;&gt;type binding<br />
//=====export/import preferences from one project to another</p>
<p>File-Export-preferences-browse to find/name a file- save</p>
<p>In new workspace<br />
File-import- browse file-open<br />
//=========Compare editor (comparing different versions of the same file)<br />
Right Click-Compare with-Local History-select one from the list<br />
left column shows the current version of the file<br />
Right column shows the earlier version of the file</p>
<p>Eclipse save our editing history automatically each time we save the file.<br />
/=========Compare editor (comparing different files)<br />
select the files from package explorer pane and then<br />
right clik and select compare with.. &#8211; each other<br />
//=======Bring back the deleted files<br />
Right click on the project name in package explorer<br />
select Restro from Local History<br />
then restore</p>
<p>//======================<br />
Use import and export with archive files to<br />
-share a project with anothe person or computer<br />
-take a snapshot of a project for later use</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahmetsayar.com/some-hints-making-your-life-easier-with-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

