howto
Differences
This shows you the differences between two versions of the page.
| Previous revision | |||
| — | howto [2025/01/15 21:40] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== How to Use Ptidej to Identify Occurrences of Design Motifs: A Quick Start ====== | ||
| + | By Chushu Gao gaochushu@googlemail.com | ||
| + | |||
| + | |||
| + | |||
| + | ===== 1. Environment ===== | ||
| + | |||
| + | This guide based on the experience on Ecilpes 3.5 in WindowsXP and Fedora Eclipse released with FC11. | ||
| + | |||
| + | |||
| + | |||
| + | ===== 2. Check out Ptidej projects ===== | ||
| + | |||
| + | You will need an account to access Ptidej SVN repository ([[https:// | ||
| + | |||
| + | Check out Ptidej using the Team Set file ([[http:// | ||
| + | |||
| + | If there are build errors after checking out, it usually results from the missing project dependencies. Use the quick fix in Eclipse or manually add projects in the project' | ||
| + | |||
| + | |||
| + | |||
| + | ===== 3. Run in Eclipse ===== | ||
| + | |||
| + | ==== 3.1 Ptidej UI Viewer Swing Standalone ==== | ||
| + | |||
| + | Even if there are projects that failed to build, the Ptidej UI Viewer Swing Standalone is still able to start. In Eclipse, run it as an applicaiton and see video for details to use this GUI tool([[http:// | ||
| + | |||
| + | |||
| + | |||
| + | ==== 3.2 Batch mode ==== | ||
| + | |||
| + | Make sure the project ' | ||
| + | |||
| + | The path to JAR or class files you want to analyse is hard-coded in the class DesignMotifIdentificationCaller(/ | ||
| + | |||
| + | Modify code to fit your settings and run this class. The path to the result file is also hard-coded in this class. | ||
| + | |||
| + | |||
| + | |||
| + | ===== 4. Run as JAR ===== | ||
| + | |||
| + | I Compile the project to a runnable JAR with the Run Configuration in step 3.2 using Eclipse Export on Eclipse 3.5 in WinXP. If the tool seems work fine but just output 0 solution for all design motif. Try copying ' | ||
| + | |||
| + | Unfortunately I got error messages as below when running this JAR in Fedora where default JDK is OpenJDK1.6: | ||
| + | |||
| + | < | ||
| + | padl.FileAccessException | ||
| + | at padl.util.repository.file.ClassFileRepository.storeFiles(ClassFileRepository.java: | ||
| + | at padl.util.repository.file.ClassFileRepository.getMetaModelFiles(ClassFileRepository.java: | ||
| + | at padl.util.repository.file.ClassFileRepository.getFiles(ClassFileRepository.java: | ||
| + | at padl.util.repository.constituent.ConstituentRepository.& | ||
| + | at padl.util.repository.constituent.ConstituentRepository.getInstance(ConstituentRepository.java: | ||
| + | at ptidej.solver.helper.DesignMotifIdentificationCaller.analyseCodeLevelModelFromJAR(DesignMotifIdentificationCaller.java: | ||
| + | at ptidej.solver.helper.DesignMotifIdentificationCaller.main(DesignMotifIdentificationCaller.java: | ||
| + | Loading class files in: ./ | ||
| + | Exception in thread " | ||
| + | at padl.creator.AbstractClassFileCreator.createElements(AbstractClassFileCreator.java: | ||
| + | at padl.creator.AbstractClassFileCreator.create(AbstractClassFileCreator.java: | ||
| + | at padl.kernel.impl.CodeLevelModel.create(CodeLevelModel.java: | ||
| + | at ptidej.solver.helper.DesignMotifIdentificationCaller.analyseCodeLevelModelFromJAR(DesignMotifIdentificationCaller.java: | ||
| + | at ptidej.solver.helper.DesignMotifIdentificationCaller.main(DesignMotifIdentificationCaller.java: | ||
| + | </ | ||
| + | |||
| + | So you may consider to run this JAR in the java environment using SunJDK. | ||
| + | |||
| + | ===== 5. Memory Usage ===== | ||
| + | |||
| + | For big JAR or class files, set enough memory for jvm, I have tried -Xmx2048M and got out of memory error when solving UI part of jdt3.0. | ||
