FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
CadPythonShell/PythonConsoleControl/PythonCompletionData.cs at dev · chuongmep/CadPythonShell · GitHub
chuongmep
/
CadPythonShell
Public
Notifications
You must be signed in to change notification settings
Fork
23
Star
119
Code
Issues
3
Pull requests
0
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
CadPythonShell
/
PythonConsoleControl
/
PythonCompletionData.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
60 lines (49 loc) · 1.67 KB
Breadcrumbs
CadPythonShell
/
PythonConsoleControl
/
PythonCompletionData.cs
Copy path
File metadata and controls
60 lines (49 loc) · 1.67 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
// Copyright (c) 2010 Joe Moorhouse
using
ICSharpCode
.
AvalonEdit
.
CodeCompletion
;
using
ICSharpCode
.
AvalonEdit
.
Document
;
using
ICSharpCode
.
AvalonEdit
.
Editing
;
using
Microsoft
.
Scripting
.
Hosting
.
Shell
;
using
System
;
namespace
PythonConsoleControl
{
/// <summary>
/// Implements AvalonEdit ICompletionData interface to provide the entries in the completion drop down.
/// </summary>
public
class
PythonCompletionData
:
ICompletionData
{
private
CommandLine
commandLine
;
public
PythonCompletionData
(
string
text
,
string
stub
,
CommandLine
commandLine
,
bool
isInstance
)
{
this
.
Text
=
text
;
this
.
Stub
=
stub
;
this
.
commandLine
=
commandLine
;
this
.
IsInstance
=
isInstance
;
}
public
System
.
Windows
.
Media
.
ImageSource
Image
{
get
{
return
null
;
}
}
public
string
Text
{
get
;
private
set
;
}
public
string
Stub
{
get
;
private
set
;
}
public
bool
IsInstance
{
get
;
private
set
;
}
// Use this property if you want to show a fancy UIElement in the drop down list.
public
object
Content
{
get
{
return
this
.
Text
;
}
}
public
object
Description
{
get
{
// Do nothing: description now updated externally and asynchronously.
return
"Not available"
;
}
}
public
double
Priority
{
get
{
return
0
;
}
}
public
void
Complete
(
TextArea
textArea
,
ISegment
completionSegment
,
EventArgs
insertionRequestEventArgs
)
{
textArea
.
Document
.
Replace
(
completionSegment
,
this
.
Text
)
;
}
}
}
Back
|
FazBrowse Home
|
New Git URL