[squeak-dev] Displaying the class outline of FileList in the Vivide IDE
H. Hirzel
hannes.hirzel at gmail.com
Fri Oct 6 10:20:29 UTC 2017
Note:
The Vivide script from Marcel T. [1] is a very useful tool to get a
global view how a class hierarchy has its subclasses distributed among
the different packages. Outstanding.
[1] Vivide script to get a two column view :
- collapsible, hierarchical class hierarchy list
- package of the class
{
[:in :out | in do: [:class | out add: {
#object -> class.
#text -> (ViLabelService doObject: class).
#icon -> (ViIconService doObject: class) } ]]
-> { #isProperty -> true.
#view -> ViTreeViewExtended }.
[:in :out | in do: [:class | out add: {
#object -> class.
#text -> (ViObjectOriginService doObject: class) } ]]
-> {(#isProperty -> true)}.
[:in :out | in do: [:class | out addAll: class subclasses]].
1. "reference to the first step"
} asScript openScriptWith: {PdicObj}.
On 10/6/17, H. Hirzel <hannes.hirzel at gmail.com> wrote:
> As a workaround in Sq6.0a to avoid drag and drop of a class to get a
> class outline.
>
> How can I open a class outline with a script?
>
> On 10/6/17, H. Hirzel <hannes.hirzel at gmail.com> wrote:
>> this happens in my Squeak6.0a trunk work image which has other
>> packages loaded. Not in the 6.0a test image which only has Metacello
>> and Vivide. I have to do more investigations ....
>>
>> On 10/6/17, H. Hirzel <hannes.hirzel at gmail.com> wrote:
>>> An issue when dragging out a class from the list
>>>
>>>
>>> PasteUpMorph(Object)>>doesNotUnderStand: #first
>>>
>>> Marked below with " ***** "
>>>
>>> wnds is a PasteUpMorph
>>>
>>>
>>> openArtifactsForTransferMorph: aTransferMorph
>>>
>>> ^ (self showWindowForTransferMorph: aTransferMorph) in: [:wnds |
>>> | bounds |
>>> wnds first " ***** " center: self currentEvent position.
>>>
>>> bounds :=((wnds collect: [:wnd | wnd fullBounds])
>>> reduce: [:b1 :b2 | b1 topLeft extent: (b1 width + b2 width) @ (b1
>>> height max: b2 height)])
>>> translatedToBeWithin: (RealEstateAgent maximumUsableAreaInWorld:
>>> self).
>>>
>>> wnds first topLeft: bounds topLeft.
>>>
>>> "Align other windows next to the first one."
>>> wnds overlappingPairsDo: [:wnd1 :wnd2 |
>>> wnd2 topLeft: wnd1 topRight].
>>>
>>> ^ wnds first]
>>>
>>>
>>> On 10/6/17, H. Hirzel <hannes.hirzel at gmail.com> wrote:
>>>> I replaced locally in my image
>>>>
>>>>
>>>>
>>>>
>>>> ECPreferences>>menuSelectionColor
>>>> Smalltalk at: #UITheme ifPresent: [ :uiTheme |
>>>> "Pharo"
>>>> ^uiTheme current settings selectionColor ].
>>>> Smalltalk at: #Preferences ifPresent: [ :preferences |
>>>> "Squeak"
>>>> ^preferences menuSelectionColor ]
>>>>
>>>>
>>>>
>>>>
>>>> with
>>>>
>>>>
>>>> ECPreferences>>menuSelectionColor
>>>>
>>>> ^(UserInterfaceTheme current get: #selectionColor for: #MenuItemMorph)
>>>> ifNil: [(Color r: 0.4 g: 0.5 b: 0.7)]
>>>>
>>>>
>>>> Now I have a Vivide in my 6.0a trunk work image.
>>>>
>>>>
>>>> Thank you, Marcel. This was easy to get Vivide into Squeak 6.0a.
>>>>
>>>> --Hannes
>>>>
>>>> On 10/6/17, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
>>>>> Try accessing the UI theme directly for the moment:
>>>>>
>>>>> (UserInterfaceTheme current get: #selectionColor for: #MenuItemMorph)
>>>>> ifNil:
>>>>> [(Color r: 0.4 g: 0.5 b: 0.7)]
>>>>>
>>>>>
>>>>> ... look at MenuMorph class >> #menuSelectionColor (deprecated).
>>>>>
>>>>> Best,
>>>>> Marcel
>>>>> Am 06.10.2017 11:19:24 schrieb H. Hirzel <hannes.hirzel at gmail.com>:
>>>>> P.S. A temporary local fix I did in my image is
>>>>>
>>>>> ECPreferences>>menuSelectionColor
>>>>>
>>>>> ^ Color r: 0.2 g: 0.3 b: 0.9
>>>>>
>>>>>
>>>>> But what is needed is a fix which honours the UI theme.
>>>>>
>>>>> On 10/6/17, H. Hirzel wrote:
>>>>>> On 10/6/17, Marcel Taeumel wrote:
>>>>>>> Seems to be related to OCompletion? We should fix
>>>>>>> that: http://www.squeaksource.com/OCompletion
>>>>>>
>>>>>> you mean? I do not have access rights to that repo. But Levente has
>>>>>> ....
>>>>>>
>>>>>> ECPreferences>>
>>>>>> menuSelectionColor
>>>>>>
>>>>>> Smalltalk at: #UITheme ifPresent: [ :uiTheme |
>>>>>> "Pharo"
>>>>>> ^uiTheme current settings selectionColor ].
>>>>>> Smalltalk at: #Preferences ifPresent: [ :preferences |
>>>>>> "Squeak"
>>>>>> ^preferences menuSelectionColor ]
>>>>>>
>>>>>>
>>>>>> For a quick local fix in my image I just copied the hard coded
>>>>>> variant
>>>>>> from
>>>>>>
>>>>>> ColorTheme menuSelectionColor
>>>>>>
>>>>>> into
>>>>>>
>>>>>> ECPreferences>>menuSelectionColor
>>>>>>
>>>>>> ^ Color r: 0.2 g: 0.3 b: 0.9
>>>>>>
>>>>>>
>>>>>> Now I have a working Vivide copy in a Squeak6.0a recent trunk image!
>>>>>> Great!
>>>>>>
>>>>>> --Hannes
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
More information about the Squeak-dev
mailing list
|