|
Re: Value returned by IConfigurationElement.getAttribute() was not translated [message #331075 is a reply to message #331072] |
Sat, 23 August 2008 06:40 |
Prakash G.R. Messages: 621 Registered: July 2009 |
Senior Member |
|
|
In the Schema of net.yau.test.extensionreg.test, the translatable should
be set to true for the name atribute
- Prakash
www.eclipse-tips.com
yau wrote:
> Hi!
>
> I'm using Eclipse 3.4. I have a plugin, it defines an extension, as below:
>
> <extension
> id=" net.yau.test.extensionreg.cosumer.net.yau.test.extensionreg. consumerID "
> point="net.yau.test.extensionreg">
> <net.yau.test.extensionreg.test
> class="net.yau.test.extensionreg.cosumer.TestObjImpl"
> id=" net.yau.test.extensionreg.cosumer.net.yau.test.extensionreg. consumerID "
> name="%consumerName">
> <description>
> The description
> </description>
> </net.yau.test.extensionreg.test>
> </extension>
>
> The attribute in the "name" attribute of the element
> "net.yau.test.extensionreg.test" are translated in plugin.properties.
> IDE also displays the correct translation in plugin.xml editor(in the
> Extensions page). So I think the translation in plugin.properties is OK.
>
> But in the application, when I do:
>
> ...
> IExtension[] exArr = ep.getExtensions();
>
> if (exArr.length > 0) {
> IExtension ex = exArr[0];
> IConfigurationElement[] elmts = ex.getConfigurationElements();
> if (elmts.length > 0) {
> IConfigurationElement elmt = elmts[0];
> return elmt.getAttribute("name");
> }
> }
>
>
> The return value is "%consumerName", not the value translated by
> plugin.properties.(Plugin developer guide said: Note that any translation
> specified in the plug-in manifest file is automatically applied. ).
>
> The fragment of my MANIFEST.MF of the extension point definition bundle:
> ===========================================
> Require-Bundle: org.eclipse.ui,
> org.eclipse.core.runtime,
> org.eclipse.update.configurator;bundle-version="3.2.200"
>
> ===========================================
>
> The fragment of my MANIFEST.MF of the extension definition bundle:
> ===========================================
> Require-Bundle: org.eclipse.ui,
> org.eclipse.core.runtime,
> net.yau.test.extensionreg.master;bundle-version="1.0.0"
> ===========================================
>
> Is the problem due to missing some bundle?
>
> Yau
>
>
|
|
|
Re: Value returned by IConfigurationElement.getAttribute() was not translated [message #331076 is a reply to message #331075] |
Sat, 23 August 2008 06:47 |
yau Messages: 14 Registered: July 2009 |
Junior Member |
|
|
I already do this:
==================================
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
==================================
"Prakash G.R." <grprakash@gmail.com>
??????:g8obc9$has$1@build.eclipse.org...
> In the Schema of net.yau.test.extensionreg.test, the translatable should
> be set to true for the name atribute
>
> - Prakash
>
> www.eclipse-tips.com
>
>
> yau wrote:
>> Hi!
>>
>> I'm using Eclipse 3.4. I have a plugin, it defines an extension, as
>> below:
>>
>> <extension
>>
>> id=" net.yau.test.extensionreg.cosumer.net.yau.test.extensionreg. consumerID "
>> point="net.yau.test.extensionreg">
>> <net.yau.test.extensionreg.test
>> class="net.yau.test.extensionreg.cosumer.TestObjImpl"
>>
>> id=" net.yau.test.extensionreg.cosumer.net.yau.test.extensionreg. consumerID "
>> name="%consumerName">
>> <description>
>> The description
>> </description>
>> </net.yau.test.extensionreg.test>
>> </extension>
>>
>> The attribute in the "name" attribute of the element
>> "net.yau.test.extensionreg.test" are translated in plugin.properties.
>> IDE also displays the correct translation in plugin.xml editor(in the
>> Extensions page). So I think the translation in plugin.properties is OK.
>>
>> But in the application, when I do:
>>
>> ...
>> IExtension[] exArr = ep.getExtensions();
>>
>> if (exArr.length > 0) {
>> IExtension ex = exArr[0];
>> IConfigurationElement[] elmts = ex.getConfigurationElements();
>> if (elmts.length > 0) {
>> IConfigurationElement elmt = elmts[0];
>> return elmt.getAttribute("name");
>> }
>> }
>>
>>
>> The return value is "%consumerName", not the value translated by
>> plugin.properties.(Plugin developer guide said: Note that any translation
>> specified in the plug-in manifest file is automatically applied. ).
>>
>> The fragment of my MANIFEST.MF of the extension point definition bundle:
>> ===========================================
>> Require-Bundle: org.eclipse.ui,
>> org.eclipse.core.runtime,
>> org.eclipse.update.configurator;bundle-version="3.2.200"
>>
>> ===========================================
>>
>> The fragment of my MANIFEST.MF of the extension definition bundle:
>> ===========================================
>> Require-Bundle: org.eclipse.ui,
>> org.eclipse.core.runtime,
>> net.yau.test.extensionreg.master;bundle-version="1.0.0"
>> ===========================================
>>
>> Is the problem due to missing some bundle?
>>
>> Yau
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03255 seconds