Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements #13

Merged
merged 22 commits into from
Sep 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8e0da9e
Fixed zero length files issue at Save/Save All
Feb 3, 2014
8a885ec
Refresh settings before Save All
Feb 3, 2014
18616fb
ExcludeNestedTypes setting fixed
Feb 3, 2014
04620f0
File size limits in order to prevent freezing (1GB for open .jar-s, 1MB
zerdei Feb 4, 2014
8abe281
Do not open binary files on textArea, but write info to status bar
zerdei Feb 4, 2014
7de43d2
Resource leak fixed: old Model.hmap elements remained in memory
zerdei Feb 4, 2014
8f324c3
Show progress information for opening a tab
zerdei Feb 4, 2014
5535f19
Hide/show FindBox, dont create new (hide: Esc or click on Main window)
zerdei Feb 4, 2014
4a99d7d
Bugfix: Edit/SelectAll & Find throws Exception if there is no open tab.
zerdei Feb 4, 2014
8baf680
Save settings by java.util.prefs.Preferences
zerdei Feb 4, 2014
aeba433
Save position/size of main window and FindBox
zerdei Feb 4, 2014
336a076
Save Theme and FileOpen/Save dialogs last directory
zerdei Feb 4, 2014
4999971
Code Outsourcing from Model.java
zerdei Feb 5, 2014
9c2362b
Open file from command line (or as a Total Commander external viewer)
zerdei Feb 5, 2014
7813fd8
Speed up a little
zerdei Feb 5, 2014
7c18224
Apply changes in Settings immediately on opened classes
zerdei Feb 6, 2014
d892afd
New selectable option: Single Click Open (Operation menu)
zerdei Feb 6, 2014
81ffa66
New selectable option: Exit By Esc
zerdei Feb 6, 2014
30da5c4
New selectable option: Package Explorer Style
zerdei Feb 6, 2014
b3ca993
New selectable option: Filter Out Inner Class Entries
zerdei Feb 6, 2014
a4f11aa
Apply "Filter Out Inner Class Entries" to Save All
zerdei Feb 6, 2014
86ca2f2
Show open jar name in window title
zerdei Feb 6, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
294 changes: 147 additions & 147 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,148 +1,148 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>us.deathmarine</groupId>
<artifactId>luyten</artifactId>
<version>0.4.1</version>
<dependencies>
<dependency>
<groupId>com.fifesoft</groupId>
<artifactId>rsyntaxtextarea</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-core</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-expressions</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-reflection</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-compilertools</artifactId>
<version>LATEST</version>
</dependency>
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<build>
<sourceDirectory>src</sourceDirectory>
<finalName>${project.artifactId}-${project.version}-lib</finalName>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptors>
<descriptor>Assembly.xml</descriptor>
</descriptors>
<finalName>${project.artifactId}</finalName>
<archive>
<manifest>
<mainClass>com.modcrafting.luyten.Model</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.bluestemsoftware.open.maven.plugin</groupId>
<artifactId>launch4j-plugin</artifactId>
<version>1.5.0.0</version>
<executions>
<execution>
<id>l4j-gui</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<outfile>target/${project.artifactId}-${project.version}.exe</outfile>
<jar>target/${project.artifactId}-${project.version}.jar</jar>
<errTitle>App Err</errTitle>
<classPath>
<mainClass>com.modcrafting.luyten.Model</mainClass>
</classPath>
<icon>Luyten.ico</icon>
<jre>
<minVersion>1.6.0</minVersion>
<maxVersion>1.8.0</maxVersion>
<initialHeapSize>128</initialHeapSize>
<maxHeapSize>1024</maxHeapSize>
</jre>
<versionInfo>
<fileVersion>0.${project.version}</fileVersion>
<txtFileVersion>0.${project.version}</txtFileVersion>
<fileDescription>Java Decompiler</fileDescription>
<copyright>2014</copyright>
<productVersion>0.${project.version}</productVersion>
<txtProductVersion>0.${project.version}</txtProductVersion>
<productName>${project.artifactId}</productName>
<internalName>${project.artifactId}</internalName>
<originalFilename>Luyten.exe</originalFilename>
</versionInfo>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<show>public</show>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<show>public</show>
</configuration>
</plugin>
</plugins>
</reporting>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>us.deathmarine</groupId>
<artifactId>luyten</artifactId>
<version>0.4.1</version>
<dependencies>
<dependency>
<groupId>com.fifesoft</groupId>
<artifactId>rsyntaxtextarea</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-core</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-expressions</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-reflection</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-compilertools</artifactId>
<version>LATEST</version>
</dependency>
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<build>
<sourceDirectory>src</sourceDirectory>
<finalName>${project.artifactId}-${project.version}-lib</finalName>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptors>
<descriptor>Assembly.xml</descriptor>
</descriptors>
<finalName>${project.artifactId}</finalName>
<archive>
<manifest>
<mainClass>com.modcrafting.luyten.Luyten</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.bluestemsoftware.open.maven.plugin</groupId>
<artifactId>launch4j-plugin</artifactId>
<version>1.5.0.0</version>
<executions>
<execution>
<id>l4j-gui</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<outfile>target/${project.artifactId}-${project.version}.exe</outfile>
<jar>target/${project.artifactId}-${project.version}.jar</jar>
<errTitle>App Err</errTitle>
<classPath>
<mainClass>com.modcrafting.luyten.Luyten</mainClass>
</classPath>
<icon>Luyten.ico</icon>
<jre>
<minVersion>1.6.0</minVersion>
<maxVersion>1.8.0</maxVersion>
<initialHeapSize>128</initialHeapSize>
<maxHeapSize>1024</maxHeapSize>
</jre>
<versionInfo>
<fileVersion>0.${project.version}</fileVersion>
<txtFileVersion>0.${project.version}</txtFileVersion>
<fileDescription>Java Decompiler</fileDescription>
<copyright>2014</copyright>
<productVersion>0.${project.version}</productVersion>
<txtProductVersion>0.${project.version}</txtProductVersion>
<productName>${project.artifactId}</productName>
<internalName>${project.artifactId}</internalName>
<originalFilename>Luyten.exe</originalFilename>
</versionInfo>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<show>public</show>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<show>public</show>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
86 changes: 43 additions & 43 deletions src/com/modcrafting/luyten/CellRenderer.java
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
package com.modcrafting.luyten;
import java.awt.Component;
import java.awt.Toolkit;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JTree;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
public class CellRenderer extends DefaultTreeCellRenderer{
private static final long serialVersionUID = -5691181006363313993L;
Icon pack;
Icon java_image;
Icon file_image;
public CellRenderer(){
this.pack = new ImageIcon(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("/resources/package_obj.png")));
this.java_image = new ImageIcon(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("/resources/java.png")));
this.file_image = new ImageIcon(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("/resources/file.png")));
}
@Override
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
if(node.getChildCount() > 0){
setIcon(this.pack);
}else if(getFileName(node).endsWith(".class") || getFileName(node).endsWith(".java")){
setIcon(this.java_image);
}else{
setIcon(this.file_image);
}
return this;
}
public String getFileName(DefaultMutableTreeNode node){
return (String) node.getUserObject();
}
}
package com.modcrafting.luyten;

import java.awt.Component;
import java.awt.Toolkit;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JTree;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;

public class CellRenderer extends DefaultTreeCellRenderer{
private static final long serialVersionUID = -5691181006363313993L;
Icon pack;
Icon java_image;
Icon file_image;

public CellRenderer(){
this.pack = new ImageIcon(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("/resources/package_obj.png")));
this.java_image = new ImageIcon(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("/resources/java.png")));
this.file_image = new ImageIcon(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("/resources/file.png")));
}

@Override
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
if(node.getChildCount() > 0){
setIcon(this.pack);
}else if(getFileName(node).endsWith(".class") || getFileName(node).endsWith(".java")){
setIcon(this.java_image);
}else{
setIcon(this.file_image);
}

return this;
}

public String getFileName(DefaultMutableTreeNode node){
return ((TreeNodeUserObject) node.getUserObject()).getOriginalName();
}

}
Loading