Skip to main content
summaryrefslogtreecommitdiffstats
blob: 3e7baf5551c193e9c1e6dd0e22df44e952283b1d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * Copyright (c) 2009, 2011, 2012 Eike Stepper (Berlin, Germany) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Victor Roldan Betancort - initial API and implementation
 *    Eike Stepper - maintenance
 */
package org.eclipse.emf.cdo.view;

import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.om.OMPlatform;

/**
 * Base class for <code>ManagedContainer</code> based <code>CDOViewProvider</code>
 * 
 * @author Victor Roldan Betancort
 * @since 2.0
 * @apiviz.exclude
 */
public abstract class ManagedContainerViewProvider extends AbstractCDOViewProvider
{
  private IManagedContainer container;

  public ManagedContainerViewProvider(IManagedContainer container, String regex, int priority)
  {
    super(regex, priority);
    this.container = container;
  }

  protected IManagedContainer getContainer()
  {
    return container;
  }

  @Override
  public int getPriority()
  {
    if (!OMPlatform.INSTANCE.isOSGiRunning())
    {
      return Integer.MIN_VALUE;
    }

    return super.getPriority();
  }
}

Back to the top