Package org.python.pydev.refactoring.core.validator

Examples of org.python.pydev.refactoring.core.validator.NameValidator


     * @return status
     */
    public RefactoringStatus checkVarName(String variableName) {
        RefactoringStatus status = new RefactoringStatus();

        NameValidator nameValidator = new NameValidator(status, info.getScopeAdapter());
        nameValidator.validateVariableName(variableName);
        nameValidator.validateUniqueVariable(variableName);

        return status;
    }
View Full Code Here


                    scopeAdapter);
            cellValidator.validate();
        }

        RefactoringStatus status = new RefactoringStatus();
        NameValidator nameValidator = new NameValidator(status, scopeAdapter);
        nameValidator.validateMethodName(getFunctionName());
        nameValidator.validateUniqueFunction(getFunctionName());

        if (status.hasError()) {
            page.setErrorMessage(status.getMessageMatchingSeverity(RefactoringStatus.WARNING));
        }
View Full Code Here

        return true;
    }

    private void validateArguments() {
        RefactoringStatus status = new RefactoringStatus();
        NameValidator validator = new NameValidator(status, this.scope);

        TableItem[] items = table.getItems();
        for (TableItem item : items) {
            if (item instanceof SimpleTableItem) {
                SimpleTableItem variableItem = (SimpleTableItem) item;
                if (variableItem.hasNewName()) {
                    validator.validateVariableName(item.getText());
                    validator.validateUniqueVariable(item.getText());
                }
            }
        }

        if (status.hasError()) {
View Full Code Here

TOP

Related Classes of org.python.pydev.refactoring.core.validator.NameValidator

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.