Skip to content

Commit

Permalink
Add @OverRide annotations where applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
garfieldnate committed Mar 7, 2024
1 parent 9f1da2c commit 95c2fcc
Show file tree
Hide file tree
Showing 50 changed files with 459 additions and 132 deletions.
5 changes: 5 additions & 0 deletions Java/Debugger/src/edu/umich/soar/debugger/MainFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ public MainFrame(Composite parent, Document doc)
// accordingly
m_SoarChangeListener = new SoarChangeListener()
{
@Override
public void soarConnectionChanged(SoarConnectionEvent e)
{
// If the connection has changed reset the focus to null
Expand All @@ -233,6 +234,7 @@ public void soarConnectionChanged(SoarConnectionEvent e)
updateMenus();
}

@Override
public void soarAgentListChanged(SoarAgentEvent e)
{
// If we're removing the current focus agent then
Expand Down Expand Up @@ -799,6 +801,7 @@ public void initComponents(String alternateLayout)
getShell().addShellListener(new ShellAdapter()
{

@Override
public void shellClosed(ShellEvent e)
{
thisWindowClosing();
Expand Down Expand Up @@ -1213,13 +1216,15 @@ protected void RecordWindowPositions()

private final SoarCommandLineMXBean commandLineMXBean = new SoarCommandLineMXBean()
{
@Override
public String getName()
{
if (m_AgentFocus == null)
return null;
return m_AgentFocus.GetAgentName();
}

@Override
public String executeCommandLine(final String line)
{
m_CommandLineResult = null;
Expand Down
32 changes: 17 additions & 15 deletions Java/Debugger/src/edu/umich/soar/debugger/dialogs/BaseDialog.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/********************************************************************************************
*
* BaseDialog.java
*
* Description:
*
*
* Description:
*
* Created on Feb 16, 2005
* @author Douglas Pearson
*
*
* Developed by ThreePenny Software <a href="http://www.threepenny.net">www.threepenny.net</a>
********************************************************************************************/
package edu.umich.soar.debugger.dialogs;
Expand All @@ -26,12 +26,12 @@
import edu.umich.soar.debugger.helpers.FormDataHelper;

/*****************************************************************************************
*
*
* Create a simple dialog with OK and cancel buttons.
*
*
* This dialog is intended to be the base class for other dialogs to save some
* legwork. SwtInputDialog shows an example of its use.
*
*
*****************************************************************************************/
public class BaseDialog
{
Expand All @@ -57,11 +57,11 @@ protected Shell getDialog()
}

/********************************************************************************************
*
*
* It looks like I need to pump my message loop here to make this a blocking
* modal dialog as we want it to be. There may be a more SWT appropriate
* solution to this.
*
*
********************************************************************************************/
protected void pumpMessages()
{
Expand All @@ -80,9 +80,9 @@ protected void open()
}

/********************************************************************************************
*
*
* Center the dialog on the given control.
*
*
********************************************************************************************/
protected void centerDialog(Control control)
{
Expand All @@ -106,9 +106,9 @@ protected void centerDialog(Control control)
}

/********************************************************************************************
*
*
* Create a basic dialog with ok and cancel buttons and set the title
*
*
********************************************************************************************/
protected BaseDialog(Composite parent, String title, boolean modal)
{
Expand All @@ -130,6 +130,7 @@ protected BaseDialog(Composite parent, String title, boolean modal)
ok.setText("OK");
ok.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent e)
{
endDialog(true);
Expand All @@ -140,6 +141,7 @@ public void widgetSelected(SelectionEvent e)
cancel.setText("Cancel");
cancel.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent e)
{
endDialog(false);
Expand All @@ -165,9 +167,9 @@ public void widgetSelected(SelectionEvent e)
}

/********************************************************************************************
*
*
* Close the dialog -- either successfully or cancelled.
*
*
********************************************************************************************/
protected void endDialog(boolean ok)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/********************************************************************************************
*
* LoggingDialog.java
*
* Description:
*
*
* Description:
*
* Created on Feb 9, 2006
* @author Douglas Pearson
*
*
* Developed by ThreePenny Software <a href="http://www.threepenny.net">www.threepenny.net</a>
********************************************************************************************/
package edu.umich.soar.debugger.dialogs;
Expand Down Expand Up @@ -113,6 +113,7 @@ protected void createContents(final Composite window, Logger logger)
// Do a find
m_Browse.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent event)
{
String filename = SaveLoad.SaveFileDialog(m_Frame.getWindow(),
Expand All @@ -130,10 +131,11 @@ public void widgetSelected(SelectionEvent event)
}

/********************************************************************************************
*
*
* Close the dialog -- either successfully or cancelled.
*
*
********************************************************************************************/
@Override
protected void endDialog(boolean ok)
{
// Only process values if the user selected ok
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ private NewWindowDialog(MainFrame frame, String title, ModuleList modules)
// If the user makes a choice we'll close the dialog (pretty aggressive)
m_Modules.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent e)
{
selectionChanged();
Expand All @@ -145,6 +146,7 @@ public void widgetSelected(SelectionEvent e)
* Close the dialog -- either successfully or cancelled.
*
********************************************************************************************/
@Override
protected void endDialog(boolean ok)
{
// If the user cancelled or no agents are selected we're done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public int getValue()
return m_Value;
}

@Override
public TableItem addTableItem(final Table table)
{
TableItem item = new TableItem(table, SWT.NULL);
Expand All @@ -108,6 +109,7 @@ public TableItem addTableItem(final Table table)
return item;
}

@Override
public boolean update()
{
try
Expand Down Expand Up @@ -158,6 +160,7 @@ public String getValue()
return m_Value;
}

@Override
public TableItem addTableItem(final Table table)
{
TableItem item = new TableItem(table, SWT.NULL);
Expand All @@ -175,6 +178,7 @@ public TableItem addTableItem(final Table table)

// Copy the value from the control to the property
// Return false if its not valid for some reason.
@Override
public boolean update()
{
m_Value = m_Text.getText();
Expand Down Expand Up @@ -220,6 +224,7 @@ private void updateButtonLabel()
m_Button.setText(first);
}

@Override
public TableItem addTableItem(final Table table)
{
TableItem item = new TableItem(table, SWT.NULL);
Expand Down Expand Up @@ -258,6 +263,7 @@ public TableItem addTableItem(final Table table)

// Copy the value from the control to the property
// Return false if its not valid for some reason.
@Override
public boolean update()
{
// String value = m_Text.getText() ;
Expand All @@ -284,6 +290,7 @@ public boolean getValue()
return m_Value;
}

@Override
public TableItem addTableItem(Table table)
{
TableItem item = new TableItem(table, SWT.NULL);
Expand All @@ -307,6 +314,7 @@ public TableItem addTableItem(Table table)

// Copy the value from the control to the property
// Return false if its not valid for some reason.
@Override
public boolean update()
{
int selection = m_Combo.getSelectionIndex();
Expand Down Expand Up @@ -359,6 +367,7 @@ public Object getValue()
return (m_Index >= 0) ? m_SetValues[m_Index] : null;
}

@Override
public TableItem addTableItem(Table table)
{
TableItem item = new TableItem(table, SWT.NULL);
Expand All @@ -379,6 +388,7 @@ public TableItem addTableItem(Table table)

// Copy the value from the control to the property
// Return false if its not valid for some reason.
@Override
public boolean update()
{
m_Index = m_Combo.getSelectionIndex();
Expand Down Expand Up @@ -460,6 +470,7 @@ public static boolean showDialog(MainFrame frame, String title,
* Close the dialog -- either successfully or cancelled.
*
********************************************************************************************/
@Override
protected void endDialog(boolean ok)
{
if (ok)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ private RemoteDialog(MainFrame frame, String title)
* Close the dialog -- either successfully or cancelled.
*
********************************************************************************************/
@Override
protected void endDialog(boolean ok)
{
// Store the user's choices (even if they cancel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ private ReorderButtonsDialog(Composite parent, String title,
top.setText("Top");
top.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent e)
{
pressed(true, true);
Expand All @@ -124,6 +125,7 @@ public void widgetSelected(SelectionEvent e)
up.setText("Up");
up.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent e)
{
pressed(true, false);
Expand All @@ -134,6 +136,7 @@ public void widgetSelected(SelectionEvent e)
down.setText("Down");
down.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent e)
{
pressed(false, false);
Expand All @@ -144,6 +147,7 @@ public void widgetSelected(SelectionEvent e)
bottom.setText("Bottom");
bottom.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent e)
{
pressed(false, true);
Expand Down Expand Up @@ -227,6 +231,7 @@ protected void pressed(boolean up, boolean toLimit)
* Close the dialog -- either successfully or cancelled.
*
********************************************************************************************/
@Override
protected void endDialog(boolean ok)
{
// If the user cancelled (or made no changes) we're done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ protected void createContents(final Composite window)
close.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
close.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent event)
{
close();
Expand All @@ -227,6 +228,7 @@ public void widgetSelected(SelectionEvent event)
// Do a find
m_DoFind.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent event)
{
find();
Expand Down
Loading

0 comments on commit 95c2fcc

Please sign in to comment.