Examples of AddTextActionProvider


Examples of org.wikipediacleaner.api.check.AddTextActionProvider

          }
          CheckErrorResult errorResult = createCheckErrorResult(
              analysis, link.getBeginIndex(), endIndex);
          errorResult.addPossibleAction(
              GT._("Add a description..."),
              new AddTextActionProvider(
                  "[" + url + " ", "]" + suffix,
                  new TextProviderUrlTitle(url),
                  GT._("What description would you like to use for the external link ?"),
                  descriptionChecker));
          if (refTag == null) {
            errorResult.addReplacement(
                "<ref>" + url + "</ref>",
                GT._("Convert into <ref> tag"));
            errorResult.addPossibleAction(
                GT._("Add a description and convert into <ref> tag"),
                new AddTextActionProvider(
                    "<ref>[" + url + " ", "]</ref>",
                    new TextProviderUrlTitle(url),
                    GT._("What description would you like to use for the external link ?"),
                    descriptionChecker));
          } else {
View Full Code Here

Examples of org.wikipediacleaner.api.check.AddTextActionProvider

              }
              String prefix = contents.substring(tag.getBeginIndex(), tag.getEndIndex() - 1);
              String suffix = contents.substring(tag.getEndIndex() - 1, tag.getCompleteEndIndex());
              errorResult.addPossibleAction(
                  GT._("Give a name to the <ref> tag"),
                  new AddTextActionProvider(
                      prefix + " name=\"",
                      "\"" + suffix,
                      provider,
                      GT._("What name would you like to use for the <ref> tag ?"),
                      nameChecker));
View Full Code Here

Examples of org.wikipediacleaner.api.check.AddTextActionProvider

                  "|" + templateArgs[2] + "=" + prefix +
                  "|" + templateArgs[3] + "=" + article +
                  "|" + templateArgs[4] + "=" + ((link.getText() != null) ? link.getText() : article) +
                  "}}";
                String question = GT._("What is the title of the page on this wiki ?");
                AddTextActionProvider action = null;
                if ((link.getText() != null) && (!link.getText().equals(article))) {
                  String[] possibleValues = { null, article, link.getText() };
                  action = new AddTextActionProvider(
                      textPrefix, textSuffix, null, question,
                      possibleValues, false, null, checker);
                } else {
                  action = new AddTextActionProvider(
                      textPrefix, textSuffix, null, question,
                      article, checker);
                }
                errorResult.addPossibleAction(
                    GT._("Replace using template {0}", "{{" + templateArgs[0] + "}}"),
View Full Code Here

Examples of org.wikipediacleaner.api.check.AddTextActionProvider

                  PageElementInternalLink.createInternalLink(
                      (needColon ? ":" : "") + article, link.getText()),
                  true);
            } else {
              String question = GT._("What text should be displayed by the link?");
              AddTextActionProvider action = new AddTextActionProvider(
                  "[[" + (needColon ? ":" : "") + article + "|", "]]", null,
                  question, article, checker);
              errorResult.addPossibleAction(
                  GT._("Convert into an internal link"),
                  action);
View Full Code Here

Examples of org.wikipediacleaner.api.check.AddTextActionProvider

          }
          prefixFull.append("|");
          prefixShort.append("|alt=");
          errorResult.addPossibleAction(
              GT._("Add a description..."),
              new AddTextActionProvider(
                  prefixFull.toString(), "]]",
                  new TextProviderImageDescription(image),
                  GT._("What description would you like to use for the image ?"),
                  descriptionChecker));
          errorResult.addPossibleAction(
              GT._("Add an alternate description..."),
              new AddTextActionProvider(
                  prefixShort.toString(), "]]",
                  new TextProviderImageDescription(image),
                  GT._("What alternate description would you like to use for the image ?"),
                  descriptionChecker));
View Full Code Here

Examples of org.wikipediacleaner.api.check.AddTextActionProvider

                  "|" + templateArgs[2] + "=" + lgCode +
                  "|" + templateArgs[3] + "=" + pageTitle +
                  "|" + templateArgs[4] + "=" + ((link.getText() != null) ? link.getText() : pageTitle) +
                  "}}";
                String question = GT._("What is the title of the page on this wiki ?");
                AddTextActionProvider action = null;
                if ((link.getText() != null) && (!link.getText().equals(pageTitle))) {
                  String[] possibleValues = { null, pageTitle, link.getText() };
                  action = new AddTextActionProvider(
                      prefix, suffix, null, question,
                      possibleValues, false, null, checker);
                } else {
                  action = new AddTextActionProvider(
                      prefix, suffix, null, question,
                      pageTitle, checker);
                }
                errorResult.addPossibleAction(
                    GT._("Replace using template {0}", "{{" + templateArgs[0] + "}}"),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.