blob: 8dccb10982e800bc466cbaa15f72fa73216ae8a2 [file] [log] [blame]
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
= Where is `TopManager`? I'm trying to do the examples from the O'Reilly book
:page-layout: wikidev
:page-tags: wiki, devfaq, needsreview
:jbake-status: published
:keywords: Apache NetBeans wiki DevFaqTopManager
:description: Apache NetBeans wiki DevFaqTopManager
:toc: left
:toc-title:
:page-syntax: true
:page-wikidevsection: _development_issues_module_basics_and_classpath_issues_and_information_about_rcpplatform_application_configuration
:page-position: 22
The O'Reilly book is old (written between 2001 and 2002) - the chapters on architectural background will still work, but many of the examples won't.
The generation of NB it was written for is from before Lookup (see xref:./DevFaqLookup.adoc[DevFaqLookup]) was in use. `TopManager` was a class with a bunch of static methods for getting service objects.
It is now gone.
For pretty much everything available via `TopManager`, simply take the class you were looking for and try `SomeClass.getDefault()` - that's typically the modern way to do this sort of thing. `TopManager` caused a tangle of interdependencies between different APIs that it was very desirable to remove.
If you were calling `TopManager.getDefault().getPlaces().nodes().projectDesktop()` in a NetBeans 3.x based application, there is no direct equivalent in NB 4.0 and later. Rather, there is a rich set of project-related APIs which can be used for various purposes. As a rule, there is no 1-to-1 conversion from the above idiom to NB 4.0+; the affected O'Reilly examples would need to be rewritten to make sense today.
Applies to: NetBeans 4.0+