Skip to content

Commit

Permalink
General Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Konloch committed Aug 21, 2024
1 parent b1933d2 commit 761ef12
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,14 @@ public void refresh(JButton button)

if (bytecodeViewPanel1.decompiler != Decompiler.NONE)
bytecodeViewPanel1.updateThread.startNewThread();

if (bytecodeViewPanel2.decompiler != Decompiler.NONE)
bytecodeViewPanel2.updateThread.startNewThread();

if (bytecodeViewPanel3.decompiler != Decompiler.NONE)
bytecodeViewPanel3.updateThread.startNewThread();
}, "ClassViewer Temp Dump");

dumpBuild.start();

if (isPanel1Editable() || isPanel2Editable() || isPanel3Editable())
Expand Down Expand Up @@ -195,9 +198,11 @@ public static void selectMethod(ClassViewer classViewer, int paneId, Method meth
case 0:
area = classViewer.bytecodeViewPanel1.updateThread.updateUpdaterTextArea;
break;

case 1:
area = classViewer.bytecodeViewPanel2.updateThread.updateUpdaterTextArea;
break;

case 2:
area = classViewer.bytecodeViewPanel3.updateThread.updateUpdaterTextArea;
break;
Expand All @@ -209,17 +214,17 @@ public static void selectMethod(ClassViewer classViewer, int paneId, Method meth
if (methods != null)
{
int methodLine = methods.findMethod(method);

if (methodLine != -1)
{
selectMethod(area, methodLine);
}
}
}
}

public static int getMaxViewLine(RSyntaxTextArea area)
{
Container parent = area.getParent();

if (parent instanceof JViewport)
{
JViewport viewport = (JViewport) parent;
Expand All @@ -234,6 +239,7 @@ public static int getMaxViewLine(RSyntaxTextArea area)
public static int getViewLine(RSyntaxTextArea area)
{
Container parent = area.getParent();

if (parent instanceof JViewport)
{
JViewport viewport = (JViewport) parent;
Expand All @@ -248,6 +254,7 @@ public static int getViewLine(RSyntaxTextArea area)
public static void setViewLine(RSyntaxTextArea area, int line)
{
Container parent = area.getParent();

if (parent instanceof JViewport)
{
JViewport viewport = (JViewport) parent;
Expand Down Expand Up @@ -291,9 +298,7 @@ else if (bytecodeViewPanel2.decompiler != Decompiler.NONE)
sp2.setResizeWeight(0.7);
setDividerLocation(sp2, 0.7);
if ((bytecodeViewPanel2.decompiler == Decompiler.NONE && bytecodeViewPanel1.decompiler != Decompiler.NONE) || (bytecodeViewPanel1.decompiler == Decompiler.NONE && bytecodeViewPanel2.decompiler != Decompiler.NONE))
{
setDividerLocation(sp2, 0.5);
}
else if (bytecodeViewPanel1.decompiler == Decompiler.NONE)
setDividerLocation(sp2, 0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ public interface ITabPopupEventListener {
* @param index, index of tab
* @param e
*/
public void onTabPopupEvent(JTabbedPane tabbedPane, int index, TabPopupEvent e);
void onTabPopupEvent(JTabbedPane tabbedPane, int index, TabPopupEvent e);
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ public interface ITabZeroComponentEventListener {
*
* @param tabbedPane
*/
public void onTabZeroComponent(JTabbedPane tabbedPane);
void onTabZeroComponent(JTabbedPane tabbedPane);
}

0 comments on commit 761ef12

Please sign in to comment.