It's all about the answers!

Ask a question

RTC 4.0.5 extension in a Deliver action

Fran Burgos (12311951) | asked Nov 07 '14, 3:28 a.m.
edited Nov 07 '14, 3:30 a.m.
I am programming an extension for analyzing files in an deliver changesets to a stream.
It is an Advisor because if the analyze fails then you can't deliver anything.

In addition I have read the articles:

But I have some doubts yet.
I have created a plugin project with extension point ID: and a java class, but I don't know how to get the path of the files included in the deliver for analyzing them:

import org.eclipse.core.runtime.IProgressMonitor;
public class CheckBadCharacterAdvisor extends AbstractService implements IOperationAdvisor{
    public void run(AdvisableOperation operation,
            IProcessConfigurationElement advisorConfiguration,
            IAdvisorInfoCollector collector, IProgressMonitor monitor)
            throws TeamRepositoryException {
        Object data = operation.getOperationData();
        // what else here?

How could I get the change sets included in the delivery?
What javadoc or steps do you follow for getting this information?

Accepted answer

permanent link
sam detweiler (12.5k6195201) | answered Nov 07 '14, 7:09 a.m.
I use this in my deliver participant

                    // get the deliver data
                    scmChange = (IScmDeltaSource) operation.getOperationData();                   
                    // loop thru the changes
                    for (IChangeHistoryAddOperandDelta delta : scmChange.getDeltas(IChangeHistoryAddOperandDelta.class))
Fran Burgos selected this answer as the correct answer

One other answer

permanent link
Ralph Schoon (62.9k33645) | answered Nov 07 '14, 4:10 a.m.
Here is some code that might help:

This also shows the API to get the path information from such items:

I know this has been discussed here in the forums and you could try to search for more information here.

Your answer

Register or to post your answer.