@Override public URI appendSegments(String[] segments) { return internalUri.appendSegments(segments); }
@Override public URI appendSegments(String[] segments) { return base.appendSegments(segments); }
@Override public URI appendSegments(String[] segments) { URI result = uri.appendSegments(segments); return result == uri ? this : appendFragment(result); }
String manifestURI = uri.appendSegments(relativePath).toString(); InputStream inputStream = new URL(manifestURI).openStream(); inputStream.close(); uri = uri.appendSegments(relativePath); manifestURL = new URL(uri.toString());
@Override public GeneratorConfig get(EObject context) { EMFPatternLanguageGeneratorConfig config = new EMFPatternLanguageGeneratorConfig(); ResourceSet resourceSet = EcoreUtil2.getResourceSet(context); if (resourceSet != null) { IProjectConfig projectConfig = projectConfigProvider.getProjectConfig(resourceSet); if (projectConfig != null) { URI configFilePath = projectConfig.getPath().appendSegments(new String[] {".settings", "org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguage.prefs"}); File f = new File(configFilePath.toFileString()); if (f.canRead()) { Properties vqlCompilerSettings = new Properties(); try { vqlCompilerSettings.load(new FileInputStream(f)); config.parseBuilderConfigurationPropertiesFile(vqlCompilerSettings); } catch (IOException e) { logger.warn(e); } } } } return config; }
/** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated NOT */ public URI absolutPath() { EObject object = this; while ((object != null) && !(object instanceof Workspace)) object = object.eContainer(); if (object instanceof Workspace) { Workspace workspace = (Workspace) object; URI root = workspace.getRoot(); if (root == null) return null; if (root.isRelative()) { File f = new File(""); URI workingDir = URI.createFileURI(f.getAbsolutePath()); root = workingDir.appendSegments(root.segments()); } return root.appendSegments(fullPath().segments()); } return null; }
URI result = targetPlatformBundleLocation.appendSegments(segments.toArray(new String[segments.size()])); return result;
.appendSegment( fragments[f].getSymbolicName()) .appendSegments(trailingSegments), locale));
URI expectedURI = prefix.appendSegments(uri.segments()); IStorage storage = data.uri2Storage.get(expectedURI); if (storage != null) {
/** * Converts the physical URI to a logic URI based on the bundle symbolic name. */ protected URI getLogicalURI(URI uri, IStorage storage, TraversalState state) { if (bundleSymbolicName != null) { URI logicalURI = URI.createPlatformResourceURI(bundleSymbolicName, false); List<?> parents = state.getParents(); for (int i = 1; i < parents.size(); i++) { Object obj = parents.get(i); if (obj instanceof IPackageFragment) { logicalURI = logicalURI.appendSegments(((IPackageFragment) obj).getElementName().split("\\.")); } else if (obj instanceof IJarEntryResource) { logicalURI = logicalURI.appendSegment(((IJarEntryResource) obj).getName()); } else if (obj instanceof IFolder) { logicalURI = logicalURI.appendSegment(((IFolder) obj).getName()); } } return logicalURI.appendSegment(uri.lastSegment()); } return uri; }
.appendSegment( fragments[f].getSymbolicName()) .appendSegments(trailingSegments), locale));
return appendSegment(segments[0]).appendSegments(newSegments);
nsURIMap.put(uri, logicalLocation.appendSegments(new Path(modelLocation).segments()));
URI manifestURI = pluginLocation.appendSegments(new String[] { "META-INF", "MANIFEST.MF" }); if (URIConverter.INSTANCE.exists(manifestURI, null))
URI manifestURI = pluginLocation.appendSegments(new String[] { "META-INF", "MANIFEST.MF" }); if (URIConverter.INSTANCE.exists(manifestURI, null))
protected URI getURI(final Path path) { if (((path == null) || Objects.equal(path, Path.ROOT))) { return null; } final IProjectConfig projectConfig = this.projectConfigProvider.getProjectConfig(this.context); if ((projectConfig == null)) { return null; } final URI projectURI = projectConfig.getPath(); final String projectName = IterableExtensions.<String>head(path.getSegments()); String _name = projectConfig.getName(); boolean _notEquals = (!Objects.equal(projectName, _name)); if (_notEquals) { return null; } final Iterable<String> segments = IterableExtensions.<String>tail(path.getSegments()); boolean _isEmpty = IterableExtensions.isEmpty(segments); if (_isEmpty) { return projectURI; } final URI relativeURI = URI.createURI(IterableExtensions.<String>head(segments)).appendSegments(((String[])Conversions.unwrapArray(IterableExtensions.<String>tail(segments), String.class))); final URI uri = relativeURI.resolve(projectURI); Boolean _isFolder = this.isFolder(uri); if ((_isFolder).booleanValue()) { return UriUtil.toFolderURI(uri); } return uri; }
/** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated NOT */ public URI fullPath() { EObject parent = eContainer(); while (parent != null) { if (parent instanceof Resolvable) { Resolvable resolvable = (Resolvable) parent; URI path = relativePath(); if(path!=null) { URI fullParentPath = resolvable.fullPath(); if(fullParentPath!=null) return fullParentPath.appendSegments(path.segments()); return relativePath(); } return resolvable.fullPath(); } } return relativePath(); }
nsURIMap.put((String)invoke(uri, PLUGIN_ATTRIBUTE_GET_VALUE_METHOD), logicalLocation.appendSegments(new Path((String)invoke(genModel, PLUGIN_ATTRIBUTE_GET_VALUE_METHOD)).segments()));
URI targetDirectory = toURI(targetPath).appendSegments(packageName.split("\\.")); URI targetFile = targetDirectory.appendSegment(className + ".java"); monitor.subTask(CodeGenEcorePlugin.INSTANCE.getString("_UI_Generating_message", new Object[] { targetFile }));
URI targetDirectory = toURI(targetPath).appendSegments(packageName.split("\\.")); URI targetFile = targetDirectory.appendSegment(className + ".java"); monitor.subTask(CodeGenEcorePlugin.INSTANCE.getString("_UI_Generating_message", new Object[] { targetFile }));