[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/eclipse-cdt/devel eclipse-cdt-libhover-jar.patch,1.1,1.2



Author: jjohnstn

Update of /cvs/dist/rpms/eclipse-cdt/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv25346

Modified Files:
	eclipse-cdt-libhover-jar.patch 
Log Message:

Fix patch as it was initially created against invalid source tar.


eclipse-cdt-libhover-jar.patch:
 LibHover.java |  145 ++++++++++++++++++++--------------------------------------
 1 files changed, 50 insertions(+), 95 deletions(-)

Index: eclipse-cdt-libhover-jar.patch
===================================================================
RCS file: /cvs/dist/rpms/eclipse-cdt/devel/eclipse-cdt-libhover-jar.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- eclipse-cdt-libhover-jar.patch	31 Jul 2006 20:50:37 -0000	1.1
+++ eclipse-cdt-libhover-jar.patch	2 Aug 2006 17:39:26 -0000	1.2
@@ -1,15 +1,14 @@
---- com.redhat.eclipse.cdt.autotools/src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java.fix	2006-07-31 15:56:12.000000000 -0400
-+++ com.redhat.eclipse.cdt.autotools/src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java	2006-07-31 15:56:31.000000000 -0400
-@@ -15,43 +15,45 @@
+--- com.redhat.eclipse.cdt.autotools/src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java.fix	2006-08-02 13:34:36.000000000 -0400
++++ com.redhat.eclipse.cdt.autotools/src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java	2006-08-02 13:34:57.000000000 -0400
+@@ -15,40 +15,45 @@
  
  package com.redhat.eclipse.cdt.autotools.ui;
  
 -import java.util.*;
--import java.net.MalformedURLException;
 -import java.net.URL;
 -import java.io.File;
  import java.io.IOException;
- import java.io.InputStream;
++import java.io.InputStream;
 +import java.net.MalformedURLException;
 +import java.util.ArrayList;
  
@@ -26,7 +25,7 @@
 -import com.redhat.eclipse.cdt.autotools.AutotoolsPlugin;
 -import org.eclipse.cdt.ui.ICHelpProvider;
 -import org.eclipse.cdt.ui.text.ICHelpInvocationContext;
- import org.eclipse.cdt.ui.CUIPlugin;
++import org.eclipse.cdt.ui.CUIPlugin;
  import org.eclipse.cdt.ui.ICHelpBook;
 +import org.eclipse.cdt.ui.ICHelpProvider;
  import org.eclipse.cdt.ui.ICHelpResourceDescriptor;
@@ -61,7 +60,7 @@
              "dtype",
  	        "enum",
  	        "function",
-@@ -66,108 +68,39 @@ public class LibHover implements ICHelpP
+@@ -63,70 +68,39 @@ public class LibHover implements ICHelpP
  	    static final int typeIndex          = 4;
  	    static final int unionIndex         = 5;
  
@@ -118,54 +117,25 @@
 +     
 +	public void getLibHoverDocs() {
  		if (null != plugin) {
--//			URL hoverdocsURL;
--//			URL homeURL = plugin.find(new Path("."));
- 			Document doc = null;
+-			URL homeURL = plugin.find(new Path("."));
++			Document doc = null;
  			try {
--//				homeURL = Platform.asLocalURL(homeURL);
--//				IPath topPath = (new Path(homeURL.getPath())).removeLastSegments(1);
--//				IPath homePath = topPath;
--//				if (null != root) homePath = homePath.append(root);
--//				if (null != path) homePath = homePath.append(path);
--//				homePath = homePath.addTrailingSeparator();
--//				docsRootPath = homePath.toOSString();
+-				homeURL = Platform.asLocalURL(homeURL);
+-				IPath topPath = (new Path(homeURL.getPath())).removeLastSegments(1);
+-				IPath homePath = topPath;
+-				if (null != root) homePath = homePath.append(root);
+-				if (null != path) homePath = homePath.append(path);
+-				homePath = homePath.addTrailingSeparator();
+-				docsRootPath = homePath.toOSString();
 -
  				// see comment in initialize()
 -				// document = getDocument(((null == defaultSearchPath) ? "!" : defaultSearchPath), "glibc.xml");
- 				try {
--					Path p = new Path("libhoverdocs/glibc.xml");
+-				document = getDocument("./libhoverdocs:~/libhoverdocs:/usr/share/eclipse/libhoverdocs:!", "glibc.xml");
++				try {
 +					// Use the FileLocator class to open the magic hover doc file
 +					// in the plugin's jar.
 +					Path p = new Path("libhoverdocs/glibc.xml"); //$NON-NLS-1$
- 					InputStream docStream = FileLocator.openStream(AutotoolsPlugin.getDefault().getBundle(), p, false);
--					System.out.println("docStream created");
--//					Path x = new Path(hoverdocsURL.getPath());
--//					x.append("glibc.xml");
--//					System.out.println(x.toString());
--		               DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
--		                factory.setValidating(true);
--		                try {
--		                    DocumentBuilder builder = factory.newDocumentBuilder();
--//		                    builder.setErrorHandler(new TextHoverErrorHandler());
--		                    doc = builder.parse(docStream);
--		                    System.out.println("doc parsed successfully");
--		                }
--		                catch (SAXParseException saxException) {
--		                    doc = null;
--		                    System.out.println("SAXParseException");
--		                }
--		                catch (SAXException saxEx) {
--		                    doc = null;
--		                    System.out.println("SAXException");
--		                }
--		                catch (ParserConfigurationException pce) {
--		                    doc = null;
--		                    System.out.println("ParserConfigurationException");
--		                }
--		                catch (IOException ioe) {
--		                    doc = null;
--		                    System.out.println("IOException");
--		                }
++					InputStream docStream = FileLocator.openStream(AutotoolsPlugin.getDefault().getBundle(), p, false);
 +					DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
 +					factory.setValidating(true);
 +					try {
@@ -184,16 +154,14 @@
 +					catch (IOException ioe) {
 +						doc = null;
 +					}
- 				} catch (MalformedURLException e) {
- 					CUIPlugin.getDefault().log(e);
- 				}
--
- 				document = doc;
--//				document = getDocument("./libhoverdocs:~/libhoverdocs:/usr/share/eclipse/libhoverdocs:!", "glibc.xml");
++				} catch (MalformedURLException e) {
++					CUIPlugin.getDefault().log(e);
++				}
++				document = doc;
  			}
  			catch (IOException ioe) {
  			}
-@@ -176,26 +109,7 @@ public class LibHover implements ICHelpP
+@@ -135,26 +109,7 @@ public class LibHover implements ICHelpP
  	
  	public void initialize() {
  		plugin = (Plugin)AutotoolsPlugin.getDefault();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]