All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.tidalwave.hierarchy.explorer.impl.role.DefaultHViewManagerDataLoader Maven / Gradle / Ivy

There is a newer version: 1.0.25
Show newest version
/***********************************************************************************************************************
 *
 * OpenBlueSky - NetBeans Platform Enhancements
 * ============================================
 *
 * Copyright (C) 2007-2010 by Tidalwave s.a.s.
 * Project home page: http://openbluesky.kenai.com
 *
 ***********************************************************************************************************************
 *
 * Licensed 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.
 *
 ***********************************************************************************************************************
 *
 * $Id: DefaultHViewManagerDataLoader.java,v f17245cd751a 2010/03/14 17:14:28 fabrizio $
 *
 **********************************************************************************************************************/
package it.tidalwave.hierarchy.explorer.impl.role;

import javax.annotation.Nonnull;
import javax.annotation.concurrent.ThreadSafe;
import org.openide.nodes.Node;
import it.tidalwave.netbeans.util.Locator;
import it.tidalwave.util.NotFoundException;
import it.tidalwave.netbeans.nodes.role.NodeDataLoader;
import it.tidalwave.hierarchy.HViewManager;
import static it.tidalwave.netbeans.nodes.role.RootNodeProvider.RootNodeProvider;
import static it.tidalwave.hierarchy.HViewManager.HViewManager;

/***********************************************************************************************************************
 *
 * @stereotype Role
 *
 * @author  Fabrizio Giudici
 * @version $Id: DefaultHViewManagerDataLoader.java,v f17245cd751a 2010/03/14 17:14:28 fabrizio $
 *
 **********************************************************************************************************************/
@ThreadSafe
public final class DefaultHViewManagerDataLoader extends NodeDataLoader
  {
    @Override @Nonnull
    protected Node getRootNode()
      throws NotFoundException
      {
        final HViewManager hViewManager = Locator.find(HViewManager);
        return hViewManager.as(RootNodeProvider).getRootNode();
      }
  }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy