This repository has been archived by the owner on Aug 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 127
/
notes.txt
697 lines (561 loc) · 23.9 KB
/
notes.txt
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
TODO {{{
Bugs {{{
- Install w/ MyEclipse
- after external change by eclipse, all view info is lost (manual folds, etc).
- https://sourceforge.net/tracker/?func=detail&atid=763326&aid=2123378&group_id=145869
- xml validate, if a doctype exists, but no dtd, then there is an error for
every element since they are "not declared" (ex. ant/cvs.xml).
<!DOCTYPE project [
<!ENTITY userlist SYSTEM "file:include/cvs-user-list.xml">
]>
}}}
Tests {{{
- util classes and vim util functions
- project nature add/remove
- logger (custom logger)
- indenting test cases
- html validate: validation of nested javascript and css
- django functionality
- :EclimHelp, :EclimHelpGrep
- :Jps
}}}
Documentation {{{
- add menu of some sort in vimdocs
- consider a command to open topic in web docs
- boostrap theme
- on short pages, clicking subnav element force it to be "selected"
- eclipse version variable
- Sublime text like gif examples (issue #142):
http://www.sublimetext.com/
Use byzanz
- Reference docs:
- note on using :EclimHelp
- suggest wildmenu settings
set wildmenu
set wildmode=longest:full,full
- Document eclim commands better by providing descriptions of the arguments
and perhaps using doclets to provide examples or to generate a separate
reference by command.
- add descriptions to the Command annotation
- Example docs for a command:
Gathers ant completion candidates for the given ant file in the given
project at the given offset.
..
java_complete -p project -f file -o offset -e encoding -l layout
* project: the project name
* file: the file, relative to the project root
* offset: the absolute offset for the context of completions
* encoding: The encoding of the file ( generally use utf8 )
* layout: the layout of the completion object ( only 'compact'? )
Results in the following json document which represents a list of
completions. Each completion object consists of the following keys:
* completion: The actual text used for replacement
* menu: descriptive text of the completion?
* info: additional information about the completion
* type: type of completion, valid options and their meanings are
* v: variable
* f: function
* t: type
Sample Result:
..
{"completions":[{
"completion":"args",
"menu":"args : String[]",
"info":"args : String[]",
"type":"v"
},{
"completion":"greet()",
"menu":"greet() : void - Hello",
"info":"greet() : void - Hello",
"type":"f"
},{
"completion":"Hello",
"menu":"Hello - test",
"info":"Hello - test",
"type":"t"
},{
"completion":"main(",
"menu":"main(String... args) : void - Hello",
"info":"main(String... args) : void - Hello",
"type":"f"}
]}
}}}
Common {{{
- add command to create project links
- leverage eclipse save actions
- settings export/import
- :LocateFile
- add 'recent' scope to search recently used files?
- need to keep track of n recently used files
- Filtering:
- <right click on the project> -> Properties -> Resource -> Resource Filters
- add ability to configure the eclipse resource filters
- :ProjectCreateWizard - use input()
- EclimValidate, per lang validation
- :verbose set completefunc?
- is the current file in a src path
- Flat or additionally filtered project tree view:
https://groups.google.com/d/msg/eclim-user/qzOMkyIndSk/Wb9T2GUMCrQJ
> In the window of "ProjectTree", Is there a way to hide any empty folder and
> only show a fatten view of current project. Just like the "Package
> Presentation -> Flat" does in Eclipse
- update nailgun to pass signals from client to server
- support ctrl-c on client killing process on server for :Java and :JUnit
- extend task and override createWatchdog() giving us a handle to the
process which we can call destroy() on.
- eclim console log
- https://sourceforge.net/tracker/?func=detail&aid=2027557&group_id=145869&atid=763326
- debugger interface
http://www.vim.org/scripts/script.php?script_id=1703
(not windows compatible, but worth watching)
http://www.vim.org/scripts/script.php?script_id=663
(probably not windows compatible either)
Templates
- replace eclim templates w/ eclipse templates
org.eclim.core/vim/eclim/autoload/eclim/common/template.vim
- org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java
- list, edit, create, remove
- TemplateStore codeTemplateStore = JavaPlugin.getDefault().getCodeTemplateStore();
- ProjectTemplateStore projectStore = new ProjectTemplateStore(project.getProject());
- determines the user's default workspace using (account for
~/.eclipse/org.eclipse.../configuration)
eclipse/configuration/.settings/org.eclipse.ui.ide.prefs
RECENT_WORKSPACES=/home/ervandew/test_workspace,/home/ervandew/workspace
- In addition to marking lines w/ errors/warnings, highlight the offending text.
- CursorHold validation of files.
- via temp file?
- Support for starting/stopping eclim from vim
- fork eclimd
- buffer to tail the eclimd log
- Remote eclimd
- mount point for code/workspace location
- ~/.eclimrc (both sides need to agree)
- ~/.eclim/.eclimd_instances (client needs to read server created file)
}}}
Vimplugin {{{
- add an "Open in Eclipse" command from vim to open the current file in eclipse.
- command must check that the eclipse gui is running first.
- setting to force eclipse to not make gvim the default editor for each
file opened via gvim. Someone else also wants the opposite, where they
have vim as the default, but occasionaly open via the Java Editor
(https://github.com/ervandew/eclim/issues/140).
- funtionality should be added to VimEditorPartListener
- add an "Open With Gvim" command that can be bound to an eclipse key binding.
- Find the eclipse "Open Declaration" command for an example:
Command: Open Declaration
When: In Windows
Category: Navigate
- toggle between using embedded gvim and standard eclipse editor
- can we swap editors on the existing tab?
}}}
C/C++ {{{
- cdt
- project create
- handle dependent projects
- specify toolchain (command to list toolchains with a configuration)
- eclipse may have the notion of a "preferred" toolchain, so that
should be taken into consideration when determining the default
toolchain to use (see #278).
- specify project type (executable, shared library, static library, makefile project)
- makefile creation
- edit project config
- modify toolchain
- add/remove paths
- references (projects), source, output
- includes, symbols (macros?), library paths
- all of these support using environment variables in the path (or
value in the case of symbols): ${MY_VAR}. support variable
completion
ICConfigurationDescription cfgDes =
ManagedBuildManager.getDescriptionForConfiguration(cfg);
IEnvironmentVariableManager mngr =
CCorePlugin.getDefault().getBuildEnvironmentManager();
IEnvironmentVariable[] vars = mngr.getVariables(cfgDes, true);
- building c/c++ projects
- see org.eclipse.cdt.managedbuilder.internal.core.HeadlessBuilder
- completion outside of a project
- a user says eclipse supports this
- http://www.eclipse.org/cdt/
http://wiki.eclipse.org/index.php/CDT
http://download.eclipse.org/tools/cdt/releases/ganymede/site.xml
http://cdt-devel-faq.wikidot.com/
- :CppHierarchy command which opens a buffer showing the class hierarchy for
the current file.
- :C[pp]IncludeHierarchy command which opens a buffer showing hierarchy of each
header file included in the current source file.
- :CCorrect
- make file validation
- make code completion
}}}
Clojure {{{
counterclockwise: http://code.google.com/p/counterclockwise/
Support send to repl.
}}}
Css {{{
- for css validation, attempt to provide messages for errors that the validator does not.
- FIRST, try checking out latest css validation code and see if they have any messages.
- * ie hacks.
- ignore error immediately following this error report (if not another valid error).
- missing closing }
- font: 100%;
- trailing , on list of selectors
- Check if additional css properties are provided by eclipse or added by
aptana (-moz-border-radius)
}}}
D {{{
http://www.dsource.org/projects/descent
}}}
Erlang {{{
http://erlide.org/
}}}
Haskell {{{
http://eclipsefp.sourceforge.net/
}}}
Html {{{
- look into using jericho instead of tidy as the html validator.
- add support for validation via the w3c online validator
(be sure to support configuration of the url to post to for local installs)
http://validator.w3.org/docs/install.html
}}}
Java {{{
- replace eclim import filters with
Preferences > Java > Appearance > Type Filters
- add, remove, set default vm install.
- :Java, :Javadoc
- allow specific jdk/jre to be used to run the command?
- :Java
- run via a system call so that ctrl-c from vim will kill it
- have eclimd create a temp build.xml and return the ant command string
to run.
- add option to 'spawn' the jvm to keep the program running while
returning to vim.
- add ability to supply jvm args, system properties, env vars, etc.
- Add simple :Jar command
- compile the project, alert if any compilation errors
- jar up the project's class files
- add option for the location of the project's manifest file if any
- add support for generating toString, equals, hasCode methods
https://github.com/ervandew/eclim/issues/212
- Support for running :JUnit / :Java via screen.vim
- Consider replacing :Java w/ a :ProjectRun command using eclipse launch
configurations.
- :JavaDocSearch
- how to deal with headless installs? can we open the full class docs into a
buffer?
- w3m -halfdump -cols <cols> (can support page anchors)
- get/set, construtor, etc. templates
- consider using the eclipse templates or giving the user that option
- :Jps handle errors when opening jconsole
- :JavaClassCreate create a new class
- handle locating the src dir, or prompting user if more than one
- handle creation of package dirs if necessary
- open new class in a split window
- Configure java code formatting from within vim
- eclipse java templates
- preview
- sub class CompilationUnitPreview and pull the preview text from fPreviewDocument
- jdt/internal/ui/preferences/formatter/BracesTabPage.java
- jdt/internal/ui/preferences/formatter/CompilationUnitPreview.java
- jdt/internal/ui/preferences/formatter/JavaPreview.java
- generic support for java based xml config file validation
- support list of xpaths to class name attributes / values to validate
- create spring file validation of class names like w/ log4j.
- class name completion support
- refactoring support.
- Safe deletes. Check for references before deleting.
- Convert anonymous class into inner/outer class.
- Convert inner class to outer class.
- Extract interface.
- Push methods / fields up to superclass or down to subclass.
- Code "Clean Up"
- Remove Unused Code (imports, private methods, private constructors,
private types).
- JSE 5.0 (add missing @Override, add missing @Deprecated)
- JUnit
- results in the browser.
- When viewing a junit result file allow linking from stack trace
elements.
- File type support of junit result files w/ search functionality.
- Integrate with eclipse junit execution env and provide user with option to
choice which to use (eclipse or current external version).
org.eclim.java.junit.engine=(eclipse|external)
- validation, look into grabbing additional message that eclipse displays
that is not picked up by eclim
- Code:
List<String> hi = new ArrayList<String>();
hi[0];
- Messages:
1. not picked up by eclim: The type of the expression must be an array
type but it resolved to List<String>
2. picked up by eclim: Syntax error, insert "AssignmentOperator
Expression" to complete Expression"
- For commands that spawn temp buffer, assign a b:currentfile var to the
file that opened the buffer so that other commands can still be invoked
by changing the get file name function to examine b:currentfile.
- JavaImpl, JavaDelegate, JUnitImpl, JUnitResult
- automate switch statement generation for enums.
When switch(enum), create cases for all enum values.
- modify for loop abbreviations to increment the looping var if the current
one is taken. (ii, jj, kk, ll, mm, nn, ...)
- push method to interface... create method in interface from method in
implementation.
- searching
- Expand searching from non java source files (spring xml, hibernate xml,
etc).
- Third party plugins may provide this functionality.
- content assist
- Generate anonymous class body, including all methods that need to be
implemented, from the start of defining one (new Runnable())
Eclipse Equiv: Ctrl+Space
- Create method from the call to one that does not yet exist or
change method signature (add/remove parameters/arguments).
Eclipse Equiv: Ctrl+1
- Create new field to hold constructor argument.
Eclipse Equiv: Ctrl+1
- Auto surround method call that throws an exception w/ try/catch
block or if surrounded and doesn't catch necessary exceptions,
add those catch statements.
Eclipse Equiv: Ctrl+1
- Wrap source block (selection) in do,if,for,try,while.
Eclipse Equiv: Ctrl+1
- many more provided by eclipse...
- code analysis
- http://findbugs.sourceforge.net/
- http://pmd.sourceforge.net/ PMD
- http://www.jutils.com/ Lint4j
- http://coverlipse.sourceforge.net Coverclipse
- http://java-source.net/open-source/code-coverage Other code coverage tools
- http://java-source.net/open-source/code-analyzers Other code analyizers
JDT Tips
http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.jdt.doc.user/tips/jdt_tips.html
JDT What's New
http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.jdt.doc.user/whatsNew/jdt_whatsnew.html
}}}
Javascript {{{
http://eclipse.org/vjet/ (formally an ebay project)
- node.js support
http://wiki.eclipse.org/index.php/ATF/JSDT
http://labs.adobe.com/technologies/jseclipse/
http://www.aptana.org/ aptana (owners of radrails)
http://www.eclipse.org/dltk/ dltk (experimental)
- javascript code completion
- javascript doc lookup for common libraries
- :JavascriptDocSearch
- yui
http://developer.yahoo.com/yui/docs/YAHOO.widget.Dialog.html#configButtons
- prototype
- jquery
- JsDoc generated docs
http://code.google.com/apis/opensocial/docs/0.7/reference/gadgets.views.html
...
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference
}}}
Jsp {{{
jsp
- syntax validation
- imports
- <%%>, <%=%> code completion
- <%@ page import="javax." %> completion
- <jsp: completion, with attribute name completion
- taglib completion (<core:<c-x><c-u>), including attribute name completion
}}}
Lua {{{
http://luaeclipse.luaforge.net/
}}}
Maven {{{
- add vim logic to mimic old --find for :Mvn
- add perference to specify location of the pom.xml
}}}
Perl {{{
http://e-p-i-c.sourceforge.net/
- syntax validation
perl -c [-W or -w] <file>
- static validation
Perl::Critic
http://search.cpan.org/~elliotjs/Perl-Critic-1.082/lib/Perl/Critic.pm
- doc search on cpan
- format
http://perltidy.sourceforge.net/
}}}
Php {{{
}}}
Python {{{
- Pydev
- preview docstrings: PyTextHover.getHoverInfo
- code format: Ctrl+Shift+F
- organize imports: Ctrl+Shift+O
- refactor -> rename: Alt+Shift+R
- jython?
}}}
SQL {{{
- sql pretty print
- antlr grammers for sql dialects (mysql, postgreql, oracle)
- http://www.antlr.org/grammar/list contains a couple oracle pl/sql
grammers and an ansi sql grammer
}}}
Xml {{{
- handle connectivity issues on xml validate
}}}
}}}
NOTES {{{
Steps for new releases {{{
1) tag git and then build the distribution
$ git tag -a -m "<version>" <version>
$ ant dist
$ git push
$ git push --tags
2) create a release on github
https://github.com/ervandew/eclim/releases/
Title: Eclim <version> (for Eclipse <version>, <Name>)
Desc: http://ervandew.github.io/eclim/changes.html
3) update documentation website
# ensure installer/dependencies.xml has correct eclipse version info
# ensure docs/content/install.rst has correct java version info
$ ant docs
$ cd gh-pages
$ git a 0-n
$ git ci -m "eclim docs <version>"
$ git push
http://ervandew.github.io/eclim/
}}}
Eclipse Docs {{{
Forcing system wide eclipse install to create user local configuration dirs:
$ eclipse -initialize
p2
http://wiki.eclipse.org/Equinox_p2_Getting_Started
http://wiki.eclipse.org/Equinox_p2_Admin_UI_Users_Guide
http://wiki.eclipse.org/Starting_Eclipse_Commandline_With_Equinox_Launcher/p2_Admin_UI
p2 director (install / upgrade)
http://wiki.eclipse.org/Equinox_p2_director_application
Example: install feature org.eclipse.wst
./eclipse -nosplash -consolelog
-application org.eclipse.equinox.p2.director
-repository http://download.eclipse.org/releases/ganymede
-installIU org.eclipse.wst.web_ui.feature.feature.group
Example: uninstall feature org.eclipse.wst (not fully tested yet)
./eclipse -nosplash -consolelog
-application org.eclipse.equinox.p2.director
-repository http://download.eclipse.org/releases/ganymede
-uninstallIU org.eclipse.wst.web_ui.feature.feature.group
}}}
Adding a new plugin {{{
Installer: (integrate these into $ ant plugin.create)
install.properties: add the following keys
- featureList.<plugin>
- featureList.<plugin>.html
dependencies.xml: add feature dependencies
FeatureProvider: add feature name, etc to constants
EclipsePluginStep: add feature to FeatureNameComparator
}}}
Troubleshooting {{{
Windows:
- starting eclim without spawning separate console
> java -Dnailgun.server.port=9092
-jar plugins/org.eclipse.equinox.launcher_<version>.jar
-debug -consolelog -clean -refresh
-data @user.home/workspace.test
-application org.eclim.application
Minimum execution of vim w/ eclim support:
$ vim -u NONE -U NONE --cmd "set nocp | sy on | filetype plugin indent on | ru plugin/eclim.vim"
Pathogen, etc.:
$ vim -u NONE -U NONE --cmd \
"set nocp | sy on | filetype plugin indent on | set rtp+=$HOME/.vim/bundle/eclim | ru plugin/eclim.vim"
Windows
> "C:\Program Files\Vim\vim72\gvim"
-u NONE -U NONE --cmd "set nocp | sy on | filetype plugin indent on | ru plugin/eclim.vim"
Minimum execution of gvim inside of eclipse:
Window -> Preferences -> Vimplugin -> Additional gvim args:
-u NONE -U NONE --cmd "set nocp | sy on | filetype plugin indent on | ru plugin/eclim.vim"
When using a project created from eclipse, may get errors in log when saving +
closing a src file, complaining that the .swp file doesn't exist. To fix this,
you need to exclude the swp files from the eclipse build.
Project > Properties > (Java/PHP/etc) Build Path
Expand Source folder node
Select "Excluded"
Hit "Edit"
Add exclusion pattern: "**/*.swp"
Or
Edit .classpath/.buildpath
Add attribute to src classpathentry/buildpathentry
excluding="**/*.swp"
You can use '|' to delineate multiple entries
excluding="**/*.swp|**/*.tmp"
}}}
Licensing {{{
http://www.fsf.org/licensing/licenses/ (lists compatible, not-compatible licenses)
http://www.eclipse.org/legal/eplfaq.php
http://www.fsf.org/blogs/licensing/using-the-gpl-for-eclipse-plug-ins
- GPLv3 and Apache are one way compatible (gpl code can link to apache code).
- GPL and EPL are not compatible
- But as copyright holder I can provide permission to link to eclipse:
http://www.fsf.org/licensing/licenses/gpl-faq.html#GPLIncompatibleLibs
- EPL also has a different definition of "derivative work":
http://www.eclipse.org/legal/eplfaq.php#DERIV (#25 - 27)
- A few of my files may be considered derivative works and will need to
be licensed as EPL accordingly.
}}}
Autostart {{{
Gnome (this may work for enlightenment 17 and xfce4 as well)
$ mkdir -p ~/.config/autostart
$ cp $ECLIPSE_HOME/plugins/org.eclim_<version>/bin/native/linux/eclimd.desktop ~/.config/autostart
KDE
$ mkdir -p ~/.kde/Autostart
$ cp $ECLIPSE_HOME/plugins/org.eclim_<version>/bin/native/linux/eclimd ~/.kde/Autostart
Others
$ vim ~/.xinitrc
/usr/local/java/eclipse/eclimd -b
}}}
Linux distro eclim dependency packages {{{
Fedora
$ yum install vim eclipse-platform
# for building eclim:
$ yum groupinstall "Development Tools"
$ yum install ant
Ubuntu
# Note: installing eclipse-platform is not enough
$ apt-get install vim eclipse
OSX
$ port install vim +huge
$ port install ctags
}}}
Misc {{{
Eclipse Color Themes:
http://www.eclipsecolorthemes.org/
Sourceforge shell access:
ssh -t USER,[email protected] create
Git repos for vim:
http://repo.or.cz/w/vim_mainline.git
Official hg repos for vim:
https://vim.googlecode.com/hg/
Building vim:
$ hg clone https://vim.googlecode.com/hg/ vim
$ cd vim/src
# to clean out any previous configure cache, etc.
$ make distclean
$ ./configure --with-features=huge --prefix=$HOME
$ make install
Build vim on windows w/ cygwin
$ cd vim/src
$ make -f Make_cyg.mak gvim.exe PYTHON=C:/Python26 PYTHON_VER=26
$ make -f Make_cyg.mak vim.exe GUI=no PYTHON=C:/Python26 PYTHON_VER=26
Building macvim on osx
http://code.google.com/p/macvim/wiki/Building
$ git clone git://repo.or.cz/MacVim.git macvim
$ cd macvim/src
$ ./configure --with-features=huge --enable-pythoninterp --with-macsdk=10.6
$ make
$ open MacVim/build/Release/MacVim.app/
JRuby nailgun source:
https://github.com/jruby/jruby/tree/master/tool/nailgun
}}}
Vim Patches of note {{{
- Patch 7.3.468: QuickFixCmdPre/Post now fired for cfile, lfile, etc.
- Patch 7.3.598: new autocmd: CompleteDone
}}}
Gant {{{
https://github.com/Gant/Gant
$ ./gradlew :gant:test
$ ./gradlew :gant:jar
}}}
}}}
// vim:fdm=marker:tw=0