Skip to content

Commit

Permalink
Update to cfr_0_123 and add .idea folder
Browse files Browse the repository at this point in the history
  • Loading branch information
caoli5288 committed Oct 14, 2017
1 parent 07a1344 commit f304504
Show file tree
Hide file tree
Showing 14 changed files with 186 additions and 7 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/.idea
/out
9 changes: 9 additions & 0 deletions .idea/artifacts/java_decompiler_plugin_cfr.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/cfr_0_123.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion java-decompiler-plugin-cfr.iml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="cfr_0_122" level="project" />
<orderEntry type="library" name="cfr_0_123" level="project" />
</component>
</module>
Binary file removed lib/cfr_0_121.jar
Binary file not shown.
Binary file renamed lib/cfr_0_122.jar → lib/cfr_0_123.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<idea-plugin>
<id>com.i5mc.idea.decompiler.cfr</id>
<name>CFR Decompiler</name>
<version>1.2</version>
<version>1.2.3</version>
<vendor email="[email protected]" url="http://www.i5mc.com">i5mc</vendor>

<description>
Expand All @@ -10,6 +10,7 @@
</description>

<change-notes>
- 2017-10-14 UPDATE CFR_123. HAPPY BIRTHDAY TO MYSELF:)
- 2017-07-22 UPDATE CFR_122
- 2017-04-09 UPDATE CFR. FIX INTERFACE STATIC METHOD DECOMPILER
- 2017-03-13 FIXED #1
Expand Down
10 changes: 6 additions & 4 deletions src/com/i5mc/idea/decompiler/Impl.java
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
package com.i5mc.idea.decompiler;

import com.google.common.collect.ImmutableMap;
import org.benf.cfr.reader.PluginRunner;

import java.util.HashMap;
import java.util.Map;

/**
* Created on 17-3-8.
*/
public interface Impl {

Map<String, String> OPTION = ImmutableMap.of("hideutf", "false");
Map<String, String> OPT = new HashMap<String, String>() {{
put("hideutf", "false");
}};

String decompile(String path);

static String fuck(String path) {
PluginRunner r = new PluginRunner(OPTION);
PluginRunner r = new PluginRunner(OPT);
r.addJarPath(path);
return r.getDecompilationFor(path);
}

static String clazz(String path) {
int i = path.lastIndexOf("!/");// filesystem path can contain ! but java can not
if (i == -1) throw new IllegalArgumentException();
PluginRunner r = new PluginRunner(OPTION);
PluginRunner r = new PluginRunner(OPT);
String head = path.substring(0, i);
r.addJarPath(head);
String tail = path.substring(i + 2, path.length() - 6);
Expand Down

0 comments on commit f304504

Please sign in to comment.