It's all about the answers!

Ask a question

operationData instanceof ???

DAVID GUO (35411) | asked May 13 '21, 10:24 a.m.
I have developed a pre-condition plug-in and checked it when delivered. The following code snippet is used:

public void run(AdvisableOperation operation,

IProcessConfigurationElement advisorConfiguration,
IAdvisorInfoCollector collector, IProgressMonitor monitor)
throws TeamRepositoryException {

Object operationData = operation.getOperationData();
        if (!(operationData instanceof DeliverOperationData))
   ... ...

Now I want to develop a "plug-in to check when the change set is modified", but I don’t know what the question mark should be, thank you

        if (!(operationData instanceof ???))

Thank you.

One answer

permanent link
David Lafreniere (4.8k7) | answered May 14 '21, 10:51 a.m.
edited May 14 '21, 10:53 a.m.

It depends on what you mean by 'change set is modified'.
There is no process enabled 'change set modified' operation (i.e. which gets fired when any change to an IChangeSet item happens).

You can register a precondition for:
-Check-in (when a change set is checked into a repository workspace)
-Deliver (when a change set is delivered to a stream)
-Save change set comment, or add links to a change set
-Component changes (changes to the component item itself, not the change sets or files in it)
-Stream changes (changes to the stream item itself, not the components or change sets or files in it)

What exactly are you trying to achieve?

To be clear though, DeliverOperationData is the ONLY type that will be available for the 'deliver' precondition.

Your answer

Register or to post your answer.