1 / 15

CRSX plug-in development

CRSX plug-in development. Prerequisites Software and Libraries. Eclipse RCP (3.5 or higher) Go http://www.eclipse.org/ Select “Download” Select “Eclipse for RCP/Plug-in Developers” Download an eclipse archive file. Uncompress the eclipse archive file. Jar file of CRSX

ovid
Download Presentation

CRSX plug-in development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CRSX plug-in development

  2. Prerequisites Software and Libraries • Eclipse RCP (3.5 or higher) • Go http://www.eclipse.org/ • Select “Download” • Select “Eclipse for RCP/Plug-in Developers” • Download an eclipse archive file. • Uncompress the eclipse archive file. • Jar file of CRSX • Go http://sourceforge.net/projects/crsx/ • Select “Download” • Download an archive file • Extract crsx.jar from the archive file • Jar files of Antlr • Go http://www.antlr.org/download • Download antlr-runtime-3.1.3.jar • Download antlr-3.1.3.jar

  3. Register CRSX CVS server to eclipse • Start eclipse RCP • Open “CVS Repository Exploring” perspective • Add new location • Connection type: extssh • Host: crsx.cvs.sourceforge.net • Repository path: /cvsroot/crsx/

  4. Check out projects • Start eclipse • Open “CVS repository exploring” perspective • Expand crsx location, Head, crsx-eclipse-plug-in • Check out “crsx-feature” project • Check out “crsx-plugin” project • Check out “crsx-update-site” project

  5. Jar Files • Start eclipse • Set the following jar files to “lib” directory in “crsx-plugin” project • crsx.jar • antlr-runtime-3.1.3.jar • antlr-3.1.3.jar

  6. Create jar file for the eclipse plug-in • Double click the “plugin.xml” in “crsx-plugin” project (Or open with “Plug-in Manifest Editor”) • Select “Overview” tab • Click “Export Wizard” link in “Exporting” section • Set Directory path in “Destination” tab in “Export” dialog • Click “Options” tab in “Export” dialog • Select “Use class files compiled in the workspace” • Click “Finish” button at the bottom of the dialog

  7. Update plug-in version, and Upload jar for network installation • Open “plugin.xml” in “crsx-plugin” project • Click “Overview” tab, and fill the version number in “Version” text box in “General Information” section • Export jar file of “crsx-plugin” project • Open “feature.xml” in “crsx-feature” • Click “Overview” tab, and fill the version number in “Version” text box in “General Information” section • Click “Plug-ins” tab, and fill the version number in “Version” text box in “Plug-in Details” section • Open “site.xml” in “crsx-update-site” project • Select “net.sf.crsx.eclipse.plugin.category” in “Managing the Site” section • Click “Add Feature” button • Select “net.sf.crsx.eclipse.feature(x.x.x)” in “Feature Selection” dialog • Click “Build All” button • Go to the “crsx-update-site” with linux terminal • $rm plugins/net.sf.crsx.ruleEditor_0.23.1.jar • $ cp ../crsx-plugin/build/build/net.sf.crsx.ruleEditor_0.23.1.jar .plugin/ • $ chmod +x upload.sh • $ upload.sh USERNAME The plug-in jar file created by update-site project is broken if the source code include multi byte character. So we have to replace it manually by plug-in jar created by the plug-in project

  8. Start another eclipse with plug-in • Right click the “crsx-plugin” project • Select “Run As” • Select “Eclipse Application”

  9. Constant Values • net.sf.crsx.eclipseplugin.Constants • Characters and String values which are shared with many classes are in this class

  10. User preference • CRSXRuleEditorPreferencePage • This class provides user level configurations. • Currently the following two items can be configured by uses • Allow eclipse plug-in to invoke CRSX or not • List-based outline view, or nested outline view by rule name

  11. Rule Editor • CRSRuleEditor • Core implementation of rule editor. This class reads and write files • CRSRulePartitionScanner • This class splits rule file into some areas such as comment, embedded token • CRSRuleScanner • Highlighting syntax for crsx rule • CRSRuleEmbeddedScanner • Highlighting syntax for embedded token • CRSXCharacterPairMatcher • highlighting corresponding braces, brackets, and so on.

  12. Communication between CRSX and plug-in • CRSXInvokeUtil • This class is the gateway class between CRSX and plug-in. All classes in plug-in invokes CRSX via this class.

  13. Outline • CRSXOutlinePage • This class is the core implementation for outline view. • This class gets rule tree object from CRSXInvokeUtil

  14. Iterative Rewriting • DebugView • This class is core implementation for iterative rewriting. • CRSXRunnerThread • Iterative rewriting is executed on a different thread from eclipse’s thread. • ObjectSharingObserver • This class is for sharing rule tree, and term with plug-in and CRSX whith are in different threads

More Related