-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGtTallyPythonMethod.class.st
More file actions
88 lines (76 loc) · 1.64 KB
/
GtTallyPythonMethod.class.st
File metadata and controls
88 lines (76 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Class {
#name : #GtTallyPythonMethod,
#superclass : #Object,
#instVars : [
'file',
'line',
'name'
],
#category : #GToolkit4Python
}
{ #category : #accessing }
GtTallyPythonMethod >> file [
^ file
]
{ #category : #accessing }
GtTallyPythonMethod >> file: anObject [
file := anObject
]
{ #category : #accessing }
GtTallyPythonMethod >> gtDisplayOn: aStream [
aStream << name << ' '.
file gtDisplayOn: aStream.
aStream << ':' << line asString
]
{ #category : #accessing }
GtTallyPythonMethod >> gtSourceFor: aView [
<gtView>
file file ifNil: [ ^ aView empty ].
^ aView forward
title: 'Source';
object: [ (name = '<module>' and: [ line = 1 ])
ifTrue: [ file file ]
ifFalse: [ GtLSPFileLocation new
lspFile: file file;
startPosition: (GtLSPPositionStructure new
line: line - 1;
character: 0;
yourself);
endPosition: (GtLSPPositionStructure new
line: line - 1;
character: (file file source lineNumber: line) size;
yourself) ] ];
view: #gtLiveFor:
]
{ #category : #accessing }
GtTallyPythonMethod >> isFromTrait [
^ false
]
{ #category : #accessing }
GtTallyPythonMethod >> line [
^ line
]
{ #category : #accessing }
GtTallyPythonMethod >> line: anObject [
line := anObject
]
{ #category : #accessing }
GtTallyPythonMethod >> method [
^ self
]
{ #category : #accessing }
GtTallyPythonMethod >> methodClass [
^ file
]
{ #category : #accessing }
GtTallyPythonMethod >> name [
^ name
]
{ #category : #accessing }
GtTallyPythonMethod >> name: anObject [
name := anObject
]
{ #category : #accessing }
GtTallyPythonMethod >> selector [
^ (name ifNil: [ '' ]) asSymbol
]