{"id":425,"date":"2015-12-09T12:48:27","date_gmt":"2015-12-09T20:48:27","guid":{"rendered":"https:\/\/www.pnfsoftware.com\/blog\/?p=425"},"modified":"2015-12-09T12:48:27","modified_gmt":"2015-12-09T20:48:27","slug":"what-s-new-in-jeb-2-1","status":"publish","type":"post","link":"https:\/\/www.pnfsoftware.com\/blog\/what-s-new-in-jeb-2-1\/","title":{"rendered":"Changes in JEB 2.1&#8230; And a holiday season gift"},"content":{"rendered":"<p>JEB 2.1 is just around the corner! Users with a valid subscription should expect software updates today or tomorrow. This major update represents the maturation of JEB 2.0, and paves the way for JEB 2.2, which will introduce modules for x86 and ARM.<\/p>\n<p style=\"text-align: center;\"><strong><a href=\"https:\/\/www.pnfsoftware.com\/jeb2cl\">View the full change log for JEB 2.1<\/a><\/strong><\/p>\n<p>The following is a non-exhaustive list of notable changes.<\/p>\n<h2>Navigation bars in text views<\/h2>\n<p>The navigation bar is interactive (zoom in and out for finer granularity, visualize currently loaded text area, etc.) and <strong>customizable<\/strong>. It is connected to the <a href=\"https:\/\/www.pnfsoftware.com\/jeb\/apidoc\/reference\/com\/pnfsoftware\/jeb\/core\/units\/IMetadataManager.html\">metadata manager<\/a> of an interactive unit. Client code (eg, in plugins or scripts) can manipulate this metadata: add, remove, query metadata and metadata groups, etc.<\/p>\n<p>Sample script:\u00a0<a href=\"https:\/\/github.com\/pnfsoftware\/jeb2-samplecode\/blob\/master\/scripts\/JEB2CustomizeMetadata.py\">JEB2CustomizeMetadata.py<\/a><\/p>\n<figure style=\"width: 502px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.pnfsoftware.com\/blog\/wp-content\/uploads\/2015\/12\/409a4ba82d1664bd75de9e518e18ee05.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.pnfsoftware.com\/blog\/wp-content\/uploads\/2015\/12\/409a4ba82d1664bd75de9e518e18ee05.png\" alt=\"\" width=\"502\" height=\"415\" \/><\/a><figcaption class=\"wp-caption-text\">The navigation bar can be seen on the right-hand side<\/figcaption><\/figure>\n<h2>Java AST API<\/h2>\n<p>The newly introduced <a href=\"https:\/\/www.pnfsoftware.com\/jeb\/apidoc\/reference\/com\/pnfsoftware\/jeb\/core\/units\/code\/java\/package-summary.html\">com.pnfsoftware.jeb.core.units.code.java<\/a>\u00a0API package allows compliant Java source units to offer direct manipulation of AST code to clients. Units produced by our native Dalvik decompiler are obviously compliant. Plugins and scripts may use this API to implement complex refactoring\/code-cleanup operations, as was <a href=\"https:\/\/www.pnfsoftware.com\/blog\/decompiled-java-code-manipulation-using-jeb-api-part-2-decrypting-strings\/\">demonstrated<\/a> with JEB 1.x in the past.<\/p>\n<figure style=\"width: 530px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.pnfsoftware.com\/blog\/wp-content\/uploads\/2015\/12\/f1768c956dc5972526254a843d1bcf25.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.pnfsoftware.com\/blog\/wp-content\/uploads\/2015\/12\/f1768c956dc5972526254a843d1bcf25.png\" alt=\"\" width=\"530\" height=\"306\" \/><\/a><figcaption class=\"wp-caption-text\">The IJavaSourceUnit interface is your entry-point to AST elements<\/figcaption><\/figure>\n<p>Note that the Java AST API has changed significantly relative to JEB1&#8217;s. A few missing features will be implemented in future service releases of JEB 2.1.x (eg, <a href=\"https:\/\/www.pnfsoftware.com\/blog\/using-the-ast-tagging-api\/\">tagging<\/a>) but overall, it is more powerful than JEB1&#8217;s: most objects can be constructed and modified, AST elements that were not offered by the older API, such as Annotations, are now accessible, etc. &#8211; not to mention, those units are now persisted! (See our next section.)<\/p>\n<p>Sample scripts:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/pnfsoftware\/jeb2-samplecode\/blob\/master\/scripts\/JEB2DecompileAll.py\">JEB2DecompileAll.py<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/pnfsoftware\/jeb2-samplecode\/blob\/master\/scripts\/JEB2JavaASTDemo.py\">JEB2JavaASTDemo.py<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/pnfsoftware\/jeb2-samplecode\/blob\/master\/scripts\/JEB2JavaASTDecryptStrings.py\">JEB2JavaASTDecryptStrings.py<\/a><\/li>\n<\/ul>\n<h2>Improved persistence<\/h2>\n<p>Semi-related to the above paragraph, we are glad to announce that the decompiled Java code (and all the modifications applied to it via the Java AST API) are now persisted to the JDB2 file when saving a project to file.<\/p>\n<p>The persistence mechanism has undergone significant changes and fixes, and therefore, some JDB2 generated by JEB 2.0 might not be compatible with JEB 2.1.<\/p>\n<p>The <a href=\"https:\/\/github.com\/pnfsoftware\/jeb2-plugin-pdf\/releases\/download\/0.2.7\/JebPdfPlugin-0.2.7.jar\">newer version of the PDF plugin<\/a> also supports persistence.<\/p>\n<h2>API for UI scripting<\/h2>\n<p>The <a href=\"https:\/\/www.pnfsoftware.com\/jeb\/apidoc\/reference\/com\/pnfsoftware\/jeb\/client\/api\/IGraphicalClientContext.html\">IGraphicalClientContext<\/a> has been augmented to support more operations, such as enumerating views and fragments, setting the focus on a specific view, setting or retrieving the active address and active items, etc.<\/p>\n<p>Sample scripts:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/pnfsoftware\/jeb2-samplecode\/blob\/master\/scripts\/JEB2UIDemo.py\">JEB2UIDemo.py<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/pnfsoftware\/jeb2-samplecode\/blob\/master\/scripts\/JEB2AsyncTask.py\">JEB2AsyncTask.py<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/pnfsoftware\/jeb2-samplecode\/blob\/master\/scripts\/JEB2AsyncTaskWithReturn.py\">JEB2AsyncTaskWithReturn.py<\/a><\/li>\n<\/ul>\n<figure style=\"width: 591px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.pnfsoftware.com\/blog\/wp-content\/uploads\/2015\/12\/36b41d25beab5df91b3f5c8bd2768d0e.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.pnfsoftware.com\/blog\/wp-content\/uploads\/2015\/12\/36b41d25beab5df91b3f5c8bd2768d0e.png\" alt=\"\" width=\"591\" height=\"324\" \/><\/a><figcaption class=\"wp-caption-text\">A sample UI script showing how to start an asynchronous, interruptible task<\/figcaption><\/figure>\n<p>The official RCP client implements the UI-API. We are planning to add more UI primitives in the upcoming maintenance releases.<\/p>\n<h2>API changes<\/h2>\n<p>Here is an incomplete list of API changes that took place between the latest 2.0 and the initial 2.1 releases:<\/p>\n<ul>\n<li>Most protected members of the <a href=\"https:\/\/www.pnfsoftware.com\/jeb\/apidoc\/reference\/com\/pnfsoftware\/jeb\/core\/units\/AbstractUnit.html\">AbstractUnit<\/a> hierarchy of skeleton classes have been\u00a0privatized. \u00a0The current guidelines is to use the provided getters, setters, and other accessor methods.\n<ul>\n<li><em>Side-note: As always, we encourage plugin developers to use abstract implementations instead of implementing interfaces from scratch, when abstracts are available.<\/em><\/li>\n<\/ul>\n<\/li>\n<li>Units offer a way to persist or not-persist their children units when saving a project to disk. Changes took place in <a href=\"https:\/\/www.pnfsoftware.com\/jeb\/apidoc\/reference\/com\/pnfsoftware\/jeb\/core\/units\/IUnit.html\">IUnit.addChild()<\/a> and co. methods.<\/li>\n<li>We added a <a href=\"https:\/\/www.pnfsoftware.com\/jeb\/apidoc\/reference\/com\/pnfsoftware\/jeb\/core\/units\/IUnitNotificationManager.html\">notification manager<\/a> (for all units) and introduced a <a href=\"https:\/\/www.pnfsoftware.com\/jeb\/apidoc\/reference\/com\/pnfsoftware\/jeb\/core\/units\/IMetadataManager.html\">metadata manager<\/a> (for interactive units only).<\/li>\n<li>The <a href=\"https:\/\/www.pnfsoftware.com\/jeb\/apidoc\/reference\/com\/pnfsoftware\/jeb\/core\/output\/IUnitFormatter.html\">formatter<\/a> (aka, the unit output manager) was also revamped: it can now yield transient and persisted documents. Write-access is also permitted, which means that plugins and scripts can add documents (such as texts, tables, or trees), and request that\u00a0they&#8217;re persisted in the JDB2 database. We uploaded sample scripts here:\n<ul>\n<li><a href=\"https:\/\/github.com\/pnfsoftware\/jeb2-samplecode\/blob\/master\/scripts\/JEB2ExtraDocument.py\">JEB2ExtraDocument.py<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/pnfsoftware\/jeb2-samplecode\/blob\/master\/scripts\/JEB2ExtraDocumentTableTree.py\">JEB2ExtraDocumentTableTree.py<\/a><\/li>\n<\/ul>\n<\/li>\n<li>The <em>client\u00a0notifications<\/em> are now called <a href=\"https:\/\/www.pnfsoftware.com\/jeb\/apidoc\/reference\/com\/pnfsoftware\/jeb\/core\/events\/ClientNotification.html\">ClientNotification<\/a>, to avoid potential confusion with another type of notification used within JEB (the <em>unit notifications<\/em>).<\/li>\n<\/ul>\n<h2>Next up<\/h2>\n<p>We are planning a few maintenance updates\u00a0before the release of JEB 2.2. The currently planned\u00a0release date for JEB 2.2 is early February 2016.<\/p>\n<p>We will keep you posted on this very blog. Stay tuned, and a happy holiday season to all.<\/p>\n<p><em>PS: as an early Christmas gift, we have uploaded a new third-party plugin on our public repository. Check out the <a href=\"https:\/\/github.com\/pnfsoftware\/jeb2-plugin-avqu\">Antivirus Quarantines File Extractor<\/a> plugin. We currently support <strong>Kaspersky KLQ<\/strong>\u00a0quarantine files only, but are planning to add more soon. If you&#8217;d like to contribute, please send us an email.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>JEB 2.1 is just around the corner! Users with a valid subscription should expect software updates today or tomorrow. This major update represents the maturation of JEB 2.0, and paves the way for JEB 2.2, which will introduce modules for x86 and ARM. View the full change log for JEB 2.1 The following is a &hellip; <a href=\"https:\/\/www.pnfsoftware.com\/blog\/what-s-new-in-jeb-2-1\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Changes in JEB 2.1&#8230; And a holiday season gift<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,8],"tags":[],"class_list":["post-425","post","type-post","status-publish","format-standard","hentry","category-api-jeb2","category-jeb2"],"_links":{"self":[{"href":"https:\/\/www.pnfsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/425","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pnfsoftware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pnfsoftware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pnfsoftware.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pnfsoftware.com\/blog\/wp-json\/wp\/v2\/comments?post=425"}],"version-history":[{"count":0,"href":"https:\/\/www.pnfsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/425\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.pnfsoftware.com\/blog\/wp-json\/wp\/v2\/media?parent=425"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pnfsoftware.com\/blog\/wp-json\/wp\/v2\/categories?post=425"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pnfsoftware.com\/blog\/wp-json\/wp\/v2\/tags?post=425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}