[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.webtools] Re: Problems using the org.eclipse.wst.ws.internal.explorer package

Hi Bernd,

The WSExplorerLauncherCommand is exported to other plugins so it can be used by other plugins within WTP, but it is not API. Specifically the manifest.mf of the web services explorer has this line: org.eclipse.wst.ws.internal.explorer;x-internal:=true which indicates that it's not API.

You're getting the discouraged access warnings to warn you that what you are using is not officially API. You can open an enhancement request in bugzilla asking for this to be made public API for the WTP web services team to consider.

That said, that class hasn't changed since 2005, and there are no plans to change it anytime soon. You should be safe to use it

I found this document on the eclipse wiki which might be useful for you: http://wiki.eclipse.org/WTP:_Consumer_Control_of_Access_Rules

Bernd W. wrote:
Hi,

in my own plugin I open a web services explorer window via the WSExplorerLauncherCommand class.
Therefore I added the org.eclipse.wst.ws.internal.explorer package to my plugin dependencies.
My code looks as follows:


WSExplorerLauncherCommand wsec = new WSExplorerLauncherCommand();
LaunchOption lo = new LaunchOption(LaunchOptions.WSDL_URL,location);
wsec.setLaunchOptions(new LaunchOption[]{lo});
wsec.execute();

Now the surprising fact: Everything works fine, so the reason why I'm bugging you is, that eclipse shows up warnings like "Discouraged access: The type WSExplorerLauncherCommand is not accessible due to restriction on required library..."
Since the org.eclipse.wst.ws.internal.explorer package exports those classes to ohter plugins, I don't understand these warnings.
Is there any better, any correct way to access the mentioned classes? (I dislike the solution with @SuppressWarnings("restriction"))


Thanks,
 Bernd