User Tools

Site Tools


install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

install [2014/02/16 06:46]
yann
install [2018/03/04 02:53]
Line 1: Line 1:
-====== How to Use Ptidej to Identify Occurrences of Design Motifs: A Quick Start ====== 
  
-By [[gaochushu@googlemail.com|Chushu Gao]] and [[yann-gael.gueheneuc@polymtl.ca|Yann-Gaël Guéhéneuc]]. 
- 
- 
- 
-===== 1. Environment ===== 
- 
-This guide based on the experience on Ecilpes 3.5 in WindowsXP and Fedora Eclipse released with FC11. It should work with any Eclipse version but you must install the [[https://​www.eclipse.org/​cdt/​|C/​C++ Development Tooling]] (CDT) for the C++ creator to work. To do so, install first Eclipse; then go to Help -> Install New Software, visit the [[https://​www.eclipse.org/​cdt/​|CDT Web site]], and install the CDT Main Features. 
- 
-===== 2. Check out Ptidej projects ===== 
- 
-You will need an account to access Ptidej SVN repository ([[https://​web.soccerlab.polymtl.ca/​rptidej/​ptidejlab/​Software/​Ptidej 5 Workspace/​]]). 
- 
-Check out Ptidej using the Team Set file ([[http://​www.ptidej.net/​material/​development/​Ptidej.psf]]). If there are build errors after checking out the projects, they usually result of missing project dependencies. Use the quick fix in Eclipse or manually add projects in the project'​s Java Build Path. Other errors may relate to the incorrect library setting, such as JUnit or JRE. 
- 
- 
- 
-===== 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 thanks to the use of reflection. In Eclipse, run it as an application and see the video for details on how to use the GUI ([[http://​www.ptidej.net/​downloads/​ptidejdemo/​PtidejDemo.avi]]). 
- 
- 
- 
-==== 3.2 Batch mode ==== 
- 
-Make sure the project '​Ptidej Solver Test' is successfully built. Some projects are not required though listed in the required projects section of Java Build Path. My working set of projects includes CPL, JChoco, PADL, PADL Analyses, PADL Creator ClassFile, PADL Design Motifs, Ptidej, and Ptidej Solver 4. 
- 
-The path to JAR or class files you want to analyse is in the class DesignMotifIdentificationCaller ("/​Ptidej Solver Tests/​src/​ptidej/​solver/​helper/​DesignMotifIdentificationCaller.java"​). Modify code to fit your settings and run this class. The path to the result file is also set in this class. 
- 
- 
- 
-===== 4. Run as JAR =====  
- 
-I Compile the project into a runnable JAR with the Run Configuration in step 3.2 using Eclipse Export on Eclipse 3.5 in WinXP. You will get the error messages below when running this JAR in Fedora where default JDK is OpenJDK1.6: 
- 
-<​code>​ 
-padl.FileAccessException 
-at padl.util.repository.file.ClassFileRepository.storeFiles(ClassFileRepository.java:​60) 
-at padl.util.repository.file.ClassFileRepository.getMetaModelFiles(ClassFileRepository.java:​115) 
-at padl.util.repository.file.ClassFileRepository.getFiles(ClassFileRepository.java:​134) 
-at padl.util.repository.constituent.ConstituentRepository.&​lt;​init&​gt;​(ConstituentRepository.java:​62) 
-at padl.util.repository.constituent.ConstituentRepository.getInstance(ConstituentRepository.java:​37) 
-at ptidej.solver.helper.DesignMotifIdentificationCaller.analyseCodeLevelModelFromJAR(DesignMotifIdentificationCaller.java:​920) 
-at ptidej.solver.helper.DesignMotifIdentificationCaller.main(DesignMotifIdentificationCaller.java:​100) 
-Loading class files in: ./​1_0/​org.eclipse.jdt.core/​jdtcore.jar 
-Exception in thread "​main"​ java.lang.NullPointerException 
-at padl.creator.AbstractClassFileCreator.createElements(AbstractClassFileCreator.java:​239) 
-at padl.creator.AbstractClassFileCreator.create(AbstractClassFileCreator.java:​224) 
-at padl.kernel.impl.CodeLevelModel.create(CodeLevelModel.java:​48) 
-at ptidej.solver.helper.DesignMotifIdentificationCaller.analyseCodeLevelModelFromJAR(DesignMotifIdentificationCaller.java:​919) 
-at ptidej.solver.helper.DesignMotifIdentificationCaller.main(DesignMotifIdentificationCaller.java:​100) 
-</​code>​ 
- 
-So you may consider to run this JAR in the java environment using SunJDK. 
- 
- 
- 
-===== 5. Memory Usage =====  
- 
-For big JAR or class files, give enough memory to the JVM, wit -Xmx2048M you will be able to anlyse the UI part of JDT 3.0.  
install.txt · Last modified: 2019/10/06 20:37 (external edit)