CN112527267A - 一种编辑器展开折叠效果实现方法 - Google Patents
一种编辑器展开折叠效果实现方法 Download PDFInfo
- Publication number
- CN112527267A CN112527267A CN202011479282.XA CN202011479282A CN112527267A CN 112527267 A CN112527267 A CN 112527267A CN 202011479282 A CN202011479282 A CN 202011479282A CN 112527267 A CN112527267 A CN 112527267A
- Authority
- CN
- China
- Prior art keywords
- folding
- code
- editor
- unfolding
- redundancy check
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 10
- 230000000694 effects Effects 0.000 title claims abstract description 8
- 239000003550 marker Substances 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/37—Compiler construction; Parser generation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1008—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
- G06F11/1012—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices using codes or arrangements adapted for a specific type of error
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/34—Graphical or visual programming
Abstract
本发明公开了一种代码或图形编辑器实现内容展开折叠效果实现方法,具体包括以下步骤:S1,计算出待折叠段代码冗余校验值;S2,将S1计算的冗余校验值以及折叠状态添加至/修改展开折叠节点列表;S3,编辑器根据展开折叠节点列表刷新显示。本发明结构科学合理,使用安全方便,本发明科学合理,计算简单,易于计算机实现。
Description
技术领域
本发明涉及计算机代码编辑器领域,具体为一种编辑器展开折叠效果实现方法。
背景技术
代码或图形编辑器要实现内容展开折叠效果,常规的方法是在代码中加入展开折叠的标记符,但是这种方法破坏了代码的真实内容,会带来额外的负担;因此需要一种不破坏代码的真实内容的标记方法,然而由于代码或图形编辑器做修改之后,标记难以跟进,容易造成错误。因此需要提出一种既不破坏代码的真实内容,又不受代码编辑影响的展开折叠标记方法。
发明内容
为实现既不破坏代码真实内容,又不受代码编辑影响,本发明提出一种代码或图形编辑器实现内容展开折叠效果实现方法,具体包括以下步骤:
S1,计算出待折叠段代码冗余校验值;
S2,将S1计算的冗余校验值以及折叠状态添加至/修改展开折叠节点列表;
S3,编辑器根据展开折叠节点列表刷新显示。
与现有技术相比,本发明的有益效果:本发明结构科学合理,使用安全方便,本发明科学合理,计算简单,易于计算机实现。
附图说明
附图用来提供对本发明的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明,并不构成对本发明的限制。在附图中:
图1为本发明的代码各折叠段CRC32校验列表;
图2为本发明的流程框图。
具体实施方式
以下结合附图对本发明的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本发明,并不用于限定本发明。
实施例:如图1-2所示,本发明提供技术方案:一种代码或图形编辑器实现内容展开折叠效果实现方法,具体包括以下步骤:
S1,计算出待折叠段代码冗余校验值;对于代码编辑器,直接取待折叠段代码;对于图形编辑器需要进行折叠,则可取需要折叠的图形段的描述代码,如文件名,注释;冗余校验可以为校验和、循环冗余校验(CRC)、水平冗余校验、竖直冗余校验以及CryptographicMessage Digest;本实施例优选CRC32校验;
S2,将S1计算的冗余校验值以及折叠状态添加至/修改展开折叠节点列表;图1所示代码各折叠段的CRC32校验列表如下:
FD016D46+
DC7CBCEA+
C18A80DE-
BA1F6653-
3F20AF10-
34E52C1D-
B8E47651+
574681EF+
BDF76927+
6AEF2E17+
C9C1BC7D+
4E095AC5+
63299AC4+
+表示折叠-表示展开,在点击展开折叠标记时,计算此标记的展开折叠段CRC32值,然后查找CRC32校验列表是否有这个校验值,如果不存在,则将以格式:CRC32+/-\r\n追加在列表末尾;如果存在则只需要修改CRC32值后面的+/-;
S3,编辑器根据展开折叠节点列表刷新显示;+表示折叠-表示展开;根据排列组合的数学原理,不同的数据段完全相同的CRC32值的概率非常小,可以认为0;这样根据CRC32值就能判断,代码段的展开折叠状态;而且无需在源代码中添加标记符号,同时在代码的其它部位被改动时,由于此代码段的CRC32值不会改变,因此达到了本发明的目的。
本发明结构科学合理,使用安全方便,本发明科学合理,计算简单,易于计算机实现。
最后应说明的是:以上所述仅为本发明的优选实例而已,并不用于限制本发明,尽管参照前述实施例对本发明进行了详细的说明,对于本领域的技术人员来说,其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
Claims (1)
1.一种代码或图形编辑器实现内容展开折叠效果实现方法,其特征在于,具体包括以下步骤:
S1,计算出待折叠段代码冗余校验值;
S2,将S1计算的冗余校验值以及折叠状态添加至/修改展开折叠节点列表;
S3,编辑器根据展开折叠节点列表刷新显示。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011479282.XA CN112527267A (zh) | 2020-12-15 | 2020-12-15 | 一种编辑器展开折叠效果实现方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011479282.XA CN112527267A (zh) | 2020-12-15 | 2020-12-15 | 一种编辑器展开折叠效果实现方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112527267A true CN112527267A (zh) | 2021-03-19 |
Family
ID=75000226
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011479282.XA Pending CN112527267A (zh) | 2020-12-15 | 2020-12-15 | 一种编辑器展开折叠效果实现方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112527267A (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116610359A (zh) * | 2023-07-18 | 2023-08-18 | 建信金融科技有限责任公司 | 一种编译信息的展示方法、装置及程序产品 |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5842218A (en) * | 1996-12-06 | 1998-11-24 | Media Plan, Inc. | Method, computer program product, and system for a reorienting categorization table |
US6745384B1 (en) * | 1998-05-29 | 2004-06-01 | Microsoft Corporation | Anticipatory optimization with composite folding |
US20060010431A1 (en) * | 2004-07-08 | 2006-01-12 | Patil Harish G | Unwind information for optimized programs |
CN101038547A (zh) * | 2007-02-06 | 2007-09-19 | 王军 | 计算机编程中运用即时风格块辅助编程的方法 |
US7506266B1 (en) * | 2008-01-27 | 2009-03-17 | International Business Machines Corporation | System and method for customizing collapse feature for editors |
US20130238665A1 (en) * | 2010-12-10 | 2013-09-12 | Vincent Sequin | Managing records displayed in a tree list |
CN104380249A (zh) * | 2012-06-22 | 2015-02-25 | 微软公司 | 开发环境中的折叠视图 |
CN107797794A (zh) * | 2017-10-17 | 2018-03-13 | 北京华航唯实机器人科技股份有限公司 | 程序代码的编辑方法、装置、存储介质、处理器及终端 |
CN109343842A (zh) * | 2018-10-09 | 2019-02-15 | 上海莉莉丝科技股份有限公司 | 在编辑器中显示物体的方法、系统、设备和介质 |
-
2020
- 2020-12-15 CN CN202011479282.XA patent/CN112527267A/zh active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5842218A (en) * | 1996-12-06 | 1998-11-24 | Media Plan, Inc. | Method, computer program product, and system for a reorienting categorization table |
US6745384B1 (en) * | 1998-05-29 | 2004-06-01 | Microsoft Corporation | Anticipatory optimization with composite folding |
US20060010431A1 (en) * | 2004-07-08 | 2006-01-12 | Patil Harish G | Unwind information for optimized programs |
CN101038547A (zh) * | 2007-02-06 | 2007-09-19 | 王军 | 计算机编程中运用即时风格块辅助编程的方法 |
US7506266B1 (en) * | 2008-01-27 | 2009-03-17 | International Business Machines Corporation | System and method for customizing collapse feature for editors |
US20130238665A1 (en) * | 2010-12-10 | 2013-09-12 | Vincent Sequin | Managing records displayed in a tree list |
CN104380249A (zh) * | 2012-06-22 | 2015-02-25 | 微软公司 | 开发环境中的折叠视图 |
CN107797794A (zh) * | 2017-10-17 | 2018-03-13 | 北京华航唯实机器人科技股份有限公司 | 程序代码的编辑方法、装置、存储介质、处理器及终端 |
CN109343842A (zh) * | 2018-10-09 | 2019-02-15 | 上海莉莉丝科技股份有限公司 | 在编辑器中显示物体的方法、系统、设备和介质 |
Non-Patent Citations (1)
Title |
---|
李春生: "《FTTx ODN技术与应用》", 31 October 2016 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116610359A (zh) * | 2023-07-18 | 2023-08-18 | 建信金融科技有限责任公司 | 一种编译信息的展示方法、装置及程序产品 |
CN116610359B (zh) * | 2023-07-18 | 2023-10-20 | 建信金融科技有限责任公司 | 一种编译信息的展示方法、装置及程序产品 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112527267A (zh) | 一种编辑器展开折叠效果实现方法 | |
CN110413439B (zh) | 用于检测数据的不完整写入的方法、设备和计算机可读介质 | |
Murata et al. | On design of CRC codes for polar codes with successive cancellation list decoding | |
CN100428176C (zh) | 根据(18,9)dec-ted码从数据字生成码字、对其解码的方法和装置 | |
CN107111529B (zh) | 使用逻辑时间中的冗余的变化跟踪 | |
JP6046403B2 (ja) | 誤り訂正符号の符号化方法及び復号方法 | |
US7240066B2 (en) | Unicode transitional code point database | |
JP2018028905A (ja) | データスクラビングを実行する電子装置、方法、及びデータスクラビング装置 | |
CN115993939B (zh) | 存储系统重复数据删除方法及装置 | |
US8560898B2 (en) | Error correction method and error correction apparatus utilizing the method | |
CN113535461A (zh) | 一种基于配置文件的联锁下位机数据可视化校验方法 | |
Fitriani et al. | Single-bit parity detection and correction using hamming code 7-bit model | |
Ezea et al. | Performance analysis of cyclic redundancy check (CRC) error detection technique in the wireless sensor network | |
Tallini et al. | Efficient systematic deletions/insertions of 0’s error control codes | |
Jha et al. | Quantum codes via binary codes over symbol-pair metric | |
CN114339493B (zh) | 基于otn网络的故障业务处理方法、装置及存储介质 | |
US7043502B1 (en) | Methodology for JEDEC file repair through compression field techniques | |
KR20190021159A (ko) | 그뢰브너 기저를 이용한 일반화된 리드-솔로몬 코드의 고속 체이스 디코딩방법 | |
Jiang | Machine learning and algorithmic techniques for error correction | |
JP2774350B2 (ja) | データ圧縮方法および圧縮データのデータ復元方法 | |
JP2952068B2 (ja) | データ圧縮及び復元方式 | |
KR100322574B1 (ko) | 오류 검출 코드의 생성방법 | |
Lu et al. | Marker Codes Using the Data Punching in the Presence of Insertions/Deletions | |
Jha et al. | Reinterpreting the Stabilizer Formalism | |
Das | A CLASS OF SOLID BURST ERROR CORRECTING CODES DERIVED FROM A REVERSIBLE CODE |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210319 |