Options
All
  • Public
  • Public/Protected
  • All
Menu

class QueryDocListener Implements the required functionality to conduct code snippet queries by listening to document changes for a user to type a query in the format: ?{query}? and too only in comments

Hierarchy

  • QueryDocListener

Index

Constructors

constructor

  • Parameters

    • type: string

    Returns QueryDocListener

Properties

type

type: string

Static queryString

queryString: string = ""

Methods

completionQuery

  • completionQuery(): Promise<undefined | "">
  • Returns Promise<undefined | "">

documentChanged

  • documentChanged(): void
  • Returns void

executeQuery

  • executeQuery(query: string, offset: any): Promise<undefined | -1>
  • Parameters

    • query: string
    • offset: any

    Returns Promise<undefined | -1>

extractQueryFromInsertion

  • extractQueryFromInsertion(text: string, offset: any[]): any[]
  • Parameters

    • text: string
    • offset: any[]

    Returns any[]

getSelectedTextFromEditor

  • getSelectedTextFromEditor(): any[]
  • Returns any[]

removeExtraOperators

  • removeExtraOperators(text: string): string
  • Parameters

    • text: string

    Returns string

Static measureQuality

  • measureQuality(code: string): number
  • This algorithm was implemented in Release 2 of this tool

    logic: We will be differentiating our code based on 3 different models and all these models are regression models

    The three models are : 1.)Organic model 2.)Semi-detached model 3.)Embedded model

    some coefficients are decided for three different types of models based on regression model. Each model will use 4 coefficients inorder to find quality of code snippet

    Actual thought process: Code snippets will be first sorted based on upvotes(fetched from stackoverflow website and people votes) After minimizing the number of code snippets,we will be analyzing each snippet based on COCOMO model to determine best code snippet

    Parameters

    • code: string

    Returns number

Static writeOnVscodeEditor

  • writeOnVscodeEditor(mostValidSnippet: string): void
  • Parameters

    • mostValidSnippet: string

      Function which write the valid code snippet on vscode editor based on either selected text or based on current position of cursor

    Returns void

Generated using TypeDoc