Skip to content

Commit

Permalink
Updated file format of plugin.xml and build.gradle.kts.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCoder committed Sep 17, 2022
1 parent 3882f02 commit 2f1d87e
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 59 deletions.
34 changes: 17 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ plugins {
id("com.github.node-gradle.node") version "3.2.1"
}

apply(plugin="com.github.node-gradle.node")
apply(plugin = "com.github.node-gradle.node")

group = properties("pluginGroup")
version = properties("pluginVersion")

// Configure project's dependencies
repositories {
mavenCentral()
flatDir { dirs ("lib") }
flatDir { dirs("lib") }
}
dependencies {
// https://mvnrepository.com/artifact/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer
Expand All @@ -43,7 +43,7 @@ dependencies {
testImplementation("junit:junit:4.12")
testImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10")
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0")
testImplementation ("org.spockframework:spock-core:2.2-groovy-4.0") {
testImplementation("org.spockframework:spock-core:2.2-groovy-4.0") {
exclude("org.codehaus.groovy", "groovy-xml")
}
}
Expand Down Expand Up @@ -133,24 +133,24 @@ tasks {

// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
pluginDescription.set(
provider {
File(projectDir, "README.md").readText().lines().run {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"

if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
subList(indexOf(start) + 1, indexOf(end))
}.joinToString("\n").run { markdownToHTML(this) }
}
provider {
File(projectDir, "README.md").readText().lines().run {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"

if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
subList(indexOf(start) + 1, indexOf(end))
}.joinToString("\n").run { markdownToHTML(this) }
}
)

// Get the latest available change notes from the changelog file
changeNotes.set(
provider {
changelog.getLatest().toHTML()
}
provider {
changelog.getLatest().toHTML()
}
)
}

Expand Down
89 changes: 47 additions & 42 deletions resource/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<idea-plugin>
<id>com.zenuml.jetbrains</id>
<name>ZenUML support</name>
<name>ZenUML Support</name>
<!-- Plugin version
Recommended format is BRANCH.BUILD.FIX (MAJOR.MINOR.FIX)
We use YEAR.MONTH.DAY format (see gradle.properties)
Expand Down Expand Up @@ -45,46 +45,46 @@

<extensionPoints>
<extensionPoint qualifiedName="org.intellij.zenuml.html.panel.provider"
interface="org.intellij.plugins.markdown.ui.preview.MarkdownHtmlPanelProvider" />
interface="org.intellij.plugins.markdown.ui.preview.MarkdownHtmlPanelProvider"/>
<extensionPoint qualifiedName="org.intellij.zenuml.fenceLanguageProvider"
interface="org.intellij.plugins.markdown.injection.CodeFenceLanguageProvider" />
interface="org.intellij.plugins.markdown.injection.CodeFenceLanguageProvider"/>
<extensionPoint qualifiedName="org.intellij.zenuml.codeFencePluginGeneratingProvider"
interface="org.intellij.plugins.markdown.extensions.MarkdownCodeFencePluginGeneratingProvider" />
interface="org.intellij.plugins.markdown.extensions.MarkdownCodeFencePluginGeneratingProvider"/>
</extensionPoints>

<extensions defaultExtensionNs="com.intellij">
<fileType name="ZenUML" extensions="z;zen;zenuml" language="ZenUML"
implementationClass="org.intellij.plugins.markdown.lang.ZenUmlFileType" fieldName="INSTANCE"/>
<!-- <lang.parserDefinition language="ZenUML" implementationClass="org.intellij.plugins.markdown.lang.parser.MarkdownParserDefinition"/>-->
<!-- <lang.ast.factory language="ZenUML" implementationClass="org.intellij.plugins.markdown.lang.psi.MarkdownASTFactory"/>-->
<!-- <lang.parserDefinition language="ZenUML" implementationClass="org.intellij.plugins.markdown.lang.parser.MarkdownParserDefinition"/>-->
<!-- <lang.ast.factory language="ZenUML" implementationClass="org.intellij.plugins.markdown.lang.psi.MarkdownASTFactory"/>-->

<!-- <lang.elementManipulator forClass="org.intellij.plugins.markdown.lang.psi.impl.ZenUmlCodeFenceImpl"-->
<!-- implementationClass="org.intellij.plugins.markdown.lang.psi.impl.ZenUmlCodeFenceImpl$Manipulator"/>-->
<!-- <lang.elementManipulator forClass="org.intellij.plugins.markdown.lang.psi.impl.ZenUmlLinkDestinationImpl"-->
<!-- implementationClass="org.intellij.plugins.markdown.lang.psi.impl.ZenUmlLinkDestinationImpl$Manipulator"/>-->
<!-- <lang.elementManipulator forClass="org.intellij.plugins.markdown.lang.psi.impl.ZenUmlCodeFenceImpl"-->
<!-- implementationClass="org.intellij.plugins.markdown.lang.psi.impl.ZenUmlCodeFenceImpl$Manipulator"/>-->
<!-- <lang.elementManipulator forClass="org.intellij.plugins.markdown.lang.psi.impl.ZenUmlLinkDestinationImpl"-->
<!-- implementationClass="org.intellij.plugins.markdown.lang.psi.impl.ZenUmlLinkDestinationImpl$Manipulator"/>-->

<!--<colorSettingsPage implementation="org.intellij.plugins.markdown.highlighting.MarkdownColorSettingsPage"/>-->
<!--<syntaxHighlighter key="ZenUML" implementationClass="org.intellij.plugins.markdown.highlighting.MarkdownSyntaxHighlighter"/>-->
<additionalTextAttributes scheme="Default" file="colorSchemes/MarkdownDefault.xml"/>
<additionalTextAttributes scheme="Darcula" file="colorSchemes/MarkdownDarcula.xml"/>

<!-- <braceMatcher filetype="ZenUML" implementationClass="org.intellij.plugins.markdown.braces.MarkdownBraceMatcher"/>-->
<!-- <quoteHandler fileType="ZenUML" className="org.intellij.plugins.markdown.braces.MarkdownQuoteHandler"/>-->
<!-- <typedHandler implementation="org.intellij.plugins.markdown.editor.MarkdownTypedHandler"/>-->
<!-- <braceMatcher filetype="ZenUML" implementationClass="org.intellij.plugins.markdown.braces.MarkdownBraceMatcher"/>-->
<!-- <quoteHandler fileType="ZenUML" className="org.intellij.plugins.markdown.braces.MarkdownQuoteHandler"/>-->
<!-- <typedHandler implementation="org.intellij.plugins.markdown.editor.MarkdownTypedHandler"/>-->

<!-- <bidiRegionsSeparator language="ZenUML" implementationClass="org.intellij.plugins.markdown.editor.MarkdownBidiRegionsSeparator"/>-->
<!-- <bidiRegionsSeparator language="ZenUML" implementationClass="org.intellij.plugins.markdown.editor.MarkdownBidiRegionsSeparator"/>-->

<!-- <annotator language="ZenUML" implementationClass="org.intellij.plugins.markdown.highlighting.MarkdownHighlightingAnnotator"/>-->
<!-- <annotator language="ZenUML" implementationClass="org.intellij.plugins.markdown.highlighting.MarkdownHighlightingAnnotator"/>-->

<!-- <multiHostInjector implementation="org.intellij.plugins.markdown.injection.CodeFenceInjector"/>-->
<!-- <multiHostInjector implementation="org.intellij.plugins.markdown.injection.CodeFenceInjector"/>-->

<!-- <completion.contributor language="ZenUML"-->
<!-- implementationClass="org.intellij.plugins.markdown.injection.LanguageListCompletionContributor"/>-->
<!-- <completion.contributor language="ZenUML"-->
<!-- implementationClass="org.intellij.plugins.markdown.injection.LanguageListCompletionContributor"/>-->

<fileEditorProvider implementation="org.intellij.plugins.markdown.ui.preview.MarkdownSplitEditorProvider"/>

<!-- <spellchecker.support language="ZenUML"-->
<!-- implementationClass="org.intellij.plugins.markdown.spellchecking.MarkdownSpellcheckingStrategy"/>-->
<!-- <spellchecker.support language="ZenUML"-->
<!-- implementationClass="org.intellij.plugins.markdown.spellchecking.MarkdownSpellcheckingStrategy"/>-->

<applicationConfigurable id="Settings.ZenUml"
bundle="org.intellij.plugins.markdown.bundle.MarkdownBundle"
Expand All @@ -94,37 +94,41 @@
instance="org.intellij.plugins.markdown.settings.MarkdownSettingsConfigurable">
</applicationConfigurable>
<applicationService serviceImplementation="org.intellij.plugins.markdown.settings.ZenUmlApplicationSettings"/>
<!-- <applicationService serviceImplementation="org.intellij.plugins.markdown.ui.preview.ZenUmlCodeFencePluginCache"/>-->
<!-- <lang.psiStructureViewFactory language="ZenUML"-->
<!-- implementationClass="org.intellij.plugins.markdown.structureView.MarkdownStructureViewFactory"/>-->
<!-- <psi.referenceContributor implementation="org.intellij.plugins.markdown.lang.references.MarkdownReferenceProvider"/>-->
<stripTrailingSpacesFilterFactory implementation="org.intellij.plugins.markdown.editor.MarkdownStripTrailingSpacesFilterFactory"/>
<!-- <applicationService serviceImplementation="org.intellij.plugins.markdown.ui.preview.ZenUmlCodeFencePluginCache"/>-->
<!-- <lang.psiStructureViewFactory language="ZenUML"-->
<!-- implementationClass="org.intellij.plugins.markdown.structureView.MarkdownStructureViewFactory"/>-->
<!-- <psi.referenceContributor implementation="org.intellij.plugins.markdown.lang.references.MarkdownReferenceProvider"/>-->
<stripTrailingSpacesFilterFactory
implementation="org.intellij.plugins.markdown.editor.MarkdownStripTrailingSpacesFilterFactory"/>
<httpRequestHandler implementation="org.intellij.plugins.markdown.ui.preview.PreviewStaticServer2"/>

<!-- <localInspection shortName="ZenUmlUnresolvedFileReference" bundle="org.intellij.plugins.markdown.bundle.MarkdownBundle"-->
<!-- key="zenuml.placeholder.inspection.name" groupKey="zenuml.inspection.group.ruby.name"-->
<!-- enabledByDefault="true" level="WARNING"-->
<!-- implementationClass="org.intellij.plugins.markdown.lang.references.ZenUmlUnresolvedFileReferenceInspection"/>-->
<!-- <localInspection shortName="ZenUmlUnresolvedFileReference" bundle="org.intellij.plugins.markdown.bundle.MarkdownBundle"-->
<!-- key="zenuml.placeholder.inspection.name" groupKey="zenuml.inspection.group.ruby.name"-->
<!-- enabledByDefault="true" level="WARNING"-->
<!-- implementationClass="org.intellij.plugins.markdown.lang.references.ZenUmlUnresolvedFileReferenceInspection"/>-->

<!-- <lang.foldingBuilder language="ZenUML" implementationClass="org.intellij.plugins.markdown.folding.MarkdownFoldingBuilder"/>-->
<!-- <stubIndex implementation="org.intellij.plugins.markdown.lang.index.MarkdownHeadersIndex"/>-->
<!-- <anchorReferenceProvider implementation="org.intellij.plugins.markdown.lang.references.MarkdownAnchorPathReferenceProvider"/>-->
<!-- <todoIndexer filetype="ZenUML" implementationClass="org.intellij.plugins.markdown.highlighting.MarkdownTodoIndexer" />-->
<!-- <indexPatternBuilder implementation="org.intellij.plugins.markdown.highlighting.MarkdownIndexPatternBuilder" />-->
<langCodeStyleSettingsProvider implementation="org.intellij.plugins.markdown.lang.formatter.MarkdownLanguageCodeStyleSettingsProvider"/>
<!-- <enterHandlerDelegate implementation="org.intellij.plugins.markdown.editor.MarkdownEnterHandler"/>-->
<!-- <lang.foldingBuilder language="ZenUML" implementationClass="org.intellij.plugins.markdown.folding.MarkdownFoldingBuilder"/>-->
<!-- <stubIndex implementation="org.intellij.plugins.markdown.lang.index.MarkdownHeadersIndex"/>-->
<!-- <anchorReferenceProvider implementation="org.intellij.plugins.markdown.lang.references.MarkdownAnchorPathReferenceProvider"/>-->
<!-- <todoIndexer filetype="ZenUML" implementationClass="org.intellij.plugins.markdown.highlighting.MarkdownTodoIndexer" />-->
<!-- <indexPatternBuilder implementation="org.intellij.plugins.markdown.highlighting.MarkdownIndexPatternBuilder" />-->
<langCodeStyleSettingsProvider
implementation="org.intellij.plugins.markdown.lang.formatter.MarkdownLanguageCodeStyleSettingsProvider"/>
<!-- <enterHandlerDelegate implementation="org.intellij.plugins.markdown.editor.MarkdownEnterHandler"/>-->

<applicationService serviceImplementation="org.intellij.sequencer.config.Configuration2"/>
</extensions>

<extensions defaultExtensionNs="org.intellij.zenuml">
<html.panel.provider implementation="org.intellij.plugins.markdown.ui.preview.javafx.JavaFxHtmlPanelProvider" />
<fenceLanguageProvider implementation="org.intellij.plugins.markdown.extensions.plantuml.PlantUMLCodeFenceLanguageProvider"/>
<!-- <codeFencePluginGeneratingProvider implementation="org.intellij.plugins.markdown.extensions.plantuml.PlantUMLProvider"/>-->
<html.panel.provider implementation="org.intellij.plugins.markdown.ui.preview.javafx.JavaFxHtmlPanelProvider"/>
<fenceLanguageProvider
implementation="org.intellij.plugins.markdown.extensions.plantuml.PlantUMLCodeFenceLanguageProvider"/>
<!-- <codeFencePluginGeneratingProvider implementation="org.intellij.plugins.markdown.extensions.plantuml.PlantUMLProvider"/>-->
</extensions>

<actions>
<group id="ZenUml.Toolbar.Left" class="com.intellij.openapi.actionSystem.DefaultActionGroup" text="Markdown editor actions">
<group id="ZenUml.Toolbar.Left" class="com.intellij.openapi.actionSystem.DefaultActionGroup"
text="Markdown editor actions">

<action class="com.zenuml.sequence.plugins.jetbrains.actions.DocumentationAction"
id="com.zenuml.sequence.plugins.jetbrains.actions.DocumentationAction"
Expand All @@ -143,7 +147,8 @@
use-shortcut-of="ParameterInfo">
</action>

<group id="ZenUml.Toolbar.Right" class="com.intellij.openapi.actionSystem.DefaultActionGroup" text="Markdown editor layout actions">
<group id="ZenUml.Toolbar.Right" class="com.intellij.openapi.actionSystem.DefaultActionGroup"
text="Markdown editor layout actions">
<action class="org.intellij.plugins.markdown.ui.actions.editorLayout.ZenUmlEditorOnlyLayoutChangeAction"
id="org.intellij.plugins.markdown.ui.actions.editorLayout.ZenUmlEditorOnlyLayoutChangeAction"
text="Show editor only"
Expand Down Expand Up @@ -173,5 +178,5 @@

</actions>

<product-descriptor code="PZENUML" release-date="20190601" release-version="20191" />
<product-descriptor code="PZENUML" release-date="20190601" release-version="20191"/>
</idea-plugin>

0 comments on commit 2f1d87e

Please sign in to comment.