This commit is contained in:
Konloch 2024-10-01 22:48:03 -06:00
parent dac4cee668
commit c713a203ba

AI 샘플 코드 생성 중입니다

Loading...

View File

@ -136,7 +136,8 @@ public class ClassViewer extends ResourceViewer
Configuration.warnForEditing = true; Configuration.warnForEditing = true;
if (!BytecodeViewer.viewer.autoCompileOnRefresh.isSelected() && !BytecodeViewer.viewer.compileOnSave.isSelected()) if (!BytecodeViewer.viewer.autoCompileOnRefresh.isSelected()
&& !BytecodeViewer.viewer.compileOnSave.isSelected())
{ {
BytecodeViewer.showMessage("Make sure to compile (File>Compile or Ctrl + T) whenever you want to " BytecodeViewer.showMessage("Make sure to compile (File>Compile or Ctrl + T) whenever you want to "
+ "test or export your changes.\nYou can set compile automatically on refresh or on save " + "test or export your changes.\nYou can set compile automatically on refresh or on save "
@ -178,8 +179,10 @@ public class ClassViewer extends ResourceViewer
{ {
case 0: case 0:
return bytecodeViewPanel1; return bytecodeViewPanel1;
case 1: case 1:
return bytecodeViewPanel2; return bytecodeViewPanel2;
case 2: case 2:
return bytecodeViewPanel3; return bytecodeViewPanel3;
} }
@ -285,8 +288,8 @@ public class ClassViewer extends ResourceViewer
public void resetDivider() public void resetDivider()
{ {
/* /*
This may be a bit overkill on how we handle setting/changing selected panels, but we now handle if only one panel is * This may be a bit overkill on how we handle setting/changing selected panels, but we now handle if only one panel is
selected, to not show any split panes but just the panel text. * selected, to not show any split panes but just the panel text.
*/ */
SwingUtilities.invokeLater(() -> SwingUtilities.invokeLater(() ->
@ -302,7 +305,9 @@ public class ClassViewer extends ResourceViewer
setDividerLocation(sp, 0.5); setDividerLocation(sp, 0.5);
/* If panel 1 and panel 2 are ticked but not panel 3 */ /* If panel 1 and panel 2 are ticked but not panel 3 */
if (bytecodeViewPanel1.decompiler != Decompiler.NONE && bytecodeViewPanel2.decompiler != Decompiler.NONE && bytecodeViewPanel3.decompiler == Decompiler.NONE) if (bytecodeViewPanel1.decompiler != Decompiler.NONE
&& bytecodeViewPanel2.decompiler != Decompiler.NONE
&& bytecodeViewPanel3.decompiler == Decompiler.NONE)
{ {
this.sp.setLeftComponent(bytecodeViewPanel1); this.sp.setLeftComponent(bytecodeViewPanel1);
this.sp.setRightComponent(bytecodeViewPanel2); this.sp.setRightComponent(bytecodeViewPanel2);
@ -310,7 +315,9 @@ public class ClassViewer extends ResourceViewer
} }
/* If panel 1 and panel 3 are ticked but not panel 2 */ /* If panel 1 and panel 3 are ticked but not panel 2 */
else if (bytecodeViewPanel1.decompiler != Decompiler.NONE && bytecodeViewPanel2.decompiler == Decompiler.NONE && bytecodeViewPanel3.decompiler != Decompiler.NONE) else if (bytecodeViewPanel1.decompiler != Decompiler.NONE
&& bytecodeViewPanel2.decompiler == Decompiler.NONE
&& bytecodeViewPanel3.decompiler != Decompiler.NONE)
{ {
this.sp.setLeftComponent(bytecodeViewPanel1); this.sp.setLeftComponent(bytecodeViewPanel1);
this.sp.setRightComponent(bytecodeViewPanel3); this.sp.setRightComponent(bytecodeViewPanel3);
@ -318,7 +325,9 @@ public class ClassViewer extends ResourceViewer
} }
/* If panel 2 and panel 3 are ticked but not panel 1 */ /* If panel 2 and panel 3 are ticked but not panel 1 */
else if (bytecodeViewPanel1.decompiler == Decompiler.NONE && bytecodeViewPanel2.decompiler != Decompiler.NONE && bytecodeViewPanel3.decompiler != Decompiler.NONE) else if (bytecodeViewPanel1.decompiler == Decompiler.NONE
&& bytecodeViewPanel2.decompiler != Decompiler.NONE
&& bytecodeViewPanel3.decompiler != Decompiler.NONE)
{ {
this.sp.setLeftComponent(bytecodeViewPanel2); this.sp.setLeftComponent(bytecodeViewPanel2);
this.sp.setRightComponent(bytecodeViewPanel3); this.sp.setRightComponent(bytecodeViewPanel3);
@ -326,7 +335,9 @@ public class ClassViewer extends ResourceViewer
} }
// If all panels are selected, create the second split pane // If all panels are selected, create the second split pane
if (bytecodeViewPanel1.decompiler != Decompiler.NONE && bytecodeViewPanel2.decompiler != Decompiler.NONE && bytecodeViewPanel3.decompiler != Decompiler.NONE) if (bytecodeViewPanel1.decompiler != Decompiler.NONE
&& bytecodeViewPanel2.decompiler != Decompiler.NONE
&& bytecodeViewPanel3.decompiler != Decompiler.NONE)
{ {
this.sp.setLeftComponent(bytecodeViewPanel1); this.sp.setLeftComponent(bytecodeViewPanel1);
this.sp.setRightComponent(bytecodeViewPanel2); this.sp.setRightComponent(bytecodeViewPanel2);
@ -390,7 +401,8 @@ public class ClassViewer extends ResourceViewer
@Override @Override
public void hierarchyChanged(HierarchyEvent e) public void hierarchyChanged(HierarchyEvent e)
{ {
if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0 && splitter.isShowing()) if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0
&& splitter.isShowing())
{ {
splitter.removeHierarchyListener(this); splitter.removeHierarchyListener(this);
setDividerLocation(splitter, proportion); setDividerLocation(splitter, proportion);