Skip to content

Commit

Permalink
Adapt the template
Browse files Browse the repository at this point in the history
  • Loading branch information
qligier committed Sep 11, 2024
1 parent 6564055 commit 5a67007
Show file tree
Hide file tree
Showing 20 changed files with 217 additions and 178 deletions.
29 changes: 29 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Updated: 2024-09-11
# See http://EditorConfig.org for more information about .editorconfig files.

##########################################
# Common Settings
##########################################

# This file is the top-most EditorConfig file
root = true

# All Files
[*]
charset = utf-8
indent_style = space
indent_size = 4
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
ij_continuation_indent_size = 8
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
ij_formatter_tags_enabled = true
ij_smart_tabs = false
ij_visual_guides = 120
ij_wrap_on_typing = true

[*.{yaml,yml}]
indent_size = 2
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@

name: Build
on:
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
# Trigger the workflow on pushes to only the 'master' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
push:
branches: [ main ]
branches: [ master ]
# Trigger the workflow on any pull request
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:

# Prepare environment and build the plugin
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
Expand Down
28 changes: 24 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
.gradle
.idea
.intellijPlatform
.qodana
build
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
antlr*.jar
idea-flex.skeleton
jflex*.jar

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
.idea/sonarlint/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
.intellijPlatform/

### Mac OS ###
.DS_Store
6 changes: 6 additions & 0 deletions .idea/copyright/MIT_qligier_current_year.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 19 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
<!-- Keep a Changelog guide -> https://keepachangelog.com -->
# Changelog

# test-jb Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Initial scaffold created from [IntelliJ Platform Plugin Template](https://github.com/JetBrains/intellij-platform-plugin-template)

- Initial scaffold created
from [IntelliJ Platform Plugin Template](https://github.com/JetBrains/intellij-platform-plugin-template)

### Changed

### Deprecated

### Removed

### Fixed

### Security
71 changes: 33 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,46 @@
# test-jb

![Build](https://github.com/qligier/test-jb/workflows/Build/badge.svg)
[![Version](https://img.shields.io/jetbrains/plugin/v/MARKETPLACE_ID.svg)](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID)
[![Downloads](https://img.shields.io/jetbrains/plugin/d/MARKETPLACE_ID.svg)](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID)

## Template ToDo list
- [x] Create a new [IntelliJ Platform Plugin Template][template] project.
- [ ] Get familiar with the [template documentation][template].
- [ ] 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).
- [ ] Adjust the plugin description in `README` (see [Tips][docs:plugin-description])
- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html?from=IJPluginTemplate).
- [ ] [Publish a plugin manually](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html?from=IJPluginTemplate) for the first time.
- [ ] Set the `MARKETPLACE_ID` in the above README badges. You can obtain it once the plugin is published to JetBrains Marketplace.
- [ ] 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).
- [ ] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html?from=IJPluginTemplate).
- [ ] 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.
# ![FHIR and SUSHI Support Logo](src/main/resources/META-INF/pluginIcon.svg) JetBrains Plugin: FHIR and SUSHI Support

<!-- Plugin description -->
This Fancy IntelliJ Platform Plugin is going to be your implementation of the brilliant ideas that you have.
A plugin that add supports for the [FHIR Shorthand language](https://build.fhir.org/ig/HL7/fhir-shorthand/index.html)
(_FSH_) and the [IG Publisher](https://github.com/HL7/fhir-ig-publisher) and [SUSHI](https://github.com/FHIR/sushi/)
tools.
<!-- Plugin description end -->

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.
<p align="center">

To keep everything working, do not remove `<!-- ... -->` sections.
<!-- Plugin description end -->
![GitHub](https://img.shields.io/github/license/qligier/jetbrains-plugin-fhir?style=flat-square)
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/qligier/jetbrains-plugin-fhir?style=flat-square)
![GitHub last commit](https://img.shields.io/github/last-commit/qligier/jetbrains-plugin-fhir?style=flat-square)
![JDK 17](https://img.shields.io/badge/JDK-11-blue?style=flat-square)
</p>

## Installation
## IG Publisher support

- Using the IDE built-in plugin system:

<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "test-jb"</kbd> >
<kbd>Install</kbd>

- Using JetBrains Marketplace:
A new configuration is available to run the IG Publisher on the current project. SUSHI is supported through the IG
Publisher.

Go to [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID) and install it by clicking the <kbd>Install to ...</kbd> button in case your IDE is running.
> **Warning**
>
> It's currently the responsibility of the user to download the IG Publisher and update its path in the
> configuration, and to make SUSHI available in the project if needed.
You can also download the [latest release](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID/versions) from JetBrains Marketplace and install it manually using
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>
## FSH language support

- Manually:
This plugin adds, for FSH files:

Download the [latest release](https://github.com/qligier/test-jb/releases/latest) and install it manually using
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>
- Syntax highlighting;
- Block and line commenting actions (`Comment with Line Comment` and `Comment with Block Comment`)
- Braces matching;
- Renaming capabilities;
- Collapsable items;
- Inspection: alias should start with '$';
- Inspection: ids should be based on the item's name;

### Notice

---
Plugin based on the [IntelliJ Platform Plugin Template][template].
The FHIR
Shorthand ![FSH icon](https://github.com/qligier/jetbrains-plugin-fhir/raw/master/src/main/resources/icons/fsh_flame.png)
is maybe copyrighted?

[template]: https://github.com/JetBrains/intellij-platform-plugin-template
[docs:plugin-description]: https://plugins.jetbrains.com/docs/intellij/plugin-user-experience.html#plugin-description-and-presentation
The logo is derived from [Burn Fire Flame Hot](https://www.svgrepo.com/svg/404501/burn-fire-flame-hot), published
under [Creative Commons Zero](https://creativecommons.org/publicdomain/zero/1.0/) license.
8 changes: 7 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright 2024 Quentin Ligier. Use of this source code is governed by the MIT license.
*/

import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
Expand Down Expand Up @@ -31,6 +35,7 @@ repositories {

// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
dependencies {
implementation(libs.annotations)
testImplementation(libs.junit)

// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
Expand Down Expand Up @@ -98,7 +103,8 @@ intellijPlatform {
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
channels = providers.gradleProperty("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
channels = providers.gradleProperty("pluginVersion")
.map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
}

pluginVerification {
Expand Down
40 changes: 17 additions & 23 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html

pluginGroup = com.github.qligier.testjb
pluginName = test-jb
pluginRepositoryUrl = https://github.com/qligier/test-jb
#
# Copyright 2024 Quentin Ligier. Use of this source code is governed by the MIT license.
#
pluginGroup=ch.qligier.jetbrains.plugin.fhir
pluginName=FHIR and SUSHI Support
pluginRepositoryUrl=https://github.com/qligier/jetbrains-plugin-fhir
# SemVer format -> https://semver.org
pluginVersion = 0.0.1

pluginVersion=0.0.1
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 233
pluginUntilBuild = 242.*

pluginSinceBuild=233
pluginUntilBuild=242.*
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType = IC
platformVersion = 2023.3.7

platformType=IC
platformVersion=2023.3.7
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
platformPlugins =
platformPlugins=
# Example: platformBundledPlugins = com.intellij.java
platformBundledPlugins =

platformBundledPlugins=
# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.9

gradleVersion=8.9
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
kotlin.stdlib.default.dependency = false

kotlin.stdlib.default.dependency=false
# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
org.gradle.configuration-cache = true

org.gradle.configuration-cache=true
# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html
org.gradle.caching = true
org.gradle.caching=true
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[versions]
# libraries
junit = "4.13.2"
annotations = "24.1.0"

# plugins
changelog = "2.2.1"
Expand All @@ -11,6 +12,7 @@ qodana = "2024.1.9"

[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }

[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
Expand Down
6 changes: 5 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/*
* Copyright 2024 Quentin Ligier. Use of this source code is governed by the MIT license.
*/

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

rootProject.name = "test-jb"
rootProject.name = "jetbrains-plugin-fhir"
11 changes: 11 additions & 0 deletions src/main/java/ch/qligier/jetbrains/plugin/fhir/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2024 Quentin Ligier. Use of this source code is governed by the MIT license.

/**
* jetbrains-plugin-fhir
*
* @author Quentin Ligier
**/
@ParametersAreNonnullByDefault
package ch.qligier.jetbrains.plugin.fhir;

import javax.annotation.ParametersAreNonnullByDefault;
20 changes: 0 additions & 20 deletions src/main/kotlin/com/github/qligier/testjb/MyBundle.kt

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5a67007

Please sign in to comment.