Split ExportDialog.getSelectedOptions() into a series of individual "get" methods

Issue #369 resolved
Robert Leach created an issue

USE CASE: WHAT DO YOU WANT TO DO?

Reduce overhead & make code easier to maintain.

STEPS TO REPRODUCE AN ISSUE (OR TRIGGER A NEW FEATURE)

  1. For example, remove an option
  2. You must adjust whatever code calls getSelectedOptions to adjust the indexes of all array positions after the removed index.

CURRENT BEHAVIOR

Returned integers must be converted into their corresponding types in every place the method is called.

EXPECTED BEHAVIOR

The returned type needs no conversion.

DEVELOPERS ONLY SECTION

SUGGESTED CHANGE (Pseudocode optional)

Create a get method for each option which returns the type it correspends to, e.g. the enums: Region, Format, ExportAspect, PaperType, and the boolean for show selections.

FILES AFFECTED (where the changes will be implemented) - developers only

ExportDialog ExportDialogController

LEVEL OF EFFORT - developers only

minor

COMMENTS

See PR 49, Lance's issues 1, 2, & 3

Comments (4)

  1. Robert Leach reporter

    Resolved issue #369 by setting the default close operation to "DO NOTHING". Also commented out a call to System.exit(0) because it seemed to be quitting successfully and in a timely manner without it. See issue #74 for more info.

    Since quitting the app has a confirmation window upon using the close button, we should dispose of the window conditionally based on the response given from the dialog. Since the default action had been set to dispose on close, it was quitting the app and closing the window regardless of the option selected.

    Perhaps in the future, we can leave the app running, but also allow the window to be closed, but for now, that's not possible.

    → <<cset a386f1c9e3ff>>

  2. Robert Leach reporter

    Resolved issue #369 by setting the default close operation to "DO NOTHING". Also commented out a call to System.exit(0) because it seemed to be quitting successfully and in a timely manner without it. See issue #74 for more info.

    Since quitting the app has a confirmation window upon using the close button, we should dispose of the window conditionally based on the response given from the dialog. Since the default action had been set to dispose on close, it was quitting the app and closing the window regardless of the option selected.

    Perhaps in the future, we can leave the app running, but also allow the window to be closed, but for now, that's not possible.

    → <<cset a386f1c9e3ff>>

  3. Robert Leach reporter
    • removed milestone

    Removing milestone: Coding Convention Adherence (automated comment)

  4. Log in to comment