Tools__ProjectCheckerBrowser.st
changeset 12538 329a570a3fbf
parent 11665 8a4c1082abc8
child 12556 06a86d00d2db
equal deleted inserted replaced
12537:2ddd00171375 12538:329a570a3fbf
    13 
    13 
    14 "{ NameSpace: Tools }"
    14 "{ NameSpace: Tools }"
    15 
    15 
    16 ApplicationModel subclass:#ProjectCheckerBrowser
    16 ApplicationModel subclass:#ProjectCheckerBrowser
    17 	instanceVariableNames:'projectCheckerHolder problemSelectionHolder problemListHolder
    17 	instanceVariableNames:'projectCheckerHolder problemSelectionHolder problemListHolder
    18 		infoPanel'
    18 		infoPanel accepted showCancel'
    19 	classVariableNames:''
    19 	classVariableNames:''
    20 	poolDictionaries:''
    20 	poolDictionaries:''
    21 	category:'System-Support-Projects'
    21 	category:'System-Support-Projects'
    22 !
    22 !
    23 
    23 
   125                       collection: (
   125                       collection: (
   126                        (HTMLViewSpec
   126                        (HTMLViewSpec
   127                           name: 'Description'
   127                           name: 'Description'
   128                           layout: (LayoutFrame 0 0 0 0 0 1 0 1)
   128                           layout: (LayoutFrame 0 0 0 0 0 1 0 1)
   129                           level: 0
   129                           level: 0
   130                           visibilityChannel: rationaleVisibleHolder
       
   131                           hasHorizontalScrollBar: true
   130                           hasHorizontalScrollBar: true
   132                           hasVerticalScrollBar: true
   131                           hasVerticalScrollBar: true
   133                           htmlText: problemDescriptionAspect
   132                           htmlText: problemDescriptionTextHolder
   134                           postBuildCallback: setupHTMLView:
   133                           postBuildCallback: setupHTMLView:
   135                         )
   134                         )
   136                        )
   135                        )
   137                      
   136                      
   138                     )
   137                     )
   142               )
   141               )
   143               handles: (Any 0.5 1.0)
   142               handles: (Any 0.5 1.0)
   144             )
   143             )
   145            (HorizontalPanelViewSpec
   144            (HorizontalPanelViewSpec
   146               name: 'ButtonPanel'
   145               name: 'ButtonPanel'
   147               layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
   146               layout: (LayoutFrame 0 0 -30 1 -16 1 0 1)
   148               horizontalLayout: fit
   147               horizontalLayout: fit
   149               verticalLayout: center
   148               verticalLayout: center
   150               horizontalSpace: 3
   149               horizontalSpace: 3
   151               verticalSpace: 3
   150               verticalSpace: 3
   152               component: 
   151               component: 
   155                  (ActionButtonSpec
   154                  (ActionButtonSpec
   156                     label: 'Check Again'
   155                     label: 'Check Again'
   157                     name: 'CheckAgain'
   156                     name: 'CheckAgain'
   158                     translateLabel: true
   157                     translateLabel: true
   159                     model: doCheckAgain
   158                     model: doCheckAgain
   160                     extent: (Point 289 22)
   159                     extent: (Point 139 22)
   161                   )
   160                   )
   162                  (ActionButtonSpec
   161                  (ActionButtonSpec
   163                     label: 'Close'
   162                     label: 'Close'
   164                     name: 'CloseButton'
   163                     name: 'CloseButton'
       
   164                     visibilityChannel: doNotShowCancel
   165                     translateLabel: true
   165                     translateLabel: true
   166                     model: doClose
   166                     model: doClose
   167                     extent: (Point 289 22)
   167                     extent: (Point 139 22)
       
   168                   )
       
   169                  (ActionButtonSpec
       
   170                     label: 'Done'
       
   171                     name: 'Button1'
       
   172                     visibilityChannel: showCancel
       
   173                     translateLabel: true
       
   174                     model: doClose
       
   175                     extent: (Point 139 22)
       
   176                   )
       
   177                  (ActionButtonSpec
       
   178                     label: 'Cancel'
       
   179                     name: 'Button2'
       
   180                     visibilityChannel: showCancel
       
   181                     translateLabel: true
       
   182                     model: doCancel
       
   183                     extent: (Point 139 22)
   168                   )
   184                   )
   169                  )
   185                  )
   170                
   186                
   171               )
   187               )
       
   188               keepSpaceForOSXResizeHandleH: true
   172             )
   189             )
   173            )
   190            )
   174          
   191          
   175         )
   192         )
   176       )
   193       )
   177 ! !
   194 ! !
   178 
   195 
   179 !ProjectCheckerBrowser methodsFor:'accessing'!
   196 !ProjectCheckerBrowser methodsFor:'accessing'!
   180 
   197 
       
   198 accepted
       
   199     ^  accepted ? true
       
   200 !
       
   201 
       
   202 doNotShowCancel
       
   203     ^ self showCancel not
       
   204 !
       
   205 
   181 problemList: problems
   206 problemList: problems
   182 
   207 
   183     self problemListHolder value: problems
   208     self problemListHolder value: problems
   184 
   209 
   185     "Created: / 13-02-2012 / 17:03:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   210     "Created: / 13-02-2012 / 17:03:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   195 projectChecker: value
   220 projectChecker: value
   196 
   221 
   197     self projectCheckerHolder value: value
   222     self projectCheckerHolder value: value
   198 
   223 
   199     "Created: / 13-02-2012 / 17:03:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   224     "Created: / 13-02-2012 / 17:03:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   225 !
       
   226 
       
   227 showCancel
       
   228     ^ showCancel ? false
       
   229 !
       
   230 
       
   231 showCancel:something
       
   232     showCancel := something.
   200 ! !
   233 ! !
   201 
   234 
   202 !ProjectCheckerBrowser methodsFor:'actions'!
   235 !ProjectCheckerBrowser methodsFor:'actions'!
       
   236 
       
   237 doCancel
       
   238     <resource: #uiCallback>
       
   239 
       
   240     accepted := false.
       
   241     AbortSignal raiseRequest
       
   242 !
   203 
   243 
   204 doCheckAgain
   244 doCheckAgain
   205     <resource: #uiCallback>
   245     <resource: #uiCallback>
   206 
   246 
   207     self infoPanel showProgressLabeled: (resources string: 'Checking...') while:[
   247     self infoPanel showProgressLabeled: (resources string: 'Checking...') while:[
   251     ^ infoPanel
   291     ^ infoPanel
   252 
   292 
   253     "Created: / 09-02-2012 / 19:23:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   293     "Created: / 09-02-2012 / 19:23:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   254 !
   294 !
   255 
   295 
       
   296 infoText
       
   297     ^ resources string:'Select a problem in the above list to get detail information and a hint for repair'.
       
   298 !
       
   299 
   256 problemDescriptionAspect
   300 problemDescriptionAspect
   257     <resource: #uiAspect>
   301     <resource: #uiAspect>
   258 
   302 
   259     |holder|
   303     |holder|
   260 
   304 
   261     (holder := builder bindingAt:#problemDescriptionAspect) isNil ifTrue:[
   305     (holder := builder bindingAt:#problemDescriptionAspect) isNil ifTrue:[
   262         holder :=  (AspectAdaptor forAspect: #descriptionAndFixes)
   306         holder :=  (AspectAdaptor forAspect: #descriptionAndFixes)
   263                         subjectChannel: self problemSelectionHolder.
   307                         subjectChannel: self problemSelectionHolder.
       
   308         builder aspectAt:#problemDescriptionAspect put:holder.
   264     ].
   309     ].
   265     ^ holder.
   310     ^ holder.
   266 
   311 
   267     "Modified: / 26-07-2012 / 09:44:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   312     "Modified: / 26-07-2012 / 09:44:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   313 !
       
   314 
       
   315 problemDescriptionTextHolder
       
   316     <resource: #uiAspect>
       
   317 
       
   318     |holder|
       
   319 
       
   320     (holder := builder bindingAt:#problemDescriptionTextHolder) isNil ifTrue:[
       
   321         holder := ValueHolder with:(self infoText).
       
   322         builder aspectAt:#problemDescriptionTextHolder put:holder.
       
   323     ].
       
   324     ^ holder.
   268 !
   325 !
   269 
   326 
   270 problemListHolder
   327 problemListHolder
   271     <resource: #uiAspect>
   328     <resource: #uiAspect>
   272 
   329 
   273     "automatically generated by UIPainter ..."
       
   274 
       
   275     "*** the code below creates a default model when invoked."
       
   276     "*** (which may not be the one you wanted)"
       
   277     "*** Please change as required and accept it in the browser."
       
   278     "*** (and replace this comment by something more useful ;-)"
       
   279 
       
   280     problemListHolder isNil ifTrue:[
   330     problemListHolder isNil ifTrue:[
   281         problemListHolder := ValueHolder new.
   331         problemListHolder := ValueHolder new.
   282 "/ if your app needs to be notified of changes, uncomment one of the lines below:
       
   283 "/       problemListHolder addDependent:self.
       
   284 "/       problemListHolder onChangeSend:#problemListHolderChanged to:self.
       
   285     ].
   332     ].
   286     ^ problemListHolder.
   333     ^ problemListHolder.
   287 
   334 
   288     "Modified: / 13-02-2012 / 18:47:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   335     "Modified: / 13-02-2012 / 18:47:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   289 !
   336 !
   290 
   337 
   291 problemSelectionHolder
   338 problemSelectionHolder
   292     <resource: #uiAspect>
   339     <resource: #uiAspect>
   293 
   340 
   294     "automatically generated by UIPainter ..."
       
   295 
       
   296     "*** the code below creates a default model when invoked."
       
   297     "*** (which may not be the one you wanted)"
       
   298     "*** Please change as required and accept it in the browser."
       
   299     "*** (and replace this comment by something more useful ;-)"
       
   300 
       
   301     problemSelectionHolder isNil ifTrue:[
   341     problemSelectionHolder isNil ifTrue:[
   302         problemSelectionHolder := ValueHolder new.
   342         problemSelectionHolder := ValueHolder new.
   303 "/ if your app needs to be notified of changes, uncomment one of the lines below:
   343         problemSelectionHolder onChangeSend:#problemSelectionChanged to:self.
   304 "/       problemSelectionHolder addDependent:self.
       
   305 "/       problemSelectionHolder onChangeSend:#problemSelectionHolderChanged to:self.
       
   306     ].
   344     ].
   307     ^ problemSelectionHolder.
   345     ^ problemSelectionHolder.
   308 !
   346 !
   309 
   347 
   310 projectCheckerHolder
   348 projectCheckerHolder
   335         self update:#value with:newValue from:projectCheckerHolder.
   373         self update:#value with:newValue from:projectCheckerHolder.
   336     ].
   374     ].
   337 ! !
   375 ! !
   338 
   376 
   339 !ProjectCheckerBrowser methodsFor:'change & update'!
   377 !ProjectCheckerBrowser methodsFor:'change & update'!
       
   378 
       
   379 problemSelectionChanged
       
   380     self problemDescriptionTextHolder value:
       
   381         (self problemSelectionHolder value notNil 
       
   382             ifTrue:[self problemDescriptionAspect value]
       
   383             ifFalse:[self infoText])
       
   384 !
   340 
   385 
   341 update:something with:aParameter from:changedObject
   386 update:something with:aParameter from:changedObject
   342     "Invoked when an object that I depend upon sends a change notification."
   387     "Invoked when an object that I depend upon sends a change notification."
   343 
   388 
   344     "stub code automatically generated - please change as required"
   389     "stub code automatically generated - please change as required"
   368 ! !
   413 ! !
   369 
   414 
   370 !ProjectCheckerBrowser class methodsFor:'documentation'!
   415 !ProjectCheckerBrowser class methodsFor:'documentation'!
   371 
   416 
   372 version
   417 version
   373     ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectCheckerBrowser.st,v 1.1 2012-07-26 11:59:59 vrany Exp $'
   418     ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectCheckerBrowser.st,v 1.2 2013-03-27 11:59:37 cg Exp $'
   374 !
   419 !
   375 
   420 
   376 version_CVS
   421 version_CVS
   377     ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectCheckerBrowser.st,v 1.1 2012-07-26 11:59:59 vrany Exp $'
   422     ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectCheckerBrowser.st,v 1.2 2013-03-27 11:59:37 cg Exp $'
   378 !
   423 !
   379 
   424 
   380 version_SVN
   425 version_SVN
   381     ^ '§Id: Tools__ProjectCheckerBrowser.st 8024 2012-07-26 10:10:37Z vranyj1 §'
   426     ^ '§Id: Tools__ProjectCheckerBrowser.st 8024 2012-07-26 10:10:37Z vranyj1 §'
   382 ! !
   427 ! !
       
   428