org.eclipse.xtext.generator.trace.TraceFileNameProvider Java Examples
The following examples show how to use
org.eclipse.xtext.generator.trace.TraceFileNameProvider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractXtendInstallDebugInfoMojo.java From xtext-xtend with Eclipse Public License 2.0 | 6 votes |
protected void collectJavaSourceFile2traceFile(String root, String subdir, Map<String, File> javaSourceFile2traceFile) { File file = new File(root + "/" + subdir); File[] listFiles = file.listFiles(); if (listFiles == null) { if (showEmptyDirWarning) { getLog().warn("Directory "+ file.getPath() +" is empty. Can't process."); } return; } for (File child : listFiles) { String name = child.getName(); if (child.isDirectory()) collectJavaSourceFile2traceFile(root, subdir + "/" + name, javaSourceFile2traceFile); else if (name.endsWith(TraceFileNameProvider.TRACE_FILE_EXTENSION)) { String javaSourceFile = subdir + "/" + traceFileNameProvider.getJavaFromTrace(name); javaSourceFile2traceFile.put(javaSourceFile, child); } } }
Example #2
Source File: TraceEditor.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected IStorage getLocalStorage(IResourceServiceProvider serviceProvider, URI traceURI) { TraceFileNameProvider fileNameProvider = serviceProvider.get(TraceFileNameProvider.class); IStorage2UriMapper storage2UriMapper = serviceProvider.get(IStorage2UriMapper.class); String generatedName = fileNameProvider.getJavaFromTrace(traceURI.lastSegment()); URI generatedURI = traceURI.trimSegments(1).appendSegment(generatedName); for (Pair<IStorage, IProject> x : storage2UriMapper.getStorages(generatedURI)) return x.getFirst(); throw new IllegalStateException("Could not find IStorage for " + generatedURI); }
Example #3
Source File: JavaIoFileSystemAccess.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
/** * @since 2.4 */ public JavaIoFileSystemAccess(IResourceServiceProvider.Registry registry, IEncodingProvider encodingProvider, TraceFileNameProvider traceFileNameProvider, TraceRegionSerializer traceRegionSerializer) { this.registry = registry; this.encodingProvider = encodingProvider; this.traceFileNameProvider = traceFileNameProvider; this.traceSerializer = traceRegionSerializer; }
Example #4
Source File: URIBasedFileSystemAccess.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public TraceFileNameProvider getTraceFileNameProvider() { return traceFileNameProvider; }
Example #5
Source File: URIBasedFileSystemAccess.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public void setTraceFileNameProvider(TraceFileNameProvider traceFileNameProvider) { this.traceFileNameProvider = traceFileNameProvider; }
Example #6
Source File: AbstractTraceForURIProvider.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
protected TraceFileNameProvider getTraceFileNameProvider() { return traceFileNameProvider; }