J Smith
J Smith

Reputation: 2405

what are the implications of referencing (org.eclipse.ui.internal) types defined inside jar files with "Discouraged Access" rules?

When I try to programmatically display an html file on a web browser within eclipse by opening the IViewPart with id = rg.eclipse.ui.internal.browser.WebBrowserView.WEB_BROWSER_VIEW_ID, eclipse displays a "discouraged access" marker on my code.

Discouraged access: The type WebBrowserView is not accessible due to restriction on required library C:\eclipse\plugins\org.eclipse.ui.browser_3.4.2.v20130123-162658.jar

The code still compiles and the plugin runs properly, but I need to know what are the implications of referencing types whose access is discouraged.

By using those types, am I diminishing the number of eclipse clients on which my plugin can run properly? Or am I just running the risk that at some point in the future my code will break?

Upvotes: 1

Views: 112

Answers (1)

morgano
morgano

Reputation: 17422

Some things I could think of:

  • your code possibly would break if that library gets updated
  • the library is meant to be used by internal eclipse process, not for public usage
  • the license of the component doesn't allow you to "redistribute" it

Upvotes: 2

Related Questions