mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 06:57:54 +02:00
components: remove prettyformat package (jcf2 is now used instead)
git-svn-id: trunk@27182 -
This commit is contained in:
parent
0429cde3d8
commit
5353af0666
13
.gitattributes
vendored
13
.gitattributes
vendored
@ -1659,19 +1659,6 @@ components/plotfunction/regplotpanel.lrs svneol=native#text/pascal
|
||||
components/plotfunction/regplotpanel.pp svneol=native#text/plain
|
||||
components/plotfunction/tplotexpressionpanel.png -text svneol=unset#image/png
|
||||
components/plotfunction/tplotfunctionpanel.png -text svneol=unset#image/png
|
||||
components/prettyformat/languages/pfidesource.de.po svneol=native#text/plain
|
||||
components/prettyformat/languages/pfidesource.fr.po svneol=native#text/plain
|
||||
components/prettyformat/languages/pfidesource.id.po svneol=native#text/plain
|
||||
components/prettyformat/languages/pfidesource.lt.po svneol=native#text/plain
|
||||
components/prettyformat/languages/pfidesource.pb.po svneol=native#text/plain
|
||||
components/prettyformat/languages/pfidesource.pl.po svneol=native#text/plain
|
||||
components/prettyformat/languages/pfidesource.po svneol=native#text/plain
|
||||
components/prettyformat/languages/pfidesource.ru.po svneol=native#text/plain
|
||||
components/prettyformat/languages/pfidesource.zh_CN.po svneol=native#text/plain
|
||||
components/prettyformat/pfidesource.pas svneol=native#text/plain
|
||||
components/prettyformat/prettyformat.lpk svneol=native#text/plain
|
||||
components/prettyformat/prettyformat.pas svneol=native#text/plain
|
||||
components/prettyformat/ptopu.pp svneol=native#text/plain
|
||||
components/prettymessages/README.txt svneol=native#text/plain
|
||||
components/prettymessages/hidefpchints.pas svneol=native#text/plain
|
||||
components/prettymessages/prettymessages.lpk svneol=native#text/plain
|
||||
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -74,12 +74,6 @@ components/opengl/*.bak
|
||||
components/opengl/example/*.bak
|
||||
components/opengl/example/units
|
||||
components/opengl/units
|
||||
components/prettyformat/*.bak
|
||||
components/prettyformat/languages/*.bak
|
||||
components/prettyformat/languages/units
|
||||
components/prettyformat/lib/*.bak
|
||||
components/prettyformat/lib/units
|
||||
components/prettyformat/units
|
||||
components/printers/*.bak
|
||||
components/printers/design/*.bak
|
||||
components/printers/design/languages/*.bak
|
||||
|
@ -90,9 +90,6 @@ plotfunction
|
||||
popupnotifier
|
||||
?
|
||||
|
||||
prettyformat
|
||||
Adds menu items to the IDE for beautifiying code via ptop.
|
||||
|
||||
prettymessages
|
||||
Hide unwanted hints, warnings and all kind of messages in the message window.
|
||||
|
||||
|
@ -1,26 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2007-07-27 21:24+0100\n"
|
||||
"Last-Translator: Joerg Braun <jb@toolbox-mag.de>\n"
|
||||
"Language-Team: Deutsch <lazarus@miraclec.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-Language: German\n"
|
||||
"X-Poedit-Country: GERMANY\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#: pfidesource.sdescrformatting
|
||||
msgid "Formatting commands"
|
||||
msgstr "Formatierbefehle"
|
||||
|
||||
#: pfidesource.sdescrpffile
|
||||
msgid "Pretty-Format File"
|
||||
msgstr "Verschönerungs-Datei"
|
||||
|
||||
#: pfidesource.sdescrpfselection
|
||||
msgid "Pretty-Format Selection"
|
||||
msgstr "Verschönerungs-Auswahl"
|
||||
|
@ -1,23 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2007-07-16 17:37+0100\n"
|
||||
"Last-Translator: Laurent Jacques <wile64@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
#: pfidesource.sdescrformatting
|
||||
msgid "Formatting commands"
|
||||
msgstr "Commandes de formatage"
|
||||
|
||||
#: pfidesource.sdescrpffile
|
||||
msgid "Pretty-Format File"
|
||||
msgstr "Formater le fichier"
|
||||
|
||||
#: pfidesource.sdescrpfselection
|
||||
msgid "Pretty-Format Selection"
|
||||
msgstr "Formater la sélection"
|
||||
|
@ -1,23 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Lazarus 1.x\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2007-09-22 01:08+0700\n"
|
||||
"Last-Translator: Zaenal Mutaqin <ade999@gmail.com>\n"
|
||||
"Language-Team: Indonesian <ade999@gmail.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: pfidesource.sdescrformatting
|
||||
msgid "Formatting commands"
|
||||
msgstr "Perintah format"
|
||||
|
||||
#: pfidesource.sdescrpffile
|
||||
msgid "Pretty-Format File"
|
||||
msgstr "File Pretty-Format"
|
||||
|
||||
#: pfidesource.sdescrpfselection
|
||||
msgid "Pretty-Format Selection"
|
||||
msgstr "Pemilihan Pretty-Format"
|
||||
|
@ -1,24 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"PO-Revision-Date: 2008-06-12 21:37+0300\n"
|
||||
"Project-Id-Version: pfidesource\n"
|
||||
"Language-Team: Lithuanian\n"
|
||||
"X-Generator: KBabel 1.11.4\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Last-Translator: Valdas Jankūnas <skroblas@erdves.lt>\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
|
||||
#: pfidesource.sdescrformatting
|
||||
msgid "Formatting commands"
|
||||
msgstr "Formatavimo komandos"
|
||||
|
||||
#: pfidesource.sdescrpffile
|
||||
msgid "Pretty-Format File"
|
||||
msgstr "Pretty-Format failas"
|
||||
|
||||
#: pfidesource.sdescrpfselection
|
||||
msgid "Pretty-Format Selection"
|
||||
msgstr "Pretty-Format žymėjimas"
|
||||
|
@ -1,23 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Marcelo Borges de Paula\n"
|
||||
"Language-Team: \n"
|
||||
|
||||
#: pfidesource.sdescrformatting
|
||||
msgid "Formatting commands"
|
||||
msgstr "Comandos formatação"
|
||||
|
||||
#: pfidesource.sdescrpffile
|
||||
msgid "Pretty-Format File"
|
||||
msgstr "Arquivo Formatação Elegante"
|
||||
|
||||
#: pfidesource.sdescrpfselection
|
||||
msgid "Pretty-Format Selection"
|
||||
msgstr "Seleção Formatação Elegante"
|
||||
|
@ -1,25 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: pfidesource\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2007-01-13 23:38+0100\n"
|
||||
"Last-Translator: AlbercikCD\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-Language: Polish\n"
|
||||
"X-Poedit-Country: POLAND\n"
|
||||
|
||||
#: pfidesource.sdescrformatting
|
||||
msgid "Formatting commands"
|
||||
msgstr ""
|
||||
|
||||
#: pfidesource.sdescrpffile
|
||||
msgid "Pretty-Format File"
|
||||
msgstr ""
|
||||
|
||||
#: pfidesource.sdescrpfselection
|
||||
msgid "Pretty-Format Selection"
|
||||
msgstr ""
|
||||
|
@ -1,18 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: pfidesource.sdescrformatting
|
||||
msgid "Formatting commands"
|
||||
msgstr ""
|
||||
|
||||
#: pfidesource.sdescrpffile
|
||||
msgid "Pretty-Format File"
|
||||
msgstr ""
|
||||
|
||||
#: pfidesource.sdescrpfselection
|
||||
msgid "Pretty-Format Selection"
|
||||
msgstr ""
|
||||
|
@ -1,23 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2007-01-21 20:06+0300\n"
|
||||
"Last-Translator: Maxim Ganetsky <maxkill@mail.ru>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: pfidesource.sdescrformatting
|
||||
msgid "Formatting commands"
|
||||
msgstr "Команды форматирования"
|
||||
|
||||
#: pfidesource.sdescrpffile
|
||||
msgid "Pretty-Format File"
|
||||
msgstr "Форматировать файл"
|
||||
|
||||
#: pfidesource.sdescrpfselection
|
||||
msgid "Pretty-Format Selection"
|
||||
msgstr "Форматировать выбранное"
|
||||
|
@ -1,26 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.9.27 beta\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2009-04-24 19:20+0800\n"
|
||||
"Last-Translator: XY.Chen <chenxinyv@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-Language: Chinese\n"
|
||||
"X-Poedit-Country: CHINA\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#: pfidesource.sdescrformatting
|
||||
msgid "Formatting commands"
|
||||
msgstr "格式化命令"
|
||||
|
||||
#: pfidesource.sdescrpffile
|
||||
msgid "Pretty-Format File"
|
||||
msgstr "美化文件"
|
||||
|
||||
#: pfidesource.sdescrpfselection
|
||||
msgid "Pretty-Format Selection"
|
||||
msgstr "美化选中节"
|
||||
|
@ -1,148 +0,0 @@
|
||||
unit pfidesource;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,LCLtype;
|
||||
|
||||
Procedure PrettyPrintSelection(Sender : TObject);
|
||||
Procedure PrettyPrintFile(Sender : TObject);
|
||||
|
||||
Procedure Register;
|
||||
|
||||
implementation
|
||||
|
||||
uses menuintf, idecommands, srceditorintf, ptopu;
|
||||
|
||||
Const
|
||||
SCmdPFSelection = 'PrettyFormatSelection';
|
||||
SCmdPFFile = 'PrettyFormatFile';
|
||||
SCatFormatting = 'Formatting';
|
||||
|
||||
Resourcestring
|
||||
SDescrPFSelection = 'Pretty-Format Selection';
|
||||
SDescrPFFile = 'Pretty-Format File';
|
||||
SDescrFormatting = 'Formatting commands';
|
||||
|
||||
Var
|
||||
CmdFormatSelection : TIDECommand;
|
||||
CmdFormatFile : TIDECommand;
|
||||
|
||||
Procedure Register;
|
||||
|
||||
Var
|
||||
Key : TIDEShortCut;
|
||||
Cat : TIDECommandCategory;
|
||||
|
||||
begin
|
||||
Key:=IDEShortCut(VK_P,[SSctrl,ssShift],VK_UNKNOWN,[]);
|
||||
{$ifndef USECustomCategory}
|
||||
Cat:=IDECommandList.CreateCategory(Nil,
|
||||
SCatFormatting,
|
||||
SDescrFormatting,
|
||||
IDECmdScopeSrcEditOnly);
|
||||
{$else}
|
||||
cat:=nil,
|
||||
{$endif}
|
||||
CmdFormatSelection:=RegisterIDECommand(Cat,
|
||||
SCmdPFSelection,
|
||||
SDescrPFSelection,
|
||||
Key,nil,@PrettyPrintSelection);
|
||||
Key:=IDEShortCut(VK_P,[SSctrl,ssAlt],VK_UNKNOWN,[]);
|
||||
CmdFormatFile:=RegisterIDECommand(Cat,
|
||||
SCmdPFFile,
|
||||
SDescrPFFile,
|
||||
Key,nil,@PrettyPrintFile);
|
||||
RegisterIDEMenuCommand(SrcEditSubMenuRefactor,
|
||||
SCmdPFSelection,
|
||||
SDescrPFSelection,
|
||||
Nil,nil,CmdFormatSelection);
|
||||
RegisterIDEMenuCommand(SrcEditSubMenuRefactor,
|
||||
SCmdPFFile,
|
||||
SDescrPFFile,
|
||||
Nil,nil,CmdFormatFile);
|
||||
RegisterIDEMenuCommand(itmEditBlockIndentation,
|
||||
SCmdPFSelection,
|
||||
SDescrPFSelection,
|
||||
Nil,nil,CmdFormatSelection);
|
||||
RegisterIDEMenuCommand(itmEditBlockIndentation,
|
||||
SCmdPFFile,
|
||||
SDescrPFFile,
|
||||
Nil,nil,CmdFormatFile);
|
||||
end;
|
||||
|
||||
Procedure PrettyPrintStream(SIn,SOut : TStream);
|
||||
|
||||
Var
|
||||
PP : TPrettyPrinter;
|
||||
|
||||
begin
|
||||
PP:=TPrettyPrinter.Create;
|
||||
Try
|
||||
PP.Source:=Sin;
|
||||
PP.Dest:=Sout;
|
||||
PP.PrettyPrint;
|
||||
Finally
|
||||
PP.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
Procedure PrettyPrintSelection(Sender : TObject);
|
||||
|
||||
Var
|
||||
S1,S2 : TSTringStream;
|
||||
E : TSourceEditorInterface;
|
||||
|
||||
begin
|
||||
if Sender=nil then ;
|
||||
E:=SourceEditorManagerIntf.ActiveEditor;
|
||||
If (E=Nil) or (Not E.SelectionAvailable) then
|
||||
Exit;
|
||||
S1:=TStringStream.Create(E.Selection);
|
||||
Try
|
||||
S2:=TStringStream.Create('');
|
||||
Try
|
||||
S1.Position:=0;
|
||||
PrettyPrintStream(S1,S2);
|
||||
E.Selection:=S2.DataString;
|
||||
Finally
|
||||
S2.Free;
|
||||
end;
|
||||
Finally
|
||||
S1.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
Procedure PrettyPrintFile(Sender : TObject);
|
||||
|
||||
Var
|
||||
S1 : TMemoryStream;
|
||||
S2 : TStringStream;
|
||||
E : TSourceEditorInterface;
|
||||
|
||||
begin
|
||||
if Sender=nil then ;
|
||||
E:=SourceEditorManagerIntf.ActiveEditor;
|
||||
If (E=Nil) then
|
||||
Exit;
|
||||
S1:=TMemoryStream.Create;
|
||||
Try
|
||||
E.Lines.SaveToStream(S1);
|
||||
S1.Position:=0;
|
||||
S2:=TStringStream.Create('');
|
||||
Try
|
||||
PrettyPrintStream(S1,S2);
|
||||
S2.Position:=0;
|
||||
E.ReplaceLines(0, E.LineCount, S2.DataString);
|
||||
Finally
|
||||
S2.Free;
|
||||
end;
|
||||
Finally
|
||||
S1.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -1,50 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<Package Version="3">
|
||||
<Name Value="prettyformat"/>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
</CodeGeneration>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Files Count="2">
|
||||
<Item1>
|
||||
<Filename Value="ptopu.pp"/>
|
||||
<UnitName Value="PtoPu"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="pfidesource.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="pfidesource"/>
|
||||
</Item2>
|
||||
</Files>
|
||||
<i18n>
|
||||
<EnableI18N Value="True"/>
|
||||
<OutDir Value="languages"/>
|
||||
</i18n>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<RequiredPkgs Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="FCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
</Item2>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)/"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
</PublishOptions>
|
||||
</Package>
|
||||
</CONFIG>
|
@ -1,21 +0,0 @@
|
||||
{ Diese Datei wurde automatisch von Lazarus erzeugt. Sie darf nicht bearbeitet werden!
|
||||
Dieser Quelltext dient nur dem Übersetzen und Installieren des Packages.
|
||||
}
|
||||
|
||||
unit prettyformat;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
PtoPu, pfidesource, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterUnit('pfidesource', @pfidesource.Register);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPackage('prettyformat', @Register);
|
||||
end.
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user