You are here: PSPad forum > Bug report / Hlášení chyb > Re: CodeFolding

Re: CodeFolding

#1 CodeFolding

Posted by: Lolo Irie | Date: 2021-07-04 21:56 | IP: IP Logged

Hello,

OMG, just discovering right now the new CodeFolding feature!!! So great, well done.
I will appreciate this feature for HTML if possible, but it's probably a lot of work.

But you wrote it should work for php files, and I'm not able to see it with my different files (POO or structural code). It's a known issue ? Should I submit any code/file examples ?

It looks like it's already working for SQL files, but it's not working correctly with BEGIN and END statements. Not sure if it's relevant like you didn't mention the SQL support for CodeFolding.

Anyway, thanks A LOT for this major feature !!!

Options: Reply | Quote | Up ^


#2 Re: CodeFolding

Posted by: pspad | Date: 2021-07-05 02:40 | IP: IP Logged

Hello
If you need to add Code explorer support in user highlighter, is necessary to set "file type" in user highlighter definition.
Code folding in user highlighter is supported for {} bracket based syntax only now. But will be extended in future.

Regards to SQL, if anything is wrong, i need code examples to see what's wrong

Options: Reply | Quote | Up ^


#3 Re: CodeFolding

Posted by: Lolo Irie | Date: 2021-07-05 07:15 | IP: IP Logged

Thanks for your help, but I'm not sure to understand what you mean with the user highlighter for PHP files and CodeFolding (Code Explorer is working, only CodeFolding not)

I've created a user highligter for PHP files, with option cftCurlyBracke, but can't see any difference.

BTW sent you the french translation updated.

Here is an example of SQL code not correctly working with the CodeFolding feature:

CREATE TABLE dbo.IMG(
IDIMG numeric(15, 0) IDENTITY(1,1) NOT NULL,
IDINTER numeric(15, 0) NOT NULL,
IMGLINK nvarchar(255) NULL,
IMGCATEGORY nvarchar(3) NULL,
IMGTYPE nvarchar(35) NULL,
IMGFORMAT nvarchar(4) NULL,
IMGDATETIME nvarchar(14) NULL,
IMGBUINTDATETIME nvarchar(14) NULL,
VERSION datetime NOT NULL,
PRIMARY KEY (IDIMG),
FOREIGN KEY (IDINTER) REFERENCES dbo.INTER(IDINTER)
);

CREATE PROCEDURE [dbo].[Notify_Report_Error]
@day varchar(10) -- example 2014-12-01

AS
BEGIN
SET NOCOUNT ON;

SELECT COALESCE(f.creator,'unknown'),
COALESCE(e.delisusr,'unknown'),
( SELECT resource FROM tfile where idproc = f.idproc AND split = 0) resource,
CASE WHEN f.ifgroup = 'MPSEXPDATA' THEN COALESCE(f.ifgroup,'') + '_' + COALESCE(f.ifvers,'')
ELSE COALESCE(f.ifgroup,'') + '_' + COALESCE(f.ifclass,'') + '_' + COALESCE(f.ifvers,'') END,
f.encoding,
COALESCE( ( SELECT s.mpsid FROM tsync s WHERE s.idshipment = e.idshipment),'') mpsid,
e.errclass,
COALESCE(e.errtype,''),
CASE WHEN f.split = 0 THEN COALESCE(e.errfield,'') + ' (line ' +
CASE WHEN e.line > 0 THEN CONVERT(VARCHAR(8), e.line) ELSE '-' END + ')'
ELSE COALESCE(e.errfield,'') END,
COALESCE(e.errvalue,''),
e.idshipment, e.version
FROM verror e, tfile f
WHERE e.idfile = f.idfile
AND ( f.creator <> 'DERRICK' OR f.creator IS NULL )
AND ( e.errclass IN (3,4,5) OR e.errfield = 'SKIP_DATA' )
AND DATEDIFF(dd, @day, f.version)=0
--limitation
ORDER BY f.creator, f.idfile DESC

END
/****** Object: StoredProcedure [dbo].[Notify_Report_Shipments] Script Date: 12/10/2014 16:08:33 ******/
SET ANSI_NULLS ON

GO
/****** Object: StoredProcedure [dbo].[Notify_Report_Error_BI] Script Date: 21.10.2020 15:03:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

Options: Reply | Quote | Up ^


#4 Re: CodeFolding

Posted by: pspad | Date: 2021-07-05 12:22 | IP: IP Logged

If you want to use code folding for PHP, you need to use PHP highlighter, not a HTML multihighlighter.

Code exploer for SQL is in the begin. I tried to make some basis for Oracle. It doesn't work for MS SQL yet.

Options: Reply | Quote | Up ^


#5 Re: CodeFolding

Posted by: Lolo Irie | Date: 2021-07-05 13:28 | IP: IP Logged

OK, without multihighlighter it's working like a charm. smiling smiley
Thanks a lot !!!

For SQL, I was already surprised CodeFolding was already working like you didn't mention it. Anyway sounds already good. Thanks and good luck to complete this feature for MS SQL as well.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR