Skip to content

Commit

Permalink
[WIP] working towards a dynamic plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ahus1 committed Jan 30, 2020
1 parent d87f64b commit 1a15e7b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 70 deletions.
9 changes: 5 additions & 4 deletions build.gradle
Expand Up @@ -2,14 +2,15 @@ buildscript {
repositories {
jcenter()
maven { url 'http://dl.bintray.com/jetbrains/intellij-plugin-service' }
maven { url 'https://www.jetbrains.com/intellij-repository/snapshots' }
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.21.0'
}
}

plugins {
id "org.jetbrains.intellij" version "0.4.8"
id "org.jetbrains.intellij" version "0.4.16"
id "org.jetbrains.grammarkit" version "2018.3.1"
id "checkstyle"
id 'org.asciidoctor.jvm.convert' version '2.2.0'
Expand Down Expand Up @@ -40,13 +41,13 @@ allprojects {
intellij {
// we support IC-2017.2, but PsiViewer is not available for the older version, therefore use IC-2018.1 to run it
// Grazie is only available from 2019.2, therefore use IC-2019.2 to run it
version 'IC-2019.3.1'
version '201-EAP-SNAPSHOT'
pluginName 'asciidoctor'
updateSinceUntilBuild false
plugins = [
'PsiViewer:193-SNAPSHOT', // used for debugging
'PsiViewer:201-SNAPSHOT', // used for debugging
'PlantUML integration:2.22.0', // used to test highlighting of plantuml diagrams
'tanvd.grazi:2019.3-6.2.stable', // used for spell and grammer checking checking
'tanvd.grazi:201.4515.32', // :2019.3-6.2.stable', // used for spell and grammer checking checking
'java' // used to integrate into the build via AsciiDocTargetScopeProvider
]
}
Expand Down
Expand Up @@ -16,8 +16,6 @@ public abstract class AsciiDocHtmlPanelProvider {
public static final ExtensionPointName<AsciiDocHtmlPanelProvider> EP_NAME =
ExtensionPointName.create("org.asciidoc.intellij.html.panel.provider");

private static AsciiDocHtmlPanelProvider[] ourProviders = null;

@NotNull
public abstract AsciiDocHtmlPanel createHtmlPanel(Document document, Path imagesPath);

Expand All @@ -29,10 +27,7 @@ public abstract class AsciiDocHtmlPanelProvider {

@NotNull
public static AsciiDocHtmlPanelProvider[] getProviders() {
if (ourProviders == null) {
ourProviders = EP_NAME.getExtensions();
}
return ourProviders;
return EP_NAME.getExtensions();
}

@NotNull
Expand Down

This file was deleted.

This file was deleted.

15 changes: 5 additions & 10 deletions src/main/resources/META-INF/plugin.xml
Expand Up @@ -12,20 +12,14 @@

<!-- please see http://confluence.jetbrains.net/display/IDEADEV/Plugin+Compatibility+with+IntelliJ+Platform+Products
on how to target different products -->
<idea-version since-build="172.2465.6"/> <!-- 2017.2 -->
<idea-version since-build="192.*"/> <!-- 2019.2 -->
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html -->
<depends>com.intellij.modules.lang</depends>
<depends optional="true" config-file="java-features.xml">com.intellij.modules.java</depends>
<depends optional="true" config-file="grazie-features.xml">tanvd.grazi</depends>

<project-components>
<component>
<implementation-class>org.asciidoc.intellij.toolbar.AsciiDocToolbarLoaderComponent</implementation-class>
</component>
</project-components>

<extensionPoints>
<extensionPoint qualifiedName="org.asciidoc.intellij.html.panel.provider"
<extensionPoint qualifiedName="org.asciidoc.intellij.html.panel.provider" dynamic="true"
interface="org.asciidoc.intellij.editor.AsciiDocHtmlPanelProvider"/>
</extensionPoints>

Expand Down Expand Up @@ -163,10 +157,11 @@
<webBrowserUrlProvider implementation="org.asciidoc.intellij.web.AsciiDocBrowserUrlProvider"/>
<customPasteProvider implementation="org.asciidoc.intellij.pasteProvider.AsciiDocPasteProvider" />
<filePasteProvider implementation="org.asciidoc.intellij.pasteProvider.AsciiDocPasteProvider" />
<fileTypeFactory implementation="org.asciidoc.intellij.file.AsciiDocFileTypeFactory"/>
<fileType name="AsciiDoc" extensions="adoc;asciidoc;ad" fileNames=".asciidoctorconfig" language="AsciiDoc"
implementationClass="org.asciidoc.intellij.file.AsciiDocFileType" fieldName="INSTANCE"/>
<fileEditorProvider implementation="org.asciidoc.intellij.editor.AsciiDocSplitEditorProvider"/>
<liveTemplateContext implementation="org.asciidoc.intellij.template.AsciiDocTemplateContextType$File"/>
<defaultLiveTemplatesProvider implementation="org.asciidoc.intellij.template.AsciiDocTemplatesProvider"/>
<defaultLiveTemplates file="liveTemplates/AsciiDocLiveTemplates.xml" />
<lang.ast.factory language="AsciiDoc" implementationClass="org.asciidoc.intellij.psi.AsciiDocASTFactory"/>
<lang.parserDefinition language="AsciiDoc"
implementationClass="org.asciidoc.intellij.parser.AsciiDocParserDefinition"/>
Expand Down

0 comments on commit 1a15e7b

Please sign in to comment.