Some hints making your life easier with Eclipse

//========
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 -> see the answer
When you work on scrapbook page its default tools will be shown in toolbar.

You can also run Java statements without needing main function/statement.
In order to run a java class or parts of it, you need to import the related package.
select import package button and import the package

In order to run a specific part of java statement
just select the code you want to run and select “execute the selected text” from Scrapbook toolbars.

//========
Keep the seperate source folder for the test classes such as JUnit and scrapbook pages

To do this:
File-new-source folder-name it “test”-finish
we want test classes to  be in the same package as the classes to be tested

after creating test foulder, create a package with the same name in which there are classes to be tested.

Now lets create first JUnit test class:
Right click on package-new-JUnit Test case-name it to class being tested_Test-
You might need to add the path to the JUnit library….

Class under test’e de test edilecek class ismini yaz

How to run JUnit test class:
Run-Run As- JUnit Test

Not: you have to implement test methods before running actual tests. In other case, you will get error messages.

//=======For Java
Source + <generate setters and getters methods>
Automatically creates get and set methods for all the predefined variables.
//=========quick fix
problems tabinda (asagida) problemin uzerinde right clik yap sec
Ctrl+1 enable you to fix the problem in the edit page – during coding.
//=======how to configure add/edit project’s build path
right clik on the name of the project  – Build path – Configure Build path –
//==========Object initialization in shortcut
Write “New” then Ctrl+spacebar, then update the Object’s type and name.
//==========creating main method in shortcut
Write “main” then Ctrl+spacebar

//===========System.out in shortcut
after writing the text/statement to be displayed, highlight it and then Ctrl+Spacebar
//========== creating jar from the source files
File-export-Java-Jar file

//============Importing a project
Since eclipse is based on standards we can work on any project developed by someone else
File-Import-General-Existing projects into Workspace-(select archive file)-open
//==========How to open multiple files at once
Select the files from the project pane and then drag&drop in to the edit pane.
//======finding out the places where commands are defined or set
Ctrl+3
ex. write Web Services and see all the related settings wizards and etc.

It is a very handy way to quickly find commands, menu choces or resources.
//=============Keyboard shurtcuts
Window-preferences-Keys
OR
Ctrl+Shift+L : keyboard shurtcut key assist
ex.
Ctrl+S  Save the document
Ctrl+F : Find / replace
CTRL+Space : yardimci menuyu acar kelimeyi tamamlamak icin
Ctrl+D: Delete the current line
Ctrl+Shift+Delete:
Ctrl+Z: Undo
Ctrl+right: move to the next word
Ctrl+left: move to the prev word
Ctrl+Shift+right: add next word to selection
Ctrl+Shift+left: add prev word to selection
Ctrl+J: Incremental Find next
Alt + /: word completion
Ctrl_Shift+F: Format  <default formats are defined in Windows-preferences. for ex. xml file: XML-XML Files-Editor>

//=========Creating your own shurtcut
Window-preferences-Keys-<click on “include unbound comments”>type binding
//=====export/import preferences from one project to another

File-Export-preferences-browse to find/name a file- save

In new workspace
File-import- browse file-open
//=========Compare editor (comparing different versions of the same file)
Right Click-Compare with-Local History-select one from the list
left column shows the current version of the file
Right column shows the earlier version of the file

Eclipse save our editing history automatically each time we save the file.
/=========Compare editor (comparing different files)
select the files from package explorer pane and then
right clik and select compare with.. – each other
//=======Bring back the deleted files
Right click on the project name in package explorer
select Restro from Local History
then restore

//======================
Use import and export with archive files to
-share a project with anothe person or computer
-take a snapshot of a project for later use

 

 

Büyük Veri, Paralel İşleme ve Akademisyenlik [Link]

Veri Analitiği & Büyük Veri [Link]