From 2b1408184ec71ec93f3af3949c9d9764141fc93f Mon Sep 17 00:00:00 2001 From: mattias Date: Sun, 22 Nov 2009 19:18:19 +0000 Subject: [PATCH] codetools: parsing objcprotocol git-svn-id: trunk@22707 - --- components/codetools/pascalparsertool.pas | 5 +- examples/pen_brush/project1.lpi | 141 ++++++++++++++++++++-- examples/pen_brush/unit1.pas | 2 +- ideintf/propedits.pp | 3 +- 4 files changed, 138 insertions(+), 13 deletions(-) diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index c3acf3c6aa..18fdabc1b7 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -391,7 +391,10 @@ begin 'O': if CompareSrcIdentifiers('OBJECT',p) or CompareSrcIdentifiers('OBJCCLASS',p) - or CompareSrcIdentifiers('OBJCCATEGORY',p) then exit(KeyWordFuncClass); + or CompareSrcIdentifiers('OBJCCATEGORY',p) then + exit(KeyWordFuncClass) + else if CompareSrcIdentifiers('OBJCPROTOCOL',p) then + exit(KeyWordFuncClassInterface); 'P': case UpChars[p[1]] of 'A': if CompareSrcIdentifiers('PACKED',p) then exit(KeyWordFuncTypePacked); diff --git a/examples/pen_brush/project1.lpi b/examples/pen_brush/project1.lpi index 6cec71a574..8b9322eab5 100644 --- a/examples/pen_brush/project1.lpi +++ b/examples/pen_brush/project1.lpi @@ -9,7 +9,7 @@ - + @@ -33,12 +33,12 @@ - + - + @@ -46,22 +46,143 @@ - + - + + + + + + + + + + - + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/pen_brush/unit1.pas b/examples/pen_brush/unit1.pas index 2f99a241dd..267c48c04f 100644 --- a/examples/pen_brush/unit1.pas +++ b/examples/pen_brush/unit1.pas @@ -63,7 +63,7 @@ uses procedure TForm1.Button1Click(Sender: TObject); begin - Close; + Monitor; end; procedure TForm1.cbAntialiasingChange(Sender: TObject); diff --git a/ideintf/propedits.pp b/ideintf/propedits.pp index 1282ff95d2..fd542287fe 100644 --- a/ideintf/propedits.pp +++ b/ideintf/propedits.pp @@ -1345,11 +1345,11 @@ type const OnGetRootClassName: TPropHookGetRootClassName); procedure RemoveHandlerGetRootClassName( const OnGetRootClassName: TPropHookGetRootClassName); + // component create, delete, rename procedure AddHandlerComponentRenamed( const OnComponentRenamed: TPropHookComponentRenamed); procedure RemoveHandlerComponentRenamed( const OnComponentRenamed: TPropHookComponentRenamed); - // persistent selection procedure AddHandlerBeforeAddPersistent( const OnBeforeAddPersistent: TPropHookBeforeAddPersistent); procedure RemoveHandlerBeforeAddPersistent( @@ -1366,6 +1366,7 @@ type const OnDeletePersistent: TPropHookDeletePersistent); procedure RemoveHandlerDeletePersistent( const OnDeletePersistent: TPropHookDeletePersistent); + // persistent selection procedure AddHandlerGetSelection( const OnGetSelection: TPropHookGetSelection); procedure RemoveHandlerGetSelection(