Tools_ProjectList.st
author Stefan Vogel <sv@exept.de>
Fri, 17 May 2019 17:11:44 +0200
changeset 18767 0478d93cdb75
parent 14016 d4256fb254ee
permissions -rw-r--r--
#REFACTORING by stefan Sanitize BlockValues class: Tools::Inspector2 changed: #toolbarBackgroundHolder
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 2000 by eXept Software AG
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
	      All Rights Reserved
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
5592
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    12
"{ Package: 'stx:libtool' }"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
"{ NameSpace: Tools }"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
BrowserList subclass:#ProjectList
10249
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
    17
	instanceVariableNames:'projectList projectNameList selectionIndexHolder worker
12394
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
    18
		workerQueue includedPseudoEntryForChanged selectionIndexValid'
7590
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
    19
	classVariableNames:'AdditionalEmptyProjects HideModules'
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	poolDictionaries:''
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
	category:'Interface-Browsers-New'
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
!ProjectList class methodsFor:'documentation'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
copyright
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
 COPYRIGHT (c) 2000 by eXept Software AG
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
	      All Rights Reserved
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 This software is furnished under a license and may be used
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 only in accordance with the terms of that license and with the
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 inclusion of the above copyright notice.   This software may not
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 be provided or otherwise made available to, or used by, any
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 other person.  No title to or ownership of the software is
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
 hereby transferred.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
"
11877
eac5956da22d added: #documentation
Claus Gittinger <cg@exept.de>
parents: 11873
diff changeset
    38
!
eac5956da22d added: #documentation
Claus Gittinger <cg@exept.de>
parents: 11873
diff changeset
    39
eac5956da22d added: #documentation
Claus Gittinger <cg@exept.de>
parents: 11873
diff changeset
    40
documentation
eac5956da22d added: #documentation
Claus Gittinger <cg@exept.de>
parents: 11873
diff changeset
    41
"
eac5956da22d added: #documentation
Claus Gittinger <cg@exept.de>
parents: 11873
diff changeset
    42
    I implement the project list in the new system browser
eac5956da22d added: #documentation
Claus Gittinger <cg@exept.de>
parents: 11873
diff changeset
    43
"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
!ProjectList class methodsFor:'interface specs'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
singleProjectWindowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    "This resource specification was automatically generated
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
     by the UIPainter of ST/X."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    "Do not manually edit this!! If it is corrupted,
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
     the UIPainter may not be able to read the specification."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
    "
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
     UIPainter new openOnClass:ClassCategoryList andSelector:#singleCategoryWindowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
     ClassCategoryList new openInterface:#singleCategoryWindowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
    "
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
    <resource: #canvas>
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
    ^ 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
     #(#FullSpec
5592
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    64
	#name: #singleProjectWindowSpec
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    65
	#window: 
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
       #(#WindowSpec
5592
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    67
	  #label: 'ProjectList'
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    68
	  #name: 'ProjectList'
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    69
	  #min: #(#Point 0 0)
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    70
	  #max: #(#Point 1024 721)
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    71
	  #bounds: #(#Rectangle 218 175 518 475)
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    72
	)
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    73
	#component: 
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
       #(#SpecCollection
5592
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    75
	  #collection: #(
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    76
	   #(#LabelSpec
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    77
	      #label: 'ProjectName'
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    78
	      #name: 'ProjectLabel'
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    79
	      #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 25 0)
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    80
	      #translateLabel: true
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    81
	      #labelChannel: #projectLabelHolder
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    82
	      #menu: #menuHolder
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    83
	    )
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    84
	   )
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
5592
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    86
	)
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
      )
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
windowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
    "This resource specification was automatically generated
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
     by the UIPainter of ST/X."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    "Do not manually edit this!! If it is corrupted,
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
     the UIPainter may not be able to read the specification."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
    "
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
     UIPainter new openOnClass:ProjectList andSelector:#windowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
     ProjectList new openInterface:#windowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
     ProjectList open
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
    "
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
    <resource: #canvas>
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
    ^ 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
     #(#FullSpec
6468
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   107
        #name: #windowSpec
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   108
        #window: 
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
       #(#WindowSpec
6468
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   110
          #label: 'ProjectList'
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   111
          #name: 'ProjectList'
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   112
          #min: #(#Point 0 0)
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   113
          #bounds: #(#Rectangle 13 23 313 323)
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   114
        )
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   115
        #component: 
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
       #(#SpecCollection
6468
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   117
          #collection: #(
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   118
           #(#SequenceViewSpec
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   119
              #name: 'List'
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   120
              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   121
              #tabable: true
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   122
              #model: #selectionIndexHolder
6468
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   123
              #menu: #menuHolder
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   124
              #hasHorizontalScrollBar: true
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   125
              #hasVerticalScrollBar: true
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   126
              #miniScrollerHorizontal: true
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   127
              #isMultiSelect: true
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   128
              #valueChangeSelector: #selectionChangedByClick
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   129
              #useIndex: true
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   130
              #sequenceList: #projectNameList
6468
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   131
              #doubleClickChannel: #doubleClickChannel
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   132
              #properties: 
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   133
             #(#PropertyListDictionary
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   134
                #dragArgument: nil
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   135
                #dropArgument: nil
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   136
                #canDropSelector: #canDropContext:
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   137
                #dropSelector: #doDropContext:
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   138
              )
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   139
            )
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   140
           )
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
6468
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   142
        )
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
      )
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
    "Created: / 17.2.2000 / 23:45:47 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
    "Modified: / 17.2.2000 / 23:47:53 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
!ProjectList class methodsFor:'queries-plugin'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
aspectSelectors
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
    ^ #( 
14016
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   153
        environmentHolder
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   154
        #(#doubleClickChannel #action )
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   155
        immediateUpdate 
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   156
        selectedProjects 
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   157
        menuHolder 
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   158
        outGeneratorHolder 
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   159
        inGeneratorHolder 
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   160
        selectionChangeCondition
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   161
        updateTrigger
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   162
        forceGeneratorTrigger
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   163
        hideUnloadedClasses
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   164
        organizerMode
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   165
        slaveMode
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
       )
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
14016
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   168
    "Created: / 17-02-2000 / 23:46:18 / cg"
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   169
    "Modified: / 25-02-2000 / 22:32:10 / cg"
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   170
    "Modified: / 24-02-2014 / 10:37:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
11915
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   173
!ProjectList methodsFor:'accessing'!
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   174
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   175
includedPseudoEntryForChanged:something
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   176
    includedPseudoEntryForChanged := something.
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   177
! !
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   178
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
!ProjectList methodsFor:'aspects'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
8632
3888dd1dc4db refactored
Claus Gittinger <cg@exept.de>
parents: 8220
diff changeset
   181
itemList
3888dd1dc4db refactored
Claus Gittinger <cg@exept.de>
parents: 8220
diff changeset
   182
    ^ self projectList value
3888dd1dc4db refactored
Claus Gittinger <cg@exept.de>
parents: 8220
diff changeset
   183
!
3888dd1dc4db refactored
Claus Gittinger <cg@exept.de>
parents: 8220
diff changeset
   184
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
projectLabelHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
    ^ self pseudoListLabelHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
projectList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
    projectList isNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
	projectList := ValueHolder new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
	projectList addDependent:self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
    ^ projectList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
    "Created: / 17.2.2000 / 23:39:32 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   199
projectNameList
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   200
    projectNameList isNil ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   201
        projectNameList := ValueHolder new.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   202
        "/ projectNameList addDependent:self.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   203
    ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   204
    ^ projectNameList
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   205
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   206
    "Created: / 17.2.2000 / 23:39:32 / cg"
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   207
!
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   208
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
selectedProjects
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
    ^ self selectionHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
    "Created: / 17.2.2000 / 23:39:57 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
selectedProjects:aValueHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
    ^ self selectionHolder:aValueHolder
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   217
!
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   218
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   219
selectionIndexHolder
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   220
    selectionIndexHolder isNil ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   221
        selectionIndexHolder := 0 asValue.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   222
        selectionIndexHolder addDependent:self.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   223
    ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   224
    ^ selectionIndexHolder
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   225
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   226
    "Created: / 17.2.2000 / 23:39:32 / cg"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
!ProjectList methodsFor:'change & update'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
delayedUpdate:something with:aParameter from:changedObject
12394
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   232
    |cls sel pkg mthd newSel|
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
    self inSlaveModeOrInvisible 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
    "/ (self slaveMode value == true) 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
    ifTrue:[
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
   237
        (changedObject == environment
12519
fb7f3dca3f2c class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12451
diff changeset
   238
        or:[ something == #projectOrganization ]) ifTrue:[
fb7f3dca3f2c class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12451
diff changeset
   239
            listValid ifFalse:[ ^ self].
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   240
            listValid := false
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   241
        ].
12394
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   242
        changedObject == self selectionHolder ifTrue:[
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   243
            selectionIndexValid := false.
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   244
        ].
12451
3ba4a65fc521 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12442
diff changeset
   245
        changedObject == inGeneratorHolder ifTrue:[
3ba4a65fc521 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12442
diff changeset
   246
            self invalidateList.
3ba4a65fc521 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12442
diff changeset
   247
            self updateList.
3ba4a65fc521 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12442
diff changeset
   248
        ].
3ba4a65fc521 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12442
diff changeset
   249
"/
3ba4a65fc521 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12442
diff changeset
   250
"/        self window shown ifFalse:[ ^ self ].
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   251
    ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   252
12394
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   253
    (changedObject == self selectionHolder) ifTrue:[
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   254
        self updateSelectionIndexFromSelection.
12532
f53e7351097d class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12519
diff changeset
   255
        "/ self enqueueDelayedUpdateOutputGenerator.
12394
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   256
        ^ self.
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   257
    ].
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   258
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   259
    selectionIndexValid ifFalse:[
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   260
        self updateSelectionIndexFromSelection.
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   261
    ].
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   262
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   263
    changedObject == self selectionIndexHolder ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   264
        listValid ifFalse:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   265
             self updateList.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   266
        ].
12451
3ba4a65fc521 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12442
diff changeset
   267
        changedObject value == 0 ifTrue:[
3ba4a65fc521 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12442
diff changeset
   268
            self selectionIndexHolder value:#()
3ba4a65fc521 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12442
diff changeset
   269
        ].
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   270
        newSel := changedObject value collect:[:idx | projectList value at:idx].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   271
        newSel ~= self selectedProjects value ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   272
            self selectedProjects value:newSel.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   273
        ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   274
        ^ self.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   275
    ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
    changedObject == slaveMode ifTrue:[
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   278
        listValid ~~ true ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   279
            self enqueueDelayedUpdateList
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   280
        ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   281
        "/ self invalidateList.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   282
        ^  self
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   285
    changedObject == self projectList ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   286
        ^  self
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   287
    ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
   289
    changedObject == environment ifTrue:[
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   290
        something == #projectOrganization ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   291
            self invalidateList.
12519
fb7f3dca3f2c class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12451
diff changeset
   292
            slaveMode value == true ifFalse:[
fb7f3dca3f2c class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12451
diff changeset
   293
                self enqueueDelayedUpdateOutputGenerator.
fb7f3dca3f2c class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12451
diff changeset
   294
            ].
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   295
            ^ self.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   296
        ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   297
        something == #methodInClass ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   298
            listValid == true ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   299
                cls := aParameter at:1.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   300
                sel := aParameter at:2.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   301
                mthd := cls compiledMethodAt:sel.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   302
                mthd notNil ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   303
                    pkg := mthd package.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   304
                    (projectList value includes:pkg) ifFalse:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   305
                        self invalidateList.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   306
                    ]
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   307
                ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   308
            ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   309
            ^ self
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   310
        ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   312
        (something == #classDefinition
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   313
        or:[something == #newClass]) ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   314
            listValid == true ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   315
                cls := aParameter.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   316
                pkg := cls package.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   317
                (projectList value includes:pkg) ifFalse:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   318
                    self invalidateList.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   319
                ] ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   320
                    self enqueueDelayedUpdateOutputGenerator
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   321
                ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   322
            ] ifFalse:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   323
                self invalidateList
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   324
            ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   325
            ^ self
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   326
        ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   327
        (something == #classRemove) ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   328
            listValid == true ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   329
                cls := aParameter.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   330
                pkg := cls package.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   331
            ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   332
        ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   333
        ^ self
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
"/    something == #projectOrganization ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
"/        aParameter isSymbol ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
"/                    "/ a single method has changed
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
"/"/                    sel := aParameter.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
"/"/                    mthd := changedObject compiledMethodAt:sel.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
"/            self enqueueDelayedUpdateOutputGenerator.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
"/        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
"/        ^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
"/    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
6966
e1d23fbb51bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6965
diff changeset
   346
    changedObject == ChangeSet ifTrue:[
e1d23fbb51bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6965
diff changeset
   347
        self invalidateList.
e1d23fbb51bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6965
diff changeset
   348
        ^ self
e1d23fbb51bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6965
diff changeset
   349
    ].
e1d23fbb51bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6965
diff changeset
   350
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
    (organizerMode notNil
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
    and:[organizerMode value ~~ #project]) ifTrue:[
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   353
        self invalidateList.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   354
        ^ self
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
    super delayedUpdate:something with:aParameter from:changedObject
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
7423
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   358
    "Created: / 17-02-2000 / 23:41:02 / cg"
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   359
    "Modified: / 17-10-2006 / 18:43:40 / cg"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
selectionChangedByClick
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   363
    "we are not interested in that - get another notification
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   364
     via the changed valueHolder"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   365
12532
f53e7351097d class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12519
diff changeset
   366
    self enqueueDelayedUpdateOutputGenerator.
f53e7351097d class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12519
diff changeset
   367
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
    "Created: / 17.2.2000 / 23:41:17 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
update:something with:aParameter from:changedObject
14016
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   372
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   373
    changedObject == environmentHolder ifTrue:[
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   374
        self environmentChanged.
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   375
        ^ self.
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   376
    ].  
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   377
8730
b767db0f53a3 changed #update:with:from:
fm
parents: 8692
diff changeset
   378
    (self builder isNil or:[self window topView realized not]) ifTrue:[
12532
f53e7351097d class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12519
diff changeset
   379
        "/ ignore those changes while I am invisible
12394
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   380
        "/ self makeIndependent.
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   381
        listValid := false.
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   382
        selectionIndexValid := false.
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   383
        ^ self
8730
b767db0f53a3 changed #update:with:from:
fm
parents: 8692
diff changeset
   384
    ].
b767db0f53a3 changed #update:with:from:
fm
parents: 8692
diff changeset
   385
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
   386
    changedObject == environment ifTrue:[
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   387
        something == #methodDictionary ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   388
            ^ self 
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   389
        ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   390
        something == #methodTrap ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   391
            ^ self
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   392
        ].
10364
934e0840d81e changed:
Claus Gittinger <cg@exept.de>
parents: 10249
diff changeset
   393
        something == #methodCoverageInfo ifTrue:[
934e0840d81e changed:
Claus Gittinger <cg@exept.de>
parents: 10249
diff changeset
   394
            ^ self
934e0840d81e changed:
Claus Gittinger <cg@exept.de>
parents: 10249
diff changeset
   395
        ].
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   396
        something == #methodInClass ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   397
            ^ self
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   398
        ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   399
        something == #classVariables ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   400
            ^ self
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   401
        ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   402
        something == #classComment ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   403
            ^ self.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   404
        ].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   405
        something == #methodInClassRemoved ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   406
            ^ self.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   407
        ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
    super update:something with:aParameter from:changedObject
7423
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   410
10364
934e0840d81e changed:
Claus Gittinger <cg@exept.de>
parents: 10249
diff changeset
   411
    "Modified: / 20-07-2011 / 18:54:39 / cg"
14016
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   412
    "Modified: / 25-02-2014 / 10:07:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
12394
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   413
!
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   414
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   415
updateSelectionIndexFromSelection
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   416
    |newSel allIdx|
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   417
12439
d90a948f2510 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12397
diff changeset
   418
    self selectionHolder value isNil ifTrue:[
d90a948f2510 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12397
diff changeset
   419
        self selectionIndexHolder value:0.
d90a948f2510 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12397
diff changeset
   420
        ^ self.
d90a948f2510 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12397
diff changeset
   421
    ].
d90a948f2510 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 12397
diff changeset
   422
12394
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   423
    listValid ifFalse:[
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   424
         self updateList.
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   425
    ].
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   426
    allIdx := projectList value indexOf:(self class nameListEntryForALL).
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   427
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   428
    newSel := self selectionHolder value 
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   429
                    collect:[:val | |i|
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   430
                                    i := projectList value indexOf:val.
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   431
                                    i == 0 ifTrue:[allIdx] ifFalse:[i]]
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   432
                    thenSelect:[:idx | idx ~~ 0]. 
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   433
    (newSel ~= self selectionIndexHolder value
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   434
    or:[ self selectionIndexHolder value == 0]) ifTrue:[
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   435
        self selectionIndexHolder value:newSel
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   436
    ].
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   437
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   438
    selectionIndexValid := true.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
!ProjectList methodsFor:'drag & drop'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
6468
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   443
canDropContext:aDropContext
7423
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   444
    |objects package|
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   445
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   446
    objects := aDropContext dropObjects collect:[:obj | obj theObject].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
7423
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   448
    (self objectsAreClassFiles:objects) ifTrue:[^ true].
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   449
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   450
    (objects conform:[:aMethodOrClass | (aMethodOrClass isMethod or:[aMethodOrClass isClass]) ]) ifFalse:[^ false].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   452
    package := self packageAtTargetPointOf:aDropContext.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
    package isNil ifTrue:[^ false].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   454
7423
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   455
    (objects contains:[:aMethodOrClass | aMethodOrClass package ~= package]) ifFalse:[^ false].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   456
    ^ true
7120
5e14c7127970 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7060
diff changeset
   457
7423
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   458
    "Modified: / 17-10-2006 / 18:30:32 / cg"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
6468
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   461
doDropContext:aDropContext
7423
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   462
    |package objects methods classes|
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
7423
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   464
    objects := aDropContext dropObjects collect:[:aDropObject | aDropObject theObject].
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   465
    (objects conform:[:something | (something isMethod or:[something isClass])]) ifTrue:[
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   466
        methods := objects select:[:something | something isMethod].
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   467
        classes := objects select:[:something | something isClass].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   468
7423
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   469
        package := self packageAtTargetPointOf:aDropContext.
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   470
        package notNil ifTrue:[
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   471
            methods notEmpty ifTrue:[
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   472
                self masterApplication moveMethods:methods toProject:package.
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   473
            ].
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   474
            classes notEmpty ifTrue:[
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   475
                self masterApplication moveClasses:classes toProject:package.
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   476
            ]
6468
8047fc185bd8 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 5782
diff changeset
   477
        ].
7423
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   478
        ^ self
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   479
    ].
7120
5e14c7127970 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7060
diff changeset
   480
7423
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   481
    (objects conform:[:something | something isFilename]) ifTrue:[
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   482
        |p|
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   483
8966
8387f26335a9 Project noPackageId -> PackageId noPackageId
Claus Gittinger <cg@exept.de>
parents: 8749
diff changeset
   484
        p := (self selectedProjects value ? #()) firstIfEmpty:PackageId noProjectID.
7423
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   485
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   486
        Class packageQuerySignal answer:p
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   487
        do:[
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   488
            self dropClassFiles:objects.
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   489
        ].
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   490
        ^ self
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   491
    ].
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   492
e92bcc3c8e0e drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents: 7338
diff changeset
   493
    "Modified: / 17-10-2006 / 18:34:43 / cg"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   495
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
packageAtTargetPointOf:aDropContext
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   497
    |p packageListView lineNr item package dropInfo now 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   498
     overItem timeOverItem|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   499
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
    p := aDropContext targetPoint.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   502
    packageListView := aDropContext targetWidget.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   503
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   504
    dropInfo := aDropContext dropInfo.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   505
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   506
    lineNr := packageListView yVisibleToLineNr:p y.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   507
    lineNr isNil ifTrue:[^ nil].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   508
7525
a37f9b951ff6 package at drop-point fix (care for spaces and other decoration)
Claus Gittinger <cg@exept.de>
parents: 7497
diff changeset
   509
    item := projectList value at:lineNr.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   510
    item isNil ifTrue:[^ nil].
7325
4e26cc5f9f21 oops - care for old (non-tree) project list handling
Claus Gittinger <cg@exept.de>
parents: 7131
diff changeset
   511
    item isString ifTrue:[^ item asSymbol].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   512
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   513
    item canExpand ifTrue:[
5782
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   514
        now := Timestamp now.
8138
7ec9d35e1357 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7889
diff changeset
   515
        overItem := dropInfo at:#overItem ifAbsentPut:item.
5782
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   516
        timeOverItem := dropInfo at:#timeOverItem ifAbsentPut:[now].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
5782
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   518
        overItem ~~ item ifTrue:[
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   519
            dropInfo at:#timeOverItem put:now.
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   520
            dropInfo at:#overItem put:item.
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   521
            aDropContext passiveAction:[ self packageAtTargetPointOf:aDropContext ].
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   522
        ] ifFalse:[
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   523
            (now millisecondDeltaFrom:timeOverItem) >= (UserPreferences current timeToAutoExpandItemsWhenDraggingOver) ifTrue:[
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   524
                aDropContext saveDraw:[ item expand. packageListView repairDamage ].
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   525
                dropInfo removeKey:#timeOverItem.
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   526
                dropInfo removeKey:#overItem.
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   527
            ] ifFalse:[
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   528
                aDropContext passiveAction:[ self packageAtTargetPointOf:aDropContext ].
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   529
            ]
ae4720e83b49 Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents: 5592
diff changeset
   530
        ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
    package := item package.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
    package = self class nameListEntryForALL ifTrue:[^ nil].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   535
    ^ package.
7325
4e26cc5f9f21 oops - care for old (non-tree) project list handling
Claus Gittinger <cg@exept.de>
parents: 7131
diff changeset
   536
7525
a37f9b951ff6 package at drop-point fix (care for spaces and other decoration)
Claus Gittinger <cg@exept.de>
parents: 7497
diff changeset
   537
    "Modified: / 18-11-2006 / 16:13:47 / cg"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
!ProjectList methodsFor:'generators'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
makeGenerator
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
    "return a generator which enumerates the classes from the selected project(s)."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   544
8749
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   545
    |selectedPackages thePackage hideUnloadedClasses showChangedClasses|
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   546
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   547
    selectedPackages := self selectedProjects value.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   548
    selectedPackages size == 0 ifTrue:[
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   549
        ^ #()
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   550
    ].
6907
494f26b3bb45 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6894
diff changeset
   551
    selectedPackages := selectedPackages collect:[:p | p string withoutSeparators].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   552
8749
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   553
    showChangedClasses := selectedPackages includes:(self class nameListEntryForChanged).
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   554
    hideUnloadedClasses := self hideUnloadedClasses value.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
    (selectedPackages includes:(self class nameListEntryForALL)) ifTrue:[
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   557
        hideUnloadedClasses ifTrue:[
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   558
            ^ Iterator on:[:whatToDo |
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
   559
                               environment allClassesDo:[:cls |
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   560
                                   cls isLoaded ifTrue:[
9385
a9f2356fae85 code deobfuscated:
Claus Gittinger <cg@exept.de>
parents: 9029
diff changeset
   561
                                       cls isRealNameSpace ifFalse:[
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   562
                                           whatToDo value:cls
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   563
                                       ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   564
                                   ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   565
                               ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   566
                          ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   567
        ].
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   568
        ^ Iterator on:[:whatToDo |
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
   569
                           environment allClassesDo:[:cls |
9385
a9f2356fae85 code deobfuscated:
Claus Gittinger <cg@exept.de>
parents: 9029
diff changeset
   570
                               cls isRealNameSpace ifFalse:[
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   571
                                   whatToDo value:cls
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   572
                               ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   573
                           ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   574
                      ]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   575
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   576
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   577
    selectedPackages size == 1 ifTrue:[
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   578
        "/ faster common case
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   579
        thePackage := selectedPackages first.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   580
8749
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   581
        ^ Iterator on:[:whatToDo | 
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   582
                           |changedClasses|
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   583
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   584
                           showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses ].
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   585
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
   586
                           environment allClassesDo:[:cls |
8749
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   587
                               |doInclude|
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   588
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   589
                               (hideUnloadedClasses not or:[cls isLoaded])
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   590
                               ifTrue:[
9385
a9f2356fae85 code deobfuscated:
Claus Gittinger <cg@exept.de>
parents: 9029
diff changeset
   591
                                   cls isRealNameSpace ifFalse:[
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   592
                                       doInclude := (thePackage = cls package).
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   593
                                       doInclude ifFalse:[
13806
1846de21f150 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13498
diff changeset
   594
                                           "/ JV@2013-09-17; Why? Java classes can have Smalltalk / Ruby / ... extensions as well!!
1846de21f150 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13498
diff changeset
   595
                                            "/ cls isJavaClass ifFalse:[
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   596
                                               doInclude := (cls methodDictionary contains:[:mthd | thePackage = mthd package])
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   597
                                                            or:[ cls class methodDictionary contains:[:mthd | thePackage = mthd package]].
13806
1846de21f150 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13498
diff changeset
   598
                                            "/ ].
8749
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   599
                                            doInclude ifFalse:[
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   600
                                                (showChangedClasses and:[ (changedClasses includes:cls theNonMetaclass)
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   601
                                                                        or:[(changedClasses includes:cls theMetaclass)] ]) ifTrue:[
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   602
                                                    doInclude := true
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   603
                                                ].
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   604
                                            ].
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   605
                                       ].
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   606
                                       doInclude ifTrue:[
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   607
                                           whatToDo value:cls
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   608
                                       ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   609
                                   ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   610
                               ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   611
                           ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   612
                      ]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   614
8749
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   615
    ^ Iterator on:[:whatToDo | 
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   616
                       |changedClasses|
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   617
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   618
                       showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses ].
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   619
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
   620
                       environment allClassesDo:[:cls |
8749
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   621
                           |doInclude|
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   622
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   623
                           (hideUnloadedClasses not or:[cls isLoaded])
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   624
                           ifTrue:[
9385
a9f2356fae85 code deobfuscated:
Claus Gittinger <cg@exept.de>
parents: 9029
diff changeset
   625
                               cls isRealNameSpace ifFalse:[
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   626
                                   doInclude := (selectedPackages includes:cls package).
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   627
                                   doInclude ifFalse:[
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   628
                                        cls isJavaClass ifFalse:[
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   629
                                           doInclude := (cls methodDictionary contains:[:mthd | selectedPackages includes:mthd package])
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   630
                                                        or:[ cls class methodDictionary contains:[:mthd | selectedPackages includes:mthd package]].
8749
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   631
                                           doInclude ifFalse:[
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   632
                                               (showChangedClasses and:[ (changedClasses includes:cls theNonMetaclass)
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   633
                                                                       or:[(changedClasses includes:cls theMetaclass)] ]) ifTrue:[
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   634
                                                   doInclude := true
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   635
                                               ].
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   636
                                           ].
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   637
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   638
                                        ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   639
                                   ].
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   640
                                   doInclude ifTrue:[
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   641
                                       whatToDo value:cls
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   642
                                   ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   643
                               ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   644
                           ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   645
                       ]
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   646
                  ]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   647
6894
42fdd22b863a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   648
    "Created: / 17-02-2000 / 23:49:37 / cg"
7497
fa14e0c38917 use isRealNameSpace
Claus Gittinger <cg@exept.de>
parents: 7423
diff changeset
   649
    "Modified: / 10-11-2006 / 17:15:15 / cg"
13806
1846de21f150 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13498
diff changeset
   650
    "Modified: / 17-09-2013 / 10:24:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   651
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   652
11258
0a6850644110 category of:
Claus Gittinger <cg@exept.de>
parents: 11157
diff changeset
   653
!ProjectList methodsFor:'initialize-release'!
10249
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   654
12087
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   655
commonPostBuild
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   656
    super commonPostBuild.
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   657
    listValid ifFalse:[
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   658
        self enqueueDelayedUpdateList.
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   659
    ]. 
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   660
!
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   661
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   662
commonPostOpen
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   663
    super commonPostOpen.
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   664
    listValid ifFalse:[
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   665
        self enqueueDelayedUpdateList.
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   666
    ]. 
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   667
!
8af911dc61d0 class: Tools::ProjectList
Claus Gittinger <cg@exept.de>
parents: 11951
diff changeset
   668
10249
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   669
initialize
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   670
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   671
    super initialize.
11915
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   672
    workerQueue := SharedQueue new.
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   673
    includedPseudoEntryForChanged := true.
12394
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   674
    selectionIndexValid := false.
10249
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   675
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   676
    "Created: / 14-12-2010 / 15:41:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
11258
0a6850644110 category of:
Claus Gittinger <cg@exept.de>
parents: 11157
diff changeset
   677
!
0a6850644110 category of:
Claus Gittinger <cg@exept.de>
parents: 11157
diff changeset
   678
0a6850644110 category of:
Claus Gittinger <cg@exept.de>
parents: 11157
diff changeset
   679
release
0a6850644110 category of:
Claus Gittinger <cg@exept.de>
parents: 11157
diff changeset
   680
    super release.
0a6850644110 category of:
Claus Gittinger <cg@exept.de>
parents: 11157
diff changeset
   681
0a6850644110 category of:
Claus Gittinger <cg@exept.de>
parents: 11157
diff changeset
   682
    projectList removeDependent:self.
10249
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   683
! !
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   684
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   685
!ProjectList methodsFor:'private'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   686
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   687
allShownProjects
11951
b313ead5ffaf changed: #allShownProjects
Claus Gittinger <cg@exept.de>
parents: 11915
diff changeset
   688
    |hideUnloaded allProjects projectBag generator addWithAllParentPackages hideModules|
7590
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   689
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   690
    hideModules := HideModules ? true.
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   691
    hideModules := HideModules ? false.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   692
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   693
    allProjects := IdentitySet new.
11951
b313ead5ffaf changed: #allShownProjects
Claus Gittinger <cg@exept.de>
parents: 11915
diff changeset
   694
    projectBag := Bag new.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   695
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   696
    inGeneratorHolder isNil ifTrue:[
6960
aa7f999ae458 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6951
diff changeset
   697
        hideUnloaded := self hideUnloadedClasses value.
aa7f999ae458 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6951
diff changeset
   698
aa7f999ae458 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6951
diff changeset
   699
        addWithAllParentPackages := 
aa7f999ae458 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6951
diff changeset
   700
            [:package |
7590
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   701
                |p parent module|
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   702
6960
aa7f999ae458 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6951
diff changeset
   703
                (allProjects includes:package) ifFalse:[
aa7f999ae458 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6951
diff changeset
   704
                    allProjects add:package.
8966
8387f26335a9 Project noPackageId -> PackageId noPackageId
Claus Gittinger <cg@exept.de>
parents: 8749
diff changeset
   705
                    (package ~= PackageId noProjectID 
7889
b5c2546a0cd9 changed #allShownProjects
Michael Beyl <mb@exept.de>
parents: 7814
diff changeset
   706
                    and:[package ~= #private]) ifTrue:[
7552
af5529b5a479 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7525
diff changeset
   707
                        p := package asPackageId.
af5529b5a479 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7525
diff changeset
   708
                        [(parent := p parentPackage) notNil] whileTrue:[
af5529b5a479 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7525
diff changeset
   709
                            allProjects add:parent asSymbol.
af5529b5a479 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7525
diff changeset
   710
                            p := parent.
af5529b5a479 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7525
diff changeset
   711
                        ].
7590
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   712
                        hideModules ifFalse:[
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   713
                            (module := p module) notNil ifTrue:[
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   714
                                allProjects add:module asSymbol.
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   715
                            ].
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   716
                        ].
6655
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   717
                    ].
6960
aa7f999ae458 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6951
diff changeset
   718
                ].
aa7f999ae458 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6951
diff changeset
   719
            ].
aa7f999ae458 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6951
diff changeset
   720
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
   721
        environment allClassesDo:[:eachClass |
6960
aa7f999ae458 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6951
diff changeset
   722
            |cls pkg p classPackage|
aa7f999ae458 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6951
diff changeset
   723
9385
a9f2356fae85 code deobfuscated:
Claus Gittinger <cg@exept.de>
parents: 9029
diff changeset
   724
            eachClass isRealNameSpace ifFalse:[
6965
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   725
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   726
                (hideUnloaded not or:[eachClass isLoaded]) ifTrue:[
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   727
                    cls := eachClass theNonMetaclass.
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   728
                    cls isPrivate ifTrue:[
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   729
                        cls := cls topOwningClass
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   730
                    ].
6960
aa7f999ae458 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6951
diff changeset
   731
8966
8387f26335a9 Project noPackageId -> PackageId noPackageId
Claus Gittinger <cg@exept.de>
parents: 8749
diff changeset
   732
                    classPackage := cls package ? (PackageId noProjectID).
6965
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   733
                    classPackage size > 0 ifTrue:[
11951
b313ead5ffaf changed: #allShownProjects
Claus Gittinger <cg@exept.de>
parents: 11915
diff changeset
   734
                        classPackage := classPackage asSymbol.
b313ead5ffaf changed: #allShownProjects
Claus Gittinger <cg@exept.de>
parents: 11915
diff changeset
   735
                        addWithAllParentPackages value:classPackage.
b313ead5ffaf changed: #allShownProjects
Claus Gittinger <cg@exept.de>
parents: 11915
diff changeset
   736
                        projectBag add:classPackage.
6965
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   737
                    ] ifFalse:[
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   738
                        "/ for now, nameSpaces are not in any package;
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   739
                        "/ this might change. Then, 0-sized packages are
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   740
                        "/ illegal, and the following should be enabled.
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   741
                        "/ self halt
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   742
                    ].
11951
b313ead5ffaf changed: #allShownProjects
Claus Gittinger <cg@exept.de>
parents: 11915
diff changeset
   743
6965
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   744
                    cls isJavaClass ifFalse:[
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   745
                        cls instAndClassSelectorsAndMethodsDo:[:sel :mthd |
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   746
                            |mpkg|
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   747
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   748
                            mpkg := mthd package asSymbol.
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   749
                            mpkg ~~ classPackage ifTrue:[   
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   750
                                (allProjects includes:mpkg) ifFalse:[
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   751
                                    addWithAllParentPackages value:mpkg.
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   752
                                ]
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   753
                            ].
6655
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   754
                        ].
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   755
                    ].
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   756
                ].
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   757
            ].
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   758
        ].
6960
aa7f999ae458 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6951
diff changeset
   759
        allProjects := allProjects asOrderedCollection.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   760
6655
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   761
        "/ those are simulated - in ST/X, empty projects do not
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   762
        "/ really exist; however, during browsing, it makes sense.
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   763
        AdditionalEmptyProjects size > 0 ifTrue:[
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   764
            "/ remove those that are present ...
13806
1846de21f150 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13498
diff changeset
   765
            AdditionalEmptyProjects := AdditionalEmptyProjects select:[:pkg | (allProjects includes:pkg) not].
6655
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   766
            allProjects addAll:AdditionalEmptyProjects.
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   767
        ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   768
    ] ifFalse:[
6655
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   769
        generator := inGeneratorHolder value.
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   770
        generator isNil ifTrue:[^ #() ].
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   771
        generator do:[:prj | allProjects add:prj].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   772
    ].
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   773
    ^ allProjects asOrderedCollection.
7497
fa14e0c38917 use isRealNameSpace
Claus Gittinger <cg@exept.de>
parents: 7423
diff changeset
   774
7590
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   775
    "Modified: / 16-01-2007 / 15:56:16 / cg"
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   776
!
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   777
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   778
defaultSlaveModeValue
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   779
    |mode|
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   780
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   781
    mode := self topApplication perform:#initialOrganizerMode ifNotUnderstood:nil.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   782
    mode == OrganizerCanvas organizerModeProject ifTrue:[^ false].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   783
    mode isNil ifTrue:[^ false].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   784
    ^ true
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   785
!
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   786
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   787
initialOrganizerMode
14016
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
   788
    ^ OrganizerCanvas organizerModeProject       
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   789
!
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   790
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   791
listOfProjects
8749
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   792
    |allProjects numClassesInChangeSet|
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   793
8975
ca2e80f67b74 copy asOrderedCollection -> copyAsOrderedCollection
Claus Gittinger <cg@exept.de>
parents: 8966
diff changeset
   794
    allProjects := self allShownProjects copyAsOrderedCollection.
11915
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   795
    allProjects sort.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   796
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   797
    allProjects size == 1 ifTrue:[
6655
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   798
        "/ self projectLabelHolder value:(allProjects first , ' [Project]').
d2b8f5af780f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6492
diff changeset
   799
        self projectLabelHolder value:(LabelAndIcon icon:(self class packageIcon) string:allProjects first).
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   800
    ].
8749
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   801
11915
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   802
    includedPseudoEntryForChanged ifTrue:[
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   803
        numClassesInChangeSet := ChangeSet current changedClasses size.
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   804
        numClassesInChangeSet > 0 ifTrue:[
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   805
            "/ don't include count - makeGenerator compares against the un-expanded nameListEntry (sigh - need two lists)
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   806
            allProjects addFirst:((self class nameListEntryForChanged "bindWith:numClassesInChangeSet") allItalic).
b070218efdaa fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents: 11877
diff changeset
   807
        ].
8749
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   808
    ].
23db847d3259 added changed to projectList
Claus Gittinger <cg@exept.de>
parents: 8730
diff changeset
   809
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   810
    allProjects size > 1 ifTrue:[
9029
66a3d6c4030e no need for #asText to emphasize a string
Claus Gittinger <cg@exept.de>
parents: 8975
diff changeset
   811
        allProjects addFirst:(self class nameListEntryForALL allItalic).
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   812
    ].
6907
494f26b3bb45 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6894
diff changeset
   813
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   814
    ^ allProjects
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   815
6907
494f26b3bb45 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6894
diff changeset
   816
    "Created: / 17-02-2000 / 23:43:05 / cg"
494f26b3bb45 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6894
diff changeset
   817
    "Modified: / 17-08-2006 / 15:08:42 / cg"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   818
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   819
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   820
makeDependent
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
   821
    environment addDependent:self.
6967
ed49b45a3a7d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6966
diff changeset
   822
    ChangeSet addDependent:self.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   823
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   824
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   825
makeIndependent
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
   826
    environment removeDependent:self.
8220
7ac29d123a95 dont forget to make independent
fm
parents: 8138
diff changeset
   827
    ChangeSet removeDependent:self.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   828
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   829
13806
1846de21f150 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13498
diff changeset
   830
markEntry: rawEntry at: index forBeingManagedBySVN: package
1846de21f150 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13498
diff changeset
   831
    ^ rawEntry.
1846de21f150 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13498
diff changeset
   832
1846de21f150 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13498
diff changeset
   833
    (ConfigurableFeatures includesFeature: #SubversionSupportEnabled) ifFalse:[^rawEntry].
1846de21f150 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13498
diff changeset
   834
    package = PackageId noProjectID ifTrue:[^rawEntry].
10249
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   835
10675
1a6a5e0b012f ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents: 10364
diff changeset
   836
"/    workerQueue 
1a6a5e0b012f ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents: 10364
diff changeset
   837
"/        nextPut:[
1a6a5e0b012f ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents: 10364
diff changeset
   838
"/            | repo newEntry branch mark|
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
   839
"/            "/ use environment-at to trick the dependency/prerequisite generator
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
   840
"/            repo := (environment at:#SVN::RepositoryManager) current 
10675
1a6a5e0b012f ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents: 10364
diff changeset
   841
"/                        repositoryForPackage: package onlyFromCache: false.
1a6a5e0b012f ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents: 10364
diff changeset
   842
"/            repo ifNotNil:[
1a6a5e0b012f ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents: 10364
diff changeset
   843
"/                mark := ' [SVN]'.
1a6a5e0b012f ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents: 10364
diff changeset
   844
"/                branch := repo workingCopy branchOrNil.
1a6a5e0b012f ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents: 10364
diff changeset
   845
"/                branch ifNotNil:[mark := ' [SVN: ', branch path,']'].
1a6a5e0b012f ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents: 10364
diff changeset
   846
"/                newEntry := rawEntry , (mark asText colorizeAllWith: Color gray).
1a6a5e0b012f ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents: 10364
diff changeset
   847
"/                self projectNameList value at: index put: newEntry.
1a6a5e0b012f ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents: 10364
diff changeset
   848
"/                self projectNameList changed.
1a6a5e0b012f ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents: 10364
diff changeset
   849
"/            ]].
13806
1846de21f150 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13498
diff changeset
   850
    ^rawEntry
10249
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   851
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   852
    "Created: / 14-12-2010 / 15:59:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
11138
c37649db3b52 changed: #markEntry:at:forBeingManagedBySVN:
Claus Gittinger <cg@exept.de>
parents: 10675
diff changeset
   853
    "Modified: / 15-01-2012 / 13:17:30 / cg"
11157
7277655aee35 Use Configurable includesFeature:#Feature instead of direct send of #hasFeature
vrany
parents: 11138
diff changeset
   854
    "Modified: / 19-01-2012 / 10:46:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10249
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   855
!
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   856
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   857
nameListFor:aProjectList
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   858
    "
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   859
     self basicNew
6951
a089896c6970 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6934
diff changeset
   860
         nameListFor:#(
7060
47650c6b33a9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6975
diff changeset
   861
            'exept:expecco'
47650c6b33a9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6975
diff changeset
   862
            'exept:expecco/application'
47650c6b33a9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6975
diff changeset
   863
            'exept:procware'
47650c6b33a9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6975
diff changeset
   864
            'exept:workflow'
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   865
        )
7590
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   866
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   867
     self basicNew
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   868
         nameListFor:#(
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   869
            'exept'
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   870
            'exept:expecco'
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   871
            'exept:expecco/application'
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   872
            'exept:procware'
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   873
            'exept:workflow'
88839bb995cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7552
diff changeset
   874
        )
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   875
    "
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   876
7338
963df065bedd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7325
diff changeset
   877
    |stack projectsWithExtensions projectsWithChangedCode packagesInChangeSet projectNameList|
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   878
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   879
    stack := OrderedCollection new.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   880
6951
a089896c6970 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6934
diff changeset
   881
    projectsWithExtensions := Set new.
a089896c6970 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6934
diff changeset
   882
    projectsWithChangedCode := Set new.
a089896c6970 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6934
diff changeset
   883
7338
963df065bedd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7325
diff changeset
   884
    packagesInChangeSet := ChangeSet current changedPackages.
6951
a089896c6970 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6934
diff changeset
   885
a089896c6970 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6934
diff changeset
   886
    projectNameList := OrderedCollection new.
a089896c6970 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6934
diff changeset
   887
    aProjectList do:[:this |
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   888
        |thisC entry rawEntry prefix indent|
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   889
6965
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   890
        this = self class nameListEntryForALL ifTrue:[
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   891
            entry := this
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   892
        ] ifFalse:[
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   893
            thisC := this asCollectionOfSubstringsSeparatedByAny:':/'.
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   894
            thisC isEmpty ifTrue:[
8966
8387f26335a9 Project noPackageId -> PackageId noPackageId
Claus Gittinger <cg@exept.de>
parents: 8749
diff changeset
   895
                thisC := Array with:(PackageId noProjectID).
6965
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   896
            ].
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   897
6965
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   898
            [
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   899
                |stackTop|
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   900
6965
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   901
                stack notEmpty
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   902
                and:[
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   903
                    stackTop := stack last.
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   904
                    (thisC startsWith:stackTop) ifFalse:[
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   905
                        stack removeLast.
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   906
                        true
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   907
                    ] ifTrue:[
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   908
                        false
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   909
                    ]]
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   910
            ] whileTrue.
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   911
            prefix := stack notEmpty ifTrue:[ stack last ] ifFalse:[ #() ].
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   912
            indent := stack size * 4.
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   913
            stack addLast:thisC.
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   914
            prefix isEmpty ifTrue:[
6970
9e23d1301d4b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6968
diff changeset
   915
                rawEntry := thisC first.
9e23d1301d4b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6968
diff changeset
   916
                thisC size > 1 ifTrue:[
9e23d1301d4b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6968
diff changeset
   917
                    rawEntry := rawEntry , ':' , ((thisC copyFrom:2) asStringWith:$/).
9e23d1301d4b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6968
diff changeset
   918
                ]
6965
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   919
            ] ifFalse:[
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   920
                rawEntry := (thisC copyFrom:prefix size+1) asStringWith:$/.
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   921
            ].
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   922
7131
f569b3dfd91f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7120
diff changeset
   923
            (packagesInChangeSet includes:this) ifTrue:[
7060
47650c6b33a9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6975
diff changeset
   924
                rawEntry := rawEntry , self class markForBeingInChangeList.
6965
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   925
                rawEntry := self colorizeForChangedCode:rawEntry.
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   926
            ].
11873
40ed77dbf31e comment/format in: #nameListFor:
Claus Gittinger <cg@exept.de>
parents: 11258
diff changeset
   927
        
6965
de49c9a12837 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6960
diff changeset
   928
            entry := (String new:indent) , rawEntry.
11157
7277655aee35 Use Configurable includesFeature:#Feature instead of direct send of #hasFeature
vrany
parents: 11138
diff changeset
   929
            ((ConfigurableFeatures includesFeature: #SubversionSupportEnabled) and:[this first ~= $*]) ifTrue:[
11873
40ed77dbf31e comment/format in: #nameListFor:
Claus Gittinger <cg@exept.de>
parents: 11258
diff changeset
   930
                entry := self markEntry: entry at: projectNameList size + 1 forBeingManagedBySVN: this.
10249
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   931
            ].
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   932
        ].
6951
a089896c6970 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6934
diff changeset
   933
        projectNameList add:entry.
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   934
    ].
10249
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   935
    self startWorker.        
6951
a089896c6970 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6934
diff changeset
   936
    ^ projectNameList.
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   937
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   938
    "Created: / 17-02-2000 / 23:43:05 / cg"
10675
1a6a5e0b012f ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents: 10364
diff changeset
   939
    "Modified: / 07-09-2011 / 10:45:05 / cg"
11157
7277655aee35 Use Configurable includesFeature:#Feature instead of direct send of #hasFeature
vrany
parents: 11138
diff changeset
   940
    "Modified: / 19-01-2012 / 10:46:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   941
!
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   942
10249
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   943
startWorker
12394
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   944
    worker 
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   945
        ifNil:[
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   946
            worker := [
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   947
                    [ workerQueue notEmpty ] whileTrue:[
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   948
                        |job|
10249
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   949
12394
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   950
                        job := workerQueue next.
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   951
                        job value
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   952
                    ].
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   953
                    worker := nil.
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   954
                ] newProcess.
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   955
            worker resume
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
   956
        ].
10249
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   957
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   958
    "Created: / 14-12-2010 / 15:49:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   959
    "Modified: / 16-12-2010 / 17:35:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   960
!
219f8553b31b Merged with JV's branch
vrany
parents: 9467
diff changeset
   961
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   962
updateList
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   963
    |newList oldList newNameList oldNameList oldSelection newSelection selectedProjectsHolder|
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   964
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   965
    selectedProjectsHolder := self selectedProjects.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   966
    oldSelection := selectedProjectsHolder value.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   967
    newList := self listOfProjects.
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   968
    oldList := projectList value.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   969
    newNameList := self nameListFor:newList.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   970
    oldNameList := self projectNameList value.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   971
    (newList ~= oldList
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   972
    or:[ newNameList ~= oldNameList]) ifTrue:[
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   973
"/        oldSelection size > 0 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   974
"/            selectedProjectsHolder removeDependent:self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   975
"/            selectedProjectsHolder value:#().
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   976
"/            selectedProjectsHolder addDependent:self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   977
"/        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   978
12442
65d7ced7bcca class: Tools::ProjectList
Stefan Vogel <sv@exept.de>
parents: 12439
diff changeset
   979
        self projectList value ~= newList ifTrue:[
65d7ced7bcca class: Tools::ProjectList
Stefan Vogel <sv@exept.de>
parents: 12439
diff changeset
   980
            "Hack to avoid recursion"
65d7ced7bcca class: Tools::ProjectList
Stefan Vogel <sv@exept.de>
parents: 12439
diff changeset
   981
            self projectList value:newList.
65d7ced7bcca class: Tools::ProjectList
Stefan Vogel <sv@exept.de>
parents: 12439
diff changeset
   982
        ].
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   983
        listValid := true.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   984
        self projectNameList value:newNameList.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   985
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   986
        oldSelection size > 0 ifTrue:[
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   987
            newSelection := oldSelection select:[:prj | newList includes:prj].
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   988
            selectedProjectsHolder value:newSelection.
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   989
        ]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   990
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   991
    listValid := true.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   992
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   993
    "Modified: / 25.2.2000 / 23:10:01 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   994
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   995
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   996
!ProjectList methodsFor:'special'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   997
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   998
addAdditionalProject:aProject
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
   999
    "/ those are simulated - in ST/X, empty projects do not
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1000
    "/ really exist; however, during browsing, it makes sense.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1001
    AdditionalEmptyProjects isNil ifTrue:[
6923
ac5a126a3107 hierarchical
Claus Gittinger <cg@exept.de>
parents: 6907
diff changeset
  1002
        AdditionalEmptyProjects := Set new.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1003
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1004
    AdditionalEmptyProjects add:aProject.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1005
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
  1006
    environment changed:#projectOrganization   "/ not really ... to force update
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1007
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1008
    "Created: / 17.2.2000 / 23:44:27 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1009
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1010
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1011
removeAdditionalProjects:aListOfProjects
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1012
    "/ those are simulated - in ST/X, empty categories do not
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1013
    "/ really exist; however, during browsing, it makes sense.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1014
    AdditionalEmptyProjects notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1015
	aListOfProjects do:[:eachProject |
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1016
	    AdditionalEmptyProjects remove:eachProject ifAbsent:nil.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1017
	].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1018
    ].
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12846
diff changeset
  1019
    environment changed:#projectOrganization   "/ not really ... to force update
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1020
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1021
    "Created: / 17.2.2000 / 23:45:24 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1022
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1023
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1024
!ProjectList class methodsFor:'documentation'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1025
11877
eac5956da22d added: #documentation
Claus Gittinger <cg@exept.de>
parents: 11873
diff changeset
  1026
version
14016
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
  1027
    ^ '$Header: /cvs/stx/stx/libtool/Tools_ProjectList.st,v 1.68 2014-02-25 10:40:06 vrany Exp $'
11877
eac5956da22d added: #documentation
Claus Gittinger <cg@exept.de>
parents: 11873
diff changeset
  1028
!
eac5956da22d added: #documentation
Claus Gittinger <cg@exept.de>
parents: 11873
diff changeset
  1029
8966
8387f26335a9 Project noPackageId -> PackageId noPackageId
Claus Gittinger <cg@exept.de>
parents: 8749
diff changeset
  1030
version_CVS
14016
d4256fb254ee Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13806
diff changeset
  1031
    ^ '$Header: /cvs/stx/stx/libtool/Tools_ProjectList.st,v 1.68 2014-02-25 10:40:06 vrany Exp $'
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1032
! !
12394
a4f9d45bb707 fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents: 12087
diff changeset
  1033