It's all about the answers!

Ask a question

Add button to work item view


Simon Fisher (1631710) | asked Nov 05 '08, 6:22 a.m.
JAZZ DEVELOPER
Hi, I'd like to add a button to the work item view, which will duplicate that work item and show the duplicate to the user. I'm comfortable with the duplication process, I just need to know how (which classes etc) to add a button to the UI, preferable in the row of buttons near 'Save' in the top right hand corner of a Work Item's view.

Also, is there an online resource detailing the different classes involved in developing extensions for the RTC UI?

Thanks,

Simon

3 answers



permanent link
Marcel Bihr, Jazz Work Item team (1.4k) | answered Nov 05 '08, 9:59 a.m.
JAZZ DEVELOPER
Hi
The work item editor is not extensible in that place. The code involved is com.ibm.team.workitem.ide.ui.internal.editor.part.TitlePart .

Links about extending RTC:
- https://jazz.net/wiki/bin/view/Main/RtcSdk
- https://jazz.net/wiki/bin/view/Main/JazzLabs

For the work item editor also:
- https://jazz.net/wiki/bin/view/Main/ContributingAttributePresentations

Regards

Marcel
Jazz Work Item team

permanent link
Simon Fisher (1631710) | answered Nov 05 '08, 12:47 p.m.
JAZZ DEVELOPER
package com.ibm.team.workitem.sars.ui;


import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.resource.LocalResourceManager;
import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.FontMetrics;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;

import com.ibm.team.jface.JazzResources;
import com.ibm.team.repository.common.util.NLS;
import com.ibm.team.workitem.client.IWorkItemListener;
import com.ibm.team.workitem.client.WorkItemChangeEvent;
import com.ibm.team.workitem.client.WorkItemWorkingCopy;
import com.ibm.team.workitem.client.internal.WorkItemWorkingCopyImpl;
import com.ibm.team.workitem.client.internal.util.ResolvedWorkItem;
import com.ibm.team.workitem.common.model.IAttribute;
import com.ibm.team.workitem.ide.ui.internal.ImagePool;
import com.ibm.team.workitem.ide.ui.internal.editor.WorkItemEditorInput;
import com.ibm.team.workitem.ide.ui.internal.editor.WorkItemEditorInputFuture;
import com.ibm.team.workitem.ide.ui.internal.editor.WorkItemEditorToolkit;
import com.ibm.team.workitem.ide.ui.internal.editor.WorkItemUIWorkingCopy;
import com.ibm.team.workitem.rcp.ui.IWorkItemUIWorkingCopy;
import com.ibm.team.workitem.rcp.ui.UIWorkItemListener;

import com.ibm.team.workitem.ide.ui.internal.editor.presentations.PresentationPart;

public class CreateSARPresentationPart extends PresentationPart {

}


I created this class in my plugin package, but the IDE is giving the following errors:

1. The hierachy of CreateSARPresentationPart is inconsistent

2. The type com.ibm.team.ui.editor.TeamFormPart cannot be resolved. It is indirectly referenced from required .class files

Any ideas as to what is causing this? I've tried to find the package referenced in the second error but to no avail.

permanent link
Marcel Bihr, Jazz Work Item team (1.4k) | answered Nov 06 '08, 3:43 a.m.
JAZZ DEVELOPER
Just guessing here:
For PresentationPart, you have com.ibm.team.workitem.ide.ui as plugin dependency. As PresentationPart uses TeamFormPart, you also need a dependency to com.ibm.team.jface, which is where TeamFormPart resides.

Regards

Marcel
Jazz Work Item team

Your answer


Register or to post your answer.