Lazarus中文社区

 找回密码
 立即注册(注册审核可向QQ群索取)

QQ登录

只需一步,快速开始

版权申明
查看: 2775|回复: 0

【分享】去掉CodeTyphon中代码格式化提示对话框

[复制链接]

该用户从未签到

发表于 2013-11-5 21:55:09 | 显示全部楼层 |阅读模式
本帖最后由 mmwy 于 2013-11-5 22:20 编辑

在Lazarus中内置了JEDI Code Format IDE Plugin for Lazarus,快捷键是Ctrl+D。在Lazarus 1.0.12中按快捷键后会直接格式化代码,无提示。但是当我使用CT 4.50时,同样的快捷键后会弹出如下的对话框。

原以为这个东西地方可以配置,但是刨了很久也没发现,最后终于刨到fcl的源码。
在C:\CodeTyphon\typhon\components\jcf2\IdePlugin\typhon\jcfidemain.pas中,找到

  1. procedure TJcfIdeMain.DoFormatCurrentIDEWindow(Sender: TObject);
  2. var
  3.   lsMsg: string;
  4. begin
  5.   if (SourceEditorManagerIntf= nil) or (SourceEditorManagerIntf.ActiveEditor = nil) then
  6.     LogIdeMessage('', 'No current window', mtInputError, -1, -1)
  7.   else begin
  8.     //lsMsg := Format(lisJEDICodeFormatOfStartFormatting, [SourceEditorManagerIntf.ActiveEditor.FileName+ NativeLineBreak]);
  9.     //if MessageDlg(lsMsg, mtConfirmation, [mbYes, mbNo], 0) = mrYes then
  10.       ConvertEditor(SourceEditorManagerIntf.ActiveEditor);
  11.   end;
  12. end;
复制代码
去掉对话框部分的代码,然后重新编译IDE。





回复

使用道具 举报

*滑块验证:

本版积分规则

QQ|手机版|小黑屋|Lazarus中国|Lazarus中文社区 ( 鄂ICP备16006501号-1 )

GMT+8, 2025-5-2 23:28 , Processed in 0.029755 second(s), 10 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表