Comments (9)
It requires a newer IntelliJ baseline. com.intellij.fileTypeFactory
was deprecated in 2019.2.
from idea-stapler-plugin.
Registering a File Type | IntelliJ Platform Plugin SDK
from idea-stapler-plugin.
Hello @duemir ,
with last master
, I tried following this: https://plugins.jetbrains.com/docs/intellij/dynamic-plugins.html#restrictions
But IDEA states nothing to report (?)
And running locally:
$ gradle runPluginVerifier -PideaVersion=2022.2.3
...
Plugin Stapler plugin for IntelliJ IDEA:2.1.0 against IC-222.4345.14: Compatible
Plugin can probably be enabled or disabled without IDE restart
Plugin Stapler plugin for IntelliJ IDEA:2.1.0 against IC-223.6160.11: Compatible
Plugin can probably be enabled or disabled without IDE restart
...
But it seems it's still not dynamic, as when installed, trying to uninstall -> requires IDE restart :/
from idea-stapler-plugin.
Check https://plugins.jetbrains.com/docs/intellij/dynamic-plugins.html#code
Do not store references to PSI elements in objects which can survive plugin loading or unloading; use
SmartPsiElementPointer
instead.
A bunch of XmlTag-s and XmlAttributes are stored around directly, I believe. Something to look into as far as this feature goes.
from idea-stapler-plugin.
I don't know how much of a clue it is, but when I updated the plugin in IntelliJ Community Edition, dynamic reload worked.
from idea-stapler-plugin.
I'm my side, can't make it reload dynamically :/
In a terminal:
$ gradle runIde -PrunIde.jvmArgs+="-XX:+UnlockDiagnosticVMOptions" -PideaVersion=2022.1
In the opened sandbox:
- change
Registry...
configuration withide.plugins.snapshot.on.unload.fail
totrue
- open a jelly file
In another terminal:
$ gradle buildPlugin -xbuildSearchableOptions
Switch focus back to sandbox:
- plugin will try to reload dynamically
- a popin will show stating dynamic reload failed
- look at
build/idea-sandbox/system/log/idea.log
:
2022-11-07 08:41:28,176 [ 44771] INFO - #c.i.i.p.DynamicPlugins - Snapshot analysis result: Root 1:
ROOT: Global JNI
com.intellij.openapi.wm.impl.IdeFrameImpl.myFrameHelper
com.intellij.openapi.wm.impl.ProjectFrameHelper$1.this$0
com.intellij.openapi.wm.impl.ProjectFrameHelper.project
com.intellij.openapi.project.impl.ProjectExImpl.componentKeyToAdapter
java.util.concurrent.ConcurrentHashMap.table
java.util.concurrent.ConcurrentHashMap$Node[]
java.util.concurrent.ConcurrentHashMap$Node.val
com.intellij.serviceContainer.ServiceComponentAdapter.initializedInstance
com.intellij.ide.structureView.impl.StructureViewFactoryImpl.myImplExtensions
java.util.concurrent.ConcurrentHashMap.table
java.util.concurrent.ConcurrentHashMap$Node[]
java.util.concurrent.ConcurrentHashMap$Node.key
org.kohsuke.stapler.idea.psi.JellyFileImpl.<loader>
* com.intellij.ide.plugins.cl.PluginClassLoader
2022-11-07 08:41:28,213 [ 44808] INFO - #c.i.i.p.DynamicPlugins - Plugin Stapler plugin for IntelliJ IDEA is not unload-safe because class loader cannot be unloaded. Memory snapshot created at /Users/xxx/unload-Stapler plugin for IntelliJ IDEA-07.11.2022_08.41.21.hprof
from idea-stapler-plugin.
That looks like the new PSI class that you introduced, which appears to be used as a key in the map somewhere inside IntelliJ.
Other than asking in Jetbrains Slack and reporting to their YouTrack if that's what they suggest on Slack, I have no ideas.
To be honest this is nice to have category in my head, so I personally would not be spending much time on this.
from idea-stapler-plugin.
Same issue with standard simple language demo from JetBrains.
Created https://youtrack.jetbrains.com/issue/IDEA-305958/simplelanguageplugin-not-dynamic
from idea-stapler-plugin.
Created issue is a duplicate of https://youtrack.jetbrains.com/issue/IDEA-263300 (unresolved yet)
from idea-stapler-plugin.
Related Issues (20)
- IntelliJ plugin verifier does not seem to required IDE versions anymore
- Show Views in the Class' Structure tool window HOT 2
- IllegalArgumentException: Invalid range specified: (1, -1); HOT 4
- Suggest localizing in well known places.
- Integrate with "Java i18n" bundled plugin instead of manual internationalization implementation
- Override organization issue templates for this repository HOT 2
- Jenkins Extensions should not be considered unused by IntelliJ
- i18n with single-quote exception Argument rangeInElement (9,25) endOffset must not exceed descriptor text range (38, 62) length (24)
- Update IntelliJ baseline to 2021.3
- Teach Groovy to recognize `namespace` method in Groovy Stapler views
- Inspect that Describable has a Descriptor
- Addressed compatibility warnings for release 2023.3
- Add support for highlighting deprecated attributes
- Update IntelliJ baseline to 2022.3
- st:include page reference doesn't seem to be clickable even though `JellyReferenceContributor` supposed to handle it
- Make Maven Localizer run automatically for jenkins plugins
- Is Stapler Facet even needed? HOT 2
- StackOverflowError when opening Jelly file HOT 2
- Jelly Core Schema is not complete HOT 3
- Add support for Stapler's `this` Jelly Tag Library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from idea-stapler-plugin.