Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
nbauma109 committed May 28, 2023
2 parents 564da3d + bd23a7a commit 3680795
Show file tree
Hide file tree
Showing 98 changed files with 3,405 additions and 942 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B install
run: mvn -B install -Dsigning.disabled=true
- name: Create release
uses: "marvinpinto/action-automatic-releases@latest"
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ bin/**/*
/**/bin/*
/bin/
*/target
lib/
lib/
File renamed without changes.
30 changes: 24 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
[![Github Release](https://github.com/nbauma109/ecd/actions/workflows/release.yml/badge.svg)](https://github.com/nbauma109/ecd/actions/workflows/release.yml)

# Enhanced Class Decompiler
Enhanced Class Decompiler integrates **JD**, **Jad**, **FernFlower**, **CFR**, **Procyon** seamlessly with Eclipse and allows Java developers to **debug class files without source code directly**. It also integrates with the eclipse class editor, m2e plugin, supports **Javadoc**, **reference search**, **library source attaching**, **byte code view** and the syntax of JDK8 **lambda** expression.
Enhanced Class Decompiler integrates **JD**, **FernFlower**, **Quiltflower**, **CFR**, **Procyon** seamlessly with Eclipse and allows Java developers to **debug class files without source code directly**. It also integrates with the eclipse class editor, m2e plugin, supports **Javadoc**, **reference search**, **library source attaching**, **byte code view** and the syntax of JDK8 **lambda** expression.

<p align="center"><img src="https://ecd-plugin.github.io/ecd/doc/o_debug_class.png"></p>

## Description
Enhanced Class Decompiler is a plug-in for the Eclipse platform. It integrates JD, Jad, FernFlower, CFR, Procyon seamlessly with Eclipse, allows you to display all the Java sources during your debugging process, even if you do not have them all, and you can debug these class files without source code directly.
Enhanced Class Decompiler is a plug-in for the Eclipse platform. It integrates JD, FernFlower, Quiltflower, CFR, Procyon seamlessly with Eclipse, allows you to display all the Java sources during your debugging process, even if you do not have them all, and you can debug these class files without source code directly.

## Why is this plug-in "enhanced"?
This is an ad-free fork of the Eclipse Decompiler Plugin. So we enhanced it by removing all code which might compromise your privacy or security (to the best of our knowledge).
Expand Down Expand Up @@ -46,11 +46,13 @@ _If you have currently the "Eclipse" Class Decompiler installed, it is recommend

## How to build from source?

Requiremnent: JDK 11 or newer (make sure `JAVA_HOME` environment variable points to an appropriate JDK)

If you want to test the latest features of this plugin, you have to build it from source. For this, proceed as following:

1. Clone this project
1. Clone https://github.com/ecd-plugin/update next to this project
1. Run mvn clean package
1. `git clone https://github.com/ecd-plugin/ecd`
2. `git clone --depth 1 https://github.com/ecd-plugin/update` next to this project
3. Run `mvn clean package`

If you want to use Eclipse and help developing, continue like this:

Expand All @@ -61,6 +63,15 @@ _If you have currently the "Eclipse" Class Decompiler installed, it is recommend
6. Press "Build All"
7. Copy the jar files generated in the _build/features_ and _build/plugins_ folder of the project into the correspondent folders of your normal Eclipse installation.

## Plugin Signature

Since version 3.3.0 ECD is signed by a self-signed 4096 bit RSA key:

* Subject: `CN=ECD Software Distribution,OU=ECD,O=ECD`
* SHA-1 fingerprint: 2D DB EE 7E 07 32 EB 0D 7C F2 FF C6 68 A0 C4 B8 B9 58 40 29
* SHA-256 fingerprint: 8A 68 55 D3 91 B7 6F 95 DA D1 1E DF 1C 38 8D 38 F1 8A 0C A2 97 E5 12 85 DD 5B 05 9C C3 21 1B D4
* Certificate file: [ecd.cer](ecd.cer)

## Licenses

The main plugin and the _org.sf.feeling.decompiler.jd_ project are licensed under [GPL 3](https://www.gnu.org/licenses/gpl-3.0-standalone.html), the other feature plugins are licensed under the [Eclipse Public License v1.0](https://www.eclipse.org/legal/epl-v10.html)
Expand All @@ -81,8 +92,8 @@ Used libraries:
* Nexus Indexer: [Apache License V2.0](https://www.apache.org/licenses/LICENSE-2.0.html)
* Nexus Restlet1x Model: [Eclipse Public License v1.0](https://www.eclipse.org/legal/epl-v10.html)
* Plexus Utils: Copyright The Codehaus Foundation, [Apache License V2.0](https://www.apache.org/licenses/LICENSE-2.0.html)
* JAD: Copyright 1997-2001 Pavel Kouznetsov, Free for non-commercial use
* JD-Core: Copyright Emmanuel Dupuy, [GPL 3](https://www.gnu.org/licenses/gpl-3.0-standalone.html)
* Quiltflower: [Apache License V2.0](https://www.apache.org/licenses/LICENSE-2.0.html)

## Contributors

Expand All @@ -93,6 +104,13 @@ Used libraries:
* Jan Peter Stotz

## Changelog
* Version 3.3.0
* ECD releases are now signed with a self-signed certificate
* Removed Jad decompiler (decompiler was released 2001)
* Quiltflower plugin and feature added
* Updated Embedded Decompilers
* CFR to version 0.152 (JDK 14 support)
* Procyon to version 0.6.0

* Version 3.3.0
* Fix a NPE bug for CFR
Expand Down
13 changes: 13 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Creating an unsigned release

mvn clean package

This command will create the release repository ZIP file in `../update/target/com.github.ecd-plugin.update-<version>.zip`

# Creating a release with signed JAR files

(For ECD maintainers):

mvn clean package -Dsigning.disabled=false -Dsigning.password=<password> -Dsigning.keystore=<absolute path-to-keystore>

This command will create the release repository ZIP file in `../update/target/com.github.ecd-plugin.update-<version>.zip`
4 changes: 1 addition & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@
# Example: ./build.sh


mvn \
clean \
verify
mvn clean verify -Dsigning.disabled=true
29 changes: 29 additions & 0 deletions ecd.cer
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----BEGIN CERTIFICATE-----
MIIE/DCCAuSgAwIBAgIEZE6LsDANBgkqhkiG9w0BAQsFADBAMQwwCgYDVQQKDANF
Q0QxDDAKBgNVBAsMA0VDRDEiMCAGA1UEAwwZRUNEIFNvZnR3YXJlIERpc3R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f0WuQ0jcZqKLy5Tban3Dvucx0NK/EM+VNSp+xu
kJ+zFQPRQFyvQUhDN90CKLMSc8zLkeEfbP9WPe4WEnuVdNOYQ7+VeHxxuBUOQStU
uv1lx3CtHIhR9pnssEwvHznnNWoJY7dfqlUNJVKavynuKcIL9ifzlqSYk9OoLH9f
4O/zuzToRRHrJ8iqxtYu63GSBj1NXsyNLO0BWentgyZwm0Vl29lcQDT1Yn2o071e
LTDA9Y4nV+L57mqIlcXf8z5RVQEydfItl4nZegkgtMA4mA3t54GtW6tJyqEVkNTs
zZxBjDO/mPh4ific7X2CH8ktZetflA3xfLqBCpcUdkzhfWeESwnbnc/yIFdB0Di0
6LhmV7g9ZjDTzThdpeocEcla29gNJQnF3NUvJI0N6Vj6KbU+A/1HkytPwJf8CRiA
plv4LUR+8+EnKiSTJRtGImv/AztgZMjJJxnUy596NCEkDtflAn8matVrTh0UggXM
xf6G9CCQJ8kE4puNsuEHDgfOsy75AdBWBB+nsHUUc2I=
-----END CERTIFICATE-----
2 changes: 1 addition & 1 deletion jitci-build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
export M3_VERSION=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/apache/maven/releases/latest | sed 's,https://github.com/apache/maven/releases/tag/maven-,,g')
export JAVA_HOME=$HOME/jdk-17.0.2+8
$HOME/apache-maven-${M3_VERSION}/bin/mvn -B install -DskipTests
$HOME/apache-maven-${M3_VERSION}/bin/mvn -B install -DskipTests -Dsigning.disabled=true
2 changes: 1 addition & 1 deletion jitci-publish.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
export M3_VERSION=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/apache/maven/releases/latest | sed 's,https://github.com/apache/maven/releases/tag/maven-,,g')
export JAVA_HOME=$HOME/jdk-17.0.2+8
$HOME/apache-maven-${M3_VERSION}/bin/mvn -B deploy -DskipTests -Dfindbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true -DaltDeploymentRepository=jitci::default::file:///home/jitpack/deploy
$HOME/apache-maven-${M3_VERSION}/bin/mvn -B deploy -DskipTests -Dfindbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true -Dsigning.disabled=true -DaltDeploymentRepository=jitci::default::file:///home/jitpack/deploy
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ install:
- export M3_VERSION=3.8.5
- curl -vkL https://archive.apache.org/dist/maven/maven-3/${M3_VERSION}/binaries/apache-maven-${M3_VERSION}-bin.zip -o $HOME/apache-maven-${M3_VERSION}-bin.zip
- unzip -o $HOME/apache-maven-${M3_VERSION}-bin.zip -d $HOME
- $HOME/apache-maven-${M3_VERSION}/bin/mvn -B install
- $HOME/apache-maven-${M3_VERSION}/bin/mvn -B install -Dsigning.disabled=true
2 changes: 1 addition & 1 deletion org.sf.feeling.decompiler.assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.github.ecd-plugin</groupId>
<artifactId>com.github.ecd-plugin.ecd</artifactId>
<version>3.4.24</version>
<version>3.5.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion org.sf.feeling.decompiler.cfr.feature/feature.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ providerName=ECD project contributors
updateSiteName=Enhanced Class Decompiler Updates

# "description" property - description of the feature
description=Enhanced Class Decompiler integrates JD, Jad, FernFlower, CFR, Procyon with Eclipse seamlessly. \
description=Enhanced Class Decompiler integrates JD, FernFlower, Quiltflower, CFR, Procyon with Eclipse seamlessly. \
It allows Java developers to debug class files without source code directly.

copyrightURL=https://ecd-plugin.github.io
Expand Down
4 changes: 2 additions & 2 deletions org.sf.feeling.decompiler.cfr.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.sf.feeling.decompiler.cfr"
label="%featureName"
version="3.4.24"
version="3.5.0"
provider-name="%providerName"
plugin="org.sf.feeling.decompiler.cfr">

Expand Down Expand Up @@ -46,7 +46,7 @@
id="org.sf.feeling.decompiler.cfr"
download-size="0"
install-size="0"
version="3.4.24"
version="3.5.0"
unpack="false"/>

</feature>
2 changes: 1 addition & 1 deletion org.sf.feeling.decompiler.cfr.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.github.ecd-plugin</groupId>
<artifactId>com.github.ecd-plugin.ecd</artifactId>
<version>3.4.24</version>
<version>3.5.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

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 @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Enhanced Class Decompiler CFR Extension
Bundle-SymbolicName: org.sf.feeling.decompiler.cfr;singleton:=true
Bundle-Version: 3.4.24
Bundle-Version: 3.5.0
Bundle-Activator: org.sf.feeling.decompiler.cfr.CfrDecompilerPlugin
Require-Bundle: org.eclipse.core.runtime,
org.sf.feeling.decompiler,
Expand Down
2 changes: 1 addition & 1 deletion org.sf.feeling.decompiler.cfr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.github.ecd-plugin</groupId>
<artifactId>com.github.ecd-plugin.ecd</artifactId>
<version>3.4.24</version>
<version>3.5.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.net.MalformedURLException;
import java.net.URL;

import org.benf.cfr.reader.util.CfrVersionInfo;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
Expand All @@ -18,6 +19,8 @@ public class CfrDecompilerPlugin extends AbstractUIPlugin implements IPropertyCh

public static final String decompilerType = "CFR"; //$NON-NLS-1$

public static final String decompilerVersion = CfrVersionInfo.VERSION;

private static CfrDecompilerPlugin plugin;

private IPreferenceStore preferenceStore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ public String getDecompilerPreferenceLabel() {

@Override
public IDecompiler getDecompiler() {
if (decompiler == null)
if (decompiler == null) {
decompiler = new CfrDecompiler();
}
return decompiler;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import java.util.Collection;

import org.benf.cfr.reader.util.CfrVersionInfo;
import org.eclipse.core.runtime.Path;
import org.sf.feeling.decompiler.cfr.CfrDecompilerPlugin;
import org.sf.feeling.decompiler.editor.BaseDecompilerSourceMapper;

public class CfrSourceMapper extends BaseDecompilerSourceMapper {
Expand All @@ -24,20 +24,22 @@ public CfrSourceMapper() {
@Override
protected void printDecompileReport(StringBuffer source, String fileLocation, Collection<Exception> exceptions,
long decompilationTime) {
String location = "\tDecompiled from: " //$NON-NLS-1$
+ fileLocation;
String logMsg = origionalDecompiler.getLog().replaceAll("\t", "") //$NON-NLS-1$ //$NON-NLS-2$
.replaceAll("\n\\s*", "\n\t"); //$NON-NLS-1$ //$NON-NLS-2$
source.append("\n\n/*"); //$NON-NLS-1$
source.append("\n\tDECOMPILATION REPORT\n\n"); //$NON-NLS-1$
source.append(location).append("\n"); //$NON-NLS-1$
source.append("\tTotal time: ") //$NON-NLS-1$
.append(decompilationTime).append(" ms\n"); //$NON-NLS-1$
source.append("\t" //$NON-NLS-1$
+ origionalDecompiler.getLog().replace("\t", "") //$NON-NLS-1$ //$NON-NLS-2$
.replaceAll("\n\\s*", "\n\t")); //$NON-NLS-1$ //$NON-NLS-2$
source.append("\n\tDECOMPILATION REPORT\n"); //$NON-NLS-1$
source.append("\n\tDecompiled from: "); //$NON-NLS-1$
source.append(fileLocation);
source.append(decompilationTime);
source.append(" ms\n\t"); //$NON-NLS-1$
source.append(logMsg);
exceptions.addAll(origionalDecompiler.getExceptions());
logExceptions(exceptions, source);
source.append("\n\tDecompiled with CFR " + CfrVersionInfo.VERSION + "."); //$NON-NLS-1$
source.append("\n*/"); //$NON-NLS-1$
source.append("\n\tDecompiled with "); //$NON-NLS-1$
source.append(CfrDecompilerPlugin.decompilerType);
source.append(" version "); //$NON-NLS-1$
source.append(CfrDecompilerPlugin.decompilerVersion);
source.append(".\n*/"); //$NON-NLS-1$
}

}
2 changes: 1 addition & 1 deletion org.sf.feeling.decompiler.feature/feature.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ providerName=ECD project contributors
updateSiteName=Enhanced Class Decompiler Updates

# "description" property - description of the feature
description=Enhanced Class Decompiler integrates JD, Jad, FernFlower, CFR, Procyon with Eclipse seamlessly. \
description=Enhanced Class Decompiler integrates JD, FernFlower, Quiltflower, CFR, Procyon with Eclipse seamlessly. \
It allows Java developers to debug class files without source code directly.

copyrightURL=https://ecd-plugin.github.io
Expand Down
4 changes: 2 additions & 2 deletions org.sf.feeling.decompiler.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.sf.feeling.decompiler"
label="%featureName"
version="3.4.24"
version="3.5.0"
provider-name="%providerName"
plugin="org.sf.feeling.decompiler">

Expand Down Expand Up @@ -50,7 +50,7 @@
id="org.sf.feeling.decompiler"
download-size="0"
install-size="0"
version="3.4.24"
version="3.5.0"
unpack="false"/>

</feature>
2 changes: 1 addition & 1 deletion org.sf.feeling.decompiler.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.github.ecd-plugin</groupId>
<artifactId>com.github.ecd-plugin.ecd</artifactId>
<version>3.4.24</version>
<version>3.5.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Loading

0 comments on commit 3680795

Please sign in to comment.