How to get repository connection from RTC Eclipse client using java
Naveen Tyagi (197●78●152)
| asked Dec 31 '15, 10:44 p.m.
edited Jan 10 '16, 12:12 p.m. by Geoffrey Clemm (30.1k●3●30●35)
I want to get an rtc connection from Eclipse client that i need to use in (Eclipse)plugin. If you are already logged in to the rtc client then plugin will get the session from it and processed with further operation.
|
Accepted answer
Hi Naveen,
Your code is correct.
You seems to be doing the Debug/execution incorrectly.
Please check if you have added the following in dependency:
com.ibm.team.repository.common;bundle-version="1.4.0"
com.ibm.team.repository.client;bundle-version="1.3.0"
Then,
Please let me know if it helps.
Naveen Tyagi selected this answer as the correct answer
|
One other answer
I would guess you would start here in the plain java classes (which is what the Eclipse client plugin uses)
// check if TeamPlatform is running.. if TeamPlatform.isStarted() // decide what to do if not started (means no userid possible) // get the list of repositories defined for this runtime TeamPlatform.getTeamRepositoryService().getTeamRepositories() // loop thru the list of connections, ITeamRepository srcServer= one of the list of repositories // check if active if SrcServer.getState()==STATE_LOGGED_IN // get the userid used to logon srcServer.getUserID() (use the repository contributor manager to get the contributor for this userid., if not already stored in the LogInInfo2 object class, I didn't go that far) probably something in those classes that will do it for you. I found this all using Eclipse on a java source file with the dev libs setup.. ctrl-space or using . (dot) on a class object name.. Comments
Naveen Tyagi
commented Jan 04 '16, 1:09 a.m.
Hi sam,
Naveen Tyagi
commented Jan 04 '16, 1:15 a.m.
sam detweiler
commented Jan 04 '16, 7:46 a.m.
hm.. it looks good to me, and compares the same as Ralph's Blog entry.
Naveen Tyagi
commented Jan 08 '16, 2:27 a.m.
Sam,
| If you use debug, which statement is causing that?
sam detweiler
commented Jan 10 '16, 12:40 p.m.
this post seems like it is relevant
showing 5 of 6
show 1 more comments
|
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.