It's all about the answers!

Ask a question

how to change the component visibility using plain java api


Steffen Kriese (381921) | asked May 13 '14, 2:50 a.m.
Hello,

I create a component using the plain java api. The code looks like this:

IComponentHandle component = wm.createComponent("Component Name", TeamArea , monitor);
IComponentOpFactory componentOpFactory = workspace.componentOpFactory();
IComponentOp addComponentOp = componentOpFactory.addComponent(component, false);
workspace.applyComponentOperations(Collections.singletonList(addComponentOp), false, monitor);

The eclipse GUI allows me to change the visibility for my component. How can I change the component visibility in the plain java api?

Steffen 
 

Accepted answer


permanent link
Ralph Schoon (63.1k33645) | answered May 13 '14, 3:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Steffen, use

IWorkspaceManager wm = SCMPlatform.getWorkspaceManager(teamRepository);
wm.setComponentOwnerAndVisibility(comp, newOwner, newScope, progress)
Steffen Kriese selected this answer as the correct answer

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.