Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to write editor file and save
How to write editor file and save [message #173796] Wed, 18 August 2004 08:34
Eclipse UserFriend
Originally posted by: abhijeetgupta.tataelxsi.co.in

Hi,

I am struggling to get a solution to modify the Editor's IFile.

My editor file is an XML file which I am reading in Init using IFile's
input stream


I want to modify or add new elements/nodes based on user inputs to the
Editor , How do I proceed?

public void init(IEditorSite site, IEditorInput editorInput)
{
super.init(site, editorInput);

try
{
inputFile = (IFileEditorInput) editorInput;
DocumentBuilderFactory docBuilderFactory =
DocumentBuilderFactory.newInstance();

DocumentBuilder docBuilder =
docBuilderFactory.newDocumentBuilder(); IPathEditorInput inputFilePath1 =
(IPathEditorInput) editorInput;
Document doc = docBuilder.parse (inputFile.getFile().getContents());
doc.getDocumentElement ().normalize ();
NodeList deviceTag = doc.getElementsByTagName("Device");
}
catch (SAXParseException err) {

}
catch (SAXException e) {

}
catch (Throwable t) {
}
Previous Topic:copy to clipboard doesn't work
Next Topic:[Cheetah] enumerations support?
Goto Forum:
  


Current Time: Tue Jul 22 02:35:08 EDT 2025

Powered by FUDForum. Page generated in 0.05619 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top