Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2012-06-08 16:46:28 -0400
committerJeff Johnston2012-06-08 16:48:27 -0400
commitdc9a95adb26bf1476d93ff80eb29b5eaae34232e (patch)
treef91745002e1e5023a7eb9bfc45021f520f8d3227 /libhover
parent3e731559e7557f8fde222fbb6c1a9ce94ffb0f12 (diff)
downloadorg.eclipse.linuxtools-dc9a95adb26bf1476d93ff80eb29b5eaae34232e.tar.gz
org.eclipse.linuxtools-dc9a95adb26bf1476d93ff80eb29b5eaae34232e.tar.xz
org.eclipse.linuxtools-dc9a95adb26bf1476d93ff80eb29b5eaae34232e.zip
Fix 2 for: https://bugs.eclipse.org/bugs/show_bug.cgi?id=381660
Update libhover to ignore functions starting with "0" when completing a match for the empty string. This allows text to be placed in the libhover binary that won't appear in any hover or completion such as GFDL invariant sections.
Diffstat (limited to 'libhover')
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/ChangeLog7
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/META-INF/MANIFEST.MF2
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/pom.xml2
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java10
4 files changed, 18 insertions, 3 deletions
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/ChangeLog b/libhover/org.eclipse.linuxtools.cdt.libhover/ChangeLog
index 1b11e60664..38f3d6abc7 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/ChangeLog
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover/ChangeLog
@@ -1,3 +1,10 @@
+2012-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * pom.xml: Bump up version.
+ * META-INF/MANIFEST.MF: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java (getMatchingFunctions): Add
+ check for function names starting with "0" and ignore them for creating list.
+
2012-03-22 Jeff Johnston <jjohnstn@redhat.com>
* src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java (LibhoverPlugin): Make public.
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/META-INF/MANIFEST.MF b/libhover/org.eclipse.linuxtools.cdt.libhover/META-INF/MANIFEST.MF
index 21c075a8c1..058fa9b2f7 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/META-INF/MANIFEST.MF
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.linuxtools.cdt.libhover; singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.2.0.qualifier
Bundle-Activator: org.eclipse.linuxtools.cdt.libhover.LibhoverPlugin
Bundle-Vendor: %provider
Bundle-Localization: plugin
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/pom.xml b/libhover/org.eclipse.linuxtools.cdt.libhover/pom.xml
index c5de2f424e..7d9b1eecdb 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/pom.xml
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover/pom.xml
@@ -18,7 +18,7 @@
</parent>
<artifactId>org.eclipse.linuxtools.cdt.libhover</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<name>Linux Tools Libhover Plug-in</name>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java
index 9123f95b32..7dcb6eb4ad 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java
@@ -637,7 +637,15 @@ public class LibHover implements ICHelpProvider {
for (Iterator<Entry<String, FunctionInfo>> i = c.iterator(); i.hasNext();) {
Map.Entry<String, FunctionInfo> e = (Map.Entry<String, FunctionInfo>)i.next();
FunctionInfo x = e.getValue();
- if (x.getName().startsWith(prefix)) {
+ String name = x.getName();
+ // Look for names that start with prefix, but ignore names that
+ // start with "0" which is used to import text data that cannot
+ // be omitted from the binary version of the document (e.g. invariant
+ // sections of a GFDL licensed document). This data is given a
+ // function name that starts with the character "0" which is not
+ // valid for the start of a C/C++ function name. As such, it should
+ // never be offered as a choice for an empty prefix.
+ if (name.startsWith(prefix) && !name.startsWith("0")) { //$NON-NLS-1$
FunctionSummary f = new FunctionSummary();
f.ReturnType = x.getReturnType();
f.Prototype = x.getPrototype();

Back to the top