Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 472049

Summary: RAP IServiceLocator API different than Eclipse Mars RCP
Product: [RT] RAP Reporter: Flavio Donze <flavio.donze>
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mknauer
Version: 3.0   
Target Milestone: 3.1 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Flavio Donze CLA 2015-07-07 08:07:09 EDT
After updating our server (using RAP) and client (using RCP) to Eclipse Mars I noticed that the RAP API differs from the RCP.

org.eclipse.ui.services.IServiceLocator

RCP:
public <T> T getService(Class<T> api);

RAP:
public Object getService(Class api);

On the RCP side I now have warnings which complain about unnecessary casts, can't resolve these warnings since then I would get compile errors on the RAP side.
Comment 1 Ivan Furnadjiev CLA 2015-07-08 03:50:50 EDT
The RAP port of Eclipse Workbench is still based on 3.7. This is the reason for code differences. Could you create a change in RAP Gerrit [1] that addresses this issue?

[1] https://wiki.eclipse.org/RAP/Git
Comment 2 Flavio Donze CLA 2015-07-08 05:41:17 EDT
I'm no RAP committer, so I can't push to Gerrit right?

If I can push anyway, what branch should I use?
Comment 3 Markus Knauer CLA 2015-07-08 09:21:19 EDT
(In reply to Flavio Donze from comment #2)
> I'm no RAP committer, so I can't push to Gerrit right?

Fortunately not right! You've got an eclipse.org account (your Bugzilla account), and you already 'signed' the CLA. You only need to add an SSH public key to your Gerrit account (https://git.eclipse.org/r/#/settings/ssh-keys) and make sure that your Git settings are correct. You don't need to be a committer on the project to contribute via Gerrit.

> If I can push anyway, what branch should I use?

To 'refs/for/master' which is (by Gerrit conventions) the branch for changes that will be pushed to 'master' after a review by the committers.
Comment 4 Flavio Donze CLA 2015-07-09 08:29:20 EDT
Well I pushed to Gerrit, it was only the class "IServiceLocator". 
I could also resolve all the new "Unnecessary cast" warnings if that is wanted?
Comment 5 Ivan Furnadjiev CLA 2015-07-23 06:59:01 EDT
Fixed with change https://git.eclipse.org/r/#/c/51648/