Initial version

This commit is contained in:
2026-07-04 20:24:40 +02:00
parent 5429339f62
commit b3ae12245b
20 changed files with 1131 additions and 70 deletions
+53
View File
@@ -0,0 +1,53 @@
<Application x:Class="EonaCat.JavaDecompile.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style x:Key="SmoothButton" TargetType="Button">
<Setter Property="Background" Value="#383838"/>
<Setter Property="Foreground" Value="#9CDCFE"/>
<Setter Property="BorderBrush" Value="#3E3E3E"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Padding" Value="8,4"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="6">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimation Storyboard.TargetName="Border"
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
To="#505050"
Duration="0:0:0.2"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimation Storyboard.TargetName="Border"
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
To="#383838"
Duration="0:0:0.2"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
</Application>
+7
View File
@@ -0,0 +1,7 @@
using System.Windows;
namespace EonaCat.JavaDecompile;
public partial class App : Application
{
}
+35
View File
@@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Content Include="icon.ico" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="EonaCat.Editor" Version="0.0.2" />
</ItemGroup>
<ItemGroup>
<None Update="external\cfr.jar">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<TargetPath>assets\external\cfr.jar</TargetPath>
</None>
<None Update="external\icons\*.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<TargetPath>assets\external\icons\%(Filename)%(Extension)</TargetPath>
</None>
<None Update="external\themes\EonaCat.JavaDecompile.eeh">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<TargetPath>assets\external\themes\EonaCat.JavaDecompile.eeh</TargetPath>
</None>
</ItemGroup>
</Project>
+25
View File
@@ -0,0 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.7.11919.86
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EonaCat.JavaDecompile", "EonaCat.JavaDecompile.csproj", "{C0ACCD23-58AA-EF3C-8090-A287D8E8AF98}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C0ACCD23-58AA-EF3C-8090-A287D8E8AF98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C0ACCD23-58AA-EF3C-8090-A287D8E8AF98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C0ACCD23-58AA-EF3C-8090-A287D8E8AF98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C0ACCD23-58AA-EF3C-8090-A287D8E8AF98}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3F0A371F-594A-421C-8CFF-583945720873}
EndGlobalSection
EndGlobal
+192
View File
@@ -0,0 +1,192 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows.Media.Imaging;
namespace EonaCat.JavaDecompile;
public static class JarProcessor
{
public static List<TreeViewItem> ExtractStructure(string jarPath)
{
using var archive = ZipFile.OpenRead(jarPath);
var root = new TreeViewItem { Header = Path.GetFileName(jarPath), Tag = null, IsExpanded = true };
foreach (var entry in archive.Entries.OrderBy(e => e.FullName))
{
var parts = entry.FullName.Split(new[] { '/' }, System.StringSplitOptions.RemoveEmptyEntries);
TreeViewItem parent = root;
for (int i = 0; i < parts.Length; i++)
{
string part = parts[i];
bool isLast = i == parts.Length - 1;
TreeViewItem? existing = parent.Items.OfType<TreeViewItem>().FirstOrDefault(x => (string)x.Header == part);
if (existing == null)
{
var node = new TreeViewItem { Header = part };
if (isLast && !entry.FullName.EndsWith("/"))
{
node.Tag = entry.FullName;
}
parent.Items.Add(node);
parent = node;
}
else
{
parent = existing;
}
}
}
return new List<TreeViewItem> { root };
}
public static bool IsImage(string path)
{
string[] exts = { ".png", ".jpg", ".jpeg", ".bmp", ".gif", ".ico" };
return exts.Any(e => path.EndsWith(e, System.StringComparison.OrdinalIgnoreCase));
}
public static BitmapImage? ExtractImage(string jarPath, string entryPath)
{
try
{
using var archive = ZipFile.OpenRead(jarPath);
var entry = archive.GetEntry(entryPath);
if (entry == null)
{
return null;
}
using var s = entry.Open();
using var ms = new MemoryStream();
s.CopyTo(ms);
ms.Position = 0;
var img = new BitmapImage();
img.BeginInit();
img.StreamSource = ms;
img.CacheOption = BitmapCacheOption.OnLoad;
img.EndInit();
img.Freeze();
return img;
}
catch
{
return null;
}
}
public static List<TreeViewItem>? ExtractStructureFromInnerJar(string mainJar, string innerJarEntry)
{
try
{
using var outer = ZipFile.OpenRead(mainJar);
var entry = outer.GetEntry(innerJarEntry);
if (entry == null)
{
return null;
}
string temp = Path.Combine(Path.GetTempPath(), "EonaCat.JavaDecompile", Path.GetRandomFileName());
Directory.CreateDirectory(temp);
string innerPath = Path.Combine(temp, Path.GetFileName(innerJarEntry));
using var s = entry.Open();
using var fs = File.Create(innerPath);
s.CopyTo(fs);
fs.Close();
return ExtractStructure(innerPath);
}
catch
{
return null;
}
}
public static string ReadTextFromJar(string jarPath, string entryPath)
{
try
{
using var archive = ZipFile.OpenRead(jarPath);
var entry = archive.GetEntry(entryPath);
if (entry == null)
{
return "// File not found";
}
using var stream = entry.Open();
if (IsBinary(entry.FullName))
{
return $"[{entry.FullName}] Binary file ({entry.Length} bytes)";
}
using var reader = new StreamReader(stream, Encoding.UTF8, true);
return reader.ReadToEnd();
}
catch
{
return "// Error reading file";
}
}
static bool IsBinary(string path)
{
string[] exts = { ".class", ".jar" };
return exts.Any(e => path.EndsWith(e, System.StringComparison.OrdinalIgnoreCase));
}
public static string DecompileClass(string jarPath, string classPath)
{
try
{
string tmp = Path.Combine(Path.GetTempPath(), "EonaCat.JavaDecompile", Path.GetRandomFileName());
Directory.CreateDirectory(tmp);
string cls = Path.Combine(tmp, Path.GetFileName(classPath));
string outDir = Path.Combine(tmp, "out");
Directory.CreateDirectory(outDir);
using (var arc = ZipFile.OpenRead(jarPath))
{
var entry = arc.GetEntry(classPath);
if (entry == null)
{
return "// Class not found";
}
using var s = entry.Open();
using var fs = File.Create(cls);
s.CopyTo(fs);
}
string cfr = Path.Combine(AppContext.BaseDirectory, "assets", "external", "cfr.jar");
if (!File.Exists(cfr))
{
return "// CFR not found";
}
var psi = new ProcessStartInfo
{
FileName = "java",
Arguments = $"-jar \"{cfr}\" \"{cls}\" --outputdir \"{outDir}\"",
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true
};
using var p = Process.Start(psi);
p?.WaitForExit();
string baseName = Path.GetFileNameWithoutExtension(classPath);
string f = Directory.GetFiles(outDir, $"{baseName}.java", SearchOption.AllDirectories).FirstOrDefault();
return f != null ? File.ReadAllText(f, Encoding.UTF8) : "// Decompiled file not found";
}
catch
{
return "// Error decompiling class";
}
}
}
+17 -69
View File
@@ -1,73 +1,21 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
MIT License
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
Copyright (c) 2026 Your Organization
1. Definitions.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright 2026 EonaCat
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+451
View File
@@ -0,0 +1,451 @@
<Window x:Class="EonaCat.JavaDecompile.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:editor="clr-namespace:EonaCat.Editor.Core;assembly=EonaCat.Editor"
Title="EonaCat.JavaDecompile"
Height="760" Width="1360"
WindowStyle="None"
Background="Transparent"
AllowsTransparency="True"
ResizeMode="CanResizeWithGrip"
Drop="OnDropJar"
PreviewDragOver="OnPreviewDragOver"
AllowDrop="True"
FontFamily="Cascadia Code">
<Window.Resources>
<!-- ===== Palette (CRT / disassembler inspired) ===== -->
<SolidColorBrush x:Key="BgBase" Color="#0B0B0C"/>
<SolidColorBrush x:Key="BgPanel" Color="#141416"/>
<SolidColorBrush x:Key="BgPanelAlt" Color="#1A1A1D"/>
<SolidColorBrush x:Key="BgField" Color="#1D1D20"/>
<SolidColorBrush x:Key="BorderHair" Color="#26262A"/>
<SolidColorBrush x:Key="BorderHairLt" Color="#333338"/>
<SolidColorBrush x:Key="Amber" Color="#FFB020"/>
<SolidColorBrush x:Key="AmberDim" Color="#8A5A12"/>
<SolidColorBrush x:Key="AmberFaint" Color="#2A2114"/>
<SolidColorBrush x:Key="TextPrimary" Color="#E8E6E1"/>
<SolidColorBrush x:Key="TextDim" Color="#8B8B90"/>
<SolidColorBrush x:Key="TextFaint" Color="#565659"/>
<SolidColorBrush x:Key="StatusOk" Color="#6FCF97"/>
<SolidColorBrush x:Key="StatusWarn" Color="#FF5C5C"/>
<!-- ===== Window chrome buttons (min / max / close) ===== -->
<Style x:Key="ChromeBtn" TargetType="Button">
<Setter Property="Width" Value="42"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{StaticResource TextDim}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FontFamily" Value="Cascadia Code"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Bg" Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bg" Property="Background" Value="#1E1E21"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ChromeCloseBtn" TargetType="Button" BasedOn="{StaticResource ChromeBtn}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Bg" Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bg" Property="Background" Value="#5A1F1F"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===== Flat action button (Open JAR / toolbar) ===== -->
<Style x:Key="FlatAction" TargetType="Button">
<Setter Property="Background" Value="{StaticResource BgField}"/>
<Setter Property="Foreground" Value="{StaticResource TextPrimary}"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderHairLt}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="12,0"/>
<Setter Property="Height" Value="32"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FontFamily" Value="Cascadia Code"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="B" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="{TemplateBinding Padding}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="B" Property="BorderBrush" Value="{StaticResource Amber}"/>
<Setter TargetName="B" Property="Background" Value="{StaticResource AmberFaint}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="B" Property="Background" Value="#332711"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===== Ghost icon button (toolbar copy / wrap) ===== -->
<Style x:Key="GhostIconBtn" TargetType="Button">
<Setter Property="Width" Value="30"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="B" Background="{TemplateBinding Background}" CornerRadius="4">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="B" Property="Background" Value="{StaticResource BgField}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===== Search / filter box ===== -->
<Style x:Key="SearchBox" TargetType="TextBox">
<Setter Property="Background" Value="{StaticResource BgField}"/>
<Setter Property="Foreground" Value="{StaticResource TextPrimary}"/>
<Setter Property="CaretBrush" Value="{StaticResource Amber}"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderHairLt}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="8,0,28,0"/>
<Setter Property="Height" Value="30"/>
<Setter Property="FontFamily" Value="Cascadia Code"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border x:Name="B" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
<ScrollViewer x:Name="PART_ContentHost" Margin="{TemplateBinding Padding}" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter TargetName="B" Property="BorderBrush" Value="{StaticResource AmberDim}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===== TreeView theme ===== -->
<Style x:Key="AmberTreeItem" TargetType="TreeViewItem">
<Setter Property="Foreground" Value="{StaticResource TextPrimary}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Padding" Value="4,3"/>
<Setter Property="FontSize" Value="12.5"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TreeViewItem">
<StackPanel>
<Border x:Name="Bd" Background="{TemplateBinding Background}" CornerRadius="3"
BorderThickness="0,0,0,0">
<Grid Margin="2,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ToggleButton x:Name="Expander"
IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}"
ClickMode="Press" Width="16" Margin="2,0,2,0">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<TextBlock x:Name="Arrow" Text="&#9656;" Foreground="{StaticResource TextFaint}"
FontSize="10" RenderTransformOrigin="0.5,0.5"/>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Arrow" Property="Text" Value="&#9662;"/>
<Setter TargetName="Arrow" Property="Foreground" Value="{StaticResource Amber}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<ContentPresenter x:Name="Head" Grid.Column="1" ContentSource="Header"
VerticalAlignment="Center" Margin="2,4,0,4"/>
</Grid>
</Border>
<ItemsPresenter x:Name="Items" Margin="18,0,0,0"/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="False">
<Setter TargetName="Items" Property="Visibility" Value="Collapsed"/>
</Trigger>
<Trigger Property="HasItems" Value="False">
<Setter TargetName="Expander" Property="Visibility" Value="Hidden"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{StaticResource AmberFaint}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#1D1D20"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===== Thin dark scrollbars ===== -->
<Style TargetType="ScrollBar">
<Setter Property="Width" Value="10"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollBar">
<Grid Background="Transparent">
<Track x:Name="PART_Track" IsDirectionReversed="True">
<Track.Thumb>
<Thumb>
<Thumb.Template>
<ControlTemplate TargetType="Thumb">
<Border Background="#3A3A3E" CornerRadius="4" Margin="2"/>
</ControlTemplate>
</Thumb.Template>
</Thumb>
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Margin="14">
<Border x:Name="Root" CornerRadius="10" Background="{StaticResource BgBase}"
BorderBrush="{StaticResource BorderHair}" BorderThickness="1">
<Border.Effect>
<DropShadowEffect Color="#000000" Opacity="0.55" BlurRadius="28" ShadowDepth="6" Direction="270"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="52"/>
<RowDefinition Height="1"/>
<RowDefinition Height="*"/>
<RowDefinition Height="26"/>
</Grid.RowDefinitions>
<!-- ================= TITLE BAR ================= -->
<Grid Grid.Row="0" Background="{StaticResource BgPanel}" MouseDown="DragWindow">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="16,0,0,0">
<Image x:Name="IconLogo" Height="20" Width="20" Margin="0,0,10,0"/>
<TextBlock Text="EONACAT" Foreground="{StaticResource TextPrimary}" FontWeight="Bold" FontSize="13" VerticalAlignment="Center"/>
<TextBlock Text="/" Foreground="{StaticResource TextFaint}" Margin="6,0" VerticalAlignment="Center"/>
<TextBlock Text="JavaDecompile" Foreground="{StaticResource Amber}" FontSize="13" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="18,0,0,0">
<Button Style="{StaticResource FlatAction}" Click="OpenJarClick">
<StackPanel Orientation="Horizontal">
<Image x:Name="IconFile" Width="14" Height="14" Margin="0,0,7,0"/>
<TextBlock Text="OPEN JAR" VerticalAlignment="Center"/>
</StackPanel>
</Button>
</StackPanel>
<!-- Breadcrumb of the currently viewed class -->
<TextBlock x:Name="BreadcrumbText"
Grid.Column="2"
Text="no file loaded"
Foreground="{StaticResource TextDim}"
FontSize="12"
VerticalAlignment="Center"
HorizontalAlignment="Center"
TextTrimming="CharacterEllipsis"/>
<StackPanel Grid.Column="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,6,0">
<Button Style="{StaticResource ChromeBtn}" Click="ToggleMaximize" Content="&#xE922;" FontFamily="Segoe MDL2 Assets" FontSize="11"/>
<Button Style="{StaticResource ChromeCloseBtn}" Click="CloseApp" Content="&#xE8BB;" FontFamily="Segoe MDL2 Assets" FontSize="11"/>
</StackPanel>
</Grid>
<Rectangle Grid.Row="1" Fill="{StaticResource BorderHair}"/>
<!-- ================= BODY ================= -->
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- ===== Sidebar ===== -->
<Grid Grid.Column="0" Background="{StaticResource BgPanel}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Margin="10,10,10,8">
<TextBox x:Name="FilterBox" Style="{StaticResource SearchBox}" TextChanged="FilterBox_TextChanged"/>
<TextBlock Text="filter classes..." Foreground="{StaticResource TextFaint}"
FontSize="12" Margin="10,0,0,0" VerticalAlignment="Center" IsHitTestVisible="False">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<DataTrigger Binding="{Binding Text.Length, ElementName=FilterBox}" Value="0">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
<DataTrigger Binding="{Binding Text.Length, ElementName=FilterBox}" Value="0" >
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</TextBlock.Style>
</TextBlock>
<Image x:Name="IconFilter" Height="13" Width="13"
HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" IsHitTestVisible="False"/>
</Grid>
<TreeView x:Name="JarTree" Grid.Row="1"
Background="Transparent"
BorderThickness="0"
Margin="4,0,0,6"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
Foreground="{StaticResource TextPrimary}"
FontSize="12.5"
ItemContainerStyle="{StaticResource AmberTreeItem}"
SelectedItemChanged="JarTree_SelectedItemChanged"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.VirtualizationMode="Recycling"
ScrollViewer.CanContentScroll="True"
SnapsToDevicePixels="True"/>
</Grid>
<Rectangle Grid.Column="1" Fill="{StaticResource BorderHair}"/>
<!-- ===== Main viewer ===== -->
<Grid Grid.Column="2" Background="{StaticResource BgBase}">
<Grid.RowDefinitions>
<RowDefinition Height="42"/>
<RowDefinition Height="1"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Toolbar -->
<Grid Grid.Row="0" Margin="14,0,10,0">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Ellipse Width="7" Height="7" Fill="{StaticResource Amber}" VerticalAlignment="Center" Margin="0,0,9,0"/>
<TextBlock x:Name="ViewerTitleText" Text="Java Code / Resource View"
Foreground="{StaticResource TextPrimary}" FontWeight="SemiBold" FontSize="12.5" VerticalAlignment="Center"/>
</StackPanel>
</Grid>
<Rectangle Grid.Row="1" Fill="{StaticResource BorderHair}"/>
<Grid Grid.Row="2">
<editor:TextEditor x:Name="CodeViewer"
ShowLineNumbers="True"
IsReadOnly="True"
FontFamily="Cascadia Code"
FontSize="13.5"
Foreground="{StaticResource TextPrimary}"
Background="{StaticResource BgBase}"
TextOptions.TextFormattingMode="Display"
LineNumbersForeground="{StaticResource AmberDim}"
BorderThickness="0"
Padding="14,10,10,10"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"/>
<Image x:Name="ImageViewer"
Stretch="Uniform"
Visibility="Collapsed"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
<!-- Empty state: signature "waiting cursor" -->
<StackPanel x:Name="EmptyState" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
<TextBlock Text="drop a .jar or " Foreground="{StaticResource TextFaint}" FontSize="13"/>
<TextBlock Text="open one" Foreground="{StaticResource TextDim}" FontSize="13" TextDecorations="Underline"/>
<TextBlock Text=" to begin" Foreground="{StaticResource TextFaint}" FontSize="13" Margin="0,0,6,0"/>
<Rectangle x:Name="BlinkCaret" Width="8" Height="16" Fill="{StaticResource Amber}">
<Rectangle.Triggers>
<EventTrigger RoutedEvent="Rectangle.Loaded">
<BeginStoryboard>
<Storyboard RepeatBehavior="Forever">
<DoubleAnimation Storyboard.TargetProperty="Opacity"
From="1" To="0" Duration="0:0:0.55" AutoReverse="True"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Rectangle.Triggers>
</Rectangle>
</StackPanel>
</Grid>
</Grid>
</Grid>
<!-- ================= STATUS BAR ================= -->
<Grid Grid.Row="3" Background="{StaticResource BgPanel}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="14,0,0,0" VerticalAlignment="Center">
<Ellipse x:Name="StatusDot" Width="6" Height="6" Fill="{StaticResource StatusOk}" VerticalAlignment="Center" Margin="0,0,7,0"/>
<TextBlock x:Name="StatusText" Text="Ready" Foreground="{StaticResource TextDim}" FontSize="11"/>
</StackPanel>
<TextBlock x:Name="ClassCountText" Grid.Column="1" Text="" Foreground="{StaticResource TextFaint}"
FontSize="11" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock x:Name="JarSizeText" Grid.Column="2" Text="" Foreground="{StaticResource TextFaint}"
FontSize="11" Margin="0,0,14,0" VerticalAlignment="Center"/>
</Grid>
</Grid>
</Border>
</Grid>
</Window>
+317
View File
@@ -0,0 +1,317 @@
using EonaCat.Editor.Language.Highlighting;
using EonaCat.Editor.Language.Highlighting.Eeh;
using Microsoft.Win32;
using System.Diagnostics;
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Xml;
namespace EonaCat.JavaDecompile;
public partial class MainWindow : Window
{
string? jarPath;
bool maximized;
List<TreeViewItem>? OriginalTree;
public MainWindow()
{
InitializeComponent();
LoadIcons();
LoadCustomJavaTheme();
Loaded += AnimateIntro;
}
void AnimateIntro(object s, RoutedEventArgs e)
{
var a = new DoubleAnimation(0, 1, new Duration(System.TimeSpan.FromSeconds(0.6)));
BeginAnimation(OpacityProperty, a);
}
void LoadIcons()
{
string basePath = Path.Combine(AppContext.BaseDirectory, "assets", "external", "icons");
void SetIcon(Image img, string file)
{
var p = Path.Combine(basePath, file);
if (File.Exists(p))
{
var bmp = new BitmapImage();
bmp.BeginInit();
bmp.UriSource = new System.Uri(p, System.UriKind.Absolute);
bmp.CacheOption = BitmapCacheOption.OnLoad;
bmp.EndInit();
img.Source = bmp;
}
}
SetIcon(IconLogo, "icon.png");
SetIcon(IconFile, "extension.png");
//SetIcon(IconCode, "code_page.png");
SetIcon(IconFilter, "filter.png");
//SetIcon(IconFull, "full.png");
//SetIcon(IconClose, "close.png");
}
void LoadCustomJavaTheme()
{
var theme = Path.Combine(AppContext.BaseDirectory, "assets", "external", "themes", "EonaCat.JavaDecompile.eeh");
if (!File.Exists(theme))
{
return;
}
using var reader = XmlReader.Create(theme);
var definition = HighlightsLoader.Load(reader, HighlightsManager.Instance);
HighlightsManager.Instance.RegisterHighlights("EonaCat.JavaDecompile", new[] { ".java" }, definition);
CodeViewer.SyntaxHighlights = definition;
}
void OpenJarClick(object s, RoutedEventArgs e)
{
var d = new OpenFileDialog { Filter = "JARfiles(*.jar)|*.jar" };
if (d.ShowDialog() == true)
{
jarPath = d.FileName;
LoadJar(jarPath);
}
}
void LoadJar(string path)
{
JarTree.Items.Clear();
OriginalTree = JarProcessor.ExtractStructure(path);
foreach (var item in OriginalTree)
{
JarTree.Items.Add(item);
}
EmptyState.Visibility = Visibility.Collapsed;
}
void FilterBox_TextChanged(object s, TextChangedEventArgs e)
{
if (OriginalTree == null)
{
return;
}
string query = FilterBox.Text.Trim().ToLower();
JarTree.Items.Clear();
if (string.IsNullOrEmpty(query))
{
foreach (var node in OriginalTree)
{
JarTree.Items.Add(node);
}
return;
}
var filtered = new List<TreeViewItem>();
foreach (var node in OriginalTree)
{
var result = FilterTree(node, query);
if (result != null)
{
filtered.Add(result);
}
}
foreach (var n in filtered)
{
JarTree.Items.Add(n);
}
}
TreeViewItem? FilterTree(TreeViewItem node, string query)
{
bool match = node.Header.ToString()!.ToLower().Contains(query);
var matches = new List<TreeViewItem>();
foreach (TreeViewItem child in node.Items)
{
var res = FilterTree(child, query);
if (res != null)
{
matches.Add(res);
}
}
if (match || matches.Count > 0)
{
var clone = new TreeViewItem { Header = node.Header, Tag = node.Tag };
foreach (var m in matches)
{
clone.Items.Add(m);
}
return clone;
}
return null;
}
void JarTree_SelectedItemChanged(object s, RoutedPropertyChangedEventArgs<object> e)
{
if (jarPath == null)
{
return;
}
if (e.NewValue is not TreeViewItem item)
{
return;
}
if (item.Tag is not string entryPath || string.IsNullOrWhiteSpace(entryPath))
{
return;
}
string ext = System.IO.Path.GetExtension(entryPath).ToLower();
if (ext == ".class")
{
ShowCode(JarProcessor.DecompileClass(jarPath, entryPath));
return;
}
if (JarProcessor.IsImage(entryPath))
{
var img = JarProcessor.ExtractImage(jarPath, entryPath);
if (img != null)
{
ShowImage(img);
}
else
{
ShowCode("// Image could not be loaded");
}
return;
}
if (ext == ".jar")
{
if (item.Items.Count == 0)
{
var sub = JarProcessor.ExtractStructureFromInnerJar(jarPath, entryPath);
if (sub != null)
{
foreach (var node in sub)
{
item.Items.Add(node);
}
item.IsExpanded = true;
}
else
{
ShowCode("// Could not open inner JAR");
}
}
return;
}
ShowCode(JarProcessor.ReadTextFromJar(jarPath, entryPath));
}
void ShowCode(string text)
{
ImageViewer.Visibility = Visibility.Collapsed;
CodeViewer.Visibility = Visibility.Visible;
CodeViewer.ApplyTemplate();
CodeViewer.Text = text;
CodeViewer.ScrollToHome();
// Run post-layout work at Loaded priority so the control is measured/arranged.
CodeViewer.Dispatcher.BeginInvoke(new Action(() => {
try {
var ta = CodeViewer.TextArea;
if (ta != null) {
var tv = ta.TextView;
if (tv != null) {
try {
tv.EnsureVisualLines();
} catch (Exception ex) { Debug.WriteLine("EnsureVisualLines scheduled failed: " + ex.Message); }
}
}
} catch (Exception ex) { Debug.WriteLine("ShowCode scheduled work failed: " + ex.Message); }
}), System.Windows.Threading.DispatcherPriority.Loaded);
}
void ShowImage(BitmapImage? img)
{
if (img == null)
{
return;
}
CodeViewer.Visibility = Visibility.Collapsed;
ImageViewer.Visibility = Visibility.Visible;
ImageViewer.Source = img;
}
void DragWindow(object s, MouseButtonEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed)
{
DragMove();
}
}
void ToggleMaximize(object s, RoutedEventArgs e)
{
double targetScale = maximized ? 1.0 : 1.04;
var scale = new System.Windows.Media.ScaleTransform(1, 1);
Root.RenderTransformOrigin = new Point(0.5, 0.5);
Root.RenderTransform = scale;
var anim = new DoubleAnimation(targetScale, new Duration(System.TimeSpan.FromMilliseconds(300)))
{
EasingFunction = new QuadraticEase { EasingMode = EasingMode.EaseOut },
AutoReverse = true
};
scale.BeginAnimation(System.Windows.Media.ScaleTransform.ScaleXProperty, anim);
scale.BeginAnimation(System.Windows.Media.ScaleTransform.ScaleYProperty, anim);
if (maximized)
{
WindowState = WindowState.Normal;
Root.Margin = new Thickness(0);
maximized = false;
}
else
{
WindowState = WindowState.Maximized;
Root.Margin = new Thickness(6);
maximized = true;
}
}
void CloseApp(object s, RoutedEventArgs e) => Close();
void OnDropJar(object s, DragEventArgs e)
{
if (!e.Data.GetDataPresent(DataFormats.FileDrop))
{
return;
}
var files = (string[])e.Data.GetData(DataFormats.FileDrop);
var jar = files.FirstOrDefault(f => f.EndsWith(".jar"));
if (jar == null)
{
return;
}
jarPath = jar;
LoadJar(jarPath);
}
void OnPreviewDragOver(object s, DragEventArgs e)
{
e.Handled = true;
e.Effects = DragDropEffects.Copy;
}
}
+3 -1
View File
@@ -1,3 +1,5 @@
# EonaCat.JavaDecompile
EonaCat.JavaDecompile
EonaCat.JavaDecompile
Decompile any Java jar file! (Android also supported)
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

+31
View File
@@ -0,0 +1,31 @@
<SyntaxDefinition name="EonaCat.JavaDecompile" xmlns="https://EonaCat.com/void">
<Color name="Default" foreground="#00FFCC"/>
<Color name="Keyword" foreground="#FF78C6"/>
<Color name="Type" foreground="#FFCB6B"/>
<Color name="String" foreground="#C3E88D"/>
<Color name="Comment" foreground="#5C6370"/>
<Color name="Number" foreground="#F78C6C"/>
<RuleSet ignoreCase="false">
<Span color="Comment" begin="/\*" end="\*/"/>
<Span color="Comment" begin="//" end="\n"/>
<Span color="String" begin="&quot;" end="&quot;"/>
<Keywords color="Keyword">
<Word>class</Word>
<Word>public</Word>
<Word>private</Word>
<Word>protected</Word>
<Word>static</Word>
<Word>void</Word>
<Word>new</Word>
<Word>return</Word>
<Word>if</Word>
<Word>else</Word>
<Word>import</Word>
<Word>package</Word>
<Word>implements</Word>
<Word>extends</Word>
</Keywords>
<Rule color="Number">\b[0-9]+(\.[0-9]+)?\b</Rule>
</RuleSet>
</SyntaxDefinition>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB