Jetbrains Plugin Custom TextEditor Rendering - intellij-plugin

How does one go about extending the jetbrains texteditor in a plugin to replace the text/characters/tokens with images/sprites?

This is not possible in the current version of IntelliJ IDEA (2016.3). The only possibility is to use the EditorInlay API to insert custom-drawn fragments between characters in the editor.

Related

Is there a plugin to tell IntelliJ not to format a particular block when I use auto format?

My question is a duplicate of: How to turn off the Eclipse code formatter for certain sections of Java code? but for IntelliJ.
Does a similar feature exist for IntelliJ?
Yes, and It works the same way with:
#formatter:off
and
#formatter:on
Navigate to:
Settings > Editor > Code Style > Formatter control

Shortcut key for context-sensitive help in Intellij Idea (coding in Java)

Isn't there some shortcut that takes you to context specific help?
For example, if I have my cursor on System.out.println, isn't there some shortcut key I press that takes me to the documentation on this particular method or class where the method is declared?
View documentation ("Quick Documentation" action):
Ctrl+Q
View external documentation ("External Documentation" action):
Shift+F1
For this to work you need to configure your project so that IntelliJ knows where to look for it (see here).
Just to add an answer for the Mac users out there try using F1 for Quick Documentation.
Check out https://www.jetbrains.com/help/idea/viewing-reference-information.html#external-docs
In the Project Structure window > Platform Settings (Ctrl+Shift+Alt+S) under SDKs you can add a documentation url for the specific SDK version: under Documentation Paths tab click on the correct + icon (or use Alt-S). In IntelliJ 2019.3 when you want to add the url it gives you by default the correct url so you can just hit Ok:
JDK 1.8: https://docs.oracle.com/javase/8/docs/api/
JDK 11: https://docs.oracle.com/en/java/javase/11/docs/api/
JDK 13: https://docs.oracle.com/en/java/javase/13/docs/api/
When you return to your source code you can the select a Java keyword and hit Shift-F1 and your browser will open and jump automatically to the correct docs for the keyword.

Intellij idea: how to extend the Java editor

I have managed to develop and run an intellij plugin. Would it be possible to create a plugin extending the java editor for instance by providing a custom code completion feature ?
Yes, this is possible. Please refer to the JavaDoc of the CompletionContributor class for details of implementing custom code completion.

Intellij idea deprecated no strikeout/strikethrough

I'm using IntelliJ IDEA v12. When I import a project, there’s a strikeout/strikethrough line on the method which has the annotation #Deprecated, but I used alt+enter to disable it. So, how can I reactivate this feature? I want to display that strikethrough, thanks!
Open Settings -> Type Inspections to go to inspection settings -> Type Deprecated to find out all deprecated related inspection settings -> Check Deprecated API usage.
IntelliJ had a bug in 2018.3, 2018.2.2 (182.4129.33). It was fixed in builds 191.65, 183.3691.
Setting -Dide.text.effect.new.metrics=false in the .vmoptions fixes the problem.
In addition to Ionghua's answer .....
If you find that IntelliJ is still not striking out deprecated methods, even though you have enabled the inspection as above, check to make sure that your code is not ignoring deprecation warnings with #SuppressWarnings("deprecation").
In addition to longhua's answer... and vegemite4me...
Another possible source for this problem might be custom color themes.
If you are using a custom theme, make sure that it contains strikethrough. I was using monokai-sublime and there is no strikethrough for #Deprecated annotations. When I changed the color theme from monokai to darcula strikethrough worked as expected.
I found that the only thing that worked for me with version 2019.2 192.5728.98, runtime 11.0.3+12-b304.10 was to use Help | Edit VM Options and add -Dide.text.effect.new.metrics=false

How to add shortcuts ("templates") to eclipse properties through my plugin?

I'm developing a plugin for visualization of objects by calling Doo.dle(Object o).
Now I'd like to automatically define a shortcut like sysout for System.out.println(), e.g. doodle.
I already know how to do it by hand:
Window > Preferences > Java > Editor > Templates
Is there an extension point or something similar to do this automatically with my plugin?
I managed to do it on my own:
I had to define a javaCompletionProposalComputer extension and implement an ICompletionProposal.
It's not exactly what I intended, but it's working too.
Update:
I finally found it out:
The key is to define an extension for org.eclipse.ui.editors.templates. Patterns etc. can be cheated off predifined templates in eclipse properties (see question).