Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 9203ad8d5053754a9ae23323e02e7d372084e361 (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
package org.eclipse.emf.cdo.internal.ui.actions;

import org.eclipse.emf.cdo.CDOSession;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.IWorkbenchPage;

/**
 * @author Eike Stepper
 */
public abstract class AbstractOpenViewAction extends SessionAction
{
  private static final int NUMBER_OF_SYSTEM_PACKAGES = 2;

  public AbstractOpenViewAction(IWorkbenchPage page, String text, String toolTipText, ImageDescriptor image,
      CDOSession session)
  {
    super(page, text, toolTipText, image, session);
  }

  @Override
  public boolean isEnabled()
  {
    return getSession().getPackageRegistry().size() > NUMBER_OF_SYSTEM_PACKAGES && super.isEnabled();
  }
}

Back to the top