Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Access to Connection Profiles(Issue attempting to retrieve the list of existing Connection Profiles)
Access to Connection Profiles [message #519540] Tue, 09 March 2010 04:48 Go to next message
John  is currently offline John
Messages: 10
Registered: August 2009
Junior Member
Hi, In my plugin I need to access the database Connection Profiles and am trying to support 2 different versions of Eclipse.

***********************************************
Eclipse Platform V3.3.101.v200908310900
Datatools Platform Connectivity plug-in V1.1.2.v200905190126

There is no problem in this version.

In this version of Eclipse the profile information is stored in an encrypted XML file at
\.metadata\.plugins\org.eclipse.datatools.connectivity\Serve rProfiles.dat

and it can be accessed using
org.eclipse.datatools.connectivity.ProfileManager.getInstanc e().getProfiles();

**********************************************
Eclipse Platform V3.2.2.r322_v20070117b
Datatools Platform Connectivity plug-in V0.9.1.20060831

In this version of Eclipse the profile information is stored in a properties file at
\.metadata\.plugins\org.eclipse.wst.rdb.core\connection\<Connection Profile name>\connection.info

The org.eclipse.datatools.connectivity.ProfileManager.getInstanc e().getProfiles(); returns an empty list, it seems because it is looking for
the ServerProfiles.dat file which does not exist in this version!!

The only way I can get access is using
org.eclipse.wst.rdb.internal.core.RDBCorePlugin.getDefault() .getConnectionManager().getAllNamedConnectionInfo();

However the compiler does warn with this message :
"Discouraged access: The type RDBCorePlugin is not accessible due to restriction on required library \plugins\org.eclipse.wst.rdb.core_1.1.132.v200806270335.jar"

What is the preferred way in this version to get access to the Connection Profiles?

**********************************************
Re: Access to Connection Profiles [message #519660 is a reply to message #519540] Tue, 09 March 2010 05:44 Go to previous message
Brian Fitzpatrick is currently offline Brian Fitzpatrick
Messages: 495
Registered: July 2009
Senior Member
Wow. I don't honestly think that it's possible to support both of those
versions.

The issue is that version 0.9.1 of DTP was pretty much early or
pre-release code just to kick things off and we stabilized code from 1.0
on.

You might be able to get around the issue by distributing the version of
DTP that went with Eclipse 3.3 and see if it runs in 3.2, but beyond
that I don't know what to suggest.

--Fitz

John wrote:
> Hi, In my plugin I need to access the database Connection Profiles and
> am trying to support 2 different versions of Eclipse.
>
> ***********************************************
> Eclipse Platform V3.3.101.v200908310900
> Datatools Platform Connectivity plug-in V1.1.2.v200905190126
>
> There is no problem in this version.
>
> In this version of Eclipse the profile information is stored in an
> encrypted XML file at
> \.metadata\.plugins\org.eclipse.datatools.connectivity\Serve rProfiles.dat
>
> and it can be accessed using
> org.eclipse.datatools.connectivity.ProfileManager.getInstanc
> e().getProfiles();
>
> **********************************************
> Eclipse Platform V3.2.2.r322_v20070117b
> Datatools Platform Connectivity plug-in V0.9.1.20060831
> In this version of Eclipse the profile information is stored in a
> properties file at
> \.metadata\.plugins\org.eclipse.wst.rdb.core\connection\<Connection
> Profile name>\connection.info
>
> The org.eclipse.datatools.connectivity.ProfileManager.getInstanc
> e().getProfiles(); returns an empty list, it seems because it is looking
> for the ServerProfiles.dat file which does not exist in this version!!
>
> The only way I can get access is using
> org.eclipse.wst.rdb.internal.core.RDBCorePlugin.getDefault()
> .getConnectionManager().getAllNamedConnectionInfo();
> However the compiler does warn with this message : "Discouraged access:
> The type RDBCorePlugin is not accessible due to restriction on required
> library \plugins\org.eclipse.wst.rdb.core_1.1.132.v200806270335.jar"
> What is the preferred way in this version to get access to the
> Connection Profiles?
>
> **********************************************
Previous Topic:should this be raised as a BUG? - problem with case sensitivity when trying to run stored procs
Next Topic:Access to Connection Profiles
Goto Forum:
  


Current Time: Sat Aug 30 12:32:15 EDT 2014

Powered by FUDForum. Page generated in 0.10676 seconds