View Issue Details

IDProjectCategoryView StatusLast Update
0027625LazarusIDEpublic2019-11-19 15:48
ReporterVojtech CihakAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Platformamd64OSLinuxOS VersionChakra 64-bi
Product Version1.5 (SVN)Product Build48159 
Target VersionFixed in Version2.2 
Summary0027625: [Feature] Add a few templates
DescriptionThis is feature request for adding templates for properties.
Here is 7 macros: prws, prwd, pirws, pirwd, pdrws, pdrwd, psrw
for
property $ Integer read $ write $ default $;|
and its variants.

I didn't know how to create patch so I added lines from lazarus.dci

If patch is needed, please, let me know how to create it.
Steps To Reproduce[prws | property read write]
$(AttributesStart)
EnableMakros=true
AutoOnSpace=true
RemoveChar=true
$(AttributesEnd)
property $param(Name) read $param(Getter) write $param(Setter);|
[prwd | property read write default]
$(AttributesStart)
EnableMakros=true
RemoveChar=true
AutoOnSpace=true
$(AttributesEnd)
property $param(Name) read $param(Getter) write $param(Setter) default $param(Const);|
[pirws | property Integer read write]
$(AttributesStart)
EnableMakros=true
AutoOnSpace=true
RemoveChar=true
$(AttributesEnd)
property $param(Name): Integer read $param(Getter) write $param(Setter);|
[pirwd | property Integer read write default]
$(AttributesStart)
EnableMakros=true
AutoOnSpace=true
RemoveChar=true
$(AttributesEnd)
property $param(Name): Integer read $param(Getter) write $param(Setter) default $param(Const);|
[psrw | property string read write]
$(AttributesStart)
AutoOnSpace=true
RemoveChar=true
EnableMakros=true
$(AttributesEnd)
property $param(Name): string read $param(Getter) write $param(Setter);|
[pdrwd | property Double read write default]
$(AttributesStart)
EnableMakros=true
AutoOnSpace=true
RemoveChar=true
$(AttributesEnd)
property $param(Name): Double read $param(Getter) write $param(Setter) default $param(Const);|
[pdrws | property Double read write]
$(AttributesStart)
EnableMakros=true
AutoOnSpace=true
RemoveChar=true
$(AttributesEnd)
property $param(Name): Double read $param(Getter) write $param(Setter);|
Additional InformationLazarus 1.5 r48159M FPC 3.1.1 x86_64-linux-qt
TagsNo tags attached.
Fixed in Revision62275
LazTarget2.2
Widgetset
Attached Files

Activities

Vojtech Cihak

2015-03-08 22:05

reporter   ~0081737

AFAIU, lazarus_dci_file.dci is initial file when lazarus.dci does not exist yet, right?

Vojtech Cihak

2015-03-10 19:48

reporter   ~0081810

I thought Lazarus uses file lazarus_dci_file.dci as a initial file when lazarus.dci does not exist but it is not true.
Lazarus uses other way to generate initial lazarus.dci.

Therefore I cannot create patch.

However, here are the lines (these lines are without configuration; should be used rather then lines added above in "Steps to Reproduce"):

[prws | property read write]
$(AttributesStart)
$(AttributesEnd)
property $param(Name) read $param(Getter) write $param(Setter);|
[prwd | property read write default]
$(AttributesStart)
$(AttributesEnd)
property $param(Name) read $param(Getter) write $param(Setter) default $param(Const);|
[pirws | property Integer read write]
$(AttributesStart)
$(AttributesEnd)
property $param(Name): Integer read $param(Getter) write $param(Setter);|
[pirwd | property Integer read write default]
$(AttributesStart)
$(AttributesEnd)
property $param(Name): Integer read $param(Getter) write $param(Setter) default $param(Const);|
[psrw | property string read write]
$(AttributesStart)
$(AttributesEnd)
property $param(Name): string read $param(Getter) write $param(Setter);|
[pdrwd | property Double read write default]
$(AttributesStart)
$(AttributesEnd)
property $param(Name): Double read $param(Getter) write $param(Setter) default $param(Const);|
[pdrws | property Double read write]
$(AttributesStart)
$(AttributesEnd)
property $param(Name): Double read $param(Getter) write $param(Setter);|

Juha Manninen

2018-10-03 19:36

developer   ~0111228

> I didn't know how to create patch so I added lines from lazarus.dci

lazarus.dci is a local config file, not part of the sources. It cannot be patched.

> If patch is needed, please, let me know how to create it.

You mean what part of the sources should be edited? I don't know. Apparently nobody knows. Please study the sources.

Vojtech Cihak

2018-11-08 21:52

reporter   ~0111873

I guess that new templates must be added to ide/lazarus_dci_file.dci and then resource file ide/editoropions.res need to be recompiled (files are listed in ide/editoroptions.rc) and then rebuild lazarus.

But I don't knowhow to rebuild resource file editoropions.res. Is it possible with lazres, or do I need windres?

Martin Friebe

2019-01-08 14:04

manager   ~0113266

Last edited: 2019-01-09 00:15

View 2 revisions

It needs windres.


A question:
Would (example for the first template) something like this be better?

   property $param(Name): $param(TType) read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1);|


Or at least would it be, if not by some bug, the "Get" param would include the following Name (after Name was edited).

With this your the Name would be inserted for read and write too. And you could then change the Get/Set to "F" as needed.

I will look into the bug part.
(And I can then later rebuild the resources.)

Martin Friebe

2019-11-03 23:02

manager   ~0119030

@Blaazen

Would (example for the first template) something like this be better?
   property $param(Name): $param(TType) read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1);|

See note above

Issue History

Date Modified Username Field Change
2015-03-08 20:18 Vojtech Cihak New Issue
2015-03-08 22:05 Vojtech Cihak Note Added: 0081737
2015-03-10 19:48 Vojtech Cihak Note Added: 0081810
2018-10-03 19:36 Juha Manninen Note Added: 0111228
2018-11-08 21:52 Vojtech Cihak Note Added: 0111873
2019-01-08 14:04 Martin Friebe Note Added: 0113266
2019-01-09 00:15 Martin Friebe Note Edited: 0113266 View Revisions
2019-01-14 01:11 Martin Friebe LazTarget => -
2019-01-14 01:11 Martin Friebe Assigned To => Martin Friebe
2019-01-14 01:11 Martin Friebe Status new => feedback
2019-11-03 23:02 Martin Friebe Note Added: 0119030
2019-11-18 23:43 Martin Friebe Status feedback => resolved
2019-11-18 23:43 Martin Friebe Resolution open => fixed
2019-11-18 23:43 Martin Friebe Fixed in Version => 2.2
2019-11-18 23:43 Martin Friebe Fixed in Revision => 62275
2019-11-18 23:43 Martin Friebe LazTarget - => 2.2