Skip to content

Commit

Permalink
ecd-plugin#40 Updated CFR decompiler to 0_140
Browse files Browse the repository at this point in the history
  • Loading branch information
pbi-qfs committed Jun 15, 2018
1 parent c616fb8 commit d7fb5bf
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
6 changes: 3 additions & 3 deletions AUDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ _Primary Source: http://jsoup.org/_
### CFR
_Primary Source: http://www.benf.org/other/cfr/_

* `./org.sf.feeling.decompiler.cfr/lib/cfr_0_122.jar`
* SHA-256: 65c2dfb76c4904014092663b74c2ea4a8e2f18ca75e98a1e4e064352c618360f
* Equal to http://www.benf.org/other/cfr/cfr_0_122.jar
* `./org.sf.feeling.decompiler.cfr/lib/cfr_0_130.jar`
* SHA-256: b66a1e59891a2585885b171b4ec6fcc0e20f0d419e90a153e5c01540bb1cc67f
* Equal to http://www.benf.org/other/cfr/cfr_0_130.jar

### Procyon
_Primary Source: https://bitbucket.org/mstrobel/procyon/_
Expand Down
2 changes: 1 addition & 1 deletion org.sf.feeling.decompiler.cfr/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/cfr_0_122.jar"/>
<classpathentry exported="true" kind="lib" path="lib/cfr_0_130.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
Expand Down
2 changes: 1 addition & 1 deletion org.sf.feeling.decompiler.cfr/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ Bundle-ActivationPolicy: lazy
Bundle-Vendor: ECD Project Team
Export-Package: org.sf.feeling.decompiler.cfr.actions,
org.sf.feeling.decompiler.cfr.decompiler
Bundle-ClassPath: lib/cfr_0_122.jar,
Bundle-ClassPath: lib/cfr_0_130.jar,
.
Binary file removed org.sf.feeling.decompiler.cfr/lib/cfr_0_122.jar
Binary file not shown.
Binary file added org.sf.feeling.decompiler.cfr/lib/cfr_0_130.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.regex.Pattern;

import org.benf.cfr.reader.api.ClassFileSource;
import org.benf.cfr.reader.bytecode.analysis.parse.utils.Pair;
import org.benf.cfr.reader.entities.ClassFile;
import org.benf.cfr.reader.state.ClassFileSourceImpl;
import org.benf.cfr.reader.state.DCCommonState;
Expand All @@ -39,7 +40,7 @@ public class CfrDecompiler implements IDecompiler
private String log = ""; //$NON-NLS-1$

/**
* Performs a <code>Runtime.exec()</code> on jad executable with selected
* Performs a <code>Runtime.exec()</code> on CFR with selected
* options.
*
* @see IDecompiler#decompile(String, String, String)
Expand All @@ -58,15 +59,16 @@ public void decompile( String root, String packege, String className )

try
{
Options options = getOptParser.parse( new String[]{
Pair<List<String>, Options> options = getOptParser.parse( new String[]{
classPathStr
}, OptionsImpl.getFactory( ) );
ClassFileSource classFileSource = new ClassFileSourceImpl( options );
DCCommonState dcCommonState = new DCCommonState( options, classFileSource );
Options namedOptions = options.getSecond();
ClassFileSource classFileSource = new ClassFileSourceImpl( namedOptions );
DCCommonState dcCommonState = new DCCommonState( namedOptions, classFileSource );

IllegalIdentifierDump illegalIdentifierDump = IllegalIdentifierDump.Factory.get( options );
IllegalIdentifierDump illegalIdentifierDump = IllegalIdentifierDump.Factory.get( namedOptions );

ClassFile c = dcCommonState.getClassFileMaybePath( options.getOption( OptionsImpl.FILENAME ) );
ClassFile c = dcCommonState.getClassFileMaybePath( classPathStr );
dcCommonState.configureWith( c );
try
{
Expand All @@ -75,7 +77,7 @@ public void decompile( String root, String packege, String className )
catch ( CannotLoadClassException e )
{
}
if ( options.getOption( OptionsImpl.DECOMPILE_INNER_CLASSES ).booleanValue( ) )
if ( namedOptions.getOption( OptionsImpl.DECOMPILE_INNER_CLASSES ).booleanValue( ) )
{
c.loadInnerClasses( dcCommonState );
}
Expand All @@ -86,7 +88,7 @@ public void decompile( String root, String packege, String className )
c.collectTypeUsages( collectingDumper );

StringDumper dumper = new StringDumper( collectingDumper.getTypeUsageInformation( ),
options,
namedOptions,
illegalIdentifierDump );
c.dump( dumper );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# http://www.eclipse.org/legal/epl-v10.html
###############################################################################

CfrDecompilerDescriptor.PreferenceLabel=CFR (Support JDK8)
CfrDecompilerDescriptor.PreferenceLabel=CFR (Support JDK9+)
JavaDecompilerActionBarContributor.Action.DecompileWithCfr=C&FR

0 comments on commit d7fb5bf

Please sign in to comment.