给myeclipse中xml添加代码提示和关联源码不再见source not found
2013-10-11 00:02
465 查看
给xml添加提示功能:
(添加xml的dtd 规则文件)
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
myeclipse首选项-》 搜索xml--》 XML catalog--》点击Add
在弹出的对话框中:
key 的地方输入类式上面的 第二行引号里面的完整内容-//Apache Software Foundation//DTD Struts Configuration 2.3//EN
location 找到对应的dtd文件
上面的例子是struts2配置文件的xml
---------------------------------------------------------------------------------------------------------------------
myeclipse关联源码的方法:
解决如下图 点击一个类或者接口 由于没有源码不给显示的问题
![](https://img-blog.csdn.net/20131010235639125?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvV0FOR3lhODIy/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
这里以关联struts2的源码为例子
方法1
在需要关联源代码的包上点右键,选properties,弹出对话框。
选择java Source Attachment,单击external folder按钮,选择下载的struts源代码目录,目录为:\struts-2.2.1.1\src
方法2
双击需要关联源代码的包中的一个类,在右边的编辑窗口中单击“Attach Source”按钮,弹出对话框
单击external folder按钮,选择下载的struts源代码目录,目录为:\struts-2.2.1.1\src
(添加xml的dtd 规则文件)
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
myeclipse首选项-》 搜索xml--》 XML catalog--》点击Add
在弹出的对话框中:
key 的地方输入类式上面的 第二行引号里面的完整内容-//Apache Software Foundation//DTD Struts Configuration 2.3//EN
location 找到对应的dtd文件
上面的例子是struts2配置文件的xml
---------------------------------------------------------------------------------------------------------------------
myeclipse关联源码的方法:
解决如下图 点击一个类或者接口 由于没有源码不给显示的问题
这里以关联struts2的源码为例子
方法1
在需要关联源代码的包上点右键,选properties,弹出对话框。
选择java Source Attachment,单击external folder按钮,选择下载的struts源代码目录,目录为:\struts-2.2.1.1\src
方法2
双击需要关联源代码的包中的一个类,在右边的编辑窗口中单击“Attach Source”按钮,弹出对话框
单击external folder按钮,选择下载的struts源代码目录,目录为:\struts-2.2.1.1\src
相关文章推荐
- 在myeclipse8.5 中添加 dtd 文件实现xml编辑时自动提示
- 为MyEclipse 9/10中的html/JSP编辑器添加代码自动提示
- MyEclipse添加ibatis DTD文件实现xml的自动提示功能
- 在Myeclipse中添加代码提示功能
- 添加spring的bean.xml代码自动提示
- Java_myeclipse添加DTD约束(框架xml只能提示功能)
- myeclipse8.5即使关联上dtd,编辑struts.xml还是没提示
- eclipse的xml添加代码自动提示
- 为MyEclipse 9中的html/JSP编辑器添加代码自动提示
- Eclipse添加dtd文档为xml编辑提供代码提示功能
- Java 用eclipse调试老是提示Source not found解决方法——关联
- MyEclipse6.5.0 编写代码时如何显示提示以及Syntax error,annotations are only available if source level is 5.0的解决办法
- MyEclipse的html/JSP编辑器添加代码自动提示
- myEclipse对spring的xml编写时添加提示方法
- 在Myeclipse中添加JSP或者HTML模版,添加JAVA代码提示
- MyEclipse+Eclipse添加ibatis DTD文件实现xml的自动提示功能
- MyEclipse的html/JSP编辑器添加代码自动提示
- Myeclipse中手动添加ibatis SqlMapConfig.xml sql-map-config-2.dtd文件 调出xml提示
- MyEclipse、Eclipse 的JAVA,XML代码提示功能
- 为MyEclipse 9/10中的html/JSP编辑器添加代码自动提示