Example #1
0
  private void editDecompiledButtonActionPerformed(ActionEvent evt) {
    File swc = Configuration.getPlayerSWC();
    final String adobePage = "http://www.adobe.com/support/flashplayer/downloads.html";
    if (swc == null) {
      if (View.showConfirmDialog(
              this,
              AppStrings.translate("message.action.playerglobal.needed")
                  .replace("%adobehomepage%", adobePage),
              AppStrings.translate("message.action.playerglobal.title"),
              JOptionPane.OK_CANCEL_OPTION,
              JOptionPane.INFORMATION_MESSAGE)
          == JOptionPane.OK_OPTION) {

        View.navigateUrl(adobePage);

        int ret;
        do {
          ret =
              View.showConfirmDialog(
                  this,
                  AppStrings.translate("message.action.playerglobal.place")
                      .replace("%libpath%", Configuration.getFlashLibPath().getAbsolutePath()),
                  AppStrings.translate("message.action.playerglobal.title"),
                  JOptionPane.OK_CANCEL_OPTION,
                  JOptionPane.INFORMATION_MESSAGE);
          swc = Configuration.getPlayerSWC();
        } while (ret == JOptionPane.OK_OPTION && swc == null);
      }
    }
    if (swc != null) {
      if (View.showConfirmDialog(
              null,
              AppStrings.translate("message.confirm.experimental.function"),
              AppStrings.translate("message.warning"),
              JOptionPane.OK_CANCEL_OPTION,
              JOptionPane.WARNING_MESSAGE,
              Configuration.warningExperimentalAS3Edit,
              JOptionPane.OK_OPTION)
          == JOptionPane.OK_OPTION) {
        setDecompiledEditMode(true);
      }
    }
  }