Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Access to Connection Profiles
Access to Connection Profiles [message #597371] Tue, 09 March 2010 09:48 Go to next message
John  is currently offline John Friend
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 #597379 is a reply to message #597371] Tue, 09 March 2010 15:34 Go to previous message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 500
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:Access to Connection Profiles
Next Topic:Postgres jdbc3 or jdbc4 driver support?
Goto Forum:
  


Current Time: Tue Mar 19 08:34:35 GMT 2024

Powered by FUDForum. Page generated in 0.03899 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top