Package de.sebastianbenz.task.ui.scoping

Source Code of de.sebastianbenz.task.ui.scoping.TaskGlobalScopeProvider

/*******************************************************************************
* Copyright (c) 2011 Sebastian Benz.
* 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:
*     Sebastian Benz - initial API and implementation
******************************************************************************/
package de.sebastianbenz.task.ui.scoping;

import java.util.Collections;
import java.util.List;

import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.xtext.resource.IContainer;
import org.eclipse.xtext.resource.IResourceDescriptions;
import org.eclipse.xtext.resource.impl.ResourceDescriptionsBasedContainer;
import org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider;

import com.google.inject.Inject;

public class TaskGlobalScopeProvider extends DefaultGlobalScopeProvider {

  @Inject
  private IResourceDescriptions resourceDescriptions;
 
  @Override
  protected List<IContainer> getVisibleContainers(Resource resource) {
    return Collections.<IContainer>singletonList(new ResourceDescriptionsBasedContainer(resourceDescriptions));
  }
}
TOP

Related Classes of de.sebastianbenz.task.ui.scoping.TaskGlobalScopeProvider

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.