顯示具有 eclipse 標籤的文章。 顯示所有文章
顯示具有 eclipse 標籤的文章。 顯示所有文章

【Eclipse】Plugin: jgit with Github


【環境】

  • Eclipse for windows

【目的】

  • 透過 Eclipse 的 plugin(jgit) 來存取 Github 所提供的服務。

Pre-requisites

  • 請先行安裝好 Eclipse for Windows
  • 準備好 Git on Windows
  • 先行註冊好你的 GitHub account(http://github.com/)

【步驟】

  1. Install jGit
    1. Navigate to Help | Install new software
      Press Add
      * Name:Git
      * Location: http://www.jgit.org/update-site
    2. Press Ok
  2. RSA key generation
    1. Download and Install utility - "Git on Windows"
      * Select "Use Git Bash only"
      * http://msysgit.googlecode.com/files/Git-1.6.4-preview20090730.exe
    2. Navigate to Start | Git | GitBash
      * key generation
      $ cd ~/.ssh
      $ ssh-keygen -t rsa -C "your_email@where.com"

      * Press "Enter" to left empty passphrase
      * Press "Enter" again
    3. Copy your key to the ssh fle dirory
      (Skip this step, 如果你的eclipse ssh key檔和 ~/.ssh 是一樣的)
      * for example
      $ cp * ~/ssh
    4. Add your rsa key to github
      * IE讀取 github網頁有點問題,建議用 Mozilla Firefox
      * 可參考 http://help.github.com/msysgit-key-setup/
    5. Restart Eclipse(must)
    6. Debug, 用git帳號探測
      $ ssh git@github.com 
  3. Import Project/Files to Eclipse from GitHub
    1. Navigate to File | Import | Git | Git Repository
      * Press "Next"
    2. Fill in your github information
      * Location git@...
      * Protocal: git+ssh
      * User: git
      Press "Next"
    3. Disable radio button "Import projects after clone"
      Press "Finish"
  4. Create a new project
    1. File | New | Project | General | Project...
    2. 把之前import 的檔案放在Project下
  5. Commit to Local/GitHub
    1. Navigate to Team | share project
    2. 先commit到local
      * Team | Add
      * Team | Commit
    3. commit 到github要用push to
      * Select Project
      * Team | Push to | Next
      * Select "Configured remote repository", Press "Next"
      * Press "Add all branches spec"
      * Press "Finish"
      * 成功的話會有一個 Status Repo
  6. 參考
    1. http://itcontent.blogspot.com/2009/04/windowseclipse-git.html
    2. authfail 參考: http://www.chengyunfeng.com/tag/git
    3. Generating SSH keys (Linux) http://help.github.com/linux-key-setup/

【Eclipse】Aptana Studio 2


Aptana Studio 2 http://www.aptana.com/products/studio2

一個由 Eclipse 改良出來的編輯器,適用 CSS/JS/XML…的編輯。

安裝擷圖
image

【Eclipse】if 區塊


同事發現在新版的 Eclipse 20100218-1602 (或許舊版也有,但我之前沒注意到), 由 #if 去定義的區塊,如果 enable 的話,裡面的保留字/函數 會以比較鮮明的顏色表示,方便追蹤程式。

【測試步驟】

  1. 用Eclipse 開啟一個新的C專案。
  2. 修改 hello.c
    #include <stdio.h>
    #include <stdlib.h>
    
    #define EnableHelloEclipse      1
    
    int main(void) {
    #if (EnableHelloEclipse)
            puts("!!!Hello Eclipse!!!"); /* prints !!!Hello Eclipse!!! */
            printf("!!!Hello Eclipse!!!");
    #else
            puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
            printf("!!!Hello World!!!");
    #endif
            return EXIT_SUCCESS;
    }
  3. 結果就會像下面這樣,可以看到中間區塊內的 puts/printf 是比較特別的顏色(看起來是紫藍色)。
    而且Disable的程式碼底色也會是淡藍色的(按顯示卡或螢幕而定,有的螢幕會看不太出來)。
    image
  4. 而在Windows底下也是大同小異,也是會讓程式碼更加容易閱讀。 image

【比較】

  • 同事提醒SourceInsight也有類似的功能,但不能以 #ifdef 控制,要直接在 #if 定義 0/1,彈性不大。
    image 

【延伸】

【Eclipse】Eclipse相關文章(tbd)


整理Eclipse相關文章

【Java】

【C/C++】

【其他】

  • 用Wine帶Editplus/SourceInsight(tbd)

【Eclipse】Hello World


【目的】

  1. 利用 Eclipse 寫 java。

【步驟】

  1. 下載 Eclipse IDE for Java Developers (92 MB) 並安裝。
  2. File | New | Project ,新增一個叫demo的Project。
  3. New | Class
     image
  4. New Java Class
    image
  5. keyin java code
    package monster;
    public class HelloWord {
        /**
         * @param args
         */
        public static void main(String[] args) {
            // TODO Auto-generated method stub
            System.out.println("Hello Word");
        }
    }

【結果】

  1. Result
    image

【參考】

  1. Eclipse整合開發環境 蘇國鈞
    http://www.iiiedu.org.tw/knowledge/Eclipse213.pdf

【VMware】VMware 7.0


速記一下今天安裝的現象。

  1. 出現這個視窗,但不知道如何去支援 Eclipse C/C++ IDE Plugin。 
    image 
  2. 安裝完vm-tool,但該有的功能(檔案拖曳與剪貼簿一些)的功能失效,目前還要再研究。
  3. 安裝vm-tool時出現一個叫The VMware FileSystem Sync Driver,目前還不知道該能為何。
    (更新 20100422 有方案, http://langui.sh/2009/10/05/ubuntu-9-10-in-vmware/)

【Refcardz】Free Cheat Sheets for Developers


裡面有很多製作精美的圖表。

【Eclipse】Install CDT from Eclipse Java


同事用chroot把開發環境由redhat移植到ubunt上面後,我就想直接在ubunt透過Eclipse 3.5.1 來coding。不要再從Vista透過samba連Redhat開啟/修改程式。

【安裝CDT】

  1. 參考之前文件,用ubunt內建的Updater安裝OpenJDK
  2. 接著安裝Eclipse,進入Eclipse
  3. 由於內建的Eclipse是給Java用的(其實官網上面的for C/C++也是加入CDT,所以直接加Plug-in就好)。再用Eclipse的Updater安裝cdt
    - 新增 http://download.eclipse.org/tools/cdt/releases/galileo
    - 在Work with選擇你加入的cdt tag
    - 出現兩個Items: CDT Main Feature and CDT Optional Feature
    - 選擇 CDT Main Feature 作 Update
    - 不確定 CDT Optional Feature需不需要安裝
    - 第一次兩個都選會叫我先裝Mylyn,所以我只裝第一個。
  4. 後來有找到 Mylyn 不過目前只是3.4
    - http://download.eclipse.org/tools/mylyn/update/e3.4
    - 由於目前對Mylyn的了解太少,就先Update以後再說。

【建立專案】

由於已有現成的程式/檔案,我目前要做的就是把檔案匯入Eclipse專案。

Mylyn


【參考文件】

整合型build server


配合eclipse
buildix http://buildix.thoughtworks.com/

在Eclipse畫流程圖


flow4j 提供 flowchart 轉成 java code
因為目前大部分還是用在 C 所以還沒試,不過先收下來。

官網:http://flow4jeclipse.sourceforge.net/docs/index.html
安裝:http://flow4jeclipse.sf.net/update


【User Guide】http://flow4jeclipse.sourceforge.net/docs/docu/usage.html

台灣的Eclipse forum


雖然其中以Java討論為多,不過還是很具參考價值
(我大部分都是用C)
Eclipse forum Link


另外在裡面發現的一篇新手文,再找時間慢慢消化
http://www.cs.umanitoba.ca/~eclipse/

【軟體】用UNetbootin作LiveUsb


只能unetbootin說這軟體超級神奇,能夠把Linux distribution的ISO檔作成
開機隨身碟,方便沒有光碟機的機器
  • 直接用USB開機或
  • 開機完後把LiveUSB安裝到Usb/Harddisk上。
以下提供我安裝ubuntu的步驟
  1. 準備好兩支隨身碟,一支1G(作成LiveUSB),一支4G(安裝ubuntu)
  2. 準備好ubuntu 9.04的ISO檔
  3. 啟動UNetbootin,將1G的隨身碟做成可以開機
  4. 用1G的隨身碟啟動PC,開機之後安裝ubuntu到4G的隨身碟上面
之後你就會有兩隻隨身碟,
一支(1G)等同LiveUSB的功能
另一隻(4G)可以客製化你要的功能了。

官方網址:http://unetbootin.sourceforge.net/

維基百科:http://zh.wikipedia.org/wiki/UNetbootin
【Eclipse】
裝完Ubuntu後試著安裝Eclipse,首先要加入Jdk的Support
Applications->Add/Remove/Search(打入java)就會出現下面兩個要安裝的套件
  1. OpenJDK java 6 Web start
  2. OpenJDK java 6 Runtime
這兩個打勾之後,按 Apply Changes
然後到Eclipse下載Linux版的Eclipse,解tar後進入該目錄打
./eclipse 就可以了。

Your First Plug-in


參考

【Eclipse】Flowchart Studio


flowchartstudio http://sourceforge.net/projects/flowchartstudio/

畫流程圖的,2006年 release的版本,目前試不出來,不過收起來先。

eclipse diagram tools


Url Update: http://eclipsediagramtools.googlecode.com/svn/trunk/workspaces/edt/edt.update_site/

Homepage:
http://www.eclipseplugincentral.com/Web_Links-index-req-viewlink-cid-1529.html

使用: File -> New -> Other... -> Examples -> Arch Diagram
可以用來畫一些網路拓樸Layout或架構。
Example: http://sourceforge.net/apps/trac/openwebarch/

尋找Eclipse Plugin


http://www.eclipseplugincentral.com/

Eclipse SSH Plugin


http://eclipsetail.sourceforge.net/eclipsesshconsole.html
http://cephas.net/blog/2003/05/23/eclipse-ssh-plugin/

Eclipse esftp Plugin


http://www.chris-alex-thomas.com/projects/esftp/

Eclipse plugin: Astyle


1. Plugin Installion

  1. Open the Install Wizard by clicking【Help > Install new software】
  2. Press【Add】
  3. Add Site
    • Name: Astyle
    • Location: http://astyleclipse.sourceforge.net/update
  4. Press【OK】
  5. Select【astyle source code formatter】
  6. Press 【Next】and then Press 【Next】 again
    ...
  7. Restart Eclipse

2. How to use

  • Highlight code and then Press【Ctrl+Shift+F】

3. About the Configuration Adjustment

  • Menu【Preferences > Astyle】

4. Reference

  • http://astyleclipse.sourceforge.net/
 

Ed32. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com