Examples of GoLiteralString


Examples of ro.redeul.google.go.lang.psi.expressions.literals.GoLiteralString

        HashSet<String> hasVisitImportPath = new HashSet<String>();
        for (GoImportDeclarations importDeclarations : file.getImportDeclarations()) {
            for (GoImportDeclaration declaration : importDeclarations.getDeclarations()) {
                String importPathValue = null;
                GoLiteralString importPath = declaration.getImportPath();
                if (importPath != null) {
                    importPathValue = importPath.getValue();
                }

                if (importPathValue == null)
                    continue;
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.expressions.literals.GoLiteralString

        return findChildByClass(GoLiteralString.class);
    }

    @Override
    public String getPackageName() {
        GoLiteralString importPathLiteral = getImportPath();

        if (importPathLiteral == null)
            return "";

        GoPackage goPackage = getPackage();
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.expressions.literals.GoLiteralString

    }

    @Nullable
    @Override
    public String getLookupTailText() {
        GoLiteralString importPathLiteral = getImportPath();
        GoPackage goPackage = getPackage();

        if (importPathLiteral == null)
            return null;

        if (goPackage != null)
            return String.format(" (%s:%s)", goPackage.getName(), importPathLiteral.getValue());

        // TODO: decide if we want to include invalid import statements here
        return String.format(" (<invalid>:%s)", importPathLiteral.getValue());
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.expressions.literals.GoLiteralString

    }

    @Override
    public boolean isValidImport() {
        String importPathValue = null;
        GoLiteralString importPath = this.getImportPath();
        if (importPath != null) {
            importPathValue = importPath.getValue();
        }

        return !(importPathValue == null || importPathValue.isEmpty()) && !(importPathValue.contains(" ") || importPathValue.contains("\t")) && !importPathValue.contains("\\");
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.expressions.literals.GoLiteralString

    }

    @Override
    public GoPackage getPackage() {

        GoLiteralString importPathLiteral = getImportPath();
        if (importPathLiteral == null)
            return null;

        String importPath = importPathLiteral.getValue();

        // if it's a relative import we normalize this and hope it falls into our project.
        // we don't support relative import paths from files outside of our project
        if ( importPath.startsWith(".") && getContainingFile() instanceof GoFile ) {
            importPath = FileUtil.toCanonicalPath(((GoFile)getContainingFile()).getPackageImportPath() + "/" + importPath, '/');
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.