Thomas Mortagne wrote:
> On Thu, Nov 5, 2009 at 22:46, Thomas Mortagne <[email protected]> 
> wrote:
>> On Thu, Nov 5, 2009 at 21:32, Marius Dumitru Florea
>> <[email protected]> wrote:
>>> Hi Thomas,
>>>
>>> tmortagne (SVN) wrote:
>>>> Author: tmortagne
>>>> Date: 2009-11-05 19:21:06 +0100 (Thu, 05 Nov 2009)
>>>> New Revision: 24884
>>>>
>>>> Modified:
>>>>    
>>>> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/client/plugin/macro/ParameterDescriptor.java
>>>>    
>>>> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/server/plugin/macro/XWikiMacroService.java
>>>> Log:
>>>> XWIKI-4556: Modify ParameterDescriptor/PropertyDescriptor to support 
>>>> id/name
>>>> * add display name support to GWT ParameterDescriptor
>>>>
>>>> Modified: 
>>>> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/client/plugin/macro/ParameterDescriptor.java
>>>> ===================================================================
>>>> --- 
>>>> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/client/plugin/macro/ParameterDescriptor.java
>>>>        2009-11-05 18:14:46 UTC (rev 24883)
>>>> +++ 
>>>> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/client/plugin/macro/ParameterDescriptor.java
>>>>        2009-11-05 18:21:06 UTC (rev 24884)
>>>> @@ -35,6 +35,12 @@
>>>>      private String id;
>>>>
>>>>      /**
>>>> +     * @see #getName()
>>>> +     * @since 2.1M1
>>>> +     */
>>>> +    private String name;
>>>> +
>>>> +    /**
>>>>       * @see #getDescription()
>>>>       */
>>>>      private String description;
>>>> @@ -75,6 +81,26 @@
>>>>      }
>>>>
>>>>      /**
>>>> +     * @return the display name of this parameter
>>>> +     * @since 2.1M1
>>>> +     */
>>>> +    public String getName()
>>>> +    {
>>>> +        return name;
>>>> +    }
>>>> +
>>>> +    /**
>>>> +     * Sets the display name of this parameter.
>>>> +     *
>>>> +     * @param id the display name of the parameter
>>>> +     * @since 2.1M1
>>>> +     */
>>>> +    public void setName(String name)
>>>> +    {
>>>> +        this.name = name;
>>>> +    }
>>>> +
>>>> +    /**
>>>>       * @return the parameter description
>>>>       */
>>>>      public String getDescription()
>>>>
>>>> Modified: 
>>>> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/server/plugin/macro/XWikiMacroService.java
>>>> ===================================================================
>>>> --- 
>>>> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/server/plugin/macro/XWikiMacroService.java
>>>>  2009-11-05 18:14:46 UTC (rev 24883)
>>>> +++ 
>>>> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/server/plugin/macro/XWikiMacroService.java
>>>>  2009-11-05 18:21:06 UTC (rev 24884)
>>>> @@ -87,6 +87,8 @@
>>>>              if (descriptor.getContentDescriptor() != null) {
>>>>                  contentDescriptor = new ParameterDescriptor();
>>>>                  contentDescriptor.setId("content");
>>>> +                // TODO: internationalize content display name
>>>> +                contentDescriptor.setName("content");
>>> This should cause a Checkstyle violation. Anyway, what I wanted to ask
>> Yes sorry i will fix it.
> 

> Note that i built the project to check before commit and i did not get
> any failure so maybe there is something wrong in pom file...

strange.. the build failed on my laptop after I updated the sources.

Marius

> 
>>> is how do we proper internationalize a component?
>> When localization component will be finished (like we will need
>> localization component to internationnalize description, display name,
>> etc...). I put a TODO to not forget this one.
>>
>>> Thanks,
>>> Marius
>>>
>>>>                  
>>>> contentDescriptor.setDescription(descriptor.getContentDescriptor().getDescription());
>>>>                  // Just a hack to distinguish between regular strings and 
>>>> large strings.
>>>>                  contentDescriptor.setType(StringBuffer.class.getName());
>>>> @@ -125,6 +127,7 @@
>>>>      {
>>>>          ParameterDescriptor result = new ParameterDescriptor();
>>>>          result.setId(descriptor.getId());
>>>> +        result.setName(descriptor.getName());
>>>>          result.setDescription(descriptor.getDescription());
>>>>          result.setType(getMacroParameterType(descriptor.getType()));
>>>>          Object defaultValue = descriptor.getDefaultValue();
>>>>
>>>> _______________________________________________
>>>> notifications mailing list
>>>> [email protected]
>>>> http://lists.xwiki.org/mailman/listinfo/notifications
>>> _______________________________________________
>>> devs mailing list
>>> [email protected]
>>> http://lists.xwiki.org/mailman/listinfo/devs
>>>
>>
>>
>> --
>> Thomas Mortagne
>>
> 
> 
> 
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to