Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006928 [Squeak Packages] OmniBrowser minor always 02-15-08 01:23 02-20-08 09:19
Reporter Nicolai Hess View Status public  
Assigned To dr
Priority normal Resolution fixed  
Status resolved  
Summary 0006928: No pretty-printing in OBMultipleSelectionBrowser
Description OBCmdPrettyPrint>>execute search the browserpanels for one of kind
OBDefinitionPanel to getDefinition and pretty-printing,
but OBMultipleSelectionBrowser uses OBMultipleDefinitionPanels
instead, and so OBCmdPrettyPrint leaves the execute method
without change.
Additional Information I tried to fix this, by searching panels of kind OBDefinitionPanel or
OBMultipleDefinitionPanel.
But I don't know how to get the definition from here, as it is hold
by one of his OBCloseableDefinitionPanel.
Can I get the current active definitionpanel from the OBMultipleDefinitionPanel?

Maybe it is simpler to execute this command not by OBCommand>>execute, but
implement perform:orSendTo:

Here we can take the additional orSendTo-Argument to get the current Textmorph
than the model and hope it is a kind of DefinitionPanel:

perform:action orSendTo:anObject
    | morph definition source |
    (anObject isKindOf: OBPluggableTextMorph)
    ifFalse:[self perform:action].
    morph:=anObject.
    definition:= anObject model getDefinition.
    source := morph text asString.
    (definition prettyPrint: source) = source
        ifTrue: [ ^ self ].
    requestor browser announce: definition.
    morph hasUnacceptedEdits: true





Attached Files

- Relationships

- Notes
(0011828 - 687 - 738 - 738 - 738 - 738 - 738)
dr
02-18-08 14:56

There are actually two pretty print commands available: One from OB-Refactory (which is broken in the multiple selection browser) and one in the cmd OBCmdMultiView which still works also in the multiple selection browser. You can access it in the fixed tab panel (the panel between the columns and the definition panel) on the right side.
The fix for the other command needs to be done in the OmniBrowser and in the OB-Refactory. I'm working on that.

One possibility to get the current active def panel from an OBMultipleDefintionPanel would be this code (requires the newest version of OB-Enhancements):

definitionPanel
   ^self panels detect: [:ea | ea node = self currentNode]
 
(0011851 - 358 - 376 - 482 - 482 - 482 - 482)
dr
02-20-08 09:19

I fixed this issue now.
You need the newest version of the following packages: OmniBrowser, OB-Refactory and OB-Enhancements. You can load them from http://source.wiresong.ca/ob. [^]

Please note that I recently changed a lot of code in OB-Enhancements which is not yet thoroughly tested. Hence you might find new issues when you update to the latest version.
 

- Issue History
Date Modified Username Field Change
02-15-08 01:23 Nicolai Hess New Issue
02-15-08 01:23 Nicolai Hess Status new => assigned
02-15-08 01:23 Nicolai Hess Assigned To  => Damien Cassou
02-15-08 08:51 Damien Cassou Assigned To Damien Cassou => dr
02-18-08 14:56 dr Note Added: 0011828
02-20-08 09:19 dr Status assigned => resolved
02-20-08 09:19 dr Resolution open => fixed
02-20-08 09:19 dr Note Added: 0011851


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
42 total queries executed.
33 unique queries executed.
Powered by Mantis Bugtracker