Sha256: 0e39b6caf7eeb88855e30e785c9fd3125fead4825beff10ed9f32aac6d6239c3

Contents?: true

Size: 1.67 KB

Versions: 12

Compression:

Stored size: 1.67 KB

Contents

package org.cx4a.rsense;

import java.util.List;
import java.util.Collections;

public class CodeCompletionResult extends CodeAssistResult {
    public static class CompletionCandidate {
        public enum Kind {
            CLASS, MODULE, CONSTANT, METHOD,
        };

        private String completion;
        private String qualifiedName;
        private String baseName;
        private Kind kind;

        public CompletionCandidate(String completion, String qualifiedName, String baseName, Kind kind) {
            this.completion = completion;
            this.qualifiedName = qualifiedName;
            this.baseName = baseName;
            this.kind = kind;
        }

        public String getCompletion() {
            return completion;
        }

        public String getQualifiedName() {
            return qualifiedName;
        }

        public String getBaseName() {
            return baseName;
        }

        public Kind getKind() {
            return kind;
        }

        @Override
        public String toString() {
            return completion;
        }
    }

    private List<CompletionCandidate> candidates = Collections.<CompletionCandidate>emptyList();

    public CodeCompletionResult() {
        super();
    }

    public void setCandidates(List<CompletionCandidate> candidates) {
        this.candidates = candidates;
    }

    public List<CompletionCandidate> getCandidates() {
        return candidates;
    }

    public static CodeCompletionResult failWithException(String message, Throwable cause) {
        CodeCompletionResult result = new CodeCompletionResult();
        result.addError(new CodeAssistError(message, cause));
        return result;
    }
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rsense-core-0.6.6 src/org/cx4a/rsense/CodeCompletionResult.java
rsense-core-0.6.5 src/org/cx4a/rsense/CodeCompletionResult.java
rsense-core-0.6.4 src/org/cx4a/rsense/CodeCompletionResult.java
rsense-core-0.6.2 src/org/cx4a/rsense/CodeCompletionResult.java
rsense-core-0.6.1 src/org/cx4a/rsense/CodeCompletionResult.java
rsense-core-0.6.0 src/org/cx4a/rsense/CodeCompletionResult.java
rsense-core-0.5.9 src/org/cx4a/rsense/CodeCompletionResult.java
rsense-core-0.5.8 src/org/cx4a/rsense/CodeCompletionResult.java
rsense-core-0.5.6 src/org/cx4a/rsense/CodeCompletionResult.java
rsense-core-0.5.2 src/org/cx4a/rsense/CodeCompletionResult.java
rsense-core-0.5.1 src/org/cx4a/rsense/CodeCompletionResult.java
rsense-core-0.5.0 src/org/cx4a/rsense/CodeCompletionResult.java