Hi I typed 'Take' and source code with it. - the progress bar does not update - more important when I click on the message browser I get a DNU ast autoSelect: aSelector textModel readSelectionBlock: [ :text | self selectedMessage ifNotNil: [ :msg | (self sourceIntervalOf: aSelector in: msg ast) ^^^^^^^^^^^^^ ifEmpty:[ self searchedString: aSelector asString in: text ] ]] and RGCommentDefinition does not understand ast. So what do we do? Is it a well know bug? Stef
2015-10-28 15:33 GMT+01:00 stepharo <stepharo@free.fr>:
Hi
I typed 'Take' and source code with it. - the progress bar does not update
- more important when I click on the message browser I get a DNU ast
autoSelect: aSelector textModel readSelectionBlock: [ :text | self selectedMessage ifNotNil: [ :msg | (self sourceIntervalOf: aSelector in: msg ast) ^^^^^^^^^^^^^ ifEmpty:[ self searchedString: aSelector asString in: text ] ]]
and RGCommentDefinition does not understand ast. So what do we do?
It is a know bug ( at least, I know of it :) ) I changed the way the MessageBrowser selects the search term, because it always highlights the search term by "text" and not by "code" ,for example, in a "at:put:" senders MessageBrowser the first the highlighting started at the first at: although this is part of a at:ifAbsent: - message. at: #OneShotArmed ifAbsent: [ true ]) ifTrue: [ Smalltalk globals at: #OneShotArmed put: 16673 <https://pharo.fogbugz.com/f/cases/16673/Senders-of-highlights-wrong-code-seg...> Senders of... highlights wrong code segment But I didn't take the "class-comment"-search results into account.
Is it a well know bug?
Stef
I see this is annoying that comments are not polymorphic. Stef Le 28/10/15 11:05, Nicolai Hess a écrit :
2015-10-28 15:33 GMT+01:00 stepharo <stepharo@free.fr <mailto:stepharo@free.fr>>:
Hi
I typed 'Take' and source code with it. - the progress bar does not update
- more important when I click on the message browser I get a DNU ast
autoSelect: aSelector textModel readSelectionBlock: [ :text | self selectedMessage ifNotNil: [ :msg | (self sourceIntervalOf: aSelector in: msg ast) ^^^^^^^^^^^^^ ifEmpty:[ self searchedString: aSelector asString in: text ] ]]
and RGCommentDefinition does not understand ast. So what do we do?
It is a know bug ( at least, I know of it :) ) I changed the way the MessageBrowser selects the search term, because it always highlights the search term by "text" and not by "code" ,for example, in a "at:put:" senders MessageBrowser the first the highlighting started at the first at: although this is part of a at:ifAbsent: - message.
at: #OneShotArmed ifAbsent: [ true ]) ifTrue: [ Smalltalk globals at: #OneShotArmed put:
16673 <https://pharo.fogbugz.com/f/cases/16673/Senders-of-highlights-wrong-code-seg...> Senders of... highlights wrong code segment
But I didn't take the "class-comment"-search results into account.
Is it a well know bug?
Stef
16883 <https://pharo.fogbugz.com/f/cases/16883/Highlight-in-Senders-of-throws-a-MNU-if-the-search-term-was-found-in-a-class-comment>Highlight in Senders of... throws a MNU if the search term was found in a class comment <https://pharo.fogbugz.com/f/cases/16883/Highlight-in-Senders-of-throws-a-MNU...> 2015-10-28 16:19 GMT+01:00 stepharo <stepharo@free.fr>:
I see this is annoying that comments are not polymorphic.
yes, but comments are text and methods are code ....
Stef
Le 28/10/15 11:05, Nicolai Hess a écrit :
2015-10-28 15:33 GMT+01:00 stepharo <stepharo@free.fr>:
Hi
I typed 'Take' and source code with it. - the progress bar does not update
- more important when I click on the message browser I get a DNU ast
autoSelect: aSelector textModel readSelectionBlock: [ :text | self selectedMessage ifNotNil: [ :msg | (self sourceIntervalOf: aSelector in: msg ast) ^^^^^^^^^^^^^ ifEmpty:[ self searchedString: aSelector asString in: text ] ]]
and RGCommentDefinition does not understand ast. So what do we do?
It is a know bug ( at least, I know of it :) ) I changed the way the MessageBrowser selects the search term, because it always highlights the search term by "text" and not by "code" ,for example, in a "at:put:" senders MessageBrowser the first the highlighting started at the first at: although this is part of a at:ifAbsent: - message.
at: #OneShotArmed ifAbsent: [ true ]) ifTrue: [ Smalltalk globals at: #OneShotArmed put:
16673 <https://pharo.fogbugz.com/f/cases/16673/Senders-of-highlights-wrong-code-seg...> Senders of... highlights wrong code segment
But I didn't take the "class-comment"-search results into account.
Is it a well know bug?
Stef
2015-10-28 16:19 GMT+01:00 stepharo <stepharo@free.fr>:
I see this is annoying that comments are not polymorphic.
They could be :) - an empty RBMethodNode with a comment attribute, or - a comment: message send with the comment as a parameter. Thierry
Stef
Le 28/10/15 11:05, Nicolai Hess a écrit :
2015-10-28 15:33 GMT+01:00 stepharo <stepharo@free.fr>:
Hi
I typed 'Take' and source code with it. - the progress bar does not update
- more important when I click on the message browser I get a DNU ast
autoSelect: aSelector textModel readSelectionBlock: [ :text | self selectedMessage ifNotNil: [ :msg | (self sourceIntervalOf: aSelector in: msg ast) ^^^^^^^^^^^^^ ifEmpty:[ self searchedString: aSelector asString in: text ] ]]
and RGCommentDefinition does not understand ast. So what do we do?
It is a know bug ( at least, I know of it :) ) I changed the way the MessageBrowser selects the search term, because it always highlights the search term by "text" and not by "code" ,for example, in a "at:put:" senders MessageBrowser the first the highlighting started at the first at: although this is part of a at:ifAbsent: - message.
at: #OneShotArmed ifAbsent: [ true ]) ifTrue: [ Smalltalk globals at: #OneShotArmed put:
16673 <https://pharo.fogbugz.com/f/cases/16673/Senders-of-highlights-wrong-code-seg...> Senders of... highlights wrong code segment
But I didn't take the "class-comment"-search results into account.
Is it a well know bug?
Stef
2015-10-28 16:19 GMT+01:00 stepharo <stepharo@free.fr <mailto:stepharo@free.fr>>:
I see this is annoying that comments are not polymorphic.
They could be :) - an empty RBMethodNode with a comment attribute, or - a comment: message send with the comment as a parameter.
Would be nice to have a tree node ClassComment The static representation of Pharo program can really be improved. I still want a full package. Stef
Thierry
Stef
Le 28/10/15 11:05, Nicolai Hess a écrit :
2015-10-28 15:33 GMT+01:00 stepharo <stepharo@free.fr <mailto:stepharo@free.fr>>:
Hi
I typed 'Take' and source code with it. - the progress bar does not update
- more important when I click on the message browser I get a DNU ast
autoSelect: aSelector textModel readSelectionBlock: [ :text | self selectedMessage ifNotNil: [ :msg | (self sourceIntervalOf: aSelector in: msg ast) ^^^^^^^^^^^^^ ifEmpty:[ self searchedString: aSelector asString in: text ] ]]
and RGCommentDefinition does not understand ast. So what do we do?
It is a know bug ( at least, I know of it :) ) I changed the way the MessageBrowser selects the search term, because it always highlights the search term by "text" and not by "code" ,for example, in a "at:put:" senders MessageBrowser the first the highlighting started at the first at: although this is part of a at:ifAbsent: - message.
at: #OneShotArmed ifAbsent: [ true ]) ifTrue: [ Smalltalk globals at: #OneShotArmed put:
16673 <https://pharo.fogbugz.com/f/cases/16673/Senders-of-highlights-wrong-code-seg...> Senders of... highlights wrong code segment
But I didn't take the "class-comment"-search results into account.
Is it a well know bug?
Stef
2015-10-29 14:58 GMT+01:00 stepharo <stepharo@free.fr>:
2015-10-28 16:19 GMT+01:00 stepharo <stepharo@free.fr>:
I see this is annoying that comments are not polymorphic.
They could be :) - an empty RBMethodNode with a comment attribute, or - a comment: message send with the comment as a parameter.
Would be nice to have a tree node
ClassComment
You have RGCommentDefinition, no?
The static representation of Pharo program can really be improved.
I still want a full package.
RGPackage? Or a unified AST-like structure? Even an AST is not that cool as a program representation. Thierry
Stef
Thierry
Stef
Le 28/10/15 11:05, Nicolai Hess a écrit :
2015-10-28 15:33 GMT+01:00 stepharo < <stepharo@free.fr>stepharo@free.fr> :
Hi
I typed 'Take' and source code with it. - the progress bar does not update
- more important when I click on the message browser I get a DNU ast
autoSelect: aSelector textModel readSelectionBlock: [ :text | self selectedMessage ifNotNil: [ :msg | (self sourceIntervalOf: aSelector in: msg ast) ^^^^^^^^^^^^^ ifEmpty:[ self searchedString: aSelector asString in: text ] ]]
and RGCommentDefinition does not understand ast. So what do we do?
It is a know bug ( at least, I know of it :) ) I changed the way the MessageBrowser selects the search term, because it always highlights the search term by "text" and not by "code" ,for example, in a "at:put:" senders MessageBrowser the first the highlighting started at the first at: although this is part of a at:ifAbsent: - message.
at: #OneShotArmed ifAbsent: [ true ]) ifTrue: [ Smalltalk globals at: #OneShotArmed put:
16673 <https://pharo.fogbugz.com/f/cases/16673/Senders-of-highlights-wrong-code-seg...> Senders of... highlights wrong code segment
But I didn't take the "class-comment"-search results into account.
Is it a well know bug?
Stef
2015-10-28 16:19 GMT+01:00 stepharo <stepharo@free.fr <mailto:stepharo@free.fr>>:
I see this is annoying that comments are not polymorphic.
They could be :) - an empty RBMethodNode with a comment attribute, or - a comment: message send with the comment as a parameter.
Would be nice to have a tree node
ClassComment
You have RGCommentDefinition, no?
And RBComment So we should probably use them.
The static representation of Pharo program can really be improved.
I still want a full package.
RGPackage? Or a unified AST-like structure? Even an AST is not that cool as a program representation.
I'm thorn because on one hand I would like to be able to express a visitor for the complete compilation unit and in particular package and extensions but may be we do not need to have this nodes and just have an object. I would be favor to have a nice and full AST representation of the compilation unit. Stef
Le 29/10/2015 16:32, stepharo a écrit :
2015-10-28 16:19 GMT+01:00 stepharo <<mailto:stepharo@free.fr>stepharo@free.fr>:
I see this is annoying that comments are not polymorphic.
They could be :) - an empty RBMethodNode with a comment attribute, or - a comment: message send with the comment as a parameter.
Would be nice to have a tree node
ClassComment
You have RGCommentDefinition, no?
And RBComment So we should probably use them.
The static representation of Pharo program can really be improved.
I still want a full package.
RGPackage? Or a unified AST-like structure? Even an AST is not that cool as a program representation.
I'm thorn because on one hand I would like to be able to express a visitor for the complete compilation unit and in particular package and extensions but may be we do not need to have this nodes and just have an object. I would be favor to have a nice and full AST representation of the compilation unit.
Well, you can unify Ring and RBMethodNode from the point of view of the visitor: you're not in Java where typing could be an issue. Note that I have a structure + visitor for the above AST level implemented in the AltBrowser (covers groups of groups of packages, packages, package tags, classes, extensions, protocols, methods, comments). Thierry
I'm thorn because on one hand I would like to be able to express a
visitor for the complete compilation unit and in particular package and extensions but may be we do not need to have this nodes and just have an object. I would be favor to have a nice and full AST representation of the compilation unit.
Well, you can unify Ring and RBMethodNode from the point of view of the visitor: you're not in Java where typing could be an issue. If you have some cycle I would love to have that unification :) Yes I know :) and thought about it.
Note that I have a structure + visitor for the above AST level implemented in the AltBrowser (covers groups of groups of packages, packages, package tags, classes, extensions, protocols, methods, comments). Do you have a gofer expression :) so that I can load the code because I think that we should have this as a clearly identifiable component. We may not have to load it always in Pharo but it should be there.
Stef
Le 30/10/2015 11:59, stepharo a écrit :
I'm thorn because on one hand I would like to be able to express a
visitor for the complete compilation unit and in particular package and extensions but may be we do not need to have this nodes and just have an object. I would be favor to have a nice and full AST representation of the compilation unit.
Well, you can unify Ring and RBMethodNode from the point of view of the visitor: you're not in Java where typing could be an issue.
If you have some cycle I would love to have that unification :) Yes I know :) and thought about it.
I'll have a look.
Note that I have a structure + visitor for the above AST level implemented in the AltBrowser (covers groups of groups of packages, packages, package tags, classes, extensions, protocols, methods, comments). Do you have a gofer expression :)
Loading AltBrowser from the ConfigurationBrowser and looking at the Alt-Browser-Nodes package tag :) A bit unstable to use as Browser on Pharo5 at the moment, however. I'm in the middle of a browser rewrite. I looked and I don't have a Visitor on the structure. I know I did that on purpose, but can't remember what was my rationale.
so that I can load the code because I think that we should have this as a clearly identifiable component.
I tried to match to Ring at a point, but Ring coverage is partial. My approach is symbol-based (each node only contains a symbol on the underlying object and resolve the symbol when needed. resolution can be dependent on the environment: the node parent).
We may not have to load it always in Pharo but it should be there.
It could simplify Nautilus code a bit.
Stef
participants (3)
-
Nicolai Hess -
stepharo -
Thierry Goubier