* @param browserConnection the browser connection
* @param monitor the progress monitor
*/
private static void openBrowserConnection( IBrowserConnection browserConnection, StudioProgressMonitor monitor )
{
IRootDSE rootDSE = browserConnection.getRootDSE();
InitializeAttributesJob.initializeAttributes( rootDSE, true, monitor );
// check schema reload
if ( rootDSE != null )
{
try
{
monitor.reportProgress( BrowserCoreMessages.model__loading_schema );
// check if schema is cached
Schema schema = browserConnection.getSchema();
if ( schema == Schema.DEFAULT_SCHEMA )
{
ReloadSchemasJob.reloadSchema( browserConnection, monitor );
}
else if ( rootDSE.getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_SUBSCHEMASUBENTRY ) != null )
{
// check if schema is up-to-date
SearchParameter sp = new SearchParameter();
sp.setSearchBase( new LdapDN( rootDSE.getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_SUBSCHEMASUBENTRY )
.getStringValue() ) );
sp.setFilter( Schema.SCHEMA_FILTER );
sp.setScope( SearchScope.OBJECT );
sp.setReturningAttributes( new String[]
{ IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP,