JET2 Custom tags problem [message #39104] |
Thu, 10 January 2008 09:14  |
Eclipse User |
|
|
|
Originally posted by: jahincapie.avansoft.com
Hi everybody,
I know that a lot of messages about this very same topic have been posted
already, and believe me when I tell you that I've been searching for a week
or more within these posts. I've follow all the steps described in some of
those posts to create a custom tag library; however it hasn't work at all.
Here is what I've done:
1. I have a JET plug-in project in which I created the custom tag:
- There is an extension in org.eclipse.jet.tagLibraries in which a
functionTag is defined
- This tagLibrary is added to the tagLibraries element in the
org.eclipse.jet.transform extension within the same plug-in, with the option
autoImport=true
- This plug-in wag exported as a .jar, so it can be used in another
plug-in extension.
2. There is another plug-in that has an extension in
org.eclipse.jet.deployedTransforms referencing the .jar generated for the
above mentioned plug-in
Now, the problem is that when I put the custom tag in the template... the
JET engine doesn't recognize it, so instead of getting what is coded in the
class implementing the tag, I get the tag definition in the generated file.
So, if anyone can give me some help, I would appreciate it a lot
Thanks.
Andr
|
|
|
|
|
|
|
Re: JET2 Custom tags problem [message #43828 is a reply to message #42739] |
Wed, 26 March 2008 10:43  |
Eclipse User |
|
|
|
Gary:
Can you setup a small test case and submit a bugzilla? That should help me
get to the bottom of this.
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=M2T& version=unspecified&component=Jet&rep_platform=PC&am p;op_sys=Windows%20XP&priority=P3&bug_severity=norma l&bug_status=NEW&bug_file_loc=http%3A%2F%2F&shor t_desc=&comment=&commentprivacy=0&keywords=& dependson=&blocked=&maketemplate=Remember%20values%2 0as%20bookmarkable%20template&form_name=enter_bug&as signed_to=m2t.jet-inbox%40eclipse.org
Paul
"Gary Pinkham" <gpinkham@kronos.com> wrote in message
news:fqmhku$2um$1@build.eclipse.org...
>I actually copied the importLibrary from the 1st Jet plugin (which does
>work (deployed as a plugin jar as well)...
>
> What I copied was this:
> <importLibrary id="com.foo.jet.common.taglib.control" usePrefix="custom"
> autoImport="true"/>
>
> As I mentioned it seems to work for the original Jet plugin but not the
> extension...
>
> Thanks!
> Gary
>
> "Paul Elder" <pelder@ca.ibm.com> wrote in message
> news:fqmh58$skb$1@build.eclipse.org...
>> Gary:
>>
>> JET may not be importing tag libraries the way you expect. In particular,
>> it DOES NOT used the standard plug-in dependency mechanism.
>>
>> Rather, you need to modify plugin.xml in MyJetTemplates to include a tag
>> library reference via an importLibrary element. You need to provide the
>> fully qualified tag library ID (plug-in ID + . + ID declared in the
>> tagLibraries extension point). Here's a typical example.
>>
>> <plugin>
>> <extension
>> id=""
>> name=""
>> point="org.eclipse.jet.transform">
>> <transform
>> startTemplate="templates/main.jet"
>>
>> templateLoaderClass="org.eclipse.jet.compiled._jet_transformation "
>> >
>> <description></description>
>> <tagLibraries>
>> <importLibrary id="org.eclipse.jet.controlTags" usePrefix="c"
>> autoImport="true"/>
>> <importLibrary id="org.eclipse.jet.javaTags" usePrefix="java"
>> autoImport="true"/>
>> <importLibrary id="org.eclipse.jet.formatTags" usePrefix="f"
>> autoImport="true"/>
>> <importLibrary id="org.eclipse.jet.workspaceTags"
>> usePrefix="ws" autoImport="false"/>
>>
>> <importLibrary id="your-tag-plug-in-id.your-taglib-id"
>> usePrefix="your-prefix" autoImport="true"/>
>>
>> </tagLibraries>
>> </transform>
>> </extension>
>> </plugin>
>>
>> Hope this helps.
>>
>> Paul
>>
>> "Gary Pinkham" <gpinkham@kronos.com> wrote in message
>> news:fqmcna$7js$1@build.eclipse.org...
>>> Paul,
>>>
>>>
>>>
>>> I seem to be having the same issue that Andres had.. But my Custom Tags
>>> are deployed as a plugin in the Eclipse plugins directory...
>>>
>>>
>>>
>>> What I have is MyCustomTags.jar and MyJetTemplates.jar plugins installed
>>> in Eclipse.
>>>
>>>
>>>
>>> In my workspace I have a project (MyJetExtensions) which extends the
>>> MyJetTemplates project. Both MyJetTemplates and MyJetExtensions both
>>> reference the Custom tags plugin. Running the MyjetTemplates on my
>>> model works fine. Running MyJetExtensions on the model produces the
>>> "errors"
>>>
>>>
>>>
>>> Any advice would be greatly appreciated..
>>>
>>> Gary
>>>
>>>
>>>
>>> "Paul Elder" <pelder@ca.ibm.com> wrote in message
>>> news:fmifnd$e0o$1@build.eclipse.org...
>>>> Andr
|
|
|
Powered by
FUDForum. Page generated in 0.10063 seconds