Home » Modeling » EMF » EPackage to containing PluginID
| EPackage to containing PluginID [message #406288] |
Wed, 10 January 2007 09:22  |
Eclipse User |
|
|
|
I need to get hold of the plugin ID of EPackages ( from generated EMF
plugins with appropraite generated_package extensions ) that I am being
passed in an Editor so that I can add them in turn to the dependencies of
a Plugin I am generating.
What is the best way of doing this given an EPackage object reference
gained from the EPackage registry...
EPackage.Registry registry = EPackage.Registry.INSTANCE;
EPackage aPackage = registry.getEPackage(nsURI);
Should I be getting hold of the GenModels ( and calling getModelPluginID()
) associated with these EPackages ( using
EcorePlugin.getEPackageNsURIToGenModelLocationMap(); ) and going from
there ?
If I use EcorePlugin.getEPackageNsURIToGenModelLocationMap() what is the
best way to turn the URIs from it into Resources or GenModels?
Thanks
|
|
| | | | | | |
| Re: EPackage to containing PluginID [message #406441 is a reply to message #406440] |
Wed, 17 January 2007 14:22   |
Eclipse User |
|
|
|
Heres the code...
package uk.co.his.tool2.emf.resources;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.emf.ecore.plugin.RegistryReader;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import
uk.co.his.tool2.emf.utils.AssembledCommandEnhancerAFEditingD omain.ResSetWithPluginRefs;
import uk.co.his.tool2.utils.LoggingSupport;
import emf_project_support_plugin.EMFSupportPlugin;
public class EmfRegistryHelper
{
public static interface RegistryListener
{
void packageAdded(String nsURI);
void packageRemoved(String nsURI);
void pluginAdded(String pluginID);
void pluginRemoved(String pluginID);
}
public static class RegistryListenerImpl implements RegistryListener
{
public HashSet packageURIs = new LinkedHashSet();
public HashSet pluginIDs = new LinkedHashSet();
public Set syncPackageURIs = Collections.synchronizedSet(packageURIs);
public Set syncPluginIDs = Collections.synchronizedSet(pluginIDs);
public void packageAdded(String nsURI)
{
syncPackageURIs.add(nsURI);
}
public void packageRemoved(String nsURI)
{
syncPackageURIs.remove(nsURI);
}
public void pluginAdded(String pluginID)
{
syncPluginIDs.add(pluginID);
}
public void pluginRemoved(String pluginID)
{
syncPluginIDs.remove(pluginID);
}
public Set getPluginIDs()
{
synchronized (syncPluginIDs)
{
return (Set) pluginIDs.clone();
}
}
public Set getPackageURIs()
{
synchronized (syncPackageURIs)
{
return (Set) packageURIs.clone();
}
}
}
LinkedHashMap registeredEPackageNsURIsToModelPluginIDs = new
LinkedHashMap();
LinkedHashMap registeredModelPluginIDsToEPackageNSUris = new
LinkedHashMap();
/**
* This contains the mapping from all plugin ids in the Platform Registry
to the generated package NS URIs that the plugin contains
*/
LinkedHashMap globalPluginIDsToEPackageNSUris = new LinkedHashMap();
/**
* onTheFlyPackages are those that the Editor generates when asked to by
the User
* They are tracked for the duration of the generation of the new plugin
run only
* Then the collection is cleared
*/
HashSet onTheFlyPackages = new HashSet();
ResourceSet genModelResSet = new ResourceSetImpl();
boolean checkIDs = true;
ArrayList listeners = new ArrayList();
/**
* This is used to indicate that a User wishes to manually add a
reference to a plugin
* This is useful if they are intending to use it and wish the
ResourceOutlineView to show its Packages for DND
*/
public final static Object EXPLICIT_USER_REF = new Object();
public static Collection getRegisteredEPackageNsURIs()
{
EPackage.Registry registry = EPackage.Registry.INSTANCE;
return registry.keySet();
}
public static boolean isValidEPackageNsURI(String ID)
{
EPackage.Registry registry = EPackage.Registry.INSTANCE;
EPackage aPackage = registry.getEPackage(ID);
return (aPackage != null);
}
public static EPackage getEPackage(String nsURI)
{
EPackage.Registry registry = EPackage.Registry.INSTANCE;
return registry.getEPackage(nsURI);
}
public static EmfRegistryHelper getHelper(Resource res)
{
if(res == null) return null;
ResourceSet resSet = res.getResourceSet();
if(resSet instanceof ResSetWithPluginRefs)
{
return ((ResSetWithPluginRefs)resSet).getRegistryHelper();
}
return null;
}
public static void printOutRegistryNamespaces()
{
IExtensionRegistry registry = Platform.getExtensionRegistry();
String[] nameSpaces = registry.getNamespaces();
for(int i = 0; i < nameSpaces.length; i++)
{
System.out.println("NameSpace: " + nameSpaces[i]);
}
}
public EmfRegistryHelper()
{
initializeGlobalPluginIdToGenPackageUriMap();
}
public synchronized String
getGeneratedJavaPackageBaseNameForEPackage(String nsURI)
{
Map map = EcorePlugin.getEPackageNsURIToGenModelLocationMap();
if(map == null)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Cannot load
EcorePlugin NsURI to GenModel location map");
return null;
}
URI genModelLocation = (URI)map.get(nsURI);
if(genModelLocation == null)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Cannot find
GenModel for EPackage with NS URI " + nsURI);
return null;
}
Resource res = null;
try
{
res = genModelResSet.getResource(genModelLocation, true);
}
finally
{
if(res == null)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Problem loading
GenModel at " + genModelLocation + " for EPackage with NS URI " + nsURI);
return null;
}
}
if(res != null)
{
GenModel coreGenModel = (GenModel)res.getContents().get(0);
if(coreGenModel != null)
{
for(Iterator iter = coreGenModel.getGenPackages().iterator();
iter.hasNext(); )
{
GenPackage genPackage = (GenPackage) iter.next();
if(nsURI.equals(genPackage.getEcorePackage().getNsURI()))
{
return genPackage.getBasePackage();
}
}
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "GenModel for
EPackage with NS URI " + nsURI + " contains no GenPackage with matching NS
URI");
}
else
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Resource at " +
genModelLocation + " which is meant to contain GenModel for EPackage with
NS URI " + nsURI + " contains no GenModel at its root!");
}
}
else
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Cannot load
GenModel at " + genModelLocation + " for EPackage with NS URI " + nsURI);
}
return null;
}
public String getModelPluginIDfromEPackageNSUri(String nsURI)
{
Map map = EcorePlugin.getEPackageNsURIToGenModelLocationMap();
if(map == null)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Cannot load
EcorePlugin NsURI to GenModel location map");
return null;
}
URI genModelLocation = (URI)map.get(nsURI);
if(genModelLocation == null)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Cannot find
GenModel for EPackage with NS URI " + nsURI);
return null;
}
Resource res = null;
try
{
res = genModelResSet.getResource(genModelLocation, true);
}
finally
{
if(res == null)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Problem loading
GenModel at " + genModelLocation + " for EPackage with NS URI " + nsURI);
return null;
}
}
if(res != null)
{
GenModel coreGenModel = (GenModel)res.getContents().get(0);
if(coreGenModel != null)
{
return coreGenModel.getModelPluginID();
}
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Resource at " +
genModelLocation + " which is meant to contain GenModel for EPackage with
NS URI " + nsURI + " contains no GenModel at its root!");
}
else
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Cannot load
GenModel at " + genModelLocation + " for EPackage with NS URI " + nsURI);
}
return null;
}
public Set getGlobalPluginIdsFromNsUri(String nsURI)
{
HashSet plugins = new HashSet();
for(Iterator iter =
globalPluginIDsToEPackageNSUris.keySet().iterator(); iter.hasNext(); )
{
String pluginID = (String) iter.next();
Set pluginIDs = (Set) globalPluginIDsToEPackageNSUris.get(pluginID);
if(pluginIDs != null)
{
if(pluginIDs.contains(nsURI)) plugins.add(pluginID);
}
}
return plugins;
}
/**
* Return all the generated EPackages contained within a given plugin,
* not just the registered one
* @param pluginID
* @return
*/
public synchronized Collection getAllEPackagesForPluginID(String
pluginID)
{
Set packageNsURIs = (Set)
globalPluginIDsToEPackageNSUris.get(pluginID);
if(packageNsURIs == null) return Collections.EMPTY_SET;
ArrayList packages = new ArrayList(packageNsURIs.size());
for(Iterator iter = packageNsURIs.iterator(); iter.hasNext(); )
{
String nsURI = (String) iter.next();
EPackage ePack = getEPackage(nsURI);
if(ePack != null) packages.add(ePack);
}
return packages;
}
public synchronized Collection
getAllRegisteredEPackagesForPluginID(String pluginID)
{
Set packageNsURIs = (Set)
registeredModelPluginIDsToEPackageNSUris.get(pluginID);
if(packageNsURIs == null) return Collections.EMPTY_SET;
ArrayList packages = new ArrayList(packageNsURIs.size());
for(Iterator iter = packageNsURIs.iterator(); iter.hasNext(); )
{
Object usage = iter.next();
if(usage != EXPLICIT_USER_REF)
{
String nsURI = (String)usage;
EPackage ePack = getEPackage(nsURI);
if(ePack != null) packages.add(ePack);
}
}
return packages;
}
/**
* Obtain a "cannonical" or "normalized" EClassifier reference
* References obtained by dynamic construction, from arbitrary Resources
( i.e. your own file reference )
* ... or even possibly through programmatic references such as
MyPackageClass.eINSTANCE which are not in the same ClassLoader context
* may give identical classes which are different java instances
*
* @param eClassifier
* @return the equivalent registered package EClassifier
*/
public synchronized EClassifier getCannonicalEClassifier(EClassifier
eClassifier, boolean register)
{
EPackage containingPackage = eClassifier.getEPackage();
if(containingPackage == null)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Unable to get
cannonical EClassifier; unable to find plugin or EPackage for EClassifier
" + eClassifier.getName());
return null;
}
EPackage cannonicalEPackage = getCannonicalEPackage(containingPackage,
register);
if(cannonicalEPackage == null)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Unable to get
cannonical EClassifier " + eClassifier.getName() + ", cannot get
associated cannonical EPackage");
return null;
}
return cannonicalEPackage.getEClassifier(eClassifier.getName());
}
/**
* Obtain a "cannonical" or "normalized" EStructuralFeature reference
* References obtained by dynamic construction, from arbitrary Resources
( i.e. your own file reference )
* ... or even possibly through programmatic references such as
MyPackageClass.eINSTANCE which are not in the same ClassLoader context
* may give identical features which are different java instances
*
* @param feature
* @return the equivalent registered package EStructuralFeature
*/
public synchronized EStructuralFeature
getCannonicalEStructuralFeature(EStructuralFeature feature, boolean
register)
{
EClass cannonicalClassifier =
(EClass)getCannonicalEClassifier(feature.getEContainingClass (), register);
if(cannonicalClassifier == null)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Unable to get
cannonical Structural Feature " + feature.getName() + ", cannot get
cannonical owning EClassifier");
return null;
}
EStructuralFeature cannonicalFeature =
cannonicalClassifier.getEStructuralFeature(feature.getName() );
if(cannonicalFeature == null)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Unable to get
cannonical Structural Feature " + feature.getName() + ", cannot find it in
cannonical owning EClassifier");
return null;
}
return cannonicalFeature;
}
public synchronized EPackage getCannonicalEPackage(String nsURI,
boolean register)
{
EPackage.Registry registry = EPackage.Registry.INSTANCE;
EPackage aPackage = registry.getEPackage(nsURI);
if(aPackage == null)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Cannot find EMF
package with URI " + nsURI);
return null;
}
if(register)
{
registerEPackageNsURI(nsURI, checkIDs);
}
return aPackage;
}
public EPackage getCannonicalEPackage(EPackage ePackage, boolean
register)
{
return getCannonicalEPackage(ePackage.getNsURI(), register);
}
public synchronized boolean manualEmfPluginRegistration(String
pluginID)
{
if(globalPluginIDsToEPackageNSUris.get(pluginID) == null)
{
LoggingSupport.warn(EMFSupportPlugin.getPlugin(), "Plugin ID " +
pluginID + " is either not a valid plugin or does not contain any
\"generated_package\" extensions, or the Platform.registry has been
updated");
return false;
}
boolean notify = false;
if(registeredModelPluginIDsToEPackageNSUris.get(pluginID) == null)
{
registeredModelPluginIDsToEPackageNSUris.put(pluginID, new
HashSet());
}
((Set)registeredModelPluginIDsToEPackageNSUris.get(pluginID) ).add(EXPLICIT_USER_REF);
if(notify)
{
notifyListenersOfPluginAdd(pluginID);
}
return true;
}
public synchronized void manuallyRemoveEmfPluginRegistration(String
pluginID)
{
if(registeredModelPluginIDsToEPackageNSUris.get(pluginID) == null)
{
LoggingSupport.info(EMFSupportPlugin.getPlugin(), "EMF Plugin " +
pluginID + " is not registered");
return;
}
Set ids = (Set)
registeredModelPluginIDsToEPackageNSUris.get(pluginID);
ids.remove(EXPLICIT_USER_REF);
if(ids.isEmpty())
{
registeredModelPluginIDsToEPackageNSUris.remove(pluginID);
notifyListenersOfPluginRemoved(pluginID);
}
}
public synchronized void removeEPackageReference(String nsURI)
{
removeEPackageReferenceToModelPlugin(nsURI);
}
public void removeEPackageReference(EPackage ePackage)
{
removeEPackageReference(ePackage.getNsURI());
}
public synchronized Collection
getUsedEmfGeneratedPackageModelPluginIDs()
{
return new HashSet(registeredModelPluginIDsToEPackageNSUris.keySet());
}
public synchronized void setCheckIDs(boolean checkIDs)
{
this.checkIDs = checkIDs;
}
/**
* @param listener
* @param update, if true communicates all the current state to the
listener
*/
public synchronized void addListener(RegistryListener listener, boolean
update)
{
listeners.add(listener);
if(update)
{
for(Iterator iter =
registeredModelPluginIDsToEPackageNSUris.keySet().iterator() ;
iter.hasNext(); )
{
String pluginID = (String) iter.next();
listener.pluginAdded(pluginID);
for(Iterator packageNSUriIter =
((Set)registeredModelPluginIDsToEPackageNSUris.get(pluginID) ).iterator();
packageNSUriIter.hasNext(); )
{
String nsURI = (String) packageNSUriIter.next();
listener.packageAdded(nsURI);
}
}
}
}
public synchronized void removeListener(RegistryListener listener)
{
listeners.remove(listener);
}
public synchronized void addOnTheFlyPackage(EPackage ePackage)
{
onTheFlyPackages.add(ePackage);
}
public synchronized Set getOnTheFlyPackages()
{
return onTheFlyPackages;
}
public synchronized void clearOnTheFlyPackages()
{
onTheFlyPackages.clear();
}
private synchronized void notifyListenersOfPackageAdd(String nsURI)
{
for(Iterator iter = listeners.iterator(); iter.hasNext();)
{
RegistryListener listener = (RegistryListener) iter.next();
listener.packageAdded(nsURI);
}
}
protected synchronized void mapEPackageNsURIToPluginID(String
pluginID, String nsURI, boolean check)
{
if(check)
{
if(registeredEPackageNsURIsToModelPluginIDs.get(nsURI) != null &&
registeredEPackageNsURIsToModelPluginIDs.get(nsURI) != pluginID)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "EPackage " +
nsURI + " is already bound to PluginID " +
registeredEPackageNsURIsToModelPluginIDs.get(nsURI) + " but registry gives
" + pluginID);
}
if(globalPluginIDsToEPackageNSUris.get(pluginID) == null)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Plugin ID " +
pluginID + " is not to be found in the global registry ... will find a
substitute if possible");
Set possiblePlugins = getGlobalPluginIdsFromNsUri(nsURI);
if(possiblePlugins.size() == 0)
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "Cannot find
plugin registered in the global registry for EPackage " + nsURI +", will
not be able to locate all EPackages");
}
else if(possiblePlugins.size() > 1)
{
String names = "";
for(Iterator iter = possiblePlugins.iterator(); iter.hasNext(); )
{
names = names + ", " + iter.next();
}
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "EPackage " +
nsURI +", nsURI can be found in several plugins" + names + ". Will not be
able to locate all EPackages");
}
else
{
mapEPackageNsURIToPluginID((String)
possiblePlugins.iterator().next(), nsURI, false);
}
}
}
registeredEPackageNsURIsToModelPluginIDs.put(nsURI, pluginID);
boolean notifyOfPlugin = false;
if(registeredModelPluginIDsToEPackageNSUris.get(pluginID) == null)
{
registeredModelPluginIDsToEPackageNSUris.put(pluginID, new HashSet());
notifyOfPlugin = true;
}
Set packagesInPlugin = (Set)
registeredModelPluginIDsToEPackageNSUris.get(pluginID);
boolean notifyOfPackage = !packagesInPlugin.contains(nsURI);
packagesInPlugin.add(nsURI);
if(notifyOfPlugin)
{
notifyListenersOfPluginAdd(pluginID);
}
if(notifyOfPackage)
{
notifyListenersOfPackageAdd(nsURI);
}
}
private synchronized void registerEPackageNsURI(String nsURI, boolean
check)
{
String existingID = (String)
registeredEPackageNsURIsToModelPluginIDs.get(nsURI);
if(existingID == null)
{
String pluginID = getModelPluginIDfromEPackageNSUri(nsURI);
if(pluginID == null) return;
mapEPackageNsURIToPluginID(pluginID, nsURI, check);
return;
}
else if(check)
{
String pluginID = getModelPluginIDfromEPackageNSUri(nsURI);
if(!existingID.equals(pluginID))
{
LoggingSupport.error(EMFSupportPlugin.getPlugin(), "EPackage " +
nsURI + " is already bound to GenModel with Model Plugin ID value of " +
existingID + " but dynamic lookup gives " + pluginID);
}
}
}
private synchronized void notifyListenersOfPluginAdd(String pluginID)
{
for(Iterator iter = listeners.iterator(); iter.hasNext();)
{
RegistryListener listener = (RegistryListener) iter.next();
listener.pluginAdded(pluginID);
}
}
private synchronized void notifyListenersOfPackageRemoved(String nsURI)
{
for(Iterator iter = listeners.iterator(); iter.hasNext();)
{
RegistryListener listener = (RegistryListener) iter.next();
listener.packageRemoved(nsURI);
}
}
private synchronized void removeEPackageReferenceToModelPlugin(String
nsURI)
{
if(registeredEPackageNsURIsToModelPluginIDs.get(nsURI) == null)
{
LoggingSupport.info(EMFSupportPlugin.getPlugin(), "EMF Plugin
reference with URI " + nsURI + " is not registered");
return;
}
String pluginID = (String)
registeredEPackageNsURIsToModelPluginIDs.get(nsURI);
Set ids = (Set)
registeredModelPluginIDsToEPackageNSUris.get(pluginID);
ids.remove(nsURI);
notifyListenersOfPackageRemoved(nsURI);
if(ids.isEmpty())
{
registeredModelPluginIDsToEPackageNSUris.remove(pluginID);
notifyListenersOfPluginRemoved(pluginID);
}
}
private synchronized void notifyListenersOfPluginRemoved(String pluginID)
{
for(Iterator iter = listeners.iterator(); iter.hasNext();)
{
RegistryListener listener = (RegistryListener) iter.next();
listener.pluginRemoved(pluginID);
}
}
private void initializeGlobalPluginIdToGenPackageUriMap()
{
printOutRegistryNamespaces();
GeneratedPackageToPluginIDReader reader = new
GeneratedPackageToPluginIDReader(globalPluginIDsToEPackageNS Uris);
reader.readRegistry();
printOutGlobalPluginToGenPackageURIMap();
}
private void printOutGlobalPluginToGenPackageURIMap()
{
for(Iterator iter = globalPluginIDsToEPackageNSUris.keySet().iterator();
iter.hasNext(); )
{
String pluginID = (String) iter.next();
System.out.println("Plugin " + pluginID + "-->");
Collection nsURIs = (Collection)
globalPluginIDsToEPackageNSUris.get(pluginID);
for(Iterator nsIter = nsURIs.iterator(); nsIter.hasNext(); )
{
System.out.println("\t" + nsIter.next());
}
System.out.println("");
}
}
/**
* Read the registry and get the names of plugins that define extensions
for Ecores generated_package extension point
*
* Ideally this would re-use
org.eclipse.emf.ecore.plugin.GeneratedPackageRegistryReader as well as the
* Ecore defined literals, particularly EcorePlugin.GENERATED_PACKAGE_PPID
* However none of these are visible.
* The only way to do this in Ecore is via the very arcane way of
iterating through EPackage.Registry.INSTANCE keys and values
* The values are of type RegistryReader.EPackageDescriptor and the name
?can be located by
element.getDeclaringExtension().getContributor().getName()
* see below
*
* @author john
*
*/
protected static class GeneratedPackageToPluginIDReader extends
RegistryReader
{
static final String TAG_PACKAGE = "package";
static final String ATT_URI = "uri";
static final String ATT_CLASS = "class";
static final String ATT_GEN_MODEL = "genModel";
static final String GENERATED_PACKAGE_PPID = "generated_package";
protected Map pluginIDToGeneratedPackageNsUriMap;
public GeneratedPackageToPluginIDReader(Map mapping)
{
super(Platform.getExtensionRegistry(),
EcorePlugin.getPlugin().getBundle().getSymbolicName(),
GENERATED_PACKAGE_PPID);
pluginIDToGeneratedPackageNsUriMap = mapping;
}
protected GeneratedPackageToPluginIDReader(IExtensionRegistry
pluginRegistry, String pluginID, String extensionPointID)
{
super(pluginRegistry, pluginID, extensionPointID);
}
protected void addNsURIRefToPluginID(String pluginID, String nsURI)
{
if(pluginIDToGeneratedPackageNsUriMap.get(pluginID) == null)
{
pluginIDToGeneratedPackageNsUriMap.put(pluginID, new LinkedHashSet());
}
((Collection)
pluginIDToGeneratedPackageNsUriMap.get(pluginID)).add(nsURI) ;
}
protected boolean readElement(IConfigurationElement element)
{
if(element.getName().equals(TAG_PACKAGE))
{
String packageURI = element.getAttribute(ATT_URI);
if(packageURI == null)
{
logMissingAttribute(element, ATT_URI);
}
else
{
String pluginID =
element.getDeclaringExtension().getContributor().getName();
if(pluginID != null)
{
addNsURIRefToPluginID(pluginID, packageURI);
}
else
{
LoggingSupport.warn(EMFSupportPlugin.getPlugin(), "Cannot find
PluginID for Gen package extension with NS URI " + packageURI);
}
return true;
}
}
return false;
}
}
}
|
|
| | | | |
Goto Forum:
Current Time: Wed Nov 05 17:06:35 EST 2025
Powered by FUDForum. Page generated in 0.04983 seconds
|