SmallSense__CetegoryOrProtocolSelectDialog.st
changeset 881 9a58acda666b
child 1144 93164087c56a
equal deleted inserted replaced
871:c30699d9e366 881:9a58acda666b
       
     1 "
       
     2 stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE
       
     3 Copyright (C) 2013-2015 Jan Vrany
       
     4 
       
     5 This library is free software; you can redistribute it and/or
       
     6 modify it under the terms of the GNU Lesser General Public
       
     7 License as published by the Free Software Foundation; either
       
     8 version 2.1 of the License.
       
     9 
       
    10 This library is distributed in the hope that it will be useful,
       
    11 but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    13 Lesser General Public License for more details.
       
    14 
       
    15 You should have received a copy of the GNU Lesser General Public
       
    16 License along with this library; if not, write to the Free Software
       
    17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
       
    18 "
       
    19 "{ Package: 'stx:goodies/smallsense' }"
       
    20 
       
    21 "{ NameSpace: SmallSense }"
       
    22 
       
    23 AbstractSelectDialog subclass:#CetegoryOrProtocolSelectDialog
       
    24 	instanceVariableNames:''
       
    25 	classVariableNames:''
       
    26 	poolDictionaries:''
       
    27 	category:'SmallSense-Core-Interface-Search'
       
    28 !
       
    29 
       
    30 !CetegoryOrProtocolSelectDialog class methodsFor:'documentation'!
       
    31 
       
    32 copyright
       
    33 "
       
    34 stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE
       
    35 Copyright (C) 2013-2015 Jan Vrany
       
    36 
       
    37 This library is free software; you can redistribute it and/or
       
    38 modify it under the terms of the GNU Lesser General Public
       
    39 License as published by the Free Software Foundation; either
       
    40 version 2.1 of the License.
       
    41 
       
    42 This library is distributed in the hope that it will be useful,
       
    43 but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    44 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    45 Lesser General Public License for more details.
       
    46 
       
    47 You should have received a copy of the GNU Lesser General Public
       
    48 License along with this library; if not, write to the Free Software
       
    49 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
       
    50 "
       
    51 ! !
       
    52 
       
    53 !CetegoryOrProtocolSelectDialog methodsFor:'accessing - private'!
       
    54 
       
    55 matchingObjectForString: aString
       
    56     "Creates a new object from given string. Called only when
       
    57      #canCreateMatchingObjectFromString: returns true"
       
    58 
       
    59     ^ aString asSymbol
       
    60 
       
    61     "Created: / 23-06-2014 / 15:25:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    62 ! !
       
    63 
       
    64 !CetegoryOrProtocolSelectDialog methodsFor:'accessing-defaults'!
       
    65 
       
    66 defaultTitle
       
    67     "raise an error: must be redefined in concrete subclass(es)"
       
    68 
       
    69     ^ self subclassResponsibility
       
    70 ! !
       
    71 
       
    72 !CetegoryOrProtocolSelectDialog methodsFor:'queries'!
       
    73 
       
    74 canCreateMatchingObjectFromString:string 
       
    75     "Return true, a new object can be created with given string value"
       
    76     
       
    77     ^ string notEmptyOrNil
       
    78 
       
    79     "Created: / 23-06-2014 / 15:15:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    80     "Modified: / 10-01-2015 / 13:36:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    81 !
       
    82 
       
    83 canSelect:selection
       
    84     ^ selection isKindOf: PO
       
    85 
       
    86     "Created: / 05-05-2014 / 23:50:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    87     "Modified: / 13-12-2014 / 12:08:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    88 ! !
       
    89 
       
    90 !CetegoryOrProtocolSelectDialog methodsFor:'searching'!
       
    91 
       
    92 matchingObjectPOsForPattern:arg1 relax:arg2
       
    93     "raise an error: must be redefined in concrete subclass(es)"
       
    94 
       
    95     ^ self subclassResponsibility
       
    96 ! !
       
    97