Package org.wikipediacleaner.api.check

Examples of org.wikipediacleaner.api.check.SimpleAction


            if (link.hasSquare()) {
              errorResult.addReplacement(url + suffix);
            }
          }
          errorResult.addPossibleAction(
              new SimpleAction(GT._("External viewer"),
                  new ActionExternalViewer(url)));
          errors.add(errorResult);
        }
      }
    }
View Full Code Here


                      GT._("What name would you like to use for the <ref> tag ?"),
                      nameChecker));

              // Add actions for external links
              for (PageElementExternalLink link : links) {
                errorResult.addPossibleAction(new SimpleAction(
                    GT._("External Viewer"),
                    new ActionExternalViewer(link.getLink())));
              }
              errors.add(errorResult);
            }
View Full Code Here

      error.addReplacement(group.getText(), GT._("Restore original text"));

      // Multiple replacements
      if (!multiples.isEmpty()) {
        if (multiples.size() == 1) {
          error.addPossibleAction(new SimpleAction(
              GT._("Replace each time with {0}", multiples.get(0)),
              new MWPaneReplaceAllAction(group.getText(), multiples.get(0))));
        } else {
          List<Actionnable> actions = new ArrayList<Actionnable>();
          for (String multiple : multiples) {
            actions.add(new SimpleAction(multiple, new MWPaneReplaceAllAction(group.getText(), multiple)));
          }
          error.addPossibleAction(new CompositeAction(GT._("Replace each time with"), actions));
        }
      }
      errors.add(error);
View Full Code Here

                  new TextProviderImageDescription(image),
                  GT._("What alternate description would you like to use for the image ?"),
                  descriptionChecker));

          // Action: view image
          errorResult.addPossibleAction(new SimpleAction(
              GT._("View image"),
              new ActionExternalViewer(
                  wiki,
                  image.getNamespace() + ":" + image.getImage(),
                  true)));
View Full Code Here

        (!searchEngines.isEmpty())) {
      List<Actionnable> actions = new ArrayList<Actionnable>();
      for (String[] searchEngine : searchEngines) {
        try {
          if (searchEngine.length > 1) {
            actions.add(new SimpleAction(
                searchEngine[0],
                new ActionExternalViewer(MessageFormat.format(searchEngine[1], search))));
          }
        } catch (IllegalArgumentException e) {
          //
View Full Code Here

        (!searchEngines.isEmpty())) {
      List<Actionnable> actions = new ArrayList<Actionnable>();
      for (String[] searchEngine : searchEngines) {
        try {
          if (searchEngine.length > 1) {
            actions.add(new SimpleAction(
                searchEngine[0],
                new ActionExternalViewer(MessageFormat.format(searchEngine[1], search))));
          }
        } catch (IllegalArgumentException e) {
          //
View Full Code Here

      index = 0;
      while (index < searchEngines.size()) {
        String[] searchEngine = searchEngines.get(index);
        if (paramName.equals(searchEngine[3].trim())) {
          try {
            actions.add(new SimpleAction(
                searchEngine[0],
                new ActionExternalViewer(MessageFormat.format(
                    searchEngine[1], URLEncoder.encode(paramValue, "UTF8")))));
          } catch (UnsupportedEncodingException e) {
            // Nothing to do
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.api.check.SimpleAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.