Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cake] Find usages returns usages from loaded files when not requested. #1204

Closed
bjorkstromm opened this issue May 25, 2018 · 0 comments
Closed
Labels

Comments

@bjorkstromm
Copy link
Member

/findusages set with OnlyThisFile: true in request still returns usages from files included via #load directive. Side effects of this can be seen in image below (see highlighting):

image

Request:

{
  "Type": "request",
  "Seq": 339,
  "Command": "/findusages",
  "Arguments": {
    "FileName": "c:\\Users\\mb\\src\\tmp\\test\\includederror.cake",
    "Line": 18,
    "Column": 11,
    "OnlyThisFile": true,
    "ExcludeDefinition": false
  }
}

Response:

{
  "Request_seq": 339,
  "Command": "/findusages",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": {
    "QuickFixes": [
      {
        "FileName": "B3437BF2-8AE3-4281-8726-B926BB9DF75D",
        "Line": 8039,
        "Column": 13,
        "EndLine": 8039,
        "EndColumn": 24,
        "Text": "public void Information(System.String value)",
        "Projects": [
          "includederror.cake"
        ]
      },
      {
        "FileName": "c:\\Users\\mb\\src\\tmp\\test\\error.cake",
        "Line": 5,
        "Column": 1,
        "EndLine": 5,
        "EndColumn": 12,
        "Text": "Information(\"Running tasks...\");",
        "Projects": [
          "includederror.cake"
        ]
      },
      {
        "FileName": "c:\\Users\\mb\\src\\tmp\\test\\error.cake",
        "Line": 7,
        "Column": 1,
        "EndLine": 7,
        "EndColumn": 12,
        "Text": "Information(\"Running tasks...\");",
        "Projects": [
          "includederror.cake"
        ]
      },
      {
        "FileName": "c:\\Users\\mb\\src\\tmp\\test\\includederror.cake",
        "Line": 18,
        "Column": 4,
        "EndLine": 18,
        "EndColumn": 15,
        "Text": "Information(\"Running tasks...\");",
        "Projects": [
          "includederror.cake"
        ]
      },
      {
        "FileName": "c:\\Users\\mb\\src\\tmp\\test\\includederror.cake",
        "Line": 24,
        "Column": 4,
        "EndLine": 24,
        "EndColumn": 15,
        "Text": "Information(\"Finished running tasks.\");",
        "Projects": [
          "includederror.cake"
        ]
      },
      {
        "FileName": "c:\\Users\\mb\\src\\tmp\\test\\includederror.cake",
        "Line": 33,
        "Column": 4,
        "EndLine": 33,
        "EndColumn": 15,
        "Text": "Information(\"Hello Cake!\");",
        "Projects": [
          "includederror.cake"
        ]
      }
    ]
  },
  "Seq": 508,
  "Type": "response"
}
@filipw filipw added the cake label May 28, 2018
bjorkstromm added a commit to bjorkstromm/omnisharp-roslyn that referenced this issue Jun 4, 2018
bjorkstromm added a commit to bjorkstromm/omnisharp-roslyn that referenced this issue Jun 6, 2018
bjorkstromm added a commit to bjorkstromm/omnisharp-roslyn that referenced this issue Jun 8, 2018
rchande pushed a commit to bjorkstromm/omnisharp-roslyn that referenced this issue Jun 18, 2018
bjorkstromm added a commit to bjorkstromm/omnisharp-roslyn that referenced this issue Jun 18, 2018
bjorkstromm added a commit to bjorkstromm/omnisharp-roslyn that referenced this issue Jun 18, 2018
bjorkstromm added a commit that referenced this issue Jun 18, 2018
GH1204: Only return usages from current file if OnlyThisFile is true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants