Skip to main content



      Home
Home » Newcomers » Newcomers » Developing plugin with feature adding code snippet in class on button click (Developing plugin with feature adding code snippet in class on button click )
Developing plugin with feature adding code snippet in class on button click [message #502093] Sat, 05 December 2009 11:46 Go to next message
Eclipse UserFriend
Hi Friends,

I want to create eclipse plugin with having feature as follows,

Button will be there in eclipse workbench, and when we create a new java class in project then when we click that button then some java code snippet(which we will define at back end) will be added at cursor's location in java class.

Please help me out resolving in this issue.

Thanks for your cooperation.

Thanks
Anubhav
Re: Developing plugin with feature adding code snippet in class on button click [message #502098 is a reply to message #502093] Sat, 05 December 2009 12:42 Go to previous messageGo to next message
Eclipse UserFriend
Anubhav wrote:
> Hi Friends,
>
> I want to create eclipse plugin with having feature as follows,
>
> Button will be there in eclipse workbench, and when we create a new java
> class in project then when we click that button then some java code
> snippet(which we will define at back end) will be added at cursor's
> location in java class.
>
> Please help me out resolving in this issue.
>
> Thanks for your cooperation.
>
> Thanks
> Anubhav
Have you look at Eclipse's Template feature. It allows you to define
code snippets that can then be accessed from the Content Assist list.
It isn't a one button solution, but it is quite powerful and accessible
out of the box.
Re: Developing plugin with feature adding code snippet in class on button click [message #502121 is a reply to message #502098] Sun, 06 December 2009 00:14 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your reverting back.

Will you please kindly tell me which eclipse
template/solution we can use for same?

Yours little guidance can me help much.

Thanks for your cooperation.

Re: Developing plugin with feature adding code snippet in class on button click [message #502125 is a reply to message #502121] Sun, 06 December 2009 02:16 Go to previous messageGo to next message
Eclipse UserFriend
Eclipse template feature is good way but we are required to develop eclipse plugin for same as we have some rich client call in that code snippet and we have to include required jars reffered by that code snippet at runtime in project's class path.

Do any one have some guidance or solution for same.?

Thanks for your cooperation.
Re: Developing plugin with feature adding code snippet in class on button click [message #502154 is a reply to message #502125] Sun, 06 December 2009 12:03 Go to previous message
Eclipse UserFriend
Anubhav wrote:
> Eclipse template feature is good way but we are required to develop
> eclipse plugin for same as we have some rich client call in that code
> snippet and we have to include required jars reffered by that code
> snippet at runtime in project's class path.
>
> Do any one have some guidance or solution for same.?
>
> Thanks for your cooperation.
Sounds similar to what the JUnit integration does. You might want to
take a look at the New JUnit Test Case dialog. It creates test cases
for a selected class. If the JUnit jar files aren't specified for the
project, it offers to add them.

Sorry I can't point you to the specific place where this occurs. My
guess would be that it is in either org.eclipse.jdt.junig or
org.eclipse.jdt.ui. It actually might have pieces in both plugins as
well as others associated with JDT and JUnit.
Previous Topic:authentication to LDAP from an SWT application
Next Topic:Getting the Workbenchpart for an icon on the toolbar
Goto Forum:
  


Current Time: Fri Nov 07 05:11:41 EST 2025

Powered by FUDForum. Page generated in 0.10915 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top