mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
[xbase] added support for IClassFileEditorInput
- Added support to load trace files for IClassFiles -> this fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=401527 Change-Id: I4dfb88fd8eeb937ddbad1469bd13a13d2224330c
This commit is contained in:
parent
94029a0173
commit
ce25ccc1e5
3 changed files with 11 additions and 5 deletions
|
@ -7,8 +7,11 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.xtext.generator.trace;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IStorage;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
|
@ -44,9 +47,12 @@ public interface ILocationInResource {
|
|||
@Nullable URI getEObjectURI();
|
||||
|
||||
/**
|
||||
* @return the storage handle for this location. Never <code>null</code>.
|
||||
* @return the storage handle for this location. This can be <code>null</code> if the trace comes from a JAR's
|
||||
* source attachment zip file.
|
||||
*/
|
||||
@NonNull IStorage getStorage();
|
||||
@Nullable IStorage getStorage();
|
||||
|
||||
@NonNull InputStream getContents() throws CoreException;
|
||||
|
||||
/**
|
||||
* @return the project for this location. Never <code>null</code>.
|
||||
|
|
|
@ -64,7 +64,7 @@ public interface ITrace {
|
|||
* Returns the storage that is associated with this trace.
|
||||
* @return the associated storage. Never <code>null</code>.
|
||||
*/
|
||||
IStorage getLocalStorage();
|
||||
// IStorage getLocalStorage();
|
||||
|
||||
// /**
|
||||
// * Returns all available inverse trace information.
|
||||
|
|
|
@ -20,7 +20,7 @@ import org.eclipse.jdt.annotation.Nullable;
|
|||
* @since 2.3
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public interface ITraceInformation {
|
||||
public interface ITraceForStorageProvider { // ITraceForStorageProvider // ITraceFor
|
||||
|
||||
/**
|
||||
* Returns the trace information to the sources that were used as input for the given derived resource.
|
||||
|
@ -38,7 +38,7 @@ public interface ITraceInformation {
|
|||
*/
|
||||
@Nullable ITrace getTraceToTarget(IStorage sourceResource);
|
||||
|
||||
class Null implements ITraceInformation {
|
||||
class Null implements ITraceForStorageProvider {
|
||||
|
||||
@Nullable
|
||||
public ITrace getTraceToSource(IStorage derivedResource) {
|
Loading…
Reference in a new issue