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();
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?
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?
>
> **********************************************