Templates for class creation
reymalahay opened this issue · comments
Hi all,
This is more a set of a questions as opposed to an issue:
-
Will it be possible to elaborate more on the class creation section?
-
Will it be possible to reference UltiSnips snippets as templates?
Please advise.
Thanks in advance,
rey malahay
Hello.
Can you describe workflow of your request, how you think it should work?
hi there,
thank you for the response. by the way, vim-javacomplete2
is a great plugin.
it's not a workflow. basically, what i am asking is:
- In your documentation, there is a section titled 'Class creation' with a usage example that looks like this
template:[subdirectory]:/package.ClassName extends SuperClass implements Interface(String str, public Integer i):contructor(*):toString(1)
will it be possible if you can expand on how to use this feature with a sample? for example, if i want to create a class MySecretClass in package com.secret, what is the correct order of keystrokes? will it be possible to add more details to this section?
-
What does a typical
vim-javacomplete2
template look like? Will it be possible to provide a sample? -
There is a plugin called UltiSnips,
https://github.com/SirVer/ultisnips
, which developers use to create blocks of code that they use frequently, as opposed to writing everything from scratch. Will it be possible to use UltiSnips together withvim-javacomplete2
?
Please advise.
Thanks in advance,
rey malahay
Hello.
Can you describe workflow of your request, how you think it should work?
Here is quick example:
Also, you can specify path of the class, like so: new_package.TestClass. It will create new directory new_package
and put new class in it.
Templates are here: https://github.com/artur-shaik/vim-javacomplete2/tree/master/plugin/res
It is actually not templates, but methods that generates class structure.
And about UltiSnips, you can use it, and it works on itself. I don't know how we can integrate it with jc2.
This is awesome! Thank you very much, @artur-shaik !
Here is quick example:
Also, you can specify path of the class, like so: new_package.TestClass. It will create new directory
new_package
and put new class in it.Templates are here: https://github.com/artur-shaik/vim-javacomplete2/tree/master/plugin/res
It is actually not templates, but methods that generates class structure.
No worries. I'll figure it out. If i find a plausible use case, i will open an issue and put forward a proposal.
And about UltiSnips, you can use it, and it works on itself. I don't know how we can integrate it with jc2.
You are welcome!