Eclipse add file plugin - set content type for java files
I am writing an eclipse plugin that whenever you enter a line like "/ usr / share" and press ctrl + space, it will open content support and prompt you to populate files for that folder (similar to other editors.)
In my plugin xml under plugin> .... extension> I have
<contentType id="org.eclipse.core.runtime.xml"/>
If I understand correctly this means that the plugin will work with files with contentType org.eclipse.core.runtime.xml - which means xml files. I want my suggestions to appear on .java files, or better, any type of file. How can i do this?
---- EDIT ---- Here is the complete plugin.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
id="completionproposal.demo.yuval"
point="org.eclipse.wst.sse.ui.completionProposal">
<proposalCategory
id="completionproposal.demo.yuval.category"
name="Yuval completion proposals">
</proposalCategory>
<proposalComputer
activate="true"
categoryId="completionproposal.demo.yuval.category"
class="xmlproposals.YuvalCompletionProposalComputer"
id="completionproposal.demo.yuval.proposalcomputer">
<contentType id="org.eclipse.core.runtime.xml"/>
</proposalComputer>
</extension>
</plugin>
+3
source to share
No one has answered this question yet
Check out similar questions: