Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Mylyn-Integrators] - help with adding custom parts in task editor

Hi,

I want to add ReadOnly filds in Attribute Part in Task Editor UI, but i'm unable to do so.
Can I add ReadOnly filds in Attribute Part in Task Editor UI. How do I do this?

Thanks,
Pankaj

On Wed, Apr 1, 2009 at 2:32 PM, Peter Stibrany <peter@xxxxxxxxxx> wrote:
Hello,

you need to override createPartDescriptors method of
AbstractTaskEditorPage, and add descriptor for your custom editor
part. Your implementation should look similar to this:

@Override
protected Set<TaskEditorPartDescriptor> createPartDescriptors() {
   Set<TaskEditorPartDescriptor> partDescriptors =
super.createPartDescriptors();

   TaskEditorPartDescriptor desc = new TaskEditorPartDescriptor(YOUR_PART_ID) {
       @Override
       public AbstractTaskEditorPart createPart() {
           return new YourTaskEditorPart();
       }
   };
   desc.setPath(PATH_COMMENTS);

   partDescriptors.add(desc);

   return partDescriptors;
}

Path specifies where in task editor your part will be places. Existing
paths (references from createParts() method of AbstractTaskEditorPage)
are PATH_HEADER, PATH_ATTRIBUTES, PATH_ATTACHMENTS, PATH_COMMENTS,
PATH_PLANNING, PATH_ACTIONS, PATH_PEOPLE.

To set your attributes as read only, simply set attribute metadata to
read only. See "Showing custom attributes via TaskEditorAttributePart"
section of http://wiki.eclipse.org/index.php/Mylyn/Integrator_Reference#Task_editor

Hope this helps,

-Peter Stibrany
www.foglyn.com

On Wed, Apr 1, 2009 at 10:29 AM, pankaj chaitram turkar
<pankaj.684@xxxxxxxxx> wrote:
>
> Hi,
>
> Apart form the existing standerd parts, I want to add few custom parts on
> the Task Editor page. How could I achieve this.
> Also I want the fields(Attributes) in the Attribute part as read only. Plz
> help me out in achieving this.
>
> Thanks,
> Pankaj Turkar
> _______________________________________________
> mylyn-integrators mailing list
> mylyn-integrators@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/mylyn-integrators
>
>
_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators



--
Panku

Back to the top