AvinZarlez / processing-vscode

A Visual Studio Code extension for the programming language Processing
https://marketplace.visualstudio.com/items?itemName=Tobiah.language-pde
MIT License
177 stars 25 forks source link

Add a problem matcher for VS Code #99

Open benthillerkus opened 3 years ago

benthillerkus commented 3 years ago

I've written a simple problem matcher, but unfortunately I haven't quite figured out where in the code you are generating the tasks.json, so I can't just do a PR for it.

      "problemMatcher": {
        "owner": "pde",
        "fileLocation": ["relative", "${workspaceFolder}"],
        "pattern": {
          "regexp": "^(.+\\.pde):(\\d+):(\\d+):(\\d+):(\\d+): (.*)()$",
          "file": 1,
          "line": 2,
          "column": 3,
          "endLine": 4,
          "endColumn": 5,
          "message": 6,
          "severity": 7,
        }
      }

image

The problem matcher works reasonably well, but it is not being triggered, when you use Processing: Run Processing Project, only when you use Terminal -> Run Task -> Run Sketch, so maybe some stuff for Processing: Run Processing Project would have to be changed. Maybe the extension could work with VS Code's Run active file?

AvinZarlez commented 3 years ago

The task file is created via copying the ProcessingTasks.json file.

https://github.com/TobiahZ/processing-vscode/blob/main/ProcessingTasks.json

The task executes processing directly, will need to tweak run_task_file from line 131 of extension.ts

As I have said on other issues, I don't have much time to support this extension lately. Definitely something I can add to a future version. Or, I would be happy to review/merge in a PR if you want to contribute.