Skip to content

Commit 39944e8

Browse files
committed
Branding
Change Java DisAssembler to JDA Minor changes to window titles Delete CommandLineInput (will be rewritten) Delete useless line in SecurityMan Add "Help" window to display the intro text Update about window
1 parent 1ef68b0 commit 39944e8

File tree

11 files changed

+97
-243
lines changed

11 files changed

+97
-243
lines changed

src/main/java/the/bytecode/club/jda/Boot.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static void boot() throws Exception
3333

3434
public static void setState(BootSequence s)
3535
{
36-
screen.setTitle("Initialzing Java DisAssembler - " + s.getMessage());
36+
screen.setTitle("Initialzing JDA - " + s.getMessage());
3737
screen.getProgressBar().setValue(s.ordinal());
3838
System.out.println(s.getMessage());
3939
}

src/main/java/the/bytecode/club/jda/CommandLineInput.java

Lines changed: 0 additions & 199 deletions
This file was deleted.

src/main/java/the/bytecode/club/jda/InitialBootScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ else if (i >= 440)
3333
else
3434
setSize(Toolkit.getDefaultToolkit().getScreenSize());
3535

36-
setTitle("Java DisAssembler Boot Screen - Starting Up");
36+
setTitle("JDA - Loading");
3737
GridBagLayout gridBagLayout = new GridBagLayout();
3838
gridBagLayout.columnWidths = new int[] { 0, 0 };
3939
gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

src/main/java/the/bytecode/club/jda/JDA.java

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ public static void main(String[] args)
6363
try
6464
{
6565
System.setSecurityManager(sm);
66-
System.out.println("Java DisAssembler (BCV Fork) " + version);
67-
CommandLineInput input = new CommandLineInput(args);
68-
if (previewCopy && !input.containsCommand())
66+
System.out.println("JDA (BCV Fork) v" + version);
67+
if (previewCopy)
6968
showMessage("WARNING: This is a preview/dev copy, you WON'T be alerted when " + version + " is actually out if you use this." + nl +
7069
"Make sure to watch the repo: https://github.com/ecx86/jda for " + version + "'s release");
7170
getJDADirectory();
@@ -74,21 +73,10 @@ public static void main(String[] args)
7473
throw new RuntimeException("Could not create recent files file");
7574
}
7675
recentFiles.addAll(FileUtils.readLines(filesFile, "UTF-8"));
77-
int CLI = input.parseCommandLine();
78-
if (CLI == CommandLineInput.STOP)
79-
return;
80-
if (CLI == CommandLineInput.OPEN_FILE)
81-
{
82-
Settings.loadGUI();
83-
viewer = new MainViewerGUI();
84-
Boot.boot();
85-
JDA.BOOT(args, false);
86-
}
87-
else
88-
{
89-
JDA.BOOT(args, true);
90-
input.executeCommandLine();
91-
}
76+
Settings.loadGUI();
77+
viewer = new MainViewerGUI();
78+
Boot.boot();
79+
JDA.boot(args, false);
9280
}
9381
catch (Exception e)
9482
{
@@ -113,7 +101,7 @@ public void run()
113101
*
114102
* @param cli is it running CLI mode or not
115103
*/
116-
public static void BOOT(String[] args, boolean cli)
104+
public static void boot(String[] args, boolean cli)
117105
{
118106
cleanup();
119107
Runtime.getRuntime().addShutdownHook(new Thread()
@@ -458,7 +446,7 @@ public static void resetWorkSpace(boolean ask)
458446
JOptionPane pane = new JOptionPane("Are you sure you want to reset the workspace?\n\rIt will also reset your file navigator and search.");
459447
Object[] options = new String[] { "Yes", "No" };
460448
pane.setOptions(options);
461-
JDialog dialog = pane.createDialog(viewer, "Java DisAssembler - Reset Workspace");
449+
JDialog dialog = pane.createDialog(viewer, "JDA - Reset Workspace");
462450
dialog.setVisible(true);
463451
Object obj = pane.getValue();
464452
int result = -1;
@@ -729,7 +717,7 @@ public String getDescription()
729717
JOptionPane pane = new JOptionPane("Are you sure you wish to overwrite this existing file?");
730718
Object[] options = new String[] { "Yes", "No" };
731719
pane.setOptions(options);
732-
JDialog dialog = pane.createDialog(JDA.viewer, "Java DisAssembler - Overwrite File");
720+
JDialog dialog = pane.createDialog(JDA.viewer, "JDA - Overwrite File");
733721
dialog.setVisible(true);
734722
Object obj = pane.getValue();
735723
int result = -1;

src/main/java/the/bytecode/club/jda/SecurityMan.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ public void stopBlocking()
2424
if (executedClass.equals("CFRDecompiler") ||
2525
executedClass.equals("ProcyonDecompiler") ||
2626
executedClass.equals("FernFlowerDecompiler") ||
27-
executedClass.equals("JDA") ||
28-
executedClass.equals("the.bytecode.club.bytecodeviewer.compilers.JavaCompiler"))
27+
executedClass.equals("JDA"))
2928
{
3029
blocking = false;
3130
}

src/main/java/the/bytecode/club/jda/api/ExceptionUI.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private void setup(Throwable e, String author)
5757
{
5858
this.setIconImages(Resources.iconList);
5959
setSize(new Dimension(600, 400));
60-
setTitle("Java DisAssembler " + JDA.version + " - Stack Trace - Send this to " + author);
60+
setTitle("JDA v" + JDA.version + " - Stack Trace - Send this to " + author);
6161
getContentPane().setLayout(new CardLayout(0, 0));
6262

6363
JTextArea txtrBytecodeViewerIs = new JTextArea();
@@ -68,7 +68,7 @@ private void setup(Throwable e, String author)
6868
e.printStackTrace(new PrintWriter(sw));
6969
e.printStackTrace();
7070

71-
txtrBytecodeViewerIs.setText("Java DisAssembler Version: " + JDA.version +
71+
txtrBytecodeViewerIs.setText("JDA v" + JDA.version +
7272
", Preview Copy: " + JDA.previewCopy +
7373
JDA.nl + JDA.nl + sw.toString());
7474
this.setLocationRelativeTo(null);
@@ -79,7 +79,7 @@ private void setup(String e, String author)
7979
{
8080
this.setIconImages(Resources.iconList);
8181
setSize(new Dimension(600, 400));
82-
setTitle("Java DisAssembler " + JDA.version + " - Stack Trace - Send this to " + author);
82+
setTitle("JDA v" + JDA.version + " - Stack Trace - Send this to " + author);
8383
getContentPane().setLayout(new CardLayout(0, 0));
8484

8585
JTextArea txtrBytecodeViewerIs = new JTextArea();

src/main/java/the/bytecode/club/jda/decompilers/Decompiler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected String parseException(Throwable e)
7979
StringWriter sw = new StringWriter();
8080
e.printStackTrace(new PrintWriter(sw));
8181
e.printStackTrace();
82-
String exception = "Java DisAssembler Version: " + JDA.version + JDA.nl + JDA.nl + sw.toString();
82+
String exception = "JDA v" + JDA.version + JDA.nl + JDA.nl + sw.toString();
8383
return getName() + " encountered a problem! Send the stacktrace to https://github.com/ecx86/jda/issues" + JDA.nl +
8484
JDA.nl +
8585
"Suggested Fix: Click refresh class, if it fails again try another decompiler." + JDA.nl +

src/main/java/the/bytecode/club/jda/gui/AboutWindow.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package the.bytecode.club.jda.gui;
22

33
import org.apache.commons.io.IOUtils;
4+
import the.bytecode.club.jda.JDA;
45
import the.bytecode.club.jda.Resources;
56

67
import javax.swing.*;
@@ -21,24 +22,26 @@ public class AboutWindow extends JFrame
2122
public AboutWindow()
2223
{
2324
this.setIconImages(Resources.iconList);
24-
setSize(new Dimension(800, 800));
25+
setSize(new Dimension(400, 400));
2526
setType(Type.UTILITY);
26-
setTitle("Java DisAssembler - About - https://the.bytecode.club");
27+
setTitle("JDA - About");
2728
getContentPane().setLayout(new CardLayout(0, 0));
2829
this.setResizable(false);
2930
this.setLocationRelativeTo(null);
3031

3132
JScrollPane scrollPane = new JScrollPane();
3233
scrollPane.setHorizontalScrollBar(null);
3334

34-
getContentPane().add(scrollPane, "name_322439757638784");
35+
getContentPane().add(scrollPane);
3536
editorPane = new JEditorPane();
3637
editorPane.setEditorKit(new HTMLEditorKit());
3738
editorPane.setContentType("text/html");
3839
editorPane.setEditable(false);
3940
try
4041
{
41-
editorPane.setText(IOUtils.toString(Resources.class.getResourceAsStream("/intro.html"), "UTF-8"));
42+
String text = IOUtils.toString(Resources.class.getResourceAsStream("/about.html"), "UTF-8");
43+
text = text.replace("$JDA_VERSION$", JDA.version + (JDA.previewCopy ? " (preview)" : ""));
44+
editorPane.setText(text);
4245
}
4346
catch (IOException e)
4447
{

0 commit comments

Comments
 (0)