redhat-developer / redhat-developer/vscode-java
Q: Is there a way from my project to programmatically detect that it is in vscode
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.3k
- Forks
- 546
- Merge medio
- 20 h 1 min
- PR fusionados (30 d)
- 11
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
El issue no menciona archivos del repositorio, pruebas ni puntos de entrada de implementación; pregunta si el código Java puede detectar que un proyecto está abierto en VS Code. Comienza revisando el contexto del issue y la integración de la extensión de VS Code del repositorio, y determina después si está definido un cambio acotado y comprobable. Done no está especificado porque el hilo solo contiene una pregunta.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, vscode
- Área
- developer-experience, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 15/100