이클립스에서 탭을 공백으로 처리하기

 

 - 메뉴 Window > Preferences

 - Java > Editor > Typing 에서 Insert space for taps 체크할 것

 - Java > Code Formatter > Style 에서 Insert tabs for indentation, not spaces 언체크할 것

 

위와같이 설정하면 탭키를 평소처럼 사용할 수 있으며,

탭키 대신 공백이 들어갑니다.

 

이클립스 소스창에서 탭을 공백으로 넣어주는게 좋습니다.

이유는 다른 에디터로 열어보았을때 깨짐현상이 없습니다.

특히 리눅스 vi로 열어보아도 깨지지 않습니다.

적극 권장합니다.

참고로 소스의 탭 크기는 4를 권장합니다.(2 안됨!!!)

 

Posted by '김용환'
,

이클립스의 버젼이 올라가서, 새로운 환경설정대신 과거 버젼의 환경설정으로 바꾸고 싶다면,

과거버젼의 configuration 디렉토리의 파일을 새로운 버젼의 configuration 디렉토리로 복사한다.

 

프로젝트만 복사하고 싶을 경우

 C:\이클립스\configuration\.settings의
org.eclipse.ui.prefs
org.eclipse.ui.ide.prefs
파일을 복사한다. 그러면, 예전의 프로젝트 형태 그대로 사용이 가능하다.

 

그리고, 이클립스 자체가 vm이라서 처음 로딩속도가 느리다면,

eclipse.ini 파일에서
에서 minimum vm size를 64메가이상으로 수정을 하면 속도가 빨라진다.

256메가까지 올리면 최초 로딩속도는 빠르겠지만, 시간이 지나면 메모리 릭이 생겨서, 다시 부팅해야할지 모른다.

 

 

Posted by '김용환'
,

이클립스에 대해서 메모리를 확잡으면 된다.

 

이클립스 설치 디렉토리에 eclipse.ini 파일이 존재한다. 이 파일을 보면 다음과 같다.

 

-vmargs
-Xms64m
-Xmx256m

-Xms256m로 수정해보시라. 좀 빨리 뜬다. 요즘 swap하니라.. 일을 못 할 지경에 다다랐다. ㅜ.ㅜ

 

저게 머냐구 묻거든... 아래를 참조하시오.

 

관련자료.

http://www.instantiations.com/codepro/ws/docs/faq.html

 

How can I improve Application Developer/Eclipse startup time, reduce swapping and eliminate unnecessary garbage collection?
Begin by specifying the starting amount of memory (-vmargs -Xms###M) in your Application Developer/Eclipse startup command line (e.g., the target field within a Windows shortcut). If this is not specified, Eclipse's starting amount of memory is quite small (only 64 MB - see http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html and scroll down until you find the -Xms option description), and can really slow down your startup and initial usage time. What happens with a small starting memory like 64 MB is that the java virtual machine (and thus Eclipse)...
  • tries to use currently allocated memory (initially 64MB)
  • garbage collects several times
  • finally determines that it really needs more memory
  • allocates more memory incrementally
  • repeats this process until it reaches a steady state

If you know you are going to use at least 128 MB or more, then try specifying -Xms128M or larger as the starting memory. It should improve your startup time and initial usage prior to swapping.

If you are certain that you are going to swap, then at least try to reduce the amount of time spent garbage collecting. For example, if Application Developer/Eclipse has to live within 256 MB, then it may be spending much of its time garbage collecting which appears like swapping (application freezes or slows to a crawl for a while). You might try specifying -Xmx384M as your maximum memory usage to reduce the amount of garbage collecting. Even if you have many large applications running simultaneously, you likely use one program for a while, then switch to another, then after a while switch back. The key here is that using a program for a while and ignoring the others, plus a larger maximum memory for java (like 384 MB) lets Application Developer/Eclipse take advantage of more physical memory and garbage collect less while the other programs are swapped out. Obviously there's a trade off of maximum memory for a program versus the physical memory available... you'll have to find that "sweet spot" somewhere between 256MB and 1GB for your machine.

Posted by '김용환'
,