Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Patch for PR 47766 (bolding of hover arguments)

Folks,

  Here is a patch to address the problem where the argument
string is not always properly highlighted and is occasionally
off by one.

  I've remarked on another problem with the current bolding
scheme but will put in a PR and a fix for this next.

ChangeLog:
 - Adjust to properly bold arguments in the hover dialog. Don't
   mess with the string that the user provided!

Index: src/org/eclipse/cdt/internal/ui/text/CParameterListValidator.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CParameterListValidator.java,v
retrieving revision 1.1
diff -u -r1.1 CParameterListValidator.java
--- src/org/eclipse/cdt/internal/ui/text/CParameterListValidator.java	24 Jun 2003 14:22:14 -0000	1.1
+++ src/org/eclipse/cdt/internal/ui/text/CParameterListValidator.java	12 Dec 2003 12:22:23 -0000
@@ -177,8 +177,12 @@
 		presentation.clear();
 		fCurrentParameter= currentParameter;
 		
-		String s= fInformation.getInformationDisplayString().trim();
+		//Don't presume what has been done to the string, rather use as is
+		String s= fInformation.getInformationDisplayString();
 		
+		//@@@ This is obviously going to have problems with functions such
+		//int myfunction(int (*function_argument)(void * extra, int param), void * extra)
+		//int myfunction(/*A comment, indeed */int a);
 		int start= 0;
 		int occurrences= 0;
 		while (occurrences < fCurrentParameter) {

Back to the top