public static String concat(String separator, List<String> list) { return concat(separator, list, 0); }
public static String concat(String separator, List<String> list) { return concat(separator, list, 0); }
public String getMergedIds(String[] ids) { return "$$$Merged:" + Strings.concat("/", Arrays.asList(ids)) + "$$$"; }
@Override public String toString() { return String.format("typeof(%s%s)", String.valueOf(type), Strings.concat("", getArrayDimensions())); }
public static String getNamespace(Grammar g) { if (Strings.isEmpty(g.getName())) return null; String[] splitted = g.getName().split("\\."); return Strings.concat(".", Arrays.asList(splitted), 1); }
buffer.append(Strings.concat(" & ", upper));
public String getJavaFileName(IEObjectDescription description) { if (!isJvmDeclaredType(description)) { return null; } QualifiedName typeName = description.getName(); return Strings.concat("/", typeName.getSegments()) + ".java"; }
public ContentAssistProcessorTestBuilder assertTextAtCursorPosition(int cursorPosition, String... expectedText) throws Exception { String currentModelToParse = getModel(); ICompletionProposal[] computeCompletionProposals = computeCompletionProposals(currentModelToParse, cursorPosition); if (computeCompletionProposals == null) computeCompletionProposals = new ICompletionProposal[0]; Arrays.sort(expectedText); final String expectation = Strings.concat(", ", Arrays.asList(expectedText)); final String actual = Strings.concat(", ", toString(computeCompletionProposals)); Assert.assertEquals(expectation, actual); for (int i = 0; i < computeCompletionProposals.length; i++) { ICompletionProposal completionProposal = computeCompletionProposals[i]; String proposedText = getProposedText(completionProposal); Assert.assertTrue("Missing proposal '" + proposedText + "'. Expect completionProposal text '" + expectation + "', but got " + actual, Arrays.asList(expectedText).contains(proposedText)); } return this; }
List<String> bootClassPathEntries = getBootClassPathEntries(); if (!isEmpty(bootClassPathEntries)) { commandLine.add("-bootclasspath \"" + concat(File.pathSeparator, bootClassPathEntries) + "\""); commandLine.add(concat(" ", transform(sourceDirectories, new Function<String, String>() { @Override public String apply(String path) { log.debug("invoke batch compiler with '" + concat(" ", commandLine) + "'"); return BatchCompiler.compile(concat(" ", commandLine), outWriter, outWriter, null);
logger.debug(Messages.EcjBatchCompiler_0, Strings.concat("\n", commandLineArguments)); //$NON-NLS-1$
logger.debug(Messages.JavacBatchCompiler_0, Strings.concat(" ", commandLineArguments)); //$NON-NLS-1$
@Override public CompilationResult compile(Iterable<String> sourceRoots, File outputClassDirectory) { Iterable<String> validSourceRoots = IterableExtensions.filter(sourceRoots, new EmptyOrMissingFilter()); if (!containsJavaFiles(validSourceRoots)) { return CompilationResult.SKIPPED; } List<String> commandLine = Lists.newArrayList(); if (configuration.isVerbose()) { commandLine.add("-verbose"); } if (classPath != null) { Iterable<String> validClasspath = IterableExtensions.filter(classPath, new EmptyOrMissingFilter()); if (validClasspath.iterator().hasNext()) { commandLine.add("-cp \"" + concat(File.pathSeparator, Lists.newArrayList(validClasspath)) + "\""); } } commandLine.add("-d \"" + outputClassDirectory.toString() + "\""); commandLine.add("-source " + configuration.getSourceLevel()); commandLine.add("-target " + configuration.getTargetLevel()); commandLine.add("-proceedOnError"); for (String src : validSourceRoots) { commandLine.add("\"" + src + "\""); } String cmdLine = concat(" ", commandLine); debugLog("invoke batch compiler with '" + cmdLine + "'"); boolean result = BatchCompiler.compile(cmdLine, new PrintWriter(getOutputWriter()), new PrintWriter( getErrorWriter()), null); return result ? CompilationResult.SUCCEEDED : CompilationResult.FAILED; }
protected void normalizeTokens(final IXtextGeneratorFileSystemAccess fsa, final String tokenFile) { String content = fsa.readTextFile(tokenFile).toString(); content = this.newLineNormalizer.postProcess(fsa.getURI(tokenFile), content).toString(); final List<String> splitted = Strings.split(content, this.codeConfig.getLineDelimiter()); Collections.<String>sort(splitted); String _concat = Strings.concat(this.codeConfig.getLineDelimiter(), splitted); String _lineDelimiter = this.codeConfig.getLineDelimiter(); String _plus = (_concat + _lineDelimiter); content = _plus; fsa.generateFile(tokenFile, content); }
public ContentAssistProcessorTestBuilder assertTextAtCursorPosition(int cursorPosition, String... expectations) throws Exception { String currentModelToParse = getFullTextToBeParsed(); ICompletionProposal[] computeCompletionProposals = computeCompletionProposals(currentModelToParse, cursorPosition); if (computeCompletionProposals == null) computeCompletionProposals = new ICompletionProposal[0]; Arrays.sort(expectations); List<String> sortedExpectations = Lists.newArrayList(); for (String expectation : expectations) { sortedExpectations.add(LineDelimiters.toPlatform(expectation)); } final String expectation = Strings.concat(Strings.newLine(), sortedExpectations); final String actual = Strings.concat(Strings.newLine(), toString(computeCompletionProposals)); Assert.assertEquals(expectation, actual); for (int i = 0; i < computeCompletionProposals.length; i++) { ICompletionProposal completionProposal = computeCompletionProposals[i]; String proposedText = getProposedText(completionProposal); Assert.assertTrue("Missing proposal '" + proposedText + "'. Expect completionProposal text '" + expectation + "', but got " + actual, sortedExpectations.contains(proposedText)); } return this; }
List<String> missingAssignments = Lists.newArrayList(mandatoryFeatures.keySet()); Collections.sort(missingAssignments); String concatenated = Strings.concat(", ", missingAssignments); EStructuralFeature feature = null; if (component.getType() != null)
if (isScalarType(type)) { error("Unsupported identifier datatype '" + identifierAttribute.getDataTypeName() + "'. Supported types are: " + Strings.concat(",", SUPPORTED_ID_TYPES) + ".", DomPackage.eINSTANCE.getAttribute_Type()); "."))) { error("Unsupported instance datatype '" + simpleType.getInstanceTypeName() + "'. Supported types are: " + Strings.concat(",", SUPPORTED_VERSION_TYPES) + ".", DomPackage.eINSTANCE.getAttribute_Type());