我有一个带有语法突出显示的Java代码编辑器,带有代码提示菜单和快速操作。编辑器用C#编写。再次,该编辑器用于编辑Java代码!我需要知道罐子库中哪些软件包,类,方法,以便进一步
代码提示和语法突出显示。
我有一个想法将罐子分解以找出“它的内容”,但我怀疑还有另一种更有效的方法可以实施它。
这就是我的编辑器的外观:
I have a Java code editor with syntax highlighting, with a code hint menu and quick actions. The editor is written in C#. Once again, this editor is for editing Java code! I need to know what packages, classes, methods are in the Jar library (Jar file) for further
code hinting and syntax highlighting.
I have an idea about decompiling the Jar to find out "its contents", but I suspect that there is another more efficient way to implement this.
This is what my editor looks like: 
发布评论
评论(1)
事实证明它相对简单。我找到了'JD-GUI'存储库( https://github.com/java-decompiler/ jd-gui ),这是应用程序: http://java-decompiler.github.github。 io/)。该程序本身是用Java编写的,是基于JD核心核心的非常好的Java分解器( https://github.com/java-decompiler/jd-core )。
我喜欢这个应用程序,因为。它详细概述了整个分解应用程序(您可以看到哪些软件包,类,方法,字段在罐子中),这正是我所需要的!因为它是一个开源存储库,所以我只是对其进行了一些调整,现在在分解时,该程序将使用“ JAR文件的内容”保存XML文件。然后,我在C#中编写了XML解析器,以加载数据并与它们进一步合作。仅此而已...
用JAR内容编辑的JD-GUI保存XML文件:加载jar file时(在同一文件夹中)xml文件,将保存此文件的内容(在同一文件夹中) 。
It turned out to be relatively simple. I found the 'jd-gui' repository (https://github.com/java-decompiler/jd-gui), here is the app: (http://java-decompiler.github.io/). The program itself is written in java and is a very good java decompiler based on the jd-core core (https://github.com/java-decompiler/jd-core).
I liked this application, because. it implements a detailed overview of the entire decompiled application (you can see what packages, classes, methods, fields are in the jar), that's exactly what I needed! Because it was an open source repository, I just tweaked it a little, and now when decompiling, the program saves the xml file with the "contents of the jar file". And then I wrote an xml parser in c# to load data and further work with them. That's all...
Code with edited jd-gui saving xml file with jar content: https://drive.google.com/drive/folders/1_opg0BBIrmHoZ125F0Fyl9n_0o4xutiL?usp=sharing When loading a jar file, next to it (in the same folder) an xml file with the contents of this file will be saved.