blob: fd0719b571175aa9a51b9898d175802bc60f2e36 [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.
//
= DevFaqTopManager
:jbake-type: wiki
:jbake-tags: wiki, devfaq, needsreview
:jbake-status: published
:keywords: Apache NetBeans wiki DevFaqTopManager
:description: Apache NetBeans wiki DevFaqTopManager
:toc: left
:toc-title:
:syntax: true
=== Where is `TopManager`? I'm trying to do the examples from the O'Reilly book
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 link:DevFaqLookup.asciidoc[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.
<hr/>
Applies to: NetBeans 4.0+
=== Apache Migration Information
The content in this page was kindly donated by Oracle Corp. to the
Apache Software Foundation.
This page was exported from link:http://wiki.netbeans.org/DevFaqTopManager[http://wiki.netbeans.org/DevFaqTopManager] ,
that was last modified by NetBeans user Admin
on 2009-11-06T16:02:29Z.
*NOTE:* This document was automatically converted to the AsciiDoc format on 2018-02-07, and needs to be reviewed.