How do I hide the select software site portion of the UI on the Eclipse Install New Software dialog in my RCP application?

StackOverflow https://stackoverflow.com/questions/14268635

  •  14-01-2022
  •  | 
  •  

Question

I found documentation that states I can hide some of the UI elements in the Install New Software dialog in an Eclipse RCP application.

It's all described here.

I want my RCP application (based on Eclipse 3.7) to hide the available software sites just like the RCP Mail example app does, so I've implemented my RCP application using this example. But, it's not working.

I've even gone so far as to import the RCP Mail project into my Eclipse IDE and launch it and debug it to see what it's doing. The RCP Mail project works like a charm when I run it in my IDE. It hides the UI just like I want my RCP app to do.

The main difference I've found so far is this.

When I run my application and try to use this code to get the Policy...

ProvisioningUI.getDefaultUI().getPolicy()

I get a different Policy then the one I registered with this code...

policy = new RestrictedP2UIPolicy();
policyRegistration = context.registerService(Policy.class.getName(), policy, null);

My ResrictedP2UIPolicy class is the same thing as the CloudPolicy class in the RCP Mail example application.

The Policy I get back at runtime is an implementation class called SDKPolicy.

Does anyone have any ideas why I'm getting this other Policy instead of the one I'm trying to register?

Was it helpful?

Solution

The SDK policy is coming from the p2.ui.sdk bundle. In an RCP application you shouldn't use this bundle as it provides the same p2 experience as the Eclipse SDK.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top