View Issue Details

IDProjectCategoryView StatusLast Update
0031960LazarusIDEpublic2017-10-16 18:13
ReporterCudaText man Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformUbuntu, OSX10.8 
Summary0031960: FunctionList error, truncated names
Descriptionfile CocoaWSDialogs.pp.
Picture. truncated names.
TagsNo tags attached.
Fixed in Revisionr56015, r56085
LazTarget-
Widgetset
Attached Files

Activities

CudaText man

2017-06-03 15:52

reporter  

alt-g-bad-names.png (75,947 bytes)   
alt-g-bad-names.png (75,947 bytes)   

Juha Manninen

2017-10-09 17:43

developer   ~0103289

Last edited: 2017-10-09 17:44

View 2 revisions

Ok, now I see some method names are truncated? Is this about Cocoa widgetset only?

CudaText man

2017-10-09 18:26

reporter   ~0103294

Last edited: 2017-10-09 18:26

View 2 revisions

Items in grid on screenshot- are truncated:

exi
procedur
pickColo
doPickColo
selectFon

It is bug on macOS Cocoa (only here seems).

CudaText man

2017-10-09 18:29

reporter   ~0103296

It is bug on all WSes, also on Linux gtk2 in that file CocoaWSDialogs.pp

Juha Manninen

2017-10-10 00:13

developer   ~0103309

Hey, I found the difference between correctly shown and truncated procedures.
The truncated ones have empty parenthesis, like:
 procedure TColorPanelDelegate.doPickColor();
Without parenthesis it shows correctly.
Also procedures with parameters inside parenthesis show correctly, e.g.:
 procedure TColorPanelDelegate.windowWillClose(notification: NSNotification);

I will debug codetools tomorrow (unless you want to do it).

CudaText man

2017-10-10 07:34

reporter   ~0103320

Func name comes from pCodeTool.ExtractProcHead(), of coz I cannot find bug in it...

Juha Manninen

2017-10-10 11:45

developer   ~0103325

Did you debug it?
Please test with r56015.

CudaText man

2017-10-10 11:54

reporter   ~0103326

It's hard for me to debug CodeTools.
Fixed,thanks.

Juha Manninen

2017-10-10 13:22

developer   ~0103332

Just open lazarus.lpi, put a breakpoint somewhere and press F9. Not hard. :)

accorp

2017-10-16 11:42

reporter  

pascalparsertool-31960.diff (608 bytes)   
Index: components/codetools/pascalparsertool.pas
===================================================================
--- components/codetools/pascalparsertool.pas	(revision 56066)
+++ components/codetools/pascalparsertool.pas	(working copy)
@@ -1402,8 +1402,7 @@
       if (CurPos.Flag in [cafRoundBracketClose,cafEdgedBracketClose])
       and (Src[CurPos.StartPos] = CloseBracket)
       then begin
-        // opening bracket was not streamed, keep ExtractMemStream intact.
-        ReadNextAtom;
+        ExtractNextAtom(not (phpWithoutBrackets in Attr),Attr);
         exit(true);
       end;
     end;
pascalparsertool-31960.diff (608 bytes)   

accorp

2017-10-16 11:43

reporter   ~0103460

@Juha Manninen

This fix breaks code completion (Ctrl+Shift+C) for methods with empty parentheses:

  TTest = class
    procedure abc();
  end;


produce error message "identifier expected, but ; found" and this code:

  procedure TTest.abc(;    // <- open bracket only
  begin
  end;


I debugged CodeTools a little, there is an attr phpWithoutBrackets. Looks like it should be used here, see patch.

Juha Manninen

2017-10-16 16:33

developer   ~0103478

Ok, I will look at it.
Next time please reopen the issue in this kind of situation. Resolved issues are usually forgotten and ignored.

Juha Manninen

2017-10-16 18:13

developer   ~0103485

Yes, your patch solves the problem. Applied. Thanks.

Issue History

Date Modified Username Field Change
2017-06-03 15:52 CudaText man New Issue
2017-06-03 15:52 CudaText man File Added: alt-g-bad-names.png
2017-10-09 17:43 Juha Manninen Note Added: 0103289
2017-10-09 17:44 Juha Manninen Note Edited: 0103289 View Revisions
2017-10-09 18:26 CudaText man Note Added: 0103294
2017-10-09 18:26 CudaText man Note Edited: 0103294 View Revisions
2017-10-09 18:29 CudaText man Note Added: 0103296
2017-10-10 00:07 Juha Manninen Assigned To => Juha Manninen
2017-10-10 00:07 Juha Manninen Status new => assigned
2017-10-10 00:13 Juha Manninen Note Added: 0103309
2017-10-10 07:34 CudaText man Note Added: 0103320
2017-10-10 11:45 Juha Manninen Fixed in Revision => r56015
2017-10-10 11:45 Juha Manninen LazTarget => -
2017-10-10 11:45 Juha Manninen Note Added: 0103325
2017-10-10 11:45 Juha Manninen Status assigned => resolved
2017-10-10 11:45 Juha Manninen Resolution open => fixed
2017-10-10 11:54 CudaText man Note Added: 0103326
2017-10-10 13:22 Juha Manninen Note Added: 0103332
2017-10-16 11:42 accorp File Added: pascalparsertool-31960.diff
2017-10-16 11:43 accorp Note Added: 0103460
2017-10-16 16:33 Juha Manninen Note Added: 0103478
2017-10-16 16:33 Juha Manninen Status resolved => assigned
2017-10-16 16:33 Juha Manninen Resolution fixed => reopened
2017-10-16 18:13 Juha Manninen Fixed in Revision r56015 => r56015, r56085
2017-10-16 18:13 Juha Manninen Note Added: 0103485
2017-10-16 18:13 Juha Manninen Status assigned => resolved
2017-10-16 18:13 Juha Manninen Resolution reopened => fixed