Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 6542 Details for
Bug 44868
[Workbench] Remove dependencies on Xerces
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch for org.eclipse.ui.jface
jface-44868.patch (text/plain), 6.60 KB, created by
Kim Horne
on 2003-10-24 10:12:44 EDT
(
hide
)
Description:
Patch for org.eclipse.ui.jface
Filename:
MIME Type:
Creator:
Kim Horne
Created:
2003-10-24 10:12:44 EDT
Size:
6.60 KB
patch
obsolete
>Index: .classpath >=================================================================== >RCS file: /home/eclipse/org.eclipse.jface/.classpath,v >retrieving revision 1.3 >diff -u -r1.3 .classpath >--- .classpath 5 Mar 2003 20:01:32 -0000 1.3 >+++ .classpath 24 Oct 2003 14:01:38 -0000 >@@ -1,7 +1,6 @@ > <?xml version="1.0" encoding="UTF-8"?> > <classpath> > <classpathentry kind="src" path="src"/> >- <classpathentry kind="src" path="/org.apache.xerces"/> > <classpathentry exported="true" kind="src" path="/org.eclipse.swt"/> > <classpathentry kind="var" path="JRE_LIB" sourcepath="JRE_SRC"/> > <classpathentry kind="src" path="/org.eclipse.core.runtime"/> >Index: .project >=================================================================== >RCS file: /home/eclipse/org.eclipse.jface/.project,v >retrieving revision 1.3 >diff -u -r1.3 .project >--- .project 5 Mar 2003 20:01:32 -0000 1.3 >+++ .project 24 Oct 2003 14:01:38 -0000 >@@ -3,7 +3,6 @@ > <name>org.eclipse.jface</name> > <comment></comment> > <projects> >- <project>org.apache.xerces</project> > <project>org.eclipse.core.runtime</project> > <project>org.eclipse.swt</project> > </projects> >Index: plugin.xml >=================================================================== >RCS file: /home/eclipse/org.eclipse.jface/plugin.xml,v >retrieving revision 1.7 >diff -u -r1.7 plugin.xml >--- plugin.xml 22 Jul 2003 15:55:17 -0000 1.7 >+++ plugin.xml 24 Oct 2003 14:01:38 -0000 >@@ -8,13 +8,13 @@ > <runtime> > <library name="jface.jar"> > <export name="*"/> >- <packages prefixes="org.eclipse.jface"/> >+ <packages prefixes="org.eclipse.jface"/> > </library> > </runtime> > <requires> >- <import plugin="org.apache.xerces"/> > <import plugin="org.eclipse.swt" export="true"/> >- <import plugin="org.eclipse.core.runtime"/> >+ <import plugin="org.eclipse.core.runtime"/> > </requires> >+ > > </plugin> >Index: src/org/eclipse/jface/dialogs/DialogSettings.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java,v >retrieving revision 1.6 >diff -u -r1.6 DialogSettings.java >--- src/org/eclipse/jface/dialogs/DialogSettings.java 10 Mar 2003 21:56:30 -0000 1.6 >+++ src/org/eclipse/jface/dialogs/DialogSettings.java 24 Oct 2003 14:01:39 -0000 >@@ -10,14 +10,40 @@ > *******************************************************************************/ > package org.eclipse.jface.dialogs; > >-import java.io.*; >-import java.util.*; >+import java.io.BufferedReader; >+import java.io.FileInputStream; >+import java.io.FileOutputStream; >+import java.io.IOException; >+import java.io.InputStreamReader; >+import java.io.OutputStreamWriter; >+import java.io.Reader; >+import java.io.Writer; >+import java.util.ArrayList; >+import java.util.Collection; >+import java.util.HashMap; >+import java.util.Iterator; >+import java.util.List; >+import java.util.Map; > >-import javax.xml.parsers.*; >+import javax.xml.parsers.DocumentBuilder; >+import javax.xml.parsers.DocumentBuilderFactory; >+import javax.xml.parsers.FactoryConfigurationError; >+import javax.xml.parsers.ParserConfigurationException; >+import javax.xml.transform.OutputKeys; >+import javax.xml.transform.Result; >+import javax.xml.transform.Source; >+import javax.xml.transform.Transformer; >+import javax.xml.transform.TransformerConfigurationException; >+import javax.xml.transform.TransformerException; >+import javax.xml.transform.TransformerFactory; >+import javax.xml.transform.TransformerFactoryConfigurationError; >+import javax.xml.transform.dom.DOMSource; >+import javax.xml.transform.stream.StreamResult; > >-import org.apache.xerces.dom.DocumentImpl; >-import org.apache.xml.serialize.*; >-import org.w3c.dom.*; >+import org.w3c.dom.Document; >+import org.w3c.dom.Element; >+import org.w3c.dom.Node; >+import org.w3c.dom.NodeList; > import org.xml.sax.InputSource; > import org.xml.sax.SAXException; > >@@ -81,8 +107,8 @@ > /* (non-Javadoc) > * Method declared on IDialogSettings. > */ >-public IDialogSettings addNewSection(String name) { >- DialogSettings section = new DialogSettings(name); >+public IDialogSettings addNewSection(String sectionName) { >+ DialogSettings section = new DialogSettings(sectionName); > addSection(section); > return section; > } >@@ -183,8 +209,9 @@ > public void load(Reader r) { > Document document = null; > try { >- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); >- DocumentBuilder parser = factory.newDocumentBuilder(); >+ DocumentBuilder parser = DocumentBuilderFactory >+ .newInstance() >+ .newDocumentBuilder(); > // parser.setProcessNamespace(true); > document = parser.parse(new InputSource(r)); > >@@ -297,12 +324,36 @@ > /* (non-Javadoc) > * Method declared on IDialogSettings. > */ >-public void save(Writer writer) throws IOException { >- Document document = new DocumentImpl(); >- save(document, (Node) document); >- OutputFormat format = new OutputFormat(); >- Serializer serializer = SerializerFactory.getSerializerFactory("xml").makeSerializer(writer, format);//$NON-NLS-1$ >- serializer.asDOMSerializer().serialize(document); >+public void save(Writer writer) throws IOException { >+ try { >+ Document document = DocumentBuilderFactory >+ .newInstance() >+ .newDocumentBuilder() >+ .newDocument(); >+ save(document, document); >+ Result result = new StreamResult(writer); >+ Source source = new DOMSource(document); >+ >+ Transformer transformer = TransformerFactory.newInstance().newTransformer(); >+ transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$ >+ transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$ >+ transformer.transform(source, result); >+ } >+ catch (TransformerConfigurationException e) { >+ throw (IOException) (new IOException().initCause(e)); >+ } >+ catch (TransformerFactoryConfigurationError e) { >+ throw (IOException) (new IOException().initCause(e)); >+ } >+ catch (TransformerException e) { >+ throw (IOException) (new IOException().initCause(e)); >+ } >+ catch (ParserConfigurationException e) { >+ throw (IOException) (new IOException().initCause(e)); >+ } >+ catch (FactoryConfigurationError e) { >+ throw (IOException) (new IOException().initCause(e)); >+ } > } > /* (non-Javadoc) > * Method declared on IDialogSettings.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 44868
:
6540
|
6541
| 6542 |
6568