new String[]{"option1", "option2", "option3-click"}

@param menuOptions new String[]{"option1", "option2", "option3-click"}
@return true or false
166052
public boolean clickOnMenu(String[] menuOptions) {
        LOGGER.debug("clickOnMenu : " + menuOptions[menuOptions.length - 1]);
        if (click()) {
            String info = toString();
//            LOGGER.info("Click on button " + info);
            // TODO try to use Menu class for implementing select item
            WebLocator menu = new WebLocator("x-menu-floating");
            if (WebDriverConfig.isIE()) {
                // menu.isVisible is not considered but is executed and is just consuming time.
//                if(menu.isVisible()){
//                    LOGGER.info("In IE is visible");
//                }
            } else {
                menu.setStyle("visibility: visible;");
            }
            menu.setInfoMessage("active menu");
            ExtJsComponent option = new ExtJsComponent(menu);
            for (String menuOption : menuOptions) {
                option.setText(menuOption);
                if (!option.mouseOver()) {
                    return false;
                }
            }
            if (option.clickAt()) {
                return true;
            } else {
                LOGGER.warn("Could not locate option '" + option.getPathBuilder().getText() + "'. Performing simple click on button : " + info);
                doClickAt();
            }
        }
        return false;
    }
642525
private <T extends Enum<T>> EnumerationRadioButtonSelect<T> createRadioButtonGroup(
			final T[] options) {
		EnumerationRadioButtonSelect<T> rbSelect = new EnumerationRadioButtonSelect<>(options);
		rbSelect.setButtonLayout(EnumerationRadioButtonSelect.Layout.FLAT);
		rbSelect.setFrameless(true);
		return rbSelect;
	}
1345958
protected static List<String> createOptions() {

        List<String> options = new ArrayList<String>();
        options.add(optionMapping.get(CmsAliasMode.permanentRedirect));
        options.add(optionMapping.get(CmsAliasMode.redirect));
        options.add(optionMapping.get(CmsAliasMode.passthrough));
        return options;
    }
697674
public void select(String[] optionLocators) {
        for (int i = 0; i < optionLocators.length; i++) {
            select(optionLocators[i]);
        }
    }
286483
protected List<String> createOption(final String option, final Object value) {
        if (value == null){
            return new ArrayList<String>();
        }
        return Arrays.asList(option, String.valueOf(value));
    }
130602
public B options(ClientOptions options) {
        requireNonNull(options, "options");
        options.asMap().values().forEach(this::option);
        return self();
    }
991729
private List<?> getNewOptions(final String[] paramValues) {
		// Take a copy of the old options
		List<?> copyOldOptions = new ArrayList(getOptions());

		// Create a new list to hold the shuffled options
		List<Object> newOptions = new ArrayList<>(paramValues.length);

		// Process the option parameters
		for (String param : paramValues) {
			for (Object oldOption : copyOldOptions) {
				// Match the string value of the option
				String stringOldOption = String.valueOf(oldOption);
				if (Util.equals(stringOldOption, param)) {
					newOptions.add(oldOption);
					copyOldOptions.remove(oldOption);
					break;
				}
			}
		}

		return newOptions;
	}
418245
@Override public boolean onCreateOptionsMenu(Menu menu) {
    if (actionBarMenuAction != null) {
      menu.add(actionBarMenuAction.title)
          .setShowAsActionFlags(SHOW_AS_ACTION_ALWAYS)
          .setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
            @Override public boolean onMenuItemClick(MenuItem menuItem) {
              actionBarMenuAction.action.call();
              return true;
            }
          });
    }
    menu.add("Log Scope Hierarchy")
        .setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
          @Override public boolean onMenuItemClick(MenuItem item) {
            Log.d("DemoActivity", MortarScopeDevHelper.scopeHierarchyToString(activityScope));
            return true;
          }
        });
    return true;
  }
274273
@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        super.onCreateOptionsMenu(menu);
        displayItems = menu.add(0, 1234, 0, "Display GeoItems");
        displayMoreItems = menu.add(0, 5678, 0, "Add more GeoItems");
        displayMoreItems.setEnabled(false);
        hideItems = menu.add(0, 9012, 0, "Remove GeoItems");
        hideItems.setEnabled(false);

        displayItems.setEnabled(false);
        displayMoreItems.setEnabled(true);
        hideItems.setEnabled(true);

        return true;
    }
192682
@SuppressWarnings("squid:S1168")
    public String[] selectOptions() {
        if (isNotPresentSelect()) {
            return null;    // returning an empty array could be confused with no options available
        }
        WebElement webElement = element.getWebElement();
        Select dropdown = new Select(webElement);
        List<WebElement> options = dropdown.getOptions();
        String[] stringOptions = new String[options.size()];
        for (int i = 0; i < options.size(); i++) {
            stringOptions[i] = options.get(i).getText();
        }
        return stringOptions;
    }
79634
public static String joinOptions(String[] optionArray) {

    String optionString = "";
    for (int i = 0; i < optionArray.length; i++) {
      if (optionArray[i].equals("")) {
	continue;
      }
      boolean escape = false;
      for (int n = 0; n < optionArray[i].length(); n++) {
	if (Character.isWhitespace(optionArray[i].charAt(n))) {
	  escape = true;
	  break;
	}
      }
      if (escape) {
	optionString += '"' + backQuoteChars(optionArray[i]) + '"';
      } else {
	optionString += optionArray[i];
      }
      optionString += " ";
    }
    return optionString.trim();
  }
62163
public void displayMenu() {
        while (true) {
            ConsoleMenu.println("");
            ConsoleMenu.println("Menu Options");

            final int size = menu.size();

            displayMenu(size);

            int opt;

            do {
                opt = ConsoleMenu.getInt("Enter your choice:", -1);
            } while ((opt <= 0 || opt > methods.size()) && opt != EXIT_CODE);

            if (opt == EXIT_CODE) {
                callTearDownIfRequired();
                return;
            }

            callMenuOption(opt);
        }
    }
1360735
static List<String> parseOptionString(String s) {
    List<String> opts = new ArrayList<>();
    StringBuilder opt = new StringBuilder();
    boolean inOpt = false;
    boolean inSingleQuote = false;
    boolean inDoubleQuote = false;
    boolean escapeNext = false;

    // This is needed to detect when a quoted empty string is used as an argument ("" or '').
    boolean hasData = false;

    for (int i = 0; i < s.length(); i++) {
      int c = s.codePointAt(i);
      if (escapeNext) {
        opt.appendCodePoint(c);
        escapeNext = false;
      } else if (inOpt) {
        switch (c) {
        case '\\':
          if (inSingleQuote) {
            opt.appendCodePoint(c);
          } else {
            escapeNext = true;
          }
          break;
        case '\'':
          if (inDoubleQuote) {
            opt.appendCodePoint(c);
          } else {
            inSingleQuote = !inSingleQuote;
          }
          break;
        case '"':
          if (inSingleQuote) {
            opt.appendCodePoint(c);
          } else {
            inDoubleQuote = !inDoubleQuote;
          }
          break;
        default:
          if (!Character.isWhitespace(c) || inSingleQuote || inDoubleQuote) {
            opt.appendCodePoint(c);
          } else {
            opts.add(opt.toString());
            opt.setLength(0);
            inOpt = false;
            hasData = false;
          }
        }
      } else {
        switch (c) {
        case '\'':
          inSingleQuote = true;
          inOpt = true;
          hasData = true;
          break;
        case '"':
          inDoubleQuote = true;
          inOpt = true;
          hasData = true;
          break;
        case '\\':
          escapeNext = true;
          inOpt = true;
          hasData = true;
          break;
        default:
          if (!Character.isWhitespace(c)) {
            inOpt = true;
            hasData = true;
            opt.appendCodePoint(c);
          }
        }
      }
    }

    checkArgument(!inSingleQuote && !inDoubleQuote && !escapeNext, "Invalid option string: %s", s);
    if (hasData) {
      opts.add(opt.toString());
    }
    return opts;
  }
543843
@Override
    public List<String> getOptions() throws WidgetException {
        try {
            org.openqa.selenium.support.ui.Select selectBox = new org.openqa.selenium.support.ui.Select(
                    findElement());
            List<WebElement> options = selectBox.getOptions();

            List<String> optionsTextValues = new ArrayList<String>();
            for (WebElement e : options) {
                optionsTextValues.add(e.getText());
            }

            return optionsTextValues;
        } catch (Exception e) {
            throw new WidgetException("Error while fetching select options", getByLocator(), e);
        }
    }
72301
def options(self, options):
        
        if self.is_optionhandler:
            javabridge.call(self.jobject, "setOptions", "([Ljava/lang/String;)V", typeconv.string_list_to_array(options))
212346
@Override
	public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
		menu.add(0, MENU_LIMIT_SCROLLING_LAT_ID, Menu.NONE, "Latitude: Limit scrolling").setCheckable(true);
		menu.add(0, MENU_LIMIT_SCROLLING_LNG_ID, Menu.NONE, "Longitude: Limit scrolling").setCheckable(true);

		super.onCreateOptionsMenu(menu, inflater);
	}
224649
public boolean hasOption(final String optionName) {
        if (optionName.length() == 1) {
            return hasOption(optionName.charAt(0));
        }
        return commandLine.hasOption("--" + optionName);
    }