use of org.jboss.tools.openshift.core.connection.IOpenShiftConnection in project jbosstools-openshift by jbosstools.
the class ConnectionWrapper method refresh.
void refresh(ProjectWrapper projectWrapper) {
resourceCache.flush(projectWrapper.getWrapped().getNamespaceName());
IProject project = projectWrapper.getWrapped();
IOpenShiftConnection connection = projectWrapper.getParent().getWrapped();
WatchManager.getInstance().stopWatch(project, connection);
WatchManager.getInstance().startWatch(project, connection);
Collection<IResource> resources = new HashSet<>();
for (String kind : RESOURCE_KINDS) {
resources.addAll(getWrapped().getResources(kind, project.getNamespaceName()));
}
resources.forEach(r -> resourceCache.add(r));
projectWrapper.updateWithResources(resources);
}
use of org.jboss.tools.openshift.core.connection.IOpenShiftConnection in project jbosstools-openshift by jbosstools.
the class RefreshTest method setUp.
@Before
public void setUp() {
registry = new ConnectionsRegistry();
model = new OpenshiftUIModelTestable(registry);
listener = mock(IElementListener.class);
model.addListener(listener);
IOpenShiftConnection connection = mock(IOpenShiftConnection.class);
registry.add(connection);
}
Aggregations