equal
deleted
inserted
replaced
1 " |
1 " |
2 stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE |
2 stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE |
3 Copyright (C) 2013-2015 Jan Vrany |
3 Copyright (C) 2013-2015 Jan Vrany |
|
4 Copyright (C) 2020 LabWare |
4 |
5 |
5 This library is free software; you can redistribute it and/or |
6 This library is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Lesser General Public |
7 modify it under the terms of the GNU Lesser General Public |
7 License as published by the Free Software Foundation; either |
8 License as published by the Free Software Foundation; either |
8 version 2.1 of the License. |
9 version 2.1 of the License. |
31 |
32 |
32 copyright |
33 copyright |
33 " |
34 " |
34 stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE |
35 stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE |
35 Copyright (C) 2013-2015 Jan Vrany |
36 Copyright (C) 2013-2015 Jan Vrany |
|
37 Copyright (C) 2020 LabWare |
36 |
38 |
37 This library is free software; you can redistribute it and/or |
39 This library is free software; you can redistribute it and/or |
38 modify it under the terms of the GNU Lesser General Public |
40 modify it under the terms of the GNU Lesser General Public |
39 License as published by the Free Software Foundation; either |
41 License as published by the Free Software Foundation; either |
40 version 2.1 of the License. |
42 version 2.1 of the License. |
70 | stringToComplete idx | |
72 | stringToComplete idx | |
71 |
73 |
72 stringToComplete := self stringToCompleteForLanguage: language. |
74 stringToComplete := self stringToCompleteForLanguage: language. |
73 language isSmalltalk ifTrue:[ |
75 language isSmalltalk ifTrue:[ |
74 idx := stringToComplete indexOf: $:. |
76 idx := stringToComplete indexOf: $:. |
75 ^idx == 0 ifTrue:[stringToComplete size] ifFalse:[idx]. |
77 ^idx == 0 ifTrue:[stringToComplete size + 1] ifFalse:[idx]. |
76 ]. |
78 ]. |
77 ((language askFor: #isJava) or:[language askFor: #isGroovy]) ifTrue:[ |
79 ((language askFor: #isJava) or:[language askFor: #isGroovy]) ifTrue:[ |
78 ^ (stringToComplete at: stringToComplete size - 1) isSeparator |
80 ^ (stringToComplete at: stringToComplete size - 1) isSeparator |
79 ifTrue:[stringToComplete size- 2] |
81 ifTrue:[stringToComplete size- 2] |
80 ifFalse:[stringToComplete size] |
82 ifFalse:[stringToComplete size] |
82 |
84 |
83 ^ stringToComplete size + 1. |
85 ^ stringToComplete size + 1. |
84 |
86 |
85 "Created: / 03-10-2013 / 16:50:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
87 "Created: / 03-10-2013 / 16:50:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
86 "Modified: / 07-10-2013 / 12:30:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
88 "Modified: / 07-10-2013 / 12:30:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
89 "Modified: / 12-06-2020 / 21:50:41 / Jan Vrany <jan.vrany@labware.com>" |
87 ! |
90 ! |
88 |
91 |
89 hint |
92 hint |
90 classes size == 1 ifTrue:[ |
93 classes size == 1 ifTrue:[ |
91 ^ classes anElement nameWithoutNameSpacePrefix. |
94 ^ classes anElement nameWithoutNameSpacePrefix. |