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

2011年11月21日 星期一

讓Eclipse的Formatter不會對註解做排版

雖然Eclipse的Formatter很好用,可以幫助做程式碼的排版, 但在排版過程中,連註解也會被處理,註解反倒是變亂了。
/*
 * a target may generate 1..n 
 * scopes a scope may contain 0..n cameras 
 */
排版後會變成
/*
 * a target may generate 1..n scopes a scope may contain
 * 0..n cameras
 */ 
但是只要加一個小小的改變,多行註解後面加上"-",就可以避免Eclipse Formatter對註解的排版
/*-
 * a target may generate 1..n 
 * scopes a scope may contain 0..n cameras 
 */
Reference: stackoverflow

2011年7月21日 星期四

使用Eclipse做Remote Debug

######################
# In Windows Machine #
######################
# find jpda port in {TOMCAT_HOME}/bin/catalina.bat Find line 「set DEBUG_OPTS=」, if this isnt configured, we have to set this configuration.
set DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8081,server=y,suspend=n
#restart tomcat

#####################
# In Linux Machine  #
#####################
# go to {TOMCAT_HOME}/bin/catalina.sh and find follow configuration and take this port
JPDA_ADDRESS="8000"
#restart tomcat and use this command "./catalina.sh jpda start"