[xbase][navigation] First shot at seamless navigation from JDT UI controls to Xtend

see https://bugs.eclipse.org/bugs/show_bug.cgi?id=364281
This commit is contained in:
Sebastian Zarnekow 2012-01-05 17:57:35 +01:00
parent b350c5dfa8
commit 38d353ab6b
3 changed files with 40 additions and 2 deletions

View file

@ -126,7 +126,8 @@ Require-Bundle: org.eclipse.emf.ecore.xmi;visibility:=reexport,
org.eclipse.emf.common,
org.eclipse.xtend;bundle-version="1.1.0";resolution:=optional,
org.eclipse.xtend.typesystem.emf;bundle-version="1.0.1";resolution:=optional,
org.eclipse.core.runtime;bundle-version="3.5.0";resolution:=optional
org.eclipse.core.runtime;bundle-version="3.5.0";resolution:=optional,
org.eclipse.core.resources;bundle-version="3.5.0";resolution:=optional
Import-Package: org.apache.log4j;version="1.2.15"
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.xtext.internal.Activator

View file

@ -0,0 +1,33 @@
/*******************************************************************************
* Copyright (c) 2012 itemis AG (http://www.itemis.eu) 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
*******************************************************************************/
package org.eclipse.xtext.generator;
import java.util.List;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
/**
* @author Sebastian Zarnekow - Initial contribution and API
* @since 2.3
*/
public interface IDerivedResourceMarkers {
boolean installMarker(IFile file, String source) throws CoreException;
String getSource(IMarker marker);
IMarker findDerivedResourceMarker(IFile file, String source) throws CoreException;
IMarker[] findDerivedResourceMarkers(IFile file) throws CoreException;
List<IFile> findDerivedResources(IContainer container, String source) throws CoreException;
}

View file

@ -16,6 +16,7 @@ import org.eclipse.xtext.resource.IResourceServiceProvider;
import org.eclipse.xtext.validation.IResourceValidator;
import com.google.inject.Inject;
import com.google.inject.Injector;
/**
* An {@link IResourceServiceProvider} for non-Xtext resources.
@ -62,7 +63,10 @@ public class GenericResourceServiceProvider implements IResourceServiceProvider
return encodingProvider;
}
@Inject
private Injector injector;
public <T> T get(Class<T> t) {
return null;
return injector.getInstance(t);
}
}