Skip to content

Commit 115a12e

Browse files
committed
wip
1 parent b842dff commit 115a12e

File tree

3 files changed

+12
-22
lines changed

3 files changed

+12
-22
lines changed

README.md

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,11 @@
1-
# odools-pycharm
2-
3-
![Build](https://github.com/fda-odoo/odools-pycharm/workflows/Build/badge.svg)
4-
[![Version](https://img.shields.io/jetbrains/plugin/v/MARKETPLACE_ID.svg)](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID)
5-
[![Downloads](https://img.shields.io/jetbrains/plugin/d/MARKETPLACE_ID.svg)](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID)
6-
7-
## Template ToDo list
8-
- [x] Create a new [IntelliJ Platform Plugin Template][template] project.
9-
- [ ] Get familiar with the [template documentation][template].
10-
- [ ] Adjust the [pluginGroup](./gradle.properties) and [pluginName](./gradle.properties), as well as the [id](./src/main/resources/META-INF/plugin.xml) and [sources package](./src/main/kotlin).
11-
- [ ] Adjust the plugin description in `README` (see [Tips][docs:plugin-description])
12-
- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html?from=IJPluginTemplate).
13-
- [ ] [Publish a plugin manually](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html?from=IJPluginTemplate) for the first time.
14-
- [ ] Set the `MARKETPLACE_ID` in the above README badges. You can obtain it once the plugin is published to JetBrains Marketplace.
15-
- [ ] Set the [Plugin Signing](https://plugins.jetbrains.com/docs/intellij/plugin-signing.html?from=IJPluginTemplate) related [secrets](https://github.com/JetBrains/intellij-platform-plugin-template#environment-variables).
16-
- [ ] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html?from=IJPluginTemplate).
17-
- [ ] Click the <kbd>Watch</kbd> button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes.
18-
- [ ] Configure the [CODECOV_TOKEN](https://docs.codecov.com/docs/quick-start) secret for automated test coverage reports on PRs
1+
# OdooLS for PyCharm
192

203
<!-- Plugin description -->
21-
This Fancy IntelliJ Platform Plugin is going to be your implementation of the brilliant ideas that you have.
4+
OdooLS for PyCharm is a plugin that bring OdooLS on PyCharm.
225

23-
This specific section is a source for the [plugin.xml](/src/main/resources/META-INF/plugin.xml) file which will be extracted by the [Gradle](/build.gradle.kts) during the build process.
6+
OdooLS is a language server for Odoo projects. It will help you by adding hover, go to definition, autocompletion and diagnostics features.
247

25-
To keep everything working, do not remove `<!-- ... -->` sections.
8+
For more information, see [OdooLS](https://github.com/odoo/odoo-ls)
269
<!-- Plugin description end -->
2710

2811
## Installation
@@ -49,4 +32,3 @@ To keep everything working, do not remove `<!-- ... -->` sections.
4932
Plugin based on the [IntelliJ Platform Plugin Template][template].
5033

5134
[template]: https://github.com/JetBrains/intellij-platform-plugin-template
52-
[docs:plugin-description]: https://plugins.jetbrains.com/docs/intellij/plugin-user-experience.html#plugin-description-and-presentation

src/main/kotlin/com/odoo/odools/OdooLSInstallationProjectActivity.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ class OdooLSInstallationProjectActivity : ProjectActivity, DumbAware {
8686
javaClass.classLoader.getResourceAsStream(resourcePath).use { input ->
8787
requireNotNull(input) { "Resource not found: $resourcePath" }
8888
try {
89+
val parentDir = targetPath.parent
90+
if (parentDir != null) {
91+
Files.createDirectories(parentDir)
92+
}
8993
Files.copy(input, targetPath, StandardCopyOption.REPLACE_EXISTING)
9094
} catch (e: Exception) {
9195
//display message notification

src/main/kotlin/com/odoo/odools/OdooLSLspServerSupportProvider.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ import com.intellij.platform.lsp.api.lsWidget.LspServerWidgetItem
1212
import com.intellij.psi.search.FilenameIndex
1313
import com.intellij.psi.search.GlobalSearchScope
1414

15+
import com.intellij.platform.lsp.api.LspServerManager
16+
import com.intellij.platform.lsp.api.LspServerManagerListener
17+
import org.eclipse.lsp4j.jsonrpc.services.JsonNotification
18+
1519
val osName = System.getProperty("os.name").lowercase()
1620
val arch = System.getProperty("os.arch").lowercase()
1721

0 commit comments

Comments
 (0)