myeclipse中struts.xml没有提示 问题的另一种解决办法

来源:互联网 发布:淘宝手机店招尺寸 编辑:程序博客网 时间:2024/06/10 18:36

网上有很多解决的办法,但是对我都没什么用,对其他一些在网上提问的人也没有用。最后自己解决问题了,希望能帮助和我一样遇到这样情况的人

 

我在使用myeclipse8.5时发现是struts2config editor自身的缺陷导致无法提示,因为换成xml编辑器就能提示了。

为了方便可以将struts.xml的默认编辑器进行修改:

Myeclipse->preferences->General->editors>Files Associations

 

 

【以下是转载】

 

在myeclipse8.5中写struts2的struts.xml配置文件时,没有提示功能,可以这样解决:

---------------------------------------------------------------------------------------------------------------------------------------------------

1,打开window-preferences-myeclipse enterprise workbench-files and editors-xml-xml catalog,

add..,出现一对话框,location栏选file system,找到struts-2.0.14-all/struts-2.0.14/src/core/src/main/resources目录下的struts-2.0.dtd文件,打开,然后key type 选择uri,下面key值填 http://struts.apache.org/dtds/struts-2.0.dtd,点击OK,这样再次打开struts.xml时应该就有提示了。

2,当你输入元素后,如果没有属性提示,比如输入<action name="" ></action>,不能再继续提示action中的属性的话,需要做如下修改:

打开window-preferences-general-keys,在右边找到content Assist这一栏,如果这一栏中binding下面有值,点击remove binding,然后在下面的binding栏,选择另一个快捷键,比如‘alt+,’,点击OK

重新打开struts.xml文件,需要属性提示时,按所设置的快捷键,就会出现属性提示

原创粉丝点击