/** * CommandListener methods */ @Override public void onCommandSuccess() { // If is not verified but finish success, set last used if (!isVerified) { setType(javaTypeNotVerified, moduleNotVerified); } }
public boolean getAllPossibleValues(final List<Completion> completions, final Class<?> requiredType, final String originalUserInput, final String optionContext, final MethodTarget target) { String adjustedUserInput = convertUserInputIntoAFullyQualifiedPath(originalUserInput); final String directoryData = adjustedUserInput.substring(0, adjustedUserInput.lastIndexOf(File.separator) + 1); adjustedUserInput = adjustedUserInput.substring(adjustedUserInput.lastIndexOf(File.separator) + 1); populate(completions, adjustedUserInput, originalUserInput, directoryData); return false; }
private void addModules(final List<Completion> completions, final String optionContext, final Collection<String> moduleNames) { final String focusedModuleName = projectOperations.getFocusedModuleName(); for (final String moduleName : moduleNames) { if (isModuleRelevant(moduleName, focusedModuleName, optionContext)) { addCompletion(moduleName, completions); } } }
@CliOptionMandatoryIndicator(command = "field boolean", params = {"class"}) public boolean isClassMandatoryForFieldBoolean() { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionMandatoryIndicator(command = "field date", params = {"class"}) public boolean isClassMandatoryForFieldDate() { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionMandatoryIndicator(command = "field embedded", params = {"class"}) public boolean isClassMandatoryForFieldEmbedded() { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionMandatoryIndicator(command = "field enum", params = {"class"}) public boolean isClassMandatoryForFieldEnum() { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "field set", params = {"class"}, help = "Option 'class' is not available " + "for this command when the focus is set to one class.") public boolean isClassVisibleForFieldSet(ShellContext shellContext) { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "field string", params = {"class"}, help = "Option 'class' is not available " + "for this command when the focus is set to one class.") public boolean isClassVisibleForFieldString(ShellContext shellContext) { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "field embedded", params = {"class"}, help = "Option 'class' is not available " + "for this command when the focus is set to one class.") public boolean isClassVisibleForFieldEmbedded(ShellContext shellContext) { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "field enum", params = {"class"}, help = "Option 'class' is not available " + "for this command when the focus is set to one class.") public boolean isClassVisibleForFieldEnum(ShellContext shellContext) { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "field number", params = {"class"}, help = "Option 'class' is not available " + "for this command when the focus is set to one class.") public boolean isClassVisibleForFieldNumber(ShellContext shellContext) { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionMandatoryIndicator(command = "field number", params = {"class"}) public boolean isClassMandatoryForFieldNumber() { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "field date", params = {"class"}, help = "Option 'class' is not available " + "for this command when the focus is set to one class.") public boolean isClassVisibleForFieldDate(ShellContext shellContext) { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "field list", params = {"class"}, help = "Option 'class' is not available " + "for this command when the focus is set to one class.") public boolean isClassVisibleForFieldList(ShellContext shellContext) { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionMandatoryIndicator(command = "field list", params = {"class"}) public boolean isClassMandatoryForFieldList() { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "field boolean", params = {"class"}, help = "Option 'class' is not available " + "for this command when the focus is set to one class.") public boolean isClassVisibleForFieldBoolean(ShellContext shellContext) { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionMandatoryIndicator(command = "field set", params = {"class"}) public boolean isClassMandatoryForFieldSet() { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionVisibilityIndicator(command = "field other", params = {"class"}, help = "Option 'class' is not available " + "for this command when the focus is set to one class.") public boolean isClassVisibleForFieldOther(ShellContext shellContext) { if (lastUsed.getJavaType() == null) { return true; } return false; }
@CliOptionMandatoryIndicator(command = "field other", params = {"class"}) public boolean isClassMandatoryForFieldOther() { if (lastUsed.getJavaType() == null) { return true; } return false; }