Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 41 additions & 126 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "org.markupcarve"
version = "0.1.4"
version = "0.1.5"

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion spec
Submodule spec updated 453 files
29 changes: 29 additions & 0 deletions src/main/resources/META-INF/carve-jcef.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<idea-plugin>
<!--
The two extension points that build a CarvePreviewPanel, and with it a
JBCefBrowser. They are loaded ONLY when the JCEF plugin
(com.intellij.modules.jcef) is present - see the optional <depends> in
plugin.xml.

JCEF is a separate plugin with its own class loader, not part of
com.intellij.modules.platform. Registering the preview unconditionally
therefore threw NoClassDefFoundError on JBCefBrowser the moment a .crv
file was opened, and because the provider declares HIDE_DEFAULT_EDITOR,
the failure took the whole editor with it - the file could not be opened
at all (#88).

Splitting the registration out is what makes the degradation real:
without JCEF nothing here is registered, the plain text editor opens the
file, and highlighting, export and the language server are unaffected.
-->
<extensions defaultExtensionNs="com.intellij">
<fileEditorProvider
implementation="org.markupcarve.carve.preview.CarvePreviewEditorProvider"/>

<toolWindow
id="Carve Preview"
anchor="right"
factoryClass="org.markupcarve.carve.preview.CarvePreviewToolWindowFactory"
icon="/icons/carve.svg"/>
</extensions>
</idea-plugin>
21 changes: 10 additions & 11 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
to get syntax highlighting and preview.
-->
<depends optional="true" config-file="carve-lsp.xml">com.redhat.devtools.lsp4ij</depends>
<!--
JCEF is a separate plugin, not part of the platform module, so the preview
registration lives in carve-jcef.xml and loads only where JCEF does. The
rest of the plugin - highlighting, export, templates, the language server -
never touches it.
-->
<depends optional="true" config-file="carve-jcef.xml">com.intellij.modules.jcef</depends>

<extensions defaultExtensionNs="com.intellij">
<notificationGroup id="Carve" displayType="BALLOON"/>
Expand Down Expand Up @@ -76,15 +83,6 @@
<colorSettingsPage
implementation="org.markupcarve.carve.highlight.CarveColorSettingsPage"/>

<fileEditorProvider
implementation="org.markupcarve.carve.preview.CarvePreviewEditorProvider"/>

<toolWindow
id="Carve Preview"
anchor="right"
factoryClass="org.markupcarve.carve.preview.CarvePreviewToolWindowFactory"
icon="/icons/carve.svg"/>

<defaultLiveTemplates file="/liveTemplates/Carve.xml"/>

<projectConfigurable
Expand All @@ -99,8 +97,9 @@

<!--
The LSP4IJ extension points (Carve language server + language mapping) live
in the optional carve-lsp.xml, loaded only when LSP4IJ is installed. See the
optional <depends config-file="carve-lsp.xml"> above.
in the optional carve-lsp.xml, loaded only when LSP4IJ is installed, and the
preview extension points live in carve-jcef.xml the same way. See the two
optional <depends config-file="..."> entries above.
-->

<actions>
Expand Down
Loading
Loading