Skip to content

Commit 693f5f9

Browse files
committed
Add source code
1 parent fab558a commit 693f5f9

File tree

6 files changed

+713
-2
lines changed

6 files changed

+713
-2
lines changed

.gitignore

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
#################
2+
## Custom
3+
#################
4+
5+
pypredefs/
6+
resources/
7+
8+
#################
9+
## Eclipse
10+
#################
11+
12+
*.pydevproject
13+
.project
14+
.metadata
15+
bin/
16+
tmp/
17+
*.tmp
18+
*.bak
19+
*.swp
20+
*~.nib
21+
local.properties
22+
.classpath
23+
.settings/
24+
.loadpath
25+
26+
# External tool builders
27+
.externalToolBuilders/
28+
29+
# Locally stored "Eclipse launch configurations"
30+
*.launch
31+
32+
# CDT-specific
33+
.cproject
34+
35+
# PDT-specific
36+
.buildpath
37+
38+
39+
#################
40+
## Visual Studio
41+
#################
42+
43+
## Ignore Visual Studio temporary files, build results, and
44+
## files generated by popular Visual Studio add-ons.
45+
46+
# User-specific files
47+
*.suo
48+
*.user
49+
*.sln.docstates
50+
51+
# Build results
52+
53+
[Dd]ebug/
54+
[Rr]elease/
55+
x64/
56+
build/
57+
[Bb]in/
58+
[Oo]bj/
59+
60+
# MSTest test Results
61+
[Tt]est[Rr]esult*/
62+
[Bb]uild[Ll]og.*
63+
64+
*_i.c
65+
*_p.c
66+
*.ilk
67+
*.meta
68+
*.obj
69+
*.pch
70+
*.pdb
71+
*.pgc
72+
*.pgd
73+
*.rsp
74+
*.sbr
75+
*.tlb
76+
*.tli
77+
*.tlh
78+
*.tmp
79+
*.tmp_proj
80+
*.log
81+
*.vspscc
82+
*.vssscc
83+
.builds
84+
*.pidb
85+
*.log
86+
*.scc
87+
88+
# Visual C++ cache files
89+
ipch/
90+
*.aps
91+
*.ncb
92+
*.opensdf
93+
*.sdf
94+
*.cachefile
95+
96+
# Visual Studio profiler
97+
*.psess
98+
*.vsp
99+
*.vspx
100+
101+
# Guidance Automation Toolkit
102+
*.gpState
103+
104+
# ReSharper is a .NET coding add-in
105+
_ReSharper*/
106+
*.[Rr]e[Ss]harper
107+
108+
# TeamCity is a build add-in
109+
_TeamCity*
110+
111+
# DotCover is a Code Coverage Tool
112+
*.dotCover
113+
114+
# NCrunch
115+
*.ncrunch*
116+
.*crunch*.local.xml
117+
118+
# Installshield output folder
119+
[Ee]xpress/
120+
121+
# DocProject is a documentation generator add-in
122+
DocProject/buildhelp/
123+
DocProject/Help/*.HxT
124+
DocProject/Help/*.HxC
125+
DocProject/Help/*.hhc
126+
DocProject/Help/*.hhk
127+
DocProject/Help/*.hhp
128+
DocProject/Help/Html2
129+
DocProject/Help/html
130+
131+
# Click-Once directory
132+
publish/
133+
134+
# Publish Web Output
135+
*.Publish.xml
136+
*.pubxml
137+
138+
# NuGet Packages Directory
139+
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
140+
#packages/
141+
142+
# Windows Azure Build Output
143+
csx
144+
*.build.csdef
145+
146+
# Windows Store app package directory
147+
AppPackages/
148+
149+
# Others
150+
sql/
151+
*.Cache
152+
ClientBin/
153+
[Ss]tyle[Cc]op.*
154+
~$*
155+
*~
156+
*.dbmdl
157+
*.[Pp]ublish.xml
158+
*.pfx
159+
*.publishsettings
160+
161+
# RIA/Silverlight projects
162+
Generated_Code/
163+
164+
# Backup & report files from converting an old project file to a newer
165+
# Visual Studio version. Backup files are not needed, because we have git ;-)
166+
_UpgradeReport_Files/
167+
Backup*/
168+
UpgradeLog*.XML
169+
UpgradeLog*.htm
170+
171+
# SQL Server files
172+
App_Data/*.mdf
173+
App_Data/*.ldf
174+
175+
#############
176+
## Windows detritus
177+
#############
178+
179+
# Windows image file caches
180+
Thumbs.db
181+
ehthumbs.db
182+
183+
# Folder config file
184+
Desktop.ini
185+
186+
# Recycle Bin used on file shares
187+
$RECYCLE.BIN/
188+
189+
# Mac crap
190+
.DS_Store
191+
192+
193+
#############
194+
## Python
195+
#############
196+
197+
*.py[co]
198+
199+
# Packages
200+
*.egg
201+
*.egg-info
202+
dist/
203+
build/
204+
eggs/
205+
parts/
206+
var/
207+
sdist/
208+
develop-eggs/
209+
.installed.cfg
210+
211+
# Installer logs
212+
pip-log.txt
213+
214+
# Unit test / coverage reports
215+
.coverage
216+
.tox
217+
218+
#Translations
219+
*.mo
220+
221+
#Mr Developer
222+
.mr.developer.cfg
223+
224+
225+
#############
226+
## Jekyll
227+
#############
228+
229+
_site
230+
.sass-cache
231+
.jekyll-metadata

README.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,42 @@
1-
# pydev-gimp-predefined-completions
2-
Script for generating PyDev predefined completions for GIMP modules
1+
PyDev Predefined Completions Generator for GIMP
2+
===============================================
3+
4+
This simple Python script generates [predefined completions](http://www.pydev.org/manual_101_interpreter.html) for [PyDev](http://www.pydev.org/)
5+
for GIMP and GTK modules to improve development of GIMP plug-ins written in Python.
6+
7+
Development of GIMP plug-ins in Python is provided by several Python modules
8+
compiled as `.pyd` files. However, PyDev has trouble parsing such files,
9+
resulting in missing code completion and "Undefined variable from import" error
10+
messages. While PyDev also provides "Forced Builtins" feature, it apparently
11+
does not work for GIMP modules (and GTK modules, at least on Windows).
12+
13+
This script therefore attempts to solve this problem by generating predefined
14+
completions for GIMP and GTK Python modules. Additionally, this script also
15+
generates predefined completions for all plug-ins and procedures installed in
16+
GIMP.
17+
18+
19+
Running the Generator
20+
---------------------
21+
22+
The script is written as a GIMP plug-in. To run the generator:
23+
1. Install the plug-in by copying all files to the
24+
`[user directory]/.gimp-<version>/plug-ins` directory.
25+
2. Open GIMP and choose
26+
`Filters -> Python-Fu -> Generate Predefined Completions for PyDev`.
27+
Alternatively, you may run the plug-in from the Python-Fu console: open GIMP,
28+
choose `Filters -> Python-Fu -> Console` and enter
29+
`pdb.generate_predefined_completions_for_pydev()`.
30+
31+
32+
Installing Predefined Completions in PyDev
33+
------------------------------------------
34+
35+
Once the generator finishes running, the predefined completions are located in
36+
in the `pypredefs` subdirectory of the directory where this plug-in is
37+
installed.
38+
39+
To add the predefined completions to PyDev, check out the
40+
[PyDev documentation](http://www.pydev.org/manual_101_interpreter.html). Simply
41+
add the entire `pypredefs` directory to the list of directories with predefined
42+
completions for the Python interpreter used by GIMP.

modules.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
gimp
2+
_gimpenums
3+
_gimpui
4+
gimpcolor
5+
gimpthumb
6+
gtk._gtk
7+
gtk.gdk
8+
gobject._gobject
9+
cairo._cairo
10+
pango
11+
pangocairo
12+
atk
13+
glib._glib
14+
gio._gio

0 commit comments

Comments
 (0)