/** * @deprecated In EMF 2.2, a {@link org.eclipse.emf.codegen.ecore.generator.GeneratorAdapter GeneratorAdapter} should be used to * implement code generation. {@link org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter AbstractGeneratorAdapter} provides * an equivalent to this method. This method will be removed after 2.2. */ @Deprecated public OutputStream createOutputStream(URI uri) throws Exception { URIConverter uriConverter = eResource().getResourceSet().getURIConverter(); return uriConverter.createOutputStream(uri); }
/** * @deprecated In EMF 2.2, a {@link org.eclipse.emf.codegen.ecore.generator.GeneratorAdapter GeneratorAdapter} should be used to * implement code generation. {@link org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter AbstractGeneratorAdapter} provides * an equivalent to this method. This method will be removed after 2.2. */ @Deprecated public OutputStream createOutputStream(URI uri) throws Exception { URIConverter uriConverter = eResource().getResourceSet().getURIConverter(); return uriConverter.createOutputStream(uri); }
public void reconcileGenAnnotations(GenBase oldGenBase) { if (!oldGenBase.getGenAnnotations().isEmpty() && eResource() != null && eResource().getResourceSet() != null) { GenAnnotationCopier copier = new GenAnnotationCopier(eResource().getResourceSet(), oldGenBase); Collection<GenAnnotation> genAnnotationsCopy = copier.copyAll(oldGenBase.getGenAnnotations()); copier.copyReferences(); getGenAnnotations().clear(); getGenAnnotations().addAll(genAnnotationsCopy); } }
public void reconcileGenAnnotations(GenBase oldGenBase) { if (!oldGenBase.getGenAnnotations().isEmpty() && eResource() != null && eResource().getResourceSet() != null) { GenAnnotationCopier copier = new GenAnnotationCopier(eResource().getResourceSet(), oldGenBase); Collection<GenAnnotation> genAnnotationsCopy = copier.copyAll(oldGenBase.getGenAnnotations()); copier.copyReferences(); getGenAnnotations().clear(); getGenAnnotations().addAll(genAnnotationsCopy); } }
/** * @deprecated In EMF 2.2, a {@link org.eclipse.emf.codegen.ecore.generator.GeneratorAdapter GeneratorAdapter} should be used to * implement code generation. {@link org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter AbstractGeneratorAdapter} provides * an equivalent to this method. This method will be removed after 2.2. */ @Deprecated public void setOverwriteable(URI uri) throws Exception { if (EMFPlugin.IS_ECLIPSE_RUNNING) { EclipseUtil.setWriteable(uri.toString()); } else { URIConverter uriConverter = eResource().getResourceSet().getURIConverter(); uri = uriConverter.normalize(uri); if ("file".equalsIgnoreCase(uri.scheme())) { new File(uri.toFileString()).delete(); } } }
/** * @deprecated In EMF 2.2, a {@link org.eclipse.emf.codegen.ecore.generator.GeneratorAdapter GeneratorAdapter} should be used to * implement code generation. {@link org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter AbstractGeneratorAdapter} provides * an equivalent to this method. This method will be removed after 2.2. */ @Deprecated public boolean isReadOnly(URI uri) { if (EMFPlugin.IS_ECLIPSE_RUNNING) { URI workspacePath = uri.replacePrefix(PLATFORM_RESOURCE_URI, EMPTY_URI); if (workspacePath != null) { return EclipseUtil.isReadOnly(workspacePath.toString()); } } URIConverter uriConverter = eResource().getResourceSet().getURIConverter(); uri = uriConverter.normalize(uri); if ("file".equalsIgnoreCase(uri.scheme())) { File file = new File(uri.toFileString()); return file.exists() && !file.canWrite(); } else { return false; } }
/** * @deprecated In EMF 2.2, a {@link org.eclipse.emf.codegen.ecore.generator.GeneratorAdapter GeneratorAdapter} should be used to * implement code generation. {@link org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter AbstractGeneratorAdapter} provides * an equivalent to this method. This method will be removed after 2.2. */ @Deprecated public InputStream createInputStream(URI uri) throws Exception { if (EMFPlugin.IS_ECLIPSE_RUNNING) { URI workspacePath = uri.replacePrefix(PLATFORM_RESOURCE_URI, EMPTY_URI); if (workspacePath != null) { return EclipseUtil.createInputStream(workspacePath.toString()); } } URIConverter uriConverter = eResource().getResourceSet().getURIConverter(); return uriConverter.createInputStream(uri); }
/** * @deprecated In EMF 2.2, a {@link org.eclipse.emf.codegen.ecore.generator.GeneratorAdapter GeneratorAdapter} should be used to * implement code generation. {@link org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter AbstractGeneratorAdapter} provides * an equivalent to this method. This method will be removed after 2.2. */ @Deprecated public void setOverwriteable(URI uri) throws Exception { if (EMFPlugin.IS_ECLIPSE_RUNNING) { EclipseUtil.setWriteable(uri.toString()); } else { URIConverter uriConverter = eResource().getResourceSet().getURIConverter(); uri = uriConverter.normalize(uri); if ("file".equalsIgnoreCase(uri.scheme())) { new File(uri.toFileString()).delete(); } } }
/** * @deprecated In EMF 2.2, a {@link org.eclipse.emf.codegen.ecore.generator.GeneratorAdapter GeneratorAdapter} should be used to * implement code generation. {@link org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter AbstractGeneratorAdapter} provides * an equivalent to this method. This method will be removed after 2.2. */ @Deprecated public boolean isReadOnly(URI uri) { if (EMFPlugin.IS_ECLIPSE_RUNNING) { URI workspacePath = uri.replacePrefix(PLATFORM_RESOURCE_URI, EMPTY_URI); if (workspacePath != null) { return EclipseUtil.isReadOnly(workspacePath.toString()); } } URIConverter uriConverter = eResource().getResourceSet().getURIConverter(); uri = uriConverter.normalize(uri); if ("file".equalsIgnoreCase(uri.scheme())) { File file = new File(uri.toFileString()); return file.exists() && !file.canWrite(); } else { return false; } }
URIConverter uriConverter = eResource().getResourceSet().getURIConverter(); uri = uriConverter.normalize(uri); if ("file".equalsIgnoreCase(uri.scheme()))
/** * @deprecated In EMF 2.2, a {@link org.eclipse.emf.codegen.ecore.generator.GeneratorAdapter GeneratorAdapter} should be used to * implement code generation. {@link org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter AbstractGeneratorAdapter} provides * an equivalent to this method. This method will be removed after 2.2. */ @Deprecated public InputStream createInputStream(URI uri) throws Exception { if (EMFPlugin.IS_ECLIPSE_RUNNING) { URI workspacePath = uri.replacePrefix(PLATFORM_RESOURCE_URI, EMPTY_URI); if (workspacePath != null) { return EclipseUtil.createInputStream(workspacePath.toString()); } } URIConverter uriConverter = eResource().getResourceSet().getURIConverter(); return uriConverter.createInputStream(uri); }
URIConverter uriConverter = eResource().getResourceSet().getURIConverter(); uri = uriConverter.normalize(uri); if ("file".equalsIgnoreCase(uri.scheme()))