redhat-developer / redhat-developer/vscode-java
Q: Is there a way from my project to programmatically detect that it is in vscode
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 546
- Merge medio
- 20h 1m
- PR unite (30g)
- 11
Descrizione
I have a situation where a Gradle plugin I'm developing needs to take conditional actions depending on whether or not the project in which my Gradle plugin is applied, is currently being edited inside vscode.
I'm wondering if there might be someway for any random Java code that is part of a project, to programmatically detect that the project is currently opened in vscode.
Maybe something like querying the hierarchy of class loaders to see if some class that is only ever loaded by vscode-java is present? Or maybe there is something like a .lock file somewhere that would only exist if vscode-java is editing a specific project? Anything like that?
I realize I could have the code look in the root folder to see if a .vscode folder is there — or something along those lines. But I very often open projects in all of the different Java IDEs at different times. So although the project might be open in IntelliJ at any given time, it would be a false positive in the IntelliJ scenario when the detection code finds a .vscode folder from the previous times I might have edited the project in vscode.
Environment
- Operating System: Windows/Linux/Mac OS
- JDK version: Java 1.5 to Java 13+
- Visual Studio Code version: 1.40.1 (system setup)
- Java extension version: 0.53.1
- Gradle 3.x - 6.x
Steps To Reproduce
Not Applicable
Current Result
Not Applicable
Expected Result
Not Applicable
Additional Informations
Not Applicable
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
L’issue non nomina file del repository, test o punti di ingresso dell’implementazione; chiede se il codice Java può rilevare che un progetto è aperto in VS Code. Inizia esaminando il contesto dell’issue e l’integrazione dell’estensione VS Code del repository, quindi determina se è definita una modifica circoscritta e verificabile. Done non è specificato perché il thread contiene solo una domanda.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, vscode
- Ambito
- developer-experience, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 15/100