rpms/eclipse-cdt/F-11 eclipse-cdt-libhover-local.patch, NONE, 1.1 eclipse-cdt-libhover.patch, NONE, 1.1 .cvsignore, 1.43, 1.44 eclipse-cdt.spec, 1.123, 1.124 sources, 1.52, 1.53

Jeff Johnston jjohnstn at fedoraproject.org
Fri Sep 25 18:15:04 UTC 2009


Author: jjohnstn

Update of /cvs/extras/rpms/eclipse-cdt/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16953

Modified Files:
	.cvsignore eclipse-cdt.spec sources 
Added Files:
	eclipse-cdt-libhover-local.patch eclipse-cdt-libhover.patch 
Log Message:

* Wed Sep 23 2009 Jeff Johnston <jjohnstn at redhat.com> 5.0.2-5
- Resolves #525004
- Upgrade libhover to 0.3.0.
- Add libhover patch to fix libstdc++ member resolution and
  to place libhover docs locally within libhover plugin.




eclipse-cdt-libhover-local.patch:
 org.eclipse.linuxtools.cdt.libhover.glibc/plugin.xml     |    2 +-
 org.eclipse.linuxtools.cdt.libhover.libstdcxx/plugin.xml |    2 +-
 org.eclipse.linuxtools.cdt.libhover/build.properties     |    3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

--- NEW FILE eclipse-cdt-libhover-local.patch ---
diff -up ./org.eclipse.linuxtools.cdt.libhover/build.properties.fix ./org.eclipse.linuxtools.cdt.libhover/build.properties
--- ./org.eclipse.linuxtools.cdt.libhover/build.properties.fix	2009-09-23 17:07:18.000000000 -0400
+++ ./org.eclipse.linuxtools.cdt.libhover/build.properties	2009-09-23 17:07:38.000000000 -0400
@@ -3,7 +3,8 @@ output.. = bin/
 bin.includes = plugin.xml,\
                META-INF/,\
                .,\
-               plugin.properties
+               plugin.properties,\
+               libhoverdocs/
 
 javacSource=1.5
 javacTarget=1.5
diff -up ./org.eclipse.linuxtools.cdt.libhover.glibc/plugin.xml.fix ./org.eclipse.linuxtools.cdt.libhover.glibc/plugin.xml
--- ./org.eclipse.linuxtools.cdt.libhover.glibc/plugin.xml.fix	2009-09-23 17:12:01.000000000 -0400
+++ ./org.eclipse.linuxtools.cdt.libhover.glibc/plugin.xml	2009-09-23 17:12:26.000000000 -0400
@@ -7,7 +7,7 @@
          point="org.eclipse.linuxtools.cdt.libhover.library">
       <library
             docs="http://www.gnu.org/software/libc/manual/html_node/index.html"
-            location="http://www.sourceware.org/eclipse/libhover/glibc-2.7-2.libhover"
+            location="libhoverdocs/glibc-2.7-2.libhover"
             name="glibc library"
             type="C">
       </library>
diff -up ./org.eclipse.linuxtools.cdt.libhover.libstdcxx/plugin.xml.fix ./org.eclipse.linuxtools.cdt.libhover.libstdcxx/plugin.xml
--- ./org.eclipse.linuxtools.cdt.libhover.libstdcxx/plugin.xml.fix	2009-09-23 17:12:43.000000000 -0400
+++ ./org.eclipse.linuxtools.cdt.libhover.libstdcxx/plugin.xml	2009-09-23 17:13:04.000000000 -0400
@@ -7,7 +7,7 @@
          point="org.eclipse.linuxtools.cdt.libhover.library">
       <library
             docs="http://gcc.gnu.org/onlinedocs/libstdc++/manual/spine.html"
-            location="http://www.sourceware.org/eclipse/libhover/libstdc++-v3.libhover"
+            location="libhoverdocs/libstdc++-v3.libhover"
             name="libstdc++ library"
             type="C++">
       </library>

eclipse-cdt-libhover.patch:
 META-INF/MANIFEST.MF                                                  |    1 
 src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java           |    1 
 src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java        |   22 +++++++---
 src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverLibrary.java |   10 ++++
 4 files changed, 27 insertions(+), 7 deletions(-)

--- NEW FILE eclipse-cdt-libhover.patch ---
diff -up ./org.eclipse.linuxtools.cdt.libhover/META-INF/MANIFEST.MF.fix2 ./org.eclipse.linuxtools.cdt.libhover/META-INF/MANIFEST.MF
--- ./org.eclipse.linuxtools.cdt.libhover/META-INF/MANIFEST.MF.fix2	2009-09-23 17:15:45.000000000 -0400
+++ ./org.eclipse.linuxtools.cdt.libhover/META-INF/MANIFEST.MF	2009-09-23 17:08:47.000000000 -0400
@@ -18,3 +18,4 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.jface.text;bundle-version="3.4.1"
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Export-Package: org.eclipse.linuxtools.cdt.libhover
+Bundle-ActivationPolicy: lazy
diff -up ./org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java.fix2 ./org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java
--- ./org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java.fix2	2009-09-23 17:16:59.000000000 -0400
+++ ./org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java	2009-09-23 17:09:54.000000000 -0400
@@ -29,6 +29,7 @@ public class LibhoverPlugin extends Abst
 	 * The constructor
 	 */
 	public LibhoverPlugin() {
+		plugin = this;
 	}
 
 	/*
diff -up ./org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java.fix2 ./org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java
--- ./org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java.fix2	2009-09-23 17:11:05.000000000 -0400
+++ ./org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java	2009-09-23 17:11:21.000000000 -0400
@@ -451,7 +451,7 @@ public class LibHover implements ICHelpP
 			return null;
 		if (methodType != null) {
 			try {
-				args = resolveArgs(info, methodType.getParameterTypes());
+				args = resolveArgs(info, methodType.getParameterTypes(), templateTypes);
 				returnType = methodType.getReturnType();
 			} catch (DOMException e) {
 				// TODO Auto-generated catch block
@@ -465,11 +465,11 @@ public class LibHover implements ICHelpP
 		MemberInfo member = info.getMember(memberName);
 		if (member != null) {
 			MemberInfo m = null;
-			if (!isParmMatch(member, args)) {
+			if (!isParmMatch(member, args, templateTypes, info)) {
 				ArrayList<MemberInfo> members = member.getChildren();
 				for (int i = 0; i < members.size(); ++i) {
 					MemberInfo k = members.get(i);
-					if (isParmMatch(k, args)) {
+					if (isParmMatch(k, args, templateTypes, info)) {
 						m = k;
 						break;
 					}
@@ -513,12 +513,18 @@ public class LibHover implements ICHelpP
 	}
      
  	
-	private boolean isParmMatch(MemberInfo m, String[] args) {
+	private boolean isParmMatch(MemberInfo m, String[] args, ArrayList<String> templateTypes, ClassInfo info) {
 		String[] memberParms = m.getParamTypes();
+		for (int i = 0; i < memberParms.length; ++i) {
+			String[] templateParms = info.getTemplateParms();
+			for (int j = 0; j < templateTypes.size(); ++j) {
+				memberParms[i] = memberParms[i].replaceAll(templateParms[j], templateTypes.get(j));
+			}
+		}
 		return Arrays.equals(memberParms, args);
 	}
 
-	private String[] resolveArgs(ClassInfo info, IType[] parameterTypes) {
+	private String[] resolveArgs(ClassInfo info, IType[] parameterTypes, ArrayList<String> templateTypes) {
 		String[] templateParms = info.getTemplateParms();
 		String[] result = new String[parameterTypes.length];
 		for (int i = 0; i < parameterTypes.length; ++i) {
@@ -529,7 +535,11 @@ public class LibHover implements ICHelpP
 			while (index >= 0) {
 				// We assume no class has more than 9 template parms.
 				int digit = param.charAt(index + 1) - '0';
-				param = param.replaceFirst(param.substring(index, index + 2), templateParms[digit]);
+				// where possible, replace template parms with real values
+				if (digit < templateTypes.size())
+					param = param.replaceFirst(param.substring(index, index + 2), templateTypes.get(digit));
+				else
+					param = param.replaceFirst(param.substring(index, index + 2), templateParms[digit]);
 				index = param.indexOf("#");
 			}
 			result[i] = param;
diff -up ./org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverLibrary.java.fix2 ./org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverLibrary.java
--- ./org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverLibrary.java.fix2	2009-09-23 17:10:32.000000000 -0400
+++ ./org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverLibrary.java	2009-09-23 17:10:55.000000000 -0400
@@ -21,10 +21,12 @@ import java.net.URL;
 import java.util.ArrayList;
 
 import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.linuxtools.cdt.libhover.ClassInfo;
 import org.eclipse.linuxtools.cdt.libhover.FunctionInfo;
 import org.eclipse.linuxtools.cdt.libhover.LibHoverInfo;
+import org.eclipse.linuxtools.cdt.libhover.LibhoverPlugin;
 import org.eclipse.linuxtools.cdt.libhover.TypedefInfo;
 
 public class LibHoverLibrary {
@@ -98,7 +100,13 @@ public class LibHoverLibrary {
 					URL url = acDoc.toURL();
 					docStream = url.openStream();
 				} else {
-					docStream = new FileInputStream(p.toFile());
+					try {
+						// Try to open the file as local to this plug-in.
+						docStream = FileLocator.openStream(LibhoverPlugin.getDefault().getBundle(), p, false);
+					} catch (IOException e) {
+						// File is not local to plug-in, try file system.
+						docStream = new FileInputStream(p.toFile());
+					}
 				}
 				ObjectInputStream input = new ObjectInputStream(docStream);
 				hoverInfo = (LibHoverInfo)input.readObject();


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/eclipse-cdt/F-11/.cvsignore,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -p -r1.43 -r1.44
--- .cvsignore	8 Apr 2009 22:38:58 -0000	1.43
+++ .cvsignore	25 Sep 2009 18:15:04 -0000	1.44
@@ -24,3 +24,6 @@ eclipse-cdt-fetched-src-autotools-R1_0_2
 eclipse-cdt-fetched-src-libhover-R0_1_1.tar.gz
 eclipse-cdt-fetched-src-CDT_5_0_2.tar.bz2
 eclipse-cdt-fetched-src-autotools-R1_0_3.tar.gz
+libstdc++-v3.libhover
+glibc-2.7-2.libhover
+eclipse-cdt-fetched-src-libhover-R0_3_0.tar.gz


Index: eclipse-cdt.spec
===================================================================
RCS file: /cvs/extras/rpms/eclipse-cdt/F-11/eclipse-cdt.spec,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -p -r1.123 -r1.124
--- eclipse-cdt.spec	26 Jun 2009 22:19:56 -0000	1.123
+++ eclipse-cdt.spec	25 Sep 2009 18:15:04 -0000	1.124
@@ -20,7 +20,7 @@ Epoch: 1
 Summary:        Eclipse C/C++ Development Tools (CDT) plugin
 Name:           eclipse-cdt
 Version:        %{majmin}.%{micro}
-Release:        4%{?dist}
+Release:        5%{?dist}
 License:        EPL and CPL
 Group:          Development/Tools
 URL:            http://www.eclipse.org/cdt
@@ -36,7 +36,7 @@ Source4: fetch-cdt.sh
 
 Source1: http://sources.redhat.com/eclipse/autotools/eclipse-cdt-fetched-src-autotools-R1_0_3.tar.gz
 
-Source2: http://sources.redhat.com/eclipse/autotools/eclipse-cdt-fetched-src-libhover-R0_1_1.tar.gz
+Source2: http://sources.redhat.com/eclipse/autotools/eclipse-cdt-fetched-src-libhover-R0_3_0.tar.gz
 
 ## The following tarball was generated thusly:
 ##
@@ -56,6 +56,10 @@ Source3: %{name}-target_filter.gif.gz
 # Script to run the tests in Xvnc
 Source5: %{name}-runtests.sh
 
+# Libhover docs to place locally
+Source6: glibc-2.7-2.libhover
+Source7: libstdc++-v3.libhover
+
 ## Patch to cppunit code to support double-clicking on file names, classes, and
 ## member names in the Hierarchy and Failure views such that the appropriate
 ## file will be opened and the appropriate line will be selected.
@@ -98,6 +102,14 @@ Patch16: %{name}-managedConfigurations-f
 # ScannerInfo.
 Patch17: %{name}-autotools-bug281582.patch
 
+# Following is a patch to supply libhover docs directory from the libhover
+# plugin and not require html to access them.
+Patch18: %{name}-libhover-local.patch
+
+# Following is a patch to libhover to fix member resolution, plugin loading,
+# and to enable local plugin file support for docs.
+Patch19: %{name}-libhover.patch
+
 BuildRequires: eclipse-pde
 BuildRequires: eclipse-mylyn >= 3.0
 %if %{gcj_support}
@@ -235,6 +247,15 @@ popd
 mkdir libhover
 pushd libhover
 tar -xzf %{SOURCE2}
+%patch18 -p0
+%patch19 -p0
+pushd org.eclipse.linuxtools.cdt.libhover
+mkdir libhoverdocs
+pushd libhoverdocs
+cp %{SOURCE6} .
+cp %{SOURCE7} .
+popd
+popd
 popd
 
 ## Cppunit stuff
@@ -339,7 +360,7 @@ java -cp $SDK/startup.jar \
      -application org.eclipse.ant.core.antRunner \
      -Duser.home=$homedir                        \
      -Dtype=feature                                    \
-     -Did=org.eclipse.linuxtools.cdt.libhover.feature  \
+     -Did=org.eclipse.linuxtools.cdt.libhover  \
      -DsourceDirectory=$(pwd)                          \
      -DbaseLocation=$SDK                               \
      -Dbuilder=$PDEDIR/templates/package-build  \
@@ -395,7 +416,7 @@ popd
 
 # Libhover install
 pushd libhover
-unzip -qq -d $installDir build/rpmBuild/org.eclipse.linuxtools.cdt.libhover.feature.zip
+unzip -qq -d $installDir build/rpmBuild/org.eclipse.linuxtools.cdt.libhover.zip
 popd
 
 mkdir -p $mylynInstallDir/eclipse/features $mylynInstallDir/eclipse/plugins
@@ -573,6 +594,12 @@ fi
 %endif
 
 %changelog
+* Wed Sep 23 2009 Jeff Johnston <jjohnstn at redhat.com> 5.0.2-5
+- Resolves #525004
+- Upgrade libhover to 0.3.0.
+- Add libhover patch to fix libstdc++ member resolution and
+  to place libhover docs locally within libhover plugin.
+
 * Fri Jun 26 2009 Jeff Johnston <jjohnstn at redhat.com> 5.0.2-4
 - Resolves #281582.
 
@@ -586,9 +613,6 @@ fi
 - Rebase autotools to 1.0.3.
 - Rebase CDT to v200903191301 (5.0.2).
 
-* Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:5.0.1-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
-
 * Fri Jan 16 2009 Jeff Johnston <jjohnstn at redhat.com> 5.0.1-2
 - Rebase libhover to 0.1.1 and autotools to 1.0.2.
 - Remove patch for 472731 which is already part of rebased autotools sources.


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/eclipse-cdt/F-11/sources,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -p -r1.52 -r1.53
--- sources	8 Apr 2009 22:38:59 -0000	1.52
+++ sources	25 Sep 2009 18:15:04 -0000	1.53
@@ -1,5 +1,7 @@
 5c470fb0777d27541edbfa31443d91f7  eclipse-cdt-cppunit-20061102.tar.gz
 2d4ae0a2131ba1efc896d981072cc091  eclipse-cdt-target_filter.gif.gz
-23c3498e551936980269c83a0051d6b1  eclipse-cdt-fetched-src-libhover-R0_1_1.tar.gz
 1768318e26e5a40e55bb55cc38fedfaa  eclipse-cdt-fetched-src-CDT_5_0_2.tar.bz2
 25251010257cc1255f9bcec90a9514b7  eclipse-cdt-fetched-src-autotools-R1_0_3.tar.gz
+921f3464c4b5a284473ebdad634e5c2d  libstdc++-v3.libhover
+4bccad3ee92faaca4f8dc3ac6941434e  glibc-2.7-2.libhover
+2dbeff80a9c053b2888940a30f62d3f2  eclipse-cdt-fetched-src-libhover-R0_3_0.tar.gz




More information about the fedora-extras-commits mailing list