protected void addConnectorDefinition( ConnectorImplementation impl, List<IResource> resourcesToExport) throws FileNotFoundException, CoreException { final IRepositoryStore store = getDefinitionStore(); ConnectorDefinition def = ((IDefinitionRepositoryStore) store) .getDefinition(impl.getDefinitionId(), impl.getDefinitionVersion()); EMFFileStore file = (EMFFileStore) store.getChild(URI.decode(def.eResource().getURI().lastSegment())); if (file != null && !file.canBeShared()) { File f = new File(file.getEMFResource().getURI().toFileString()); if (f.exists()) { IFile defFile = store.getResource().getFile(f.getName()); defFile.create(new FileInputStream(f), true, Repository.NULL_PROGRESS_MONITOR); resourcesToExport.add(defFile); cleanAfterExport.add(defFile); } } else if (file != null) { resourcesToExport.add(file.getResource()); } addDefinitionIcons(resourcesToExport, store, def); addDefinitionPropertiesFile(resourcesToExport, store, def); }