Add entry point annotation via plugin Follow
Answered
How can I add entry point annotation via a custom plugin?
I can see the following entry in the file <project_root>/.idea/misc.xml. We already have a custom plugin for code styles and other stuff so was wondering can we can add this.
<component name="EntryPointsManager">
<list size="1">
<item index="0" class="java.lang.String" itemvalue="com.foo.MyAnnotation" />
</list>
</component>
Please sign in to leave a comment.
com.intellij.deadCode
extension point,com.intellij.codeInspection.reference.EntryPoint#getIgnoreAnnotations
see
com.intellij.execution.junit2.inspection.JUnitEntryPoint
as sampleCan't we just add that entry to any XML file? (For instance, our default profile project.default.xml)
Yes, you can modify the inspection settings Java | Declaration redundancy | Unused declaration by definining Annnotations there and use shared project-level inspection profile.
Our inspection/Default.xml file in the settings repo looks like this:
Can I add it there?
Simply edit the inspection settings in _Preferences | Editor | Inspections_
I've changed the config both in the Project Default (stored in project) and Default (stored in IDE), and the changes go to that file (<project_root>/.idea/misc.xml) in both cases.
How can I make this change as an IDE level change?
Please see https://www.jetbrains.com/help/idea/customizing-profiles.html
Sorry to bother you again.
Our repo is not allowed to push from the IDE, so the IDE's Upstream URL point to my local repo. However; when I make changes to the preferences I don't see the changes in my local repo. What am I doing wrong? I've tried with many preferences, including making a copy of the inspection profile.
Poroto20
Could you please elaborate a bit more - by IDE's Upstream do you mean a URL specified for Settings repository?
Or do you use Git in your project? In this case you need to push changes to your upstream repository (even though it's local)
Yes, the URL specified for settings points to my local repo, which is a fork of the main repo. So instead of "git@git...." it points to "/Users/....."
But I don't see any changes in my repo, even when I go to File->IDE Settings->Sync->Overwrite remote.
I've tried with many properties but I don't see any difference. I even tried cloning and editing an inspection profile.