File: eclipse-helpindexbuilder.dpatch

package info (click to toggle)
eclipse 3.2.1-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 54,216 kB
  • ctags: 71
  • sloc: sh: 8,046; makefile: 496
file content (53 lines) | stat: -rw-r--r-- 1,868 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#! /bin/sh -e
##
## DP: Fixing bug in HelpIndexBuilder, which cause an OutOfMemoryException
## DP: (https://bugs.eclipse.org/bugs/show_bug.cgi?id=114001)

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch)
        patch $patch_opts -p0 < $0;;
    -unpatch)
        patch $patch_opts -p0 -R < $0;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1;;
esac
exit 0

@DPATCH@
diff -r -u ../source-tree.orig/plugins/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java source-tree/plugins/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java
--- ../source-tree.orig/plugins/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java	2005-10-27 15:18:45.000000000 +0200
+++ source-tree/plugins/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java	2005-10-27 15:30:57.000000000 +0200
@@ -555,8 +555,15 @@
 				hrefs.add(href);
 		}
 		NodeList subtopics = topic.getElementsByTagName("topic"); //$NON-NLS-1$
-		for (int i = 0; i < subtopics.getLength(); i++)
-			add((Element) subtopics.item(i), hrefs);
+		for (int i = 0; i < subtopics.getLength(); i++) {
+			Element subtopic = (Element) subtopics.item(i);
+			href = getAttribute(subtopic, "href");
+			if (href != null && !href.equals("") && !href.startsWith("http://") && !href.startsWith("https://")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				href = SearchIndex.getIndexableHref(href);
+				if (href != null)
+					hrefs.add(href);
+			}
+		}
 	}
 	
 	/*
@@ -774,4 +781,5 @@
 				IStatus.OK, message, t);
 		throw new CoreException(status);
 	}
-}
\ Kein Zeilenumbruch am Dateiende.
+}
+