Commit 5ba183c9 authored by Dominique Marcadet's avatar Dominique Marcadet

add filename getter to NsdObject

parent 4c3ce267
......@@ -102,4 +102,9 @@ public interface NsdObject extends EObject {
* @generated
*/
boolean buildExplicitLinks( IRiseClipseConsole console, boolean forceUpdate );
/*
* @generated NOT
*/
String getFilename();
} // NsdObject
......@@ -31,6 +31,7 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
/**
......@@ -279,5 +280,10 @@ public abstract class NsdObjectImpl extends MinimalEObjectImpl.Container impleme
if( rs instanceof NsdResourceSetImpl ) return ( NsdResourceSetImpl ) rs;
return null;
}
public String getFilename() {
Resource r = eResource();
return ( r == null ) ? "" : r.getURI().lastSegment();
}
} //NsdObjectImpl
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment