소스인사이트는 강력한 에디터 입니다. 쓰는 분들은 다른에디터로 옮겨가기 어려울 정도?? (개인적인 생각이었습니다.)


이 에디터를 사용해본 사람들은 주석 처리 하는것이 좀 귀찮다는 생각이 들 것입니다.

선택한 영역을 전체 주석 처리 하는 기능이 없기 때문입니다.

그래서 이런 필요한 기능들을 매크로로 정의해서 사용 하는데요 말 나온김에 선택영역 전체를 

주석 처리 하는 매크로 작성법에 대해 알아 보겠습니다.


1. 먼저 에디터를 실행하고 프로젝트를 열어줍니다.

1.jpg 


2. 기본적으로 이 에디터에는 base 라는 프로젝트가 있으며, 여기에 매크로를 추가 할 수 있습니다.

2.jpg 


3. base 프로젝트를 열어보면 여러가지 기본적인 매크로들이 작성돼 있으며, 맨 아래에 그림과 같이 매크로를 추가 해 줍니다.

( 매크로 출처 : http://windrevo.egloos.com/393730 )

매크로는 누군가가 만들어놓은 것을 가져다 쓰면 그만이지 구지 끙끙대며 만들어낼 필요는 없다고 봅니다.

링크된 사이트에서 소스전체를 복사해서 추가 해 줍니다.

그리고나서 저장하고 닫습니다.

3.jpg

3. 이제 현재 작업중인 프로젝트를 오픈하고, 거기서 작성해둔 매크로를 키로 등록 하면 됩니다.

 open - key assignments.. 를 선택해 줍니다.

4.jpg 


4. 먼저 등록해 둔 Macro:remark_all 을 선택 합니다.

5.jpg 


5. 매크로를 선택 한 다음 중앙의 Assign New Key.. 를 눌러주면 팝업이 나타나는데. 이때 눌러주는 key 가 매크로

실행키가 됩니다. 일반적으로 Ctrl 을 포함해서 임의의 키로 등록 하며, 저는 Ctrl + Shift + / 를 주석으로 설정 해 보았습니다.

6.jpg


6. 이제 등록된 매크로를 실제로 사용해 보겠습니다.

임의의 영역을 쭉 선택한 다음 매크로로 등록한 키를 누르면 주석을 입력 하도록 팝업이 나타 나며, 내용을 입력 하고 엔터를 누릅니다.

7.jpg


7. 선택 영역이 주석처리 된 것을 확인 할 수 있습니다.

8.jpg


여기까지 주석처리 하는 매크로를 등록 하는 방법이었습니다.

그외에도 시간을 입력 하는 매크로, 라인을 추가하는 매크로..헤더를 선언하는 매크로.. 등등 다양한 

매크로들을 정의해서 쓸수 있으며, 그런 매크로 소스는 위에서 말했듯이 끙끙대며 만들지 말고, 

웹상에서 검색하면 금방 찾을 수 있습니다.

반응형
Posted by 컴투
comtoo@comtoo-ubuntu:~$ ln -s .gvfs/
10.1.12.161의 comtoo/   192.168.184.128의 공유 문서/
10.1.12.161의 share/         SFTP, 호스트 10.1.12.161/
comtoo@comtoo-ubuntu:~$ ln -s .gvfs/ server_source

라고 해주고 탐색기로 server_source에 들어가보면 바로가기가 만들어져 있다


컬로 로그캣
  - logcat
./colorlogcat.py
반응형
Posted by 컴투


1. 부분빌드를 실행하기 위해서 필요
userId@build1:~/svn/export_20110705/trunk/Android$ source build/envsetup.sh
including device/htc/passion/vendorsetup.sh
including device/samsung/crespo/vendorsetup.sh

2. 사용자필요에 맞게 설정해 주면 됩니다. ( 예 : choosecombo 1 2 8 3 )
userId@build1:~/svn/export_20110705/trunk/Android$ choosecombo
Build for the simulator or the device?
     1. Device
     2. Simulator

Which would you like? [1] 1


Build type choices are:
     1. release
     2. debug

Which would you like? [1] 2


Product choices are:
     1. core
     2. full
     3. full_crespo
     4. full_passion
     5. generic
     6. generic_x86
     7. msm7627_ffa
     8. msm7627_surf
     9. msm7630_fusion
     10. msm7630_surf
     11. msm8660_csfb
     12. msm8660_surf
     13. sample_addon
     14. sdk
     15. sim
You can also type the name of a product if you know it.
Which product would you like? [msm7627_surf] 8


Variant choices are:
     1. user
     2. userdebug
     3. eng
Which would you like? [eng] 3

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4
TARGET_PRODUCT=msm7627_surf
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=debug
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================

3. mmm 빌드할려는 package의 주소
userId@build1:~/svn/export_20110705/trunk/Android$ mmm /package/apps/AAAA   엔터

4. 빌드가 되면 아래와 같이 부분빌드된 apk의 주소가 나옵니다.
out/debug/target/product/msm7627_surf/system/app/AAAA.apk)

5. adb를 이용하여 이전의 소스를 삭제하고 push를 이용하여 넣습니다.
adb push out/debug/target/product/msm7627_surf/system/app/AAAA.apk

6. adb reboot 꼭 해야함.

끝~


반응형
Posted by 컴투

Ctrl + space가 인식 되지 않을 때 Window - Preferences - General - Keys  에서 위 그림과 같이 편집하면 됨

Content assist 추가
Window - Preferences - Java - Editor - Content Assist  - Advanced 에서 위 사진과 같이
Java Type Proposals를 체크한다

반응형

'프로그래밍 > Linux(Ubuntu)' 카테고리의 다른 글

바로가기 만들기  (0) 2011.07.20
Ubuntu 환경만들기  (0) 2011.06.28
Posted by 컴투

환경만들기

  • root계정 활성화
assa@ubuntu-android:~# sudo passwd root
Enter new UNIX password:
Retype new UNIX password:

  • ssh service 설치 및 서비스 구동
assa@ubuntu-android:~#  apt-get install ssh
assa@ubuntu-android:~# /etc/init.d/ssh start
* Starting OpenBSD Secure Shell server sshd                               [ OK ]
  • ip address 확인
assa@ubuntu-android:~#  ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:29:e0:ef:57
          inet addr:192.168.0.76  Bcast:192.168.0.255  Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fee0:ef57/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6436934 errors:11 dropped:14 overruns:0 frame:0
TX packets:905306 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3409448628 (3.4 GB) TX bytes:90977125 (90.9 MB)
Interrupt:19 Base address:0x2000
  • 필수 패키지 설치(ubuntu의 경우)
assa@ubuntu-android:~# sudo apt-get install git-core gnupg flex bison bison-doc gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
  • repo 설치
assa@ubuntu-android:~# mkdir  bin
assa@ubuntu-android:~# curl http://android.git.kernel.org/repo >~/bin/repo
assa@ubuntu-android:~# cd bin
assa@ubuntu-android:~# chmod a+x repo  //실행권한주기
assa@ubuntu-android:~# repo
error: repo is not installed.  Use "repo init" to install it here. //설치확인
  • jdk 설치
# sudo apt-get install sun-java6-jdk
# sudo update-java-alternatives -s java-6-sun
  • cross compiler 4.4.3
  • path 수정
assa@ubuntu-android:~#cd
assa@ubuntu-android:~#vi .bashrc
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi
export PATH=$PATH:/home/XXXX/bin:/home/assa/jdk1.6.0_20/bin #jdk 1.6의 경우
#export PATH=$PATH:/home/XXXX/bin:/home/assa/jdk1.5.0_22/bin  #jdk 1.5의 경우
export JAVA_HOME=/home/assa/jdk1.6.0_20/
export JAVA_HOME=/home/assa/jdk1.6.0_20/
export USE_CCACHE=1


  • repo tree sync및 source download
assa@ubuntu-android:~#mkdir  mydroid
assa@ubuntu-android:~#cd mydroid
assa@ubuntu-android:~# repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo

-b 는 branch name임

assa@ubuntu-android:~#repo sync

다운로드가 시작됨


Samba Install


리눅스를 운영 중인 디스크 공간의 일정 부분을 Windows에서 네트워크 드라이브로 연결해 사용하기 위해서 삼바(Samba)를 주로 사용하게 됩니다.

터미널(프로그램 -> 보조프로그램 -> 터미널)을 실행합니다. 아래의 명령어는 Samba 설치하는 명령어입니다.

$sudo apt-get install samba //Samba 설치하는 명령어


smb.conf 파일의 설정파일을 변경해야 합니다.sudo

$sudo gedit /etc/samba/smb.conf


< 수정 사항 >

# security = user //<- 찾기 통해서 주석해제(# 없애면 주석해제 된다.)

//아래 부분을 추가해주면 된다.

[home]

path = /home

writable = yes

create mask = 755

directory mask = 755


samba 사용자 아이디는 우분투 8.10 사용자 계정을 넣어주시고, 암호도 동일한 암호로 입력해주시면 됩니다.

$sudo smbpasswd –a 사용자 아이디


아래의 명령어를 통해서 sambarestart 합니다.

$sudo /etc/init.d/samba restart

samba service restart 할 때,

 

ubuntu 10.10 으로 오면서

samba 에서 smbd 로 명령어가 변경되었다.

samba restart -> smbd restart

[편집] samba

 
[comtoo]
server string = xxxxxx share folder
comment = xxxxxx share folder
path =/home/xxxxxx
public = yes
only guest = no
writable = yes
create mask = 0777
force user = comtoo

 
반응형
Posted by 컴투