문제

I have a project for a product plugin which is a "plugin project" not based on the OSGI.

I have a file inside called plugin.xml and everytime I want to edit it I have a strange keyboard behaviour which makes me difficult to edit the XML.

The name cannot be changed but I notice if I just change it to another name the keyboard shortcuts behave differently.

I guess Eclipse detects that plugin.xml to be a special file, but for this project I want to know if there is any way to prevent Eclipse to detect it as a OSGI plugin (or anything else).

도움이 되었습니까?

해결책 2

Because the error Unsupported content type in editor I preffered just to rename the file like my-plugin.xml and to rename it after when I construct the packaging (with maven assembly) like this:

<files>
    <file>
        <source>${project.basedir}/my-plugin.xml</source>
        <outputDirectory>/</outputDirectory>
        <destName>plugin.xml</destName>
    </file>
</files> 

It is more a workaround but that way I can have the proper highlighting during the edition and proper name when deployed.

다른 팁

Right click on the plugin.xml file and select Open With.... Select the XML editor you want to use for the file from the list of editors. Eclipse will remember this choice for future opens.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top