之前看到有介紹relo的工具的,本來想到官方網站下載下傳下來試用下看看,結果發現了relo更新了,變成Architexa。
這個工具在分析開源項目的源碼時很好用,relo已經不再維護,變成了新的插件Architexa,其網址是http://www.architexa.com/,雖然說architexa東西不錯,可惜需要付費,30天試用。這個東西可以自動根據java代碼生成UML類圖、序列圖等模型,友善對源碼進行分析研究。
參考網上的一些方法對源碼進行反編譯,去除限制。
1. 從eclipse 線上安裝更新 location為http://update.architexa.com/client
2.到ecpilse下面plugin找到一些lib包,主要包括
com.architexa.collab_1.2.2.201009141629.jar
com.architexa.collab.ui_1.2.2.201009141629.jar
com.architexa.debug_1.2.2.201009141629.jar
com.architexa.diagrams_1.2.2.201009141629.jar
com.architexa.diagrams.all.ui_1.2.2.201009141629.jar
com.architexa.diagrams.jdt_1.2.2.201009141629.jar
com.architexa.diagrams.strata_1.2.2.201009141629.jar
com.architexa.external.eclipse_1.2.2.201009141629.jar
com.architexa.external.eclipse.draw2d_1.2.2.201009141629.jar
com.architexa.external.eclipse.gef_1.2.2.201009141629.jar
com.architexa.external.jiggle_1.2.2.201009141629.jar
com.architexa.help_1.2.2.201009141629.jar
org.eclipse.core.resources_3.X.X.R35x_v20091203-1235.jar
org.eclipse.core.resources.win32.x86_3.5.0.v20081020.jar
ReloStore.jar
3.下載下傳或者拷貝一些必須要使用到的lib
commons-codec-1.4.jar
commons-lang-2.5.jar
json-lib-2.2.1-jdk15.jar
log4j-1.2.8.jar
openrdf-model-1.2.7.jar
openrdf-util-1.2.7.jar
4.拷貝SWT和JFACE的lib
org.eclipse.swt_3.x.x.jar
org.eclipse.jface_3.x.x.jar
org.eclipse.core.runtime_3.x.x.jar
org.eclipse.ui.workbench_3.x.x.jar
5.建立一個工程項目,導入lib包,然後用jad反編譯修改下面倆個檔案
com.architexa.diagrams.RSECore 位于com.architexa.diagrams_1.2.XXX.jar
修改RSECore類的方法:
public static boolean validInstall(boolean userReq) { return true; }
com.architexa.rse.ConnectAccountDialog 位于com.architexa.intro_1.XXXX/ReloIntro.jar
修改ConnectAccountDialog類的代碼
protected void okPressed_Internal() { this.emailEntered = this.emailField.getText(); this.passwordEntered = this.passwordField.getText(); AccountConnection ac = new AccountConnection(); if (this.enableOnOK) ac.setMenuToDisable(!this.disableOnCancel); super.okPressed(); }
6.重新打包成jar覆寫舊的即可無限制使用。
最後附上倆個少見的lib包,以及生成的一些類圖效果