Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Eclipse文件完成建议插件-为java文件设置内容类型_Java_Xml_Eclipse_Eclipse Plugin_Content Assist - Fatal编程技术网

Eclipse文件完成建议插件-为java文件设置内容类型

Eclipse文件完成建议插件-为java文件设置内容类型,java,xml,eclipse,eclipse-plugin,content-assist,Java,Xml,Eclipse,Eclipse Plugin,Content Assist,我正在编写一个eclipse插件,每当您键入“/usr/share”这样的字符串并按ctrl+space时,它就会打开内容辅助并建议您完成该文件夹的文件(类似于其他编辑器) 在plugin>…extension>下的插件xml中,我有 <contentType id="org.eclipse.core.runtime.xml"/> 如果我理解正确,这意味着插件将在contentType为org.eclipse.core.runtime.xml的文件上工作

我正在编写一个eclipse插件,每当您键入“/usr/share”这样的字符串并按ctrl+space时,它就会打开内容辅助并建议您完成该文件夹的文件(类似于其他编辑器)

在plugin>…extension>下的插件xml中,我有

<contentType id="org.eclipse.core.runtime.xml"/>            

如果我理解正确,这意味着插件将在contentType为org.eclipse.core.runtime.xml的文件上工作——这意味着xml文件。 我希望我的建议出现在.java文件上,或者更好,出现在任何类型的文件上。 我该怎么做

----编辑---- 以下是完整的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>


这是哪个扩展点,向我们展示整个扩展点definition@greg-449我添加了xml。我注意到,当我更改插件并再次运行它时,打开的新eclipse实例并没有改变。有什么想法吗?这是java内容类型吗?org.eclipse.jdt.core.javaSourceYes。请注意,此评论实际上没有帮助。这个链接与我的问题无关,也与谷歌搜索无关@好吧,我投了赞成票,因为这个问题很独特。但是也许你会有更多关于这个主题的电子邮件列表或博客,因为很少有人知道这个问题?我也面临同样的问题,因为我想为.drl文件创建新的提案,但我不知道应该在这个plugin.xml文件上放什么才能使它在我的drl文件上运行。