Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » using of own templates
using of own templates [message #83434] Mon, 14 March 2005 17:28 Go to next message
Elena Demeter is currently offline Elena DemeterFriend
Messages: 152
Registered: July 2009
Senior Member
Hello,

I would like that VE uses another template for the components.
------------------------------------------------------------ ---------------
- I changed DefaultMethodTemplate.javajet to MyMethodTemplate.javajet and
changed a little bit the code.

- created new class MyMethodTextGenerator.java that is similar to
DefaultMethodTextGenerator.java, only the name of template is
"MyMethodTemplate".

- in the ..ROOT...override I changed
" org.eclipse.ve.java.core/org.eclipse.ve.internal.java.codege n.util.DefaultMethodTextGenerator "
to "java:/MyDecoder.MyMethodTextGenerator"

But I think that the VE cannot find the class MyMethodTextGenerator.
Because it doesn't generate any text.
------------------------------------------------------------ ---------------
1. How is it right to write the path for own plugin?

2. I also saw that it is possible to write own .override. How can I "say
to the VE" that he has to take my override-files?

Thank you very much
Elena
Re: using of own templates [message #83493 is a reply to message #83434] Mon, 14 March 2005 19:41 Go to previous messageGo to next message
Srimanth  is currently offline Srimanth Friend
Messages: 225
Registered: July 2009
Senior Member
Hi Elena,
Just change that line in the ..ROOT...override to read like:

methodGenerator="my.plugin/my.plugin.package.MyDefaultMethodTextGenerator "/>

And MyDefaultMethodTextGenerator should be picked up.
(Clearing the configuration might help if the above didnt make any
difference)

Regards,
Sri.

Elena wrote:
> Hello,
>
> I would like that VE uses another template for the components.
> ------------------------------------------------------------ ---------------
> - I changed DefaultMethodTemplate.javajet to MyMethodTemplate.javajet
> and changed a little bit the code.
>
> - created new class MyMethodTextGenerator.java that is similar to
> DefaultMethodTextGenerator.java, only the name of template is
> "MyMethodTemplate".
>
> - in the ..ROOT...override I changed
> " org.eclipse.ve.java.core/org.eclipse.ve.internal.java.codege n.util.DefaultMethodTextGenerator "
> to "java:/MyDecoder.MyMethodTextGenerator"
>
> But I think that the VE cannot find the class MyMethodTextGenerator.
> Because it doesn't generate any text.
> ------------------------------------------------------------ ---------------
> 1. How is it right to write the path for own plugin?
>
> 2. I also saw that it is possible to write own .override. How can I "say
> to the VE" that he has to take my override-files?
>
> Thank you very much
> Elena
>
Re: using of own templates [message #83621 is a reply to message #83493] Tue, 15 March 2005 09:15 Go to previous messageGo to next message
Elena Demeter is currently offline Elena DemeterFriend
Messages: 152
Registered: July 2009
Senior Member
Hello,

I changed it to

methodGenerator="MyDecoder/mydecoder.MyMethodTextGenerator"/ >

But it still does not insert any text. Although this time I just copied
DefaultMethodTextGenerator.java to MyMethodTextGenerator.java and only
changed the word "private" to "public" in template
"DefaultMethodTemplate.javajet".

Did I understand you right: MyDecoder is the name for plugin, mydecoder is
the name for package?

How can I clear the configuration? (I always started eclipse with the
option -clear)

Thanks
Elena


Sri Gunturi wrote:

> Hi Elena,
> Just change that line in the ..ROOT...override to read like:

> methodGenerator="my.plugin/my.plugin.package.MyDefaultMethodTextGenerator "/>

> And MyDefaultMethodTextGenerator should be picked up.
> (Clearing the configuration might help if the above didnt make any
> difference)

> Regards,
> Sri.

> Elena wrote:
>> Hello,
>>
>> I would like that VE uses another template for the components.
>> ------------------------------------------------------------ ---------------
>> - I changed DefaultMethodTemplate.javajet to MyMethodTemplate.javajet
>> and changed a little bit the code.
>>
>> - created new class MyMethodTextGenerator.java that is similar to
>> DefaultMethodTextGenerator.java, only the name of template is
>> "MyMethodTemplate".
>>
>> - in the ..ROOT...override I changed
>>
" org.eclipse.ve.java.core/org.eclipse.ve.internal.java.codege n.util.DefaultMethodTextGenerator "
>> to "java:/MyDecoder.MyMethodTextGenerator"
>>
>> But I think that the VE cannot find the class MyMethodTextGenerator.
>> Because it doesn't generate any text.
>> ------------------------------------------------------------ ---------------
>> 1. How is it right to write the path for own plugin?
>>
>> 2. I also saw that it is possible to write own .override. How can I "say
>> to the VE" that he has to take my override-files?
>>
>> Thank you very much
>> Elena
>>
Re: using of own templates [message #83664 is a reply to message #83434] Tue, 15 March 2005 14:15 Go to previous messageGo to next message
Gili Mendel is currently offline Gili MendelFriend
Messages: 338
Registered: July 2009
Senior Member
Are you dropping Swing or SWT components? The SWT plugin overrides the
method generator of widgets and below:
methodGenerator=" org.eclipse.ve.swt/org.eclipse.ve.internal.swt.codegen.SWTNo ReturnMethodTextGenerator "

Do you have any exceptions in the log?

put a breakpoint in BeanPartFactory.generateInitMethod() will give you
more information on what/why
Re: using of own templates [message #83680 is a reply to message #83621] Tue, 15 March 2005 14:36 Go to previous message
Srimanth  is currently offline Srimanth Friend
Messages: 225
Registered: July 2009
Senior Member
Hello,
Please make sure that all the static final variables are correctly
assigned to the appropriate plugin(BASE_PLUGIN), template
path(TEMPLATE_PATH)and javajet file name(METHOD_TEMPLATE_CLASS_NAME). Do
you find any exceptions in the logs?
Regards,
Sri.



Elena wrote:
> Hello,
>
> I changed it to
>
> methodGenerator="MyDecoder/mydecoder.MyMethodTextGenerator"/ >
>
> But it still does not insert any text. Although this time I just copied
> DefaultMethodTextGenerator.java to MyMethodTextGenerator.java and only
> changed the word "private" to "public" in template
> "DefaultMethodTemplate.javajet".
>
> Did I understand you right: MyDecoder is the name for plugin, mydecoder
> is the name for package?
>
> How can I clear the configuration? (I always started eclipse with the
> option -clear)
>
> Thanks
> Elena
>
>
> Sri Gunturi wrote:
>
>> Hi Elena,
>> Just change that line in the ..ROOT...override to read like:
>
>
>> methodGenerator="my.plugin/my.plugin.package.MyDefaultMethodTextGenerator "/>
>>
>
>
>> And MyDefaultMethodTextGenerator should be picked up.
>> (Clearing the configuration might help if the above didnt make any
>> difference)
>
>
>> Regards,
>> Sri.
>
>
>> Elena wrote:
>>
>>> Hello,
>>>
>>> I would like that VE uses another template for the components.
>>> ------------------------------------------------------------ ---------------
>>>
>>> - I changed DefaultMethodTemplate.javajet to MyMethodTemplate.javajet
>>> and changed a little bit the code.
>>>
>>> - created new class MyMethodTextGenerator.java that is similar to
>>> DefaultMethodTextGenerator.java, only the name of template is
>>> "MyMethodTemplate".
>>>
>>> - in the ..ROOT...override I changed
>
> " org.eclipse.ve.java.core/org.eclipse.ve.internal.java.codege n.util.DefaultMethodTextGenerator "
>
>
>>> to "java:/MyDecoder.MyMethodTextGenerator"
>>>
>>> But I think that the VE cannot find the class MyMethodTextGenerator.
>>> Because it doesn't generate any text.
>>> ------------------------------------------------------------ ---------------
>>>
>>> 1. How is it right to write the path for own plugin?
>>>
>>> 2. I also saw that it is possible to write own .override. How can I
>>> "say to the VE" that he has to take my override-files?
>>>
>>> Thank you very much
>>> Elena
>>>
>
>
Re: using of own templates [message #605858 is a reply to message #83434] Mon, 14 March 2005 19:41 Go to previous message
Srimanth  is currently offline Srimanth Friend
Messages: 225
Registered: July 2009
Senior Member
Hi Elena,
Just change that line in the ..ROOT...override to read like:

methodGenerator="my.plugin/my.plugin.package.MyDefaultMethodTextGenerator "/>

And MyDefaultMethodTextGenerator should be picked up.
(Clearing the configuration might help if the above didnt make any
difference)

Regards,
Sri.

Elena wrote:
> Hello,
>
> I would like that VE uses another template for the components.
> ------------------------------------------------------------ ---------------
> - I changed DefaultMethodTemplate.javajet to MyMethodTemplate.javajet
> and changed a little bit the code.
>
> - created new class MyMethodTextGenerator.java that is similar to
> DefaultMethodTextGenerator.java, only the name of template is
> "MyMethodTemplate".
>
> - in the ..ROOT...override I changed
> " org.eclipse.ve.java.core/org.eclipse.ve.internal.java.codege n.util.DefaultMethodTextGenerator "
> to "java:/MyDecoder.MyMethodTextGenerator"
>
> But I think that the VE cannot find the class MyMethodTextGenerator.
> Because it doesn't generate any text.
> ------------------------------------------------------------ ---------------
> 1. How is it right to write the path for own plugin?
>
> 2. I also saw that it is possible to write own .override. How can I "say
> to the VE" that he has to take my override-files?
>
> Thank you very much
> Elena
>
Re: using of own templates [message #605870 is a reply to message #83493] Tue, 15 March 2005 09:15 Go to previous message
Elena Demeter is currently offline Elena DemeterFriend
Messages: 152
Registered: July 2009
Senior Member
Hello,

I changed it to

methodGenerator="MyDecoder/mydecoder.MyMethodTextGenerator"/ >

But it still does not insert any text. Although this time I just copied
DefaultMethodTextGenerator.java to MyMethodTextGenerator.java and only
changed the word "private" to "public" in template
"DefaultMethodTemplate.javajet".

Did I understand you right: MyDecoder is the name for plugin, mydecoder is
the name for package?

How can I clear the configuration? (I always started eclipse with the
option -clear)

Thanks
Elena


Sri Gunturi wrote:

> Hi Elena,
> Just change that line in the ..ROOT...override to read like:

> methodGenerator="my.plugin/my.plugin.package.MyDefaultMethodTextGenerator "/>

> And MyDefaultMethodTextGenerator should be picked up.
> (Clearing the configuration might help if the above didnt make any
> difference)

> Regards,
> Sri.

> Elena wrote:
>> Hello,
>>
>> I would like that VE uses another template for the components.
>> ------------------------------------------------------------ ---------------
>> - I changed DefaultMethodTemplate.javajet to MyMethodTemplate.javajet
>> and changed a little bit the code.
>>
>> - created new class MyMethodTextGenerator.java that is similar to
>> DefaultMethodTextGenerator.java, only the name of template is
>> "MyMethodTemplate".
>>
>> - in the ..ROOT...override I changed
>>
" org.eclipse.ve.java.core/org.eclipse.ve.internal.java.codege n.util.DefaultMethodTextGenerator "
>> to "java:/MyDecoder.MyMethodTextGenerator"
>>
>> But I think that the VE cannot find the class MyMethodTextGenerator.
>> Because it doesn't generate any text.
>> ------------------------------------------------------------ ---------------
>> 1. How is it right to write the path for own plugin?
>>
>> 2. I also saw that it is possible to write own .override. How can I "say
>> to the VE" that he has to take my override-files?
>>
>> Thank you very much
>> Elena
>>
Re: using of own templates [message #605877 is a reply to message #83434] Tue, 15 March 2005 14:15 Go to previous message
Gili Mendel is currently offline Gili MendelFriend
Messages: 338
Registered: July 2009
Senior Member
Are you dropping Swing or SWT components? The SWT plugin overrides the
method generator of widgets and below:
methodGenerator=" org.eclipse.ve.swt/org.eclipse.ve.internal.swt.codegen.SWTNo ReturnMethodTextGenerator "

Do you have any exceptions in the log?

put a breakpoint in BeanPartFactory.generateInitMethod() will give you
more information on what/why
Re: using of own templates [message #605879 is a reply to message #83621] Tue, 15 March 2005 14:36 Go to previous message
Srimanth  is currently offline Srimanth Friend
Messages: 225
Registered: July 2009
Senior Member
Hello,
Please make sure that all the static final variables are correctly
assigned to the appropriate plugin(BASE_PLUGIN), template
path(TEMPLATE_PATH)and javajet file name(METHOD_TEMPLATE_CLASS_NAME). Do
you find any exceptions in the logs?
Regards,
Sri.



Elena wrote:
> Hello,
>
> I changed it to
>
> methodGenerator="MyDecoder/mydecoder.MyMethodTextGenerator"/ >
>
> But it still does not insert any text. Although this time I just copied
> DefaultMethodTextGenerator.java to MyMethodTextGenerator.java and only
> changed the word "private" to "public" in template
> "DefaultMethodTemplate.javajet".
>
> Did I understand you right: MyDecoder is the name for plugin, mydecoder
> is the name for package?
>
> How can I clear the configuration? (I always started eclipse with the
> option -clear)
>
> Thanks
> Elena
>
>
> Sri Gunturi wrote:
>
>> Hi Elena,
>> Just change that line in the ..ROOT...override to read like:
>
>
>> methodGenerator="my.plugin/my.plugin.package.MyDefaultMethodTextGenerator "/>
>>
>
>
>> And MyDefaultMethodTextGenerator should be picked up.
>> (Clearing the configuration might help if the above didnt make any
>> difference)
>
>
>> Regards,
>> Sri.
>
>
>> Elena wrote:
>>
>>> Hello,
>>>
>>> I would like that VE uses another template for the components.
>>> ------------------------------------------------------------ ---------------
>>>
>>> - I changed DefaultMethodTemplate.javajet to MyMethodTemplate.javajet
>>> and changed a little bit the code.
>>>
>>> - created new class MyMethodTextGenerator.java that is similar to
>>> DefaultMethodTextGenerator.java, only the name of template is
>>> "MyMethodTemplate".
>>>
>>> - in the ..ROOT...override I changed
>
> " org.eclipse.ve.java.core/org.eclipse.ve.internal.java.codege n.util.DefaultMethodTextGenerator "
>
>
>>> to "java:/MyDecoder.MyMethodTextGenerator"
>>>
>>> But I think that the VE cannot find the class MyMethodTextGenerator.
>>> Because it doesn't generate any text.
>>> ------------------------------------------------------------ ---------------
>>>
>>> 1. How is it right to write the path for own plugin?
>>>
>>> 2. I also saw that it is possible to write own .override. How can I
>>> "say to the VE" that he has to take my override-files?
>>>
>>> Thank you very much
>>> Elena
>>>
>
>
Previous Topic:specific scenario (1) for tutorial
Next Topic:VE & WST don't work together
Goto Forum:
  


Current Time: Fri Apr 26 21:47:13 GMT 2024

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

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

Back to the top