我在RCP工程Plugin中添加了一个xml节点,希望通过自带的XMLEditor,打开xml文件;
org.eclipse.core.resources.IProject project= org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot().getProject("Review"); //Review是我的工程名
IFile xml_file=project.getFolder("lib").getFile("RefineXML.xml"); //RefineXML.xml放在lib文件夹中 FileEditorInput input=new FileEditorInput(xml_file);
try {
window.getActivePage().openEditor(input, XMLEditor.XMLID);
} catch (PartInitException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}但是每次运行时候,总是报错说:“Resource Review/lib/RefineXML.xml doesn't exist” 实在不明白怎么回事,请高手指点!
org.eclipse.core.resources.IProject project= org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot().getProject("Review"); //Review是我的工程名
IFile xml_file=project.getFolder("lib").getFile("RefineXML.xml"); //RefineXML.xml放在lib文件夹中 FileEditorInput input=new FileEditorInput(xml_file);
try {
window.getActivePage().openEditor(input, XMLEditor.XMLID);
} catch (PartInitException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}但是每次运行时候,总是报错说:“Resource Review/lib/RefineXML.xml doesn't exist” 实在不明白怎么回事,请高手指点!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货