Where is my PHPstorm plugin going wrong - intellij-idea

I'm trying to create a basic plugin which basically adds live-templates / snippets to PHPStorm.
When I install it by entering PHPStorm > Settings > Plugins and clicking on "Install plugin from disk". After selecting the jar file I created, it appeared in the plugins list with the correct title, description, change log etc, then it asks me to restart and all appears to have worked well.
The only issue is the live templates are not working at all. What am I doing wrong?
https://github.com/JasonMortonNZ/test-phpstorm-plugin

Maybe you are missing this in plugin.xml
<depends>com.intellij.modules.lang</depends>

Related

How to remove material theme (or reset to defaults) from IntelliJ / PyCharm?

I have installed Material Theme UI and it made my IDE blackish. Later I decided to remove and and removed plugin. Unfortunately, this didn't give default colors back, some parts of IDE, for example Project pane, remained blackish.
How ro recover?
How to remove material theme from IntelliJ / PyCharm?
you can go to the Preferences->Plugins on the search bar, type Material UI
then press on the Uninstall button .
You should:
Go to Settings->Plugins and remove Material UI plugin
Switch to Default theme in Settings->Editor->Color Scheme
If it does not help (it happened to me) and you still have some colors/fonts from removed Material UI - looks like Material UI theme override some default colors. You should then close Intellij, go to Intellij config folder (on Windows it is C:/Users/<your username>/.IntellijIdeaXXXX.X/config) and remove this config folder and restart Intellij. It should show you a dialog window to import settings from previous version or use defaults (like when you install Intellij and make the first start). After that everything will be switched to default colors/fonts.
From the material-theme-jetbrains repo:
File Colors stuck after uninstallation The File Status Colors feature
is also a feature that sticks outside of the realm of the plugin as it
modifies the IDE itself. Therefore when uninstalling/disabling the
plugin the colors will stuck.
If you want to reset to the default colors, open the Settings at
Version Control -> File Status Colors in 2017.3+. In previous
versions, you will need to go to the config directory and delete the
_#user_Darcula.icls color scheme manually.
None of these worked for me as an acceptable solution. So here is what I figured out:
Go to plugins, uninstall Material UI.
Ensure colour scheme is Default/Darcula.
Restart Idea.
At this point most changes were back to default, but some things like colour of current tab, error highlights, modified files etc were still not back to usual. So I followed the advice of deleting config and things returned to normal. But with this option you lose everything, even the installed plugins. And worst thing was, I was using a settings repository to sync settings, few minutes later the colours were back! So I did a diff with older config directory and then a git log revealed that these files are the culprits.
Delete these 4 files from this path: .IntelliJIdea<version>/config/settingsRepository/repository/
colors/_#user_Darcula.icls
colors/_#user_Default.icls
material_custom_theme. xml
material_theme.xml
Then do a git commit and git push to ensure these are synced to your repository. And finally theme was back to normal!
Unfortunately whatever I was doing from the settings, I've couldn't get rid of that theme. So I uninstalled the program and reinstalled it again without material theme. Hope there will be better solution.
Tested with intellij 2018.3 go to settings->Type material then untick the material theme after that restart ide should fix the issue.
A tad brute force, but you could try and delete the theme directly.
Close IntelliJ
Go to: ..\JetBrains\themes
Delete Material UI
Open IntelliJ
Press Command + , (comma) (Shortcut to preferences) and search for material. Uninstall the material in plugins section.
Uninstall Material Theme UI plugin: Settings->Plugins
Delete colors from the config folder: C:\Users\User name\<.IdeaIC2018.2>\config\colors (don't remove the whole config folder because all the previous settings and tasks will be removed)
Delete material_theme file: C:\Users\User name\<.IdeaIC2018.2>\options\material_theme
If you are wondering how to do it in PHPStorm 2020.2 and above:
Settings (Alt + Ctrl + S) -> Plugins -> Uncheck the MaterialUI.
After unchecking, you would then be able to see an option to uninstall from the dropdown arrow found next to the install button.
2019 version File > Settings (or alt + f7 on windows), search for material theme ui
if you have the stupid accents persisting through uninstalling the plugin, deleting config files and so on the solution is under:
appearance and behavior > file colors > delete all of them
Another 2019 version (worked in my case):
open the settings editor (File->Settings)
search for Plugins page
inside the Plugins page, search for the Material UI plugin and uninstall it
search for Appearance & Behaviour->Appearance page
select the theme you prefer (IntelliJ or Darkula or High contrast). If your theme is already selected, chose another theme, apply the changes, than select back your preferred theme.
close IntelliJ (or PyCharm/WebStorm/etc)
open .IntelliJIdea<version>/config folder, usually it's in your home folder.
remove the following files:
material_theme.xml
colors/_#user_Darcula.icls or colors/_#user_Dafault.icls (beware: you may loose custom configurations you may have done)
Done.
This works for me in 2023.
Steps
Go to File --> Settings --> Plugins --> Go to "Installed" tab --> Search "Material Theme UI" --> Click on settings icon --> Click on "Uninstall" --> Click "Yes" in the dialog box --> Restart the IDE
Screenshot
Make sure to Restart the IDE

Intellij Annotate Option Grayed Out

I am trying to look at who changed a line in Intellij 15. I know I can use git blame but I want to learn how to do it correctly in intellij. I am right clicking on the line numbers on the file but when I get the context menu the annotate option is grayed out. What setting am I missing?
I looked at this page and couldn't find an answer. What am I missing?
If you check File > Settings > Version Control and see that your current project is listed under "Unregistered Roots", go to (on the menubar) VCS > Enable Version Control Integration. It will ask you to select the VCS tool you use, then click ok and you'll have all the integrations working (including the annotate feature which uses git blame).
The answer by #activedecay let me in the right direction. In my case, I have a multi-module project - each has a separate git repo - but we're all in the same workspace.
In my case, Intellij IDEA 2017.2, the Preferences -> Version Control (update from 2022: or Preferences > Version Control > Directory Mappings) panel shows a listing of all the project roots. The module with the disabled "Annotate" option was in the "Unregistered Roots" section.
To fix the problem, I selected the module and pressed the "+" icon in the lower toolbar to register the module root with Intellij VCS. The change is immediate and the "Annotate" options becomes available.
Looks like its a fresh project. First configure the Version Control like Git and than commit at least once. After first commit Annotate option will not be grayed out.
Also update git for any new version.
Your VCS is not enabled, hence the issue. Below is the solution for that:
Click on the VCS option in the menu bar
Enable VCS
Select your version control
Done, you should be able to use the annotate option.
Make sure the file is tracked by version control
Add the project to "Version Control" settings
I had the same issue with the Annotate being greyed out however VCS was already set up. Editing the current VCS Directory Mapping fixed the issue for me.
Go to
Settings -> Version Control
Click on the current entry for your
your application listed under projects.
Click the pen icon to edit it
Hit Ok, then ok to close the main dialog
Under the version control setting, make sure to remove any unregistered roots, I had a similar issue where there was a Unregistered roots entry was found, after removing this unwanted entry, I was able to annotate on file.
I the following two screen short will solve your problem:
1.
I hope after those steps you will be able to see who changed a line.
Here are the steps i followed :
Go to VCS -> Checkout from Version Control -> Git -> give the URL for your repository.
The annotate option will be enabled now.
I had exactly the same issue and managed to solve it by updating git.
The reason for that is that I have recent InteliJ Idea and an old 2.1.x git installed.
For Mac:
brew upgrade git
brew link git
followed by IDE restart.
Perhaps you did not check Git Integration while setting up a fresh installation of IntelliJ. It happened to me when I updated to a major release. When I was setting up the new program, I might have unchecked the Git Integration on the wizard installation.
In order to solve this for IntelliJ Community 2019.1, access File > Settings > Plugins, go to the tab Installed and make sure the plugin Git Integration is checked. You should restart the IDE in order to make the Annotate action work.
I had the same issue, but my VCS settings were all configured properly. It turns out that git itself was considering the file as a brand new file and therefore didn't have any history for it. The file was actually not new, but simply renamed. While my rename changes were unstaged, git understood it as two separate files: a deletion of the old file and creation of a new file. However, once I git added the "deleted" file and the "new" file, git understood that it was actually a rename and IntelliJ was able to annotate on the file as expected.
I'm not sure why git didn't understand the rename when it was unstaged, but hopefully this helps someone!

IntelliJ IDEA not showing my module/project

Suddenly, IntelliJ IDEA is showing the following module view with a strange yellow colour in the background. I don't know how to get my module back, because it is not being shown:
Do you know how can I see my project folder back?
Thanks
This is way late, but deleting my .idea folder did the trick.
Close IntelliJ
cd <project-path>
rm -rf .idea
You can go to File-> Project Structure and then define it as a Source Folder
In Intellij, Right click on your parent pom file and click add as maven project
For Maven Projects that don't show up you can right click your pom.xml and click 'Add as Maven Project'.
In my case Modules kept on disappearing and I managed to fix it with these simple steps:
In the Project panel, right click to see the context menu
Select "Open Module Settings"
Select the Module that is not shown in the tree view
Select the first tab labeled "Sources"
Press the "+ Add Content Root" link
Select the root folder where the files for this module are located
Once the folder has been scanned, press the OK button and you will see the Module appear
I had a similar issue. Other answers did not solve the problem for me.
I ended up uninstalling IntelliJ, then installing a new copy. When prompted to import previous settings, I selected the option of not to import, then set up IntelliJ from scratch. After re-install/re-setup, I was able to open my project folder and all of the modules showed like before. Some how my IntelliJ got fubared, my guess is that it happened when I updated it last week.
For me, I must've deleted my .iml file somehow. Files with .iml contain configuration for your modules. The problem was that my project module was not being loaded without it. I'm using gradle, syncing my project with gradle regenerated whichever *.iml was necessary to build. Here is a post that provides a succinct explanation.
IntelliJ IDE | .iml File lost or deleted
Also - I know this issue is probably long gone and out of his head but for whoever may come across this issue, the above was the solution for me.
Check if the FACETS panel is blank
If it's blank .Then click the "+" button to add
one.
For me .I need a android facet.
For details.go to this link
Hope this is work for you.
I assume you are used to working with Eclipse. Intellij IDEA uses the same idea, but different names.
A Eclipse workspace is equal to IDEA's project.
A Eclipse project is equal to IDEA's module.

intellij navigate to file stopped working

So we have a large project and I use the intellij navigate to file cntrl+shift+n all the time. I don't know what happened but now when I try and use it - it can't find anything. I haven't recently installed any plugins or anything.
I've restarted intellij a couple times, checked the little filter icon to make sure I'm not filtering on anything...nothing seems to be working. Any ideas what I need to do to get it working again?
Try 11.1.2 build and File | Invalidate Caches. If it doesn't help, contact JetBrains support with a sample project to reproduce it.
Also try to verify if some plugins are updated, and disable them to try if some of them is the problem.
In my case it was:
Apache config (.htaccess) support Version 131.61
Make sure your keymap is set to Default. You may be using different keymap, so go to File > Setting and search for Keymap. You can change it there.
When you press Ctrl+Shift+N the Find Window will pop up, check the filter icon (on top right of the Find Window) on the search box and ensure that the file type you are looking for is checked.
For me restarting the Webstorm with the project folder again sorted it out.
File -> New -> Project
Just restarting it kept the go to file source pointed to the Webstorm app directory.
I program in rust.
So for me installing the missing rust plug-in solved it.
I deleted the project and then reimported it using maven(right corner of IDE) -> plus icon to add project again
What helped me was to run an update (Help > Check for updates) and update what was needed (2 plugins)

Notepad++ workspace refresh?

How do i refresh the workspace / project in notepad++ when the file-system changes ( files and folders added or removed ).
at the moment it does not keep up with the local file system and i have to re-create the project each time!! frustrating..
I followed Rechtar's suggestion.
I had a similar issue. Notepad++'s Project pane doesn't update when I change or create new files. What I ended up doing was downloading the explorer plugin through
PLUGINS > PLUGIN MANAGER > SHOW PLUGIN MANAGER
Then install the explorer plugin.
After it's installed go to PLUGINS > EXPLORER and select the explorer.
It's not really comparable to something like Eclipse's project navigation.
In Notepad++ 7.5.8, this issue has been fixed. I suggest you update your notepad++ to the latest version.
In order to do this, go to ? -> Update Notepad++ and it will automatically detect a new update package. Update Notepad++ normally.
Otherwise, you could download the update from here:
https://notepad-plus-plus.org/news/notepad-7.5.8-released.html
In case you're curious, here's the changelog for 7.5.8:
Notepad++ v7.5.8 bug-fixes:
1. Remove annoying "no update" notification.
2. Fix Folder as Workspace not updating regression.
3. Fixed crash issue by checking & unchecking "Disable extension column" option in preferences dialog.
4. Fixed a crash when trying to launch a secondary instance with command line arguments.
5. Fix "Explorer Here" from "Folder as Workspace" problem if folder name contains comma.
Included plugins:
1. NppExport v0.2.8 (32-bit x86 only)
2. Converter 4.2.1
3. Mime Tool 2.1
4. DSpellCheck 1.3.5
Updater (Installer only):
* WinGup (for Notepad++) v5.0.2
I'm currently running version 6.3.3 of notepad ++ and instead of adding the entire project all over again, you can right-click the folder in your project that has the new file and choose: "Add files...". From there, you can select your new file and open it. This will add it to your project in the appropriate folder.
There doesn't seem to be a proper way to do this in Notepad++. The Project panel was born just 2 or 3 releases ago, so it's naturally immature. I suggest that you install either the Explorer plugin or the Light Explorer plugin - they are much more usable.
Or better yet, go learn Vim and fall in love with the NERDTree ;-)