id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
56,900 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/AbstractMarkerLanguageParser.java | AbstractMarkerLanguageParser.parseRange | public static IntegerRange parseRange(String stringRange, int minValue) {
final String sepPattern = "[,;\\-:]"; //$NON-NLS-1$
try {
final Matcher matcher = Pattern.compile("^\\s*" //$NON-NLS-1$
+ "(?:(?<left>[0-9]+)\\s*(?:(?<sep1>" + sepPattern + ")\\s*(?<right1>[0-9]+)?)?)" //$NON-NLS-1$ //$NON-NLS-2$
... | java | public static IntegerRange parseRange(String stringRange, int minValue) {
final String sepPattern = "[,;\\-:]"; //$NON-NLS-1$
try {
final Matcher matcher = Pattern.compile("^\\s*" //$NON-NLS-1$
+ "(?:(?<left>[0-9]+)\\s*(?:(?<sep1>" + sepPattern + ")\\s*(?<right1>[0-9]+)?)?)" //$NON-NLS-1$ //$NON-NLS-2$
... | [
"public",
"static",
"IntegerRange",
"parseRange",
"(",
"String",
"stringRange",
",",
"int",
"minValue",
")",
"{",
"final",
"String",
"sepPattern",
"=",
"\"[,;\\\\-:]\"",
";",
"//$NON-NLS-1$",
"try",
"{",
"final",
"Matcher",
"matcher",
"=",
"Pattern",
".",
"compi... | Parse a range of integers.
<p>The supported formats are:<ul>
<li>{@code n} for exactly {@code n},</li>
<li>{@code n-m} for {@code n} to {@code m},</li>
<li>{@code n-} for {@code n} to infinity,</li>
<li>{@code -m} for 1 to {@code n}.</li>
</ul>
@param stringRange the string representation to parse.
@param minValue th... | [
"Parse",
"a",
"range",
"of",
"integers",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/AbstractMarkerLanguageParser.java#L85-L120 |
56,901 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/AbstractMarkerLanguageParser.java | AbstractMarkerLanguageParser.isHtmlFileExtension | public static boolean isHtmlFileExtension(String extension) {
for (final String ext : HTML_FILE_EXTENSIONS) {
if (Strings.equal(ext, extension)) {
return true;
}
}
return false;
} | java | public static boolean isHtmlFileExtension(String extension) {
for (final String ext : HTML_FILE_EXTENSIONS) {
if (Strings.equal(ext, extension)) {
return true;
}
}
return false;
} | [
"public",
"static",
"boolean",
"isHtmlFileExtension",
"(",
"String",
"extension",
")",
"{",
"for",
"(",
"final",
"String",
"ext",
":",
"HTML_FILE_EXTENSIONS",
")",
"{",
"if",
"(",
"Strings",
".",
"equal",
"(",
"ext",
",",
"extension",
")",
")",
"{",
"retur... | Replies if the given extension is for HTML file.
@param extension the extension to test.
@return {@code true} if the extension is for a HTML file. | [
"Replies",
"if",
"the",
"given",
"extension",
"is",
"for",
"HTML",
"file",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/AbstractMarkerLanguageParser.java#L143-L150 |
56,902 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/AbstractMarkerLanguageParser.java | AbstractMarkerLanguageParser.setDocumentParser | @Inject
public void setDocumentParser(SarlDocumentationParser parser) {
assert parser != null;
this.parser = parser;
this.parser.reset();
} | java | @Inject
public void setDocumentParser(SarlDocumentationParser parser) {
assert parser != null;
this.parser = parser;
this.parser.reset();
} | [
"@",
"Inject",
"public",
"void",
"setDocumentParser",
"(",
"SarlDocumentationParser",
"parser",
")",
"{",
"assert",
"parser",
"!=",
"null",
";",
"this",
".",
"parser",
"=",
"parser",
";",
"this",
".",
"parser",
".",
"reset",
"(",
")",
";",
"}"
] | Change the document parser.
@param parser the documentation parser. | [
"Change",
"the",
"document",
"parser",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/AbstractMarkerLanguageParser.java#L156-L161 |
56,903 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/AbstractMarkerLanguageParser.java | AbstractMarkerLanguageParser.getStandardValidationComponents | public Iterable<ValidationComponent> getStandardValidationComponents(File inputFile) {
final ValidationHandler handler = new ValidationHandler();
getDocumentParser().extractValidationComponents(inputFile, handler);
return handler.getComponents();
} | java | public Iterable<ValidationComponent> getStandardValidationComponents(File inputFile) {
final ValidationHandler handler = new ValidationHandler();
getDocumentParser().extractValidationComponents(inputFile, handler);
return handler.getComponents();
} | [
"public",
"Iterable",
"<",
"ValidationComponent",
">",
"getStandardValidationComponents",
"(",
"File",
"inputFile",
")",
"{",
"final",
"ValidationHandler",
"handler",
"=",
"new",
"ValidationHandler",
"(",
")",
";",
"getDocumentParser",
"(",
")",
".",
"extractValidatio... | Extract the validation components from the given file.
@param inputFile the input file.
@return the validation components. | [
"Extract",
"the",
"validation",
"components",
"from",
"the",
"given",
"file",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/AbstractMarkerLanguageParser.java#L268-L272 |
56,904 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/AbstractMarkerLanguageParser.java | AbstractMarkerLanguageParser.getMarkerSpecificValidationComponents | public final List<DynamicValidationComponent> getMarkerSpecificValidationComponents(File inputFile,
File rootFolder,
DynamicValidationContext context) {
return getSpecificValidationComponents(
transform(inputFile, false),
inputFile,
rootFolder,
context);
} | java | public final List<DynamicValidationComponent> getMarkerSpecificValidationComponents(File inputFile,
File rootFolder,
DynamicValidationContext context) {
return getSpecificValidationComponents(
transform(inputFile, false),
inputFile,
rootFolder,
context);
} | [
"public",
"final",
"List",
"<",
"DynamicValidationComponent",
">",
"getMarkerSpecificValidationComponents",
"(",
"File",
"inputFile",
",",
"File",
"rootFolder",
",",
"DynamicValidationContext",
"context",
")",
"{",
"return",
"getSpecificValidationComponents",
"(",
"transfor... | Extract the validation components that are specific to the marker language.
@param inputFile the input file.
@param rootFolder the root folder in which the input file is located.
@param context the generation context.
@return the validation components. | [
"Extract",
"the",
"validation",
"components",
"that",
"are",
"specific",
"to",
"the",
"marker",
"language",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/AbstractMarkerLanguageParser.java#L293-L301 |
56,905 | sarl/sarl | sre/io.janusproject/io.janusproject.eclipse/src/io/janusproject/eclipse/buildpath/JanusClasspathContainer.java | JanusClasspathContainer.getJanusPlatformClasspath | public static IBundleDependencies getJanusPlatformClasspath() {
final Bundle bundle = Platform.getBundle(JanusEclipsePlugin.JANUS_KERNEL_PLUGIN_ID);
return BundleUtil.resolveBundleDependencies(bundle,
new JanusBundleJavadocURLMappings(),
JANUS_ROOT_BUNDLE_NAMES);
} | java | public static IBundleDependencies getJanusPlatformClasspath() {
final Bundle bundle = Platform.getBundle(JanusEclipsePlugin.JANUS_KERNEL_PLUGIN_ID);
return BundleUtil.resolveBundleDependencies(bundle,
new JanusBundleJavadocURLMappings(),
JANUS_ROOT_BUNDLE_NAMES);
} | [
"public",
"static",
"IBundleDependencies",
"getJanusPlatformClasspath",
"(",
")",
"{",
"final",
"Bundle",
"bundle",
"=",
"Platform",
".",
"getBundle",
"(",
"JanusEclipsePlugin",
".",
"JANUS_KERNEL_PLUGIN_ID",
")",
";",
"return",
"BundleUtil",
".",
"resolveBundleDependen... | Replies the standard classpath for running the Janus platform.
@return the classpath. | [
"Replies",
"the",
"standard",
"classpath",
"for",
"running",
"the",
"Janus",
"platform",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.eclipse/src/io/janusproject/eclipse/buildpath/JanusClasspathContainer.java#L93-L98 |
56,906 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/FormalParameterListComparator.java | FormalParameterListComparator.compare | public static int compare(XtendParameter p1, XtendParameter p2) {
if (p1 != p2) {
if (p1 == null) {
return Integer.MIN_VALUE;
}
if (p2 == null) {
return Integer.MAX_VALUE;
}
final JvmTypeReference t1 = p1.getParameterType();
final JvmTypeReference t2 = p2.getParameterType();
if (t1 != t2)... | java | public static int compare(XtendParameter p1, XtendParameter p2) {
if (p1 != p2) {
if (p1 == null) {
return Integer.MIN_VALUE;
}
if (p2 == null) {
return Integer.MAX_VALUE;
}
final JvmTypeReference t1 = p1.getParameterType();
final JvmTypeReference t2 = p2.getParameterType();
if (t1 != t2)... | [
"public",
"static",
"int",
"compare",
"(",
"XtendParameter",
"p1",
",",
"XtendParameter",
"p2",
")",
"{",
"if",
"(",
"p1",
"!=",
"p2",
")",
"{",
"if",
"(",
"p1",
"==",
"null",
")",
"{",
"return",
"Integer",
".",
"MIN_VALUE",
";",
"}",
"if",
"(",
"p... | Compare the two formal parameters.
@param p1 the first parameter to compare.
@param p2 the second parameter to compare.
@return A negative value if <code>p1</code> is
lower than <code>p2</code>, a positive value if
<code>p1</code> is greater than <code>p2</code>,
otherwise <code>0</code>. | [
"Compare",
"the",
"two",
"formal",
"parameters",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/FormalParameterListComparator.java#L74-L99 |
56,907 | sarl/sarl | main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlBehaviorBuilderImpl.java | SarlBehaviorBuilderImpl.addSarlBehaviorUnit | public ISarlBehaviorUnitBuilder addSarlBehaviorUnit(String name) {
ISarlBehaviorUnitBuilder builder = this.iSarlBehaviorUnitBuilderProvider.get();
builder.eInit(getSarlBehavior(), name, getTypeResolutionContext());
return builder;
} | java | public ISarlBehaviorUnitBuilder addSarlBehaviorUnit(String name) {
ISarlBehaviorUnitBuilder builder = this.iSarlBehaviorUnitBuilderProvider.get();
builder.eInit(getSarlBehavior(), name, getTypeResolutionContext());
return builder;
} | [
"public",
"ISarlBehaviorUnitBuilder",
"addSarlBehaviorUnit",
"(",
"String",
"name",
")",
"{",
"ISarlBehaviorUnitBuilder",
"builder",
"=",
"this",
".",
"iSarlBehaviorUnitBuilderProvider",
".",
"get",
"(",
")",
";",
"builder",
".",
"eInit",
"(",
"getSarlBehavior",
"(",
... | Create a SarlBehaviorUnit.
@param name the type of the SarlBehaviorUnit.
@return the builder. | [
"Create",
"a",
"SarlBehaviorUnit",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlBehaviorBuilderImpl.java#L158-L162 |
56,908 | sarl/sarl | main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlBehaviorBuilderImpl.java | SarlBehaviorBuilderImpl.addVarSarlField | public ISarlFieldBuilder addVarSarlField(String name) {
ISarlFieldBuilder builder = this.iSarlFieldBuilderProvider.get();
builder.eInit(getSarlBehavior(), name, "var", getTypeResolutionContext());
return builder;
} | java | public ISarlFieldBuilder addVarSarlField(String name) {
ISarlFieldBuilder builder = this.iSarlFieldBuilderProvider.get();
builder.eInit(getSarlBehavior(), name, "var", getTypeResolutionContext());
return builder;
} | [
"public",
"ISarlFieldBuilder",
"addVarSarlField",
"(",
"String",
"name",
")",
"{",
"ISarlFieldBuilder",
"builder",
"=",
"this",
".",
"iSarlFieldBuilderProvider",
".",
"get",
"(",
")",
";",
"builder",
".",
"eInit",
"(",
"getSarlBehavior",
"(",
")",
",",
"name",
... | Create a SarlField.
@param name the name of the SarlField.
@return the builder. | [
"Create",
"a",
"SarlField",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlBehaviorBuilderImpl.java#L171-L175 |
56,909 | sarl/sarl | main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlBehaviorBuilderImpl.java | SarlBehaviorBuilderImpl.addDefSarlAction | public ISarlActionBuilder addDefSarlAction(String name) {
ISarlActionBuilder builder = this.iSarlActionBuilderProvider.get();
builder.eInit(getSarlBehavior(), name, "def", getTypeResolutionContext());
return builder;
} | java | public ISarlActionBuilder addDefSarlAction(String name) {
ISarlActionBuilder builder = this.iSarlActionBuilderProvider.get();
builder.eInit(getSarlBehavior(), name, "def", getTypeResolutionContext());
return builder;
} | [
"public",
"ISarlActionBuilder",
"addDefSarlAction",
"(",
"String",
"name",
")",
"{",
"ISarlActionBuilder",
"builder",
"=",
"this",
".",
"iSarlActionBuilderProvider",
".",
"get",
"(",
")",
";",
"builder",
".",
"eInit",
"(",
"getSarlBehavior",
"(",
")",
",",
"name... | Create a SarlAction.
@param name the name of the SarlAction.
@return the builder. | [
"Create",
"a",
"SarlAction",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlBehaviorBuilderImpl.java#L203-L207 |
56,910 | sarl/sarl | main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlBehaviorBuilderImpl.java | SarlBehaviorBuilderImpl.addSarlClass | public ISarlClassBuilder addSarlClass(String name) {
ISarlClassBuilder builder = this.iSarlClassBuilderProvider.get();
builder.eInit(getSarlBehavior(), name, getTypeResolutionContext());
return builder;
} | java | public ISarlClassBuilder addSarlClass(String name) {
ISarlClassBuilder builder = this.iSarlClassBuilderProvider.get();
builder.eInit(getSarlBehavior(), name, getTypeResolutionContext());
return builder;
} | [
"public",
"ISarlClassBuilder",
"addSarlClass",
"(",
"String",
"name",
")",
"{",
"ISarlClassBuilder",
"builder",
"=",
"this",
".",
"iSarlClassBuilderProvider",
".",
"get",
"(",
")",
";",
"builder",
".",
"eInit",
"(",
"getSarlBehavior",
"(",
")",
",",
"name",
",... | Create a SarlClass.
@param name the name of the SarlClass.
@return the builder. | [
"Create",
"a",
"SarlClass",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlBehaviorBuilderImpl.java#L235-L239 |
56,911 | sarl/sarl | main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlBehaviorBuilderImpl.java | SarlBehaviorBuilderImpl.addSarlCapacityUses | public void addSarlCapacityUses(String... name) {
if (name != null && name.length > 0) {
SarlCapacityUses member = SarlFactory.eINSTANCE.createSarlCapacityUses();
this.sarlBehavior.getMembers().add(member);
member.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendMember());
Collection<JvmParameterizedTy... | java | public void addSarlCapacityUses(String... name) {
if (name != null && name.length > 0) {
SarlCapacityUses member = SarlFactory.eINSTANCE.createSarlCapacityUses();
this.sarlBehavior.getMembers().add(member);
member.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendMember());
Collection<JvmParameterizedTy... | [
"public",
"void",
"addSarlCapacityUses",
"(",
"String",
"...",
"name",
")",
"{",
"if",
"(",
"name",
"!=",
"null",
"&&",
"name",
".",
"length",
">",
"0",
")",
"{",
"SarlCapacityUses",
"member",
"=",
"SarlFactory",
".",
"eINSTANCE",
".",
"createSarlCapacityUse... | Create a SarlCapacityUses.
@param name the types referenced by the SarlCapacityUses. | [
"Create",
"a",
"SarlCapacityUses",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlBehaviorBuilderImpl.java#L283-L296 |
56,912 | sarl/sarl | main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlBehaviorBuilderImpl.java | SarlBehaviorBuilderImpl.addSarlRequiredCapacity | public void addSarlRequiredCapacity(String... name) {
if (name != null && name.length > 0) {
SarlRequiredCapacity member = SarlFactory.eINSTANCE.createSarlRequiredCapacity();
this.sarlBehavior.getMembers().add(member);
member.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendMember());
Collection<JvmPar... | java | public void addSarlRequiredCapacity(String... name) {
if (name != null && name.length > 0) {
SarlRequiredCapacity member = SarlFactory.eINSTANCE.createSarlRequiredCapacity();
this.sarlBehavior.getMembers().add(member);
member.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendMember());
Collection<JvmPar... | [
"public",
"void",
"addSarlRequiredCapacity",
"(",
"String",
"...",
"name",
")",
"{",
"if",
"(",
"name",
"!=",
"null",
"&&",
"name",
".",
"length",
">",
"0",
")",
"{",
"SarlRequiredCapacity",
"member",
"=",
"SarlFactory",
".",
"eINSTANCE",
".",
"createSarlReq... | Create a SarlRequiredCapacity.
@param name the types referenced by the SarlRequiredCapacity. | [
"Create",
"a",
"SarlRequiredCapacity",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlBehaviorBuilderImpl.java#L301-L314 |
56,913 | sarl/sarl | products/sarlc/src/main/java/io/sarl/lang/sarlc/modules/configs/SarlcConfigModule.java | SarlcConfigModule.getSarlcConfig | @SuppressWarnings("static-method")
@Provides
@Singleton
public SarlConfig getSarlcConfig(ConfigurationFactory configFactory, Injector injector) {
final SarlConfig config = SarlConfig.getConfiguration(configFactory);
injector.injectMembers(config);
return config;
} | java | @SuppressWarnings("static-method")
@Provides
@Singleton
public SarlConfig getSarlcConfig(ConfigurationFactory configFactory, Injector injector) {
final SarlConfig config = SarlConfig.getConfiguration(configFactory);
injector.injectMembers(config);
return config;
} | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"@",
"Provides",
"@",
"Singleton",
"public",
"SarlConfig",
"getSarlcConfig",
"(",
"ConfigurationFactory",
"configFactory",
",",
"Injector",
"injector",
")",
"{",
"final",
"SarlConfig",
"config",
"=",
"SarlConfig"... | Replies the instance of the sarl configuration.
@param configFactory accessor to the bootique factory.
@param injector the current injector.
@return the path configuration accessor. | [
"Replies",
"the",
"instance",
"of",
"the",
"sarl",
"configuration",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/products/sarlc/src/main/java/io/sarl/lang/sarlc/modules/configs/SarlcConfigModule.java#L135-L142 |
56,914 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/refactoring/rename/EcorePackageRenameStrategy.java | EcorePackageRenameStrategy.validatePackageName | public static RefactoringStatus validatePackageName(String newName) {
if (!PACKAGE_NAME_PATTERN.matcher(newName).find()) {
RefactoringStatus.createErrorStatus(MessageFormat.format(Messages.SARLJdtPackageRenameParticipant_0, newName));
}
return new RefactoringStatus();
} | java | public static RefactoringStatus validatePackageName(String newName) {
if (!PACKAGE_NAME_PATTERN.matcher(newName).find()) {
RefactoringStatus.createErrorStatus(MessageFormat.format(Messages.SARLJdtPackageRenameParticipant_0, newName));
}
return new RefactoringStatus();
} | [
"public",
"static",
"RefactoringStatus",
"validatePackageName",
"(",
"String",
"newName",
")",
"{",
"if",
"(",
"!",
"PACKAGE_NAME_PATTERN",
".",
"matcher",
"(",
"newName",
")",
".",
"find",
"(",
")",
")",
"{",
"RefactoringStatus",
".",
"createErrorStatus",
"(",
... | Validate the package name.
@param newName the package name to be validated.
@return the status of the validation. | [
"Validate",
"the",
"package",
"name",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/refactoring/rename/EcorePackageRenameStrategy.java#L73-L78 |
56,915 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/refactoring/rename/EcorePackageRenameStrategy.java | EcorePackageRenameStrategy.setPackageName | protected void setPackageName(String newName, ResourceSet resourceSet) {
final EObject object = resourceSet.getEObject(this.uriProvider.apply(resourceSet), true);
if (object instanceof SarlScript) {
((SarlScript) object).setPackage(newName);
} else {
throw new RefactoringException("SARL script not loaded.")... | java | protected void setPackageName(String newName, ResourceSet resourceSet) {
final EObject object = resourceSet.getEObject(this.uriProvider.apply(resourceSet), true);
if (object instanceof SarlScript) {
((SarlScript) object).setPackage(newName);
} else {
throw new RefactoringException("SARL script not loaded.")... | [
"protected",
"void",
"setPackageName",
"(",
"String",
"newName",
",",
"ResourceSet",
"resourceSet",
")",
"{",
"final",
"EObject",
"object",
"=",
"resourceSet",
".",
"getEObject",
"(",
"this",
".",
"uriProvider",
".",
"apply",
"(",
"resourceSet",
")",
",",
"tru... | Change the package name.
@param newName the new name.
@param resourceSet the set of resource to use. | [
"Change",
"the",
"package",
"name",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/refactoring/rename/EcorePackageRenameStrategy.java#L106-L113 |
56,916 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/refactoring/rename/EcorePackageRenameStrategy.java | EcorePackageRenameStrategy.getDeclarationTextEdit | protected TextEdit getDeclarationTextEdit(String newName, ResourceSet resourceSet) {
final EObject object = resourceSet.getEObject(this.uriProvider.apply(resourceSet), true);
if (object instanceof SarlScript) {
final ITextRegion region = getOriginalPackageRegion((SarlScript) object);
if (region != null) {
... | java | protected TextEdit getDeclarationTextEdit(String newName, ResourceSet resourceSet) {
final EObject object = resourceSet.getEObject(this.uriProvider.apply(resourceSet), true);
if (object instanceof SarlScript) {
final ITextRegion region = getOriginalPackageRegion((SarlScript) object);
if (region != null) {
... | [
"protected",
"TextEdit",
"getDeclarationTextEdit",
"(",
"String",
"newName",
",",
"ResourceSet",
"resourceSet",
")",
"{",
"final",
"EObject",
"object",
"=",
"resourceSet",
".",
"getEObject",
"(",
"this",
".",
"uriProvider",
".",
"apply",
"(",
"resourceSet",
")",
... | Replies the text update for the rename.
@param newName the new package name.
@param resourceSet the set of resources.
@return the text update. | [
"Replies",
"the",
"text",
"update",
"for",
"the",
"rename",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/refactoring/rename/EcorePackageRenameStrategy.java#L138-L147 |
56,917 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/refactoring/rename/EcorePackageRenameStrategy.java | EcorePackageRenameStrategy.getOriginalPackageRegion | protected ITextRegion getOriginalPackageRegion(final SarlScript script) {
return this.locationInFileProvider.getFullTextRegion(script,
XtendPackage.Literals.XTEND_FILE__PACKAGE, 0);
} | java | protected ITextRegion getOriginalPackageRegion(final SarlScript script) {
return this.locationInFileProvider.getFullTextRegion(script,
XtendPackage.Literals.XTEND_FILE__PACKAGE, 0);
} | [
"protected",
"ITextRegion",
"getOriginalPackageRegion",
"(",
"final",
"SarlScript",
"script",
")",
"{",
"return",
"this",
".",
"locationInFileProvider",
".",
"getFullTextRegion",
"(",
"script",
",",
"XtendPackage",
".",
"Literals",
".",
"XTEND_FILE__PACKAGE",
",",
"0"... | Replies the text region that is corresponding to the package name.
@param script the script.
@return the region. | [
"Replies",
"the",
"text",
"region",
"that",
"is",
"corresponding",
"to",
"the",
"package",
"name",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/refactoring/rename/EcorePackageRenameStrategy.java#L154-L157 |
56,918 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java | SarlDocumentationParser.setOutputLanguage | @Inject
public void setOutputLanguage(@Named(Constants.LANGUAGE_NAME) String outputLanguage) {
if (!Strings.isNullOrEmpty(outputLanguage)) {
final String[] parts = outputLanguage.split("\\.+"); //$NON-NLS-1$
if (parts.length > 0) {
final String simpleName = parts[parts.length - 1];
if (!Strings.i... | java | @Inject
public void setOutputLanguage(@Named(Constants.LANGUAGE_NAME) String outputLanguage) {
if (!Strings.isNullOrEmpty(outputLanguage)) {
final String[] parts = outputLanguage.split("\\.+"); //$NON-NLS-1$
if (parts.length > 0) {
final String simpleName = parts[parts.length - 1];
if (!Strings.i... | [
"@",
"Inject",
"public",
"void",
"setOutputLanguage",
"(",
"@",
"Named",
"(",
"Constants",
".",
"LANGUAGE_NAME",
")",
"String",
"outputLanguage",
")",
"{",
"if",
"(",
"!",
"Strings",
".",
"isNullOrEmpty",
"(",
"outputLanguage",
")",
")",
"{",
"final",
"Strin... | Change the name of the language.
@param outputLanguage the language name, or {@code null} for ignoring the language name. | [
"Change",
"the",
"name",
"of",
"the",
"language",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L136-L149 |
56,919 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java | SarlDocumentationParser.getFencedCodeBlockFormatter | public static Function2<String, String, String> getFencedCodeBlockFormatter() {
return (languageName, content) -> {
/*final StringBuilder result = new StringBuilder();
result.append("<div class=\\\"highlight"); //$NON-NLS-1$
if (!Strings.isNullOrEmpty(languageName)) {
result.append(" highlight-").ap... | java | public static Function2<String, String, String> getFencedCodeBlockFormatter() {
return (languageName, content) -> {
/*final StringBuilder result = new StringBuilder();
result.append("<div class=\\\"highlight"); //$NON-NLS-1$
if (!Strings.isNullOrEmpty(languageName)) {
result.append(" highlight-").ap... | [
"public",
"static",
"Function2",
"<",
"String",
",",
"String",
",",
"String",
">",
"getFencedCodeBlockFormatter",
"(",
")",
"{",
"return",
"(",
"languageName",
",",
"content",
")",
"->",
"{",
"/*final StringBuilder result = new StringBuilder();\r\n\t\t\tresult.append(\"<d... | Replies the fenced code block formatter.
<p>This code block formatter is usually used by Github.
@return the formatter. | [
"Replies",
"the",
"fenced",
"code",
"block",
"formatter",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L190-L203 |
56,920 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java | SarlDocumentationParser.getBasicCodeBlockFormatter | public static Function2<String, String, String> getBasicCodeBlockFormatter() {
return (languageName, content) -> {
return Pattern.compile("^", Pattern.MULTILINE).matcher(content).replaceAll("\t"); //$NON-NLS-1$ //$NON-NLS-2$
};
} | java | public static Function2<String, String, String> getBasicCodeBlockFormatter() {
return (languageName, content) -> {
return Pattern.compile("^", Pattern.MULTILINE).matcher(content).replaceAll("\t"); //$NON-NLS-1$ //$NON-NLS-2$
};
} | [
"public",
"static",
"Function2",
"<",
"String",
",",
"String",
",",
"String",
">",
"getBasicCodeBlockFormatter",
"(",
")",
"{",
"return",
"(",
"languageName",
",",
"content",
")",
"->",
"{",
"return",
"Pattern",
".",
"compile",
"(",
"\"^\"",
",",
"Pattern",
... | Replies the basic code block formatter.
@return the formatter. | [
"Replies",
"the",
"basic",
"code",
"block",
"formatter",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L209-L213 |
56,921 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java | SarlDocumentationParser.reset | public void reset() {
this.rawPatterns.clear();
this.compiledPatterns.clear();
this.inlineFormat = DEFAULT_INLINE_FORMAT;
this.blockFormat = null;
this.outlineOutputTag = DEFAULT_OUTLINE_OUTPUT_TAG;
this.dynamicNameExtractionPattern = DEFAULT_TAG_NAME_PATTERN;
this.lineContinuation = DEFAULT_LINE_C... | java | public void reset() {
this.rawPatterns.clear();
this.compiledPatterns.clear();
this.inlineFormat = DEFAULT_INLINE_FORMAT;
this.blockFormat = null;
this.outlineOutputTag = DEFAULT_OUTLINE_OUTPUT_TAG;
this.dynamicNameExtractionPattern = DEFAULT_TAG_NAME_PATTERN;
this.lineContinuation = DEFAULT_LINE_C... | [
"public",
"void",
"reset",
"(",
")",
"{",
"this",
".",
"rawPatterns",
".",
"clear",
"(",
")",
";",
"this",
".",
"compiledPatterns",
".",
"clear",
"(",
")",
";",
"this",
".",
"inlineFormat",
"=",
"DEFAULT_INLINE_FORMAT",
";",
"this",
".",
"blockFormat",
"... | Reset to the default settings. | [
"Reset",
"to",
"the",
"default",
"settings",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L244-L252 |
56,922 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java | SarlDocumentationParser.setPattern | public void setPattern(Tag tag, String regex) {
if (Strings.isNullOrEmpty(regex)) {
this.rawPatterns.remove(tag);
this.compiledPatterns.remove(tag);
} else {
this.rawPatterns.put(tag, regex);
this.compiledPatterns.put(tag, Pattern.compile("^\\s*" + regex, PATTERN_COMPILE_OPTIONS)); //$NON-NLS-1$
... | java | public void setPattern(Tag tag, String regex) {
if (Strings.isNullOrEmpty(regex)) {
this.rawPatterns.remove(tag);
this.compiledPatterns.remove(tag);
} else {
this.rawPatterns.put(tag, regex);
this.compiledPatterns.put(tag, Pattern.compile("^\\s*" + regex, PATTERN_COMPILE_OPTIONS)); //$NON-NLS-1$
... | [
"public",
"void",
"setPattern",
"(",
"Tag",
"tag",
",",
"String",
"regex",
")",
"{",
"if",
"(",
"Strings",
".",
"isNullOrEmpty",
"(",
"regex",
")",
")",
"{",
"this",
".",
"rawPatterns",
".",
"remove",
"(",
"tag",
")",
";",
"this",
".",
"compiledPattern... | Change the pattern of the tag.
@param tag the tag.
@param regex the regular expression. | [
"Change",
"the",
"pattern",
"of",
"the",
"tag",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L289-L297 |
56,923 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java | SarlDocumentationParser.getPattern | public String getPattern(Tag tag) {
final String pattern = this.rawPatterns.get(tag);
if (pattern == null) {
return tag.getDefaultPattern();
}
return pattern;
} | java | public String getPattern(Tag tag) {
final String pattern = this.rawPatterns.get(tag);
if (pattern == null) {
return tag.getDefaultPattern();
}
return pattern;
} | [
"public",
"String",
"getPattern",
"(",
"Tag",
"tag",
")",
"{",
"final",
"String",
"pattern",
"=",
"this",
".",
"rawPatterns",
".",
"get",
"(",
"tag",
")",
";",
"if",
"(",
"pattern",
"==",
"null",
")",
"{",
"return",
"tag",
".",
"getDefaultPattern",
"("... | Replies the pattern of the tag.
@param tag the tag.
@return the regular expression pattern. | [
"Replies",
"the",
"pattern",
"of",
"the",
"tag",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L304-L310 |
56,924 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java | SarlDocumentationParser.getTagForPattern | public Tag getTagForPattern(CharSequence text) {
for (final Tag tag : Tag.values()) {
Pattern pattern = this.compiledPatterns.get(tag);
if (pattern == null) {
pattern = Pattern.compile("^\\s*" + getPattern(tag), Pattern.DOTALL); //$NON-NLS-1$
this.compiledPatterns.put(tag, pattern);
}
final... | java | public Tag getTagForPattern(CharSequence text) {
for (final Tag tag : Tag.values()) {
Pattern pattern = this.compiledPatterns.get(tag);
if (pattern == null) {
pattern = Pattern.compile("^\\s*" + getPattern(tag), Pattern.DOTALL); //$NON-NLS-1$
this.compiledPatterns.put(tag, pattern);
}
final... | [
"public",
"Tag",
"getTagForPattern",
"(",
"CharSequence",
"text",
")",
"{",
"for",
"(",
"final",
"Tag",
"tag",
":",
"Tag",
".",
"values",
"(",
")",
")",
"{",
"Pattern",
"pattern",
"=",
"this",
".",
"compiledPatterns",
".",
"get",
"(",
"tag",
")",
";",
... | Replies the tag that is matching the given text.
@param text the text to match.
@return the tag or {@code null}. | [
"Replies",
"the",
"tag",
"that",
"is",
"matching",
"the",
"given",
"text",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L317-L330 |
56,925 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java | SarlDocumentationParser.getLineSeparator | public String getLineSeparator() {
if (Strings.isNullOrEmpty(this.lineSeparator)) {
final String nl = System.getProperty("line.separator"); //$NON-NLS-1$
if (Strings.isNullOrEmpty(nl)) {
return "\n"; //$NON-NLS-1$
}
return nl;
}
return this.lineSeparator;
} | java | public String getLineSeparator() {
if (Strings.isNullOrEmpty(this.lineSeparator)) {
final String nl = System.getProperty("line.separator"); //$NON-NLS-1$
if (Strings.isNullOrEmpty(nl)) {
return "\n"; //$NON-NLS-1$
}
return nl;
}
return this.lineSeparator;
} | [
"public",
"String",
"getLineSeparator",
"(",
")",
"{",
"if",
"(",
"Strings",
".",
"isNullOrEmpty",
"(",
"this",
".",
"lineSeparator",
")",
")",
"{",
"final",
"String",
"nl",
"=",
"System",
".",
"getProperty",
"(",
"\"line.separator\"",
")",
";",
"//$NON-NLS-... | Replies the OS-dependent line separator.
@return the line separator from the {@code "line.separator"} property, or {@code "\n"}. | [
"Replies",
"the",
"OS",
"-",
"dependent",
"line",
"separator",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L560-L569 |
56,926 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java | SarlDocumentationParser.extractDynamicName | protected void extractDynamicName(Tag tag, CharSequence name, OutParameter<String> dynamicName) {
if (tag.hasDynamicName()) {
final Pattern pattern = Pattern.compile(getDynamicNameExtractionPattern());
final Matcher matcher = pattern.matcher(name);
if (matcher.matches()) {
dynamicName.set(Strings.nu... | java | protected void extractDynamicName(Tag tag, CharSequence name, OutParameter<String> dynamicName) {
if (tag.hasDynamicName()) {
final Pattern pattern = Pattern.compile(getDynamicNameExtractionPattern());
final Matcher matcher = pattern.matcher(name);
if (matcher.matches()) {
dynamicName.set(Strings.nu... | [
"protected",
"void",
"extractDynamicName",
"(",
"Tag",
"tag",
",",
"CharSequence",
"name",
",",
"OutParameter",
"<",
"String",
">",
"dynamicName",
")",
"{",
"if",
"(",
"tag",
".",
"hasDynamicName",
"(",
")",
")",
"{",
"final",
"Pattern",
"pattern",
"=",
"P... | Extract the dynamic name of that from the raw text.
@param tag the tag to extract for.
@param name the raw text.
@param dynamicName the dynamic name. | [
"Extract",
"the",
"dynamic",
"name",
"of",
"that",
"from",
"the",
"raw",
"text",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L621-L631 |
56,927 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java | SarlDocumentationParser.transform | public String transform(File inputFile) {
final String content;
try (FileReader reader = new FileReader(inputFile)) {
content = read(reader);
} catch (IOException exception) {
reportError(Messages.SarlDocumentationParser_0, exception);
return null;
}
return transform(content, inputFile);
} | java | public String transform(File inputFile) {
final String content;
try (FileReader reader = new FileReader(inputFile)) {
content = read(reader);
} catch (IOException exception) {
reportError(Messages.SarlDocumentationParser_0, exception);
return null;
}
return transform(content, inputFile);
} | [
"public",
"String",
"transform",
"(",
"File",
"inputFile",
")",
"{",
"final",
"String",
"content",
";",
"try",
"(",
"FileReader",
"reader",
"=",
"new",
"FileReader",
"(",
"inputFile",
")",
")",
"{",
"content",
"=",
"read",
"(",
"reader",
")",
";",
"}",
... | Read the given file and transform its content in order to have a raw text.
@param inputFile the input file.
@return the raw file context. | [
"Read",
"the",
"given",
"file",
"and",
"transform",
"its",
"content",
"in",
"order",
"to",
"have",
"a",
"raw",
"text",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L649-L658 |
56,928 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java | SarlDocumentationParser.postProcessing | protected String postProcessing(CharSequence text) {
final String lineContinuation = getLineContinuation();
if (lineContinuation != null) {
final Pattern pattern = Pattern.compile(
"\\s*\\\\[\\n\\r]+\\s*", //$NON-NLS-1$
Pattern.DOTALL);
final Matcher matcher = pattern.matcher(text.toString().t... | java | protected String postProcessing(CharSequence text) {
final String lineContinuation = getLineContinuation();
if (lineContinuation != null) {
final Pattern pattern = Pattern.compile(
"\\s*\\\\[\\n\\r]+\\s*", //$NON-NLS-1$
Pattern.DOTALL);
final Matcher matcher = pattern.matcher(text.toString().t... | [
"protected",
"String",
"postProcessing",
"(",
"CharSequence",
"text",
")",
"{",
"final",
"String",
"lineContinuation",
"=",
"getLineContinuation",
"(",
")",
";",
"if",
"(",
"lineContinuation",
"!=",
"null",
")",
"{",
"final",
"Pattern",
"pattern",
"=",
"Pattern"... | Do a post processing of the text.
@param text the text to post process.
@return the post-processed text. | [
"Do",
"a",
"post",
"processing",
"of",
"the",
"text",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L716-L726 |
56,929 | sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java | SarlDocumentationParser.formatBlockText | protected static String formatBlockText(String content, String languageName, Function2<String, String, String> blockFormat) {
String replacement = Strings.nullToEmpty(content);
final String[] lines = replacement.trim().split("[\n\r]+"); //$NON-NLS-1$
int minIndent = Integer.MAX_VALUE;
final Pattern wpPatter... | java | protected static String formatBlockText(String content, String languageName, Function2<String, String, String> blockFormat) {
String replacement = Strings.nullToEmpty(content);
final String[] lines = replacement.trim().split("[\n\r]+"); //$NON-NLS-1$
int minIndent = Integer.MAX_VALUE;
final Pattern wpPatter... | [
"protected",
"static",
"String",
"formatBlockText",
"(",
"String",
"content",
",",
"String",
"languageName",
",",
"Function2",
"<",
"String",
",",
"String",
",",
"String",
">",
"blockFormat",
")",
"{",
"String",
"replacement",
"=",
"Strings",
".",
"nullToEmpty",... | Format the given text in order to be suitable for being output as a block.
@param content the text.
@param languageName the name of the output language.
@param blockFormat the formatting template.
@return the formatted text. | [
"Format",
"the",
"given",
"text",
"in",
"order",
"to",
"be",
"suitable",
"for",
"being",
"output",
"as",
"a",
"block",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L1055-L1089 |
56,930 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/DocumentationBuilderFragment.java | DocumentationBuilderFragment.generateInnerDocumentationAdapter | protected void generateInnerDocumentationAdapter() {
final TypeReference adapter = getCodeElementExtractor().getInnerBlockDocumentationAdapter();
final StringConcatenationClient content = new StringConcatenationClient() {
@Override
protected void appendTo(TargetStringConcatenation it) {
it.append("public ... | java | protected void generateInnerDocumentationAdapter() {
final TypeReference adapter = getCodeElementExtractor().getInnerBlockDocumentationAdapter();
final StringConcatenationClient content = new StringConcatenationClient() {
@Override
protected void appendTo(TargetStringConcatenation it) {
it.append("public ... | [
"protected",
"void",
"generateInnerDocumentationAdapter",
"(",
")",
"{",
"final",
"TypeReference",
"adapter",
"=",
"getCodeElementExtractor",
"(",
")",
".",
"getInnerBlockDocumentationAdapter",
"(",
")",
";",
"final",
"StringConcatenationClient",
"content",
"=",
"new",
... | Generate the adapter that supports the inner documentation. | [
"Generate",
"the",
"adapter",
"that",
"supports",
"the",
"inner",
"documentation",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/DocumentationBuilderFragment.java#L224-L275 |
56,931 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/editor/SARLSourceViewerPreferenceAccess.java | SARLSourceViewerPreferenceAccess.setAutoFormattingEnabled | public void setAutoFormattingEnabled(Boolean enable) {
final IPreferenceStore store = getWritablePreferenceStore(null);
if (enable == null) {
store.setToDefault(AUTOFORMATTING_PROPERTY);
} else {
store.setValue(AUTOFORMATTING_PROPERTY, enable.booleanValue());
}
} | java | public void setAutoFormattingEnabled(Boolean enable) {
final IPreferenceStore store = getWritablePreferenceStore(null);
if (enable == null) {
store.setToDefault(AUTOFORMATTING_PROPERTY);
} else {
store.setValue(AUTOFORMATTING_PROPERTY, enable.booleanValue());
}
} | [
"public",
"void",
"setAutoFormattingEnabled",
"(",
"Boolean",
"enable",
")",
"{",
"final",
"IPreferenceStore",
"store",
"=",
"getWritablePreferenceStore",
"(",
"null",
")",
";",
"if",
"(",
"enable",
"==",
"null",
")",
"{",
"store",
".",
"setToDefault",
"(",
"A... | Enable or disable the auto-formatting feature into the SARL editor.
@param enable is {@code true} if it is enabled; {@code false} if it is disable; {@code null}
to restore the default value.
@since 0.8
@see #getWritablePreferenceStore(Object) | [
"Enable",
"or",
"disable",
"the",
"auto",
"-",
"formatting",
"feature",
"into",
"the",
"SARL",
"editor",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/editor/SARLSourceViewerPreferenceAccess.java#L69-L76 |
56,932 | sarl/sarl | main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlActionBuilderImpl.java | SarlActionBuilderImpl.setReturnType | public void setReturnType(String type) {
if (!Strings.isEmpty(type)
&& !Objects.equals("void", type)
&& !Objects.equals(Void.class.getName(), type)) {
this.sarlAction.setReturnType(newTypeRef(container, type));
} else {
this.sarlAction.setReturnType(null);
}
} | java | public void setReturnType(String type) {
if (!Strings.isEmpty(type)
&& !Objects.equals("void", type)
&& !Objects.equals(Void.class.getName(), type)) {
this.sarlAction.setReturnType(newTypeRef(container, type));
} else {
this.sarlAction.setReturnType(null);
}
} | [
"public",
"void",
"setReturnType",
"(",
"String",
"type",
")",
"{",
"if",
"(",
"!",
"Strings",
".",
"isEmpty",
"(",
"type",
")",
"&&",
"!",
"Objects",
".",
"equals",
"(",
"\"void\"",
",",
"type",
")",
"&&",
"!",
"Objects",
".",
"equals",
"(",
"Void",... | Change the return type.
@param type the return type of the member. | [
"Change",
"the",
"return",
"type",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlActionBuilderImpl.java#L147-L155 |
56,933 | sarl/sarl | main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlActionBuilderImpl.java | SarlActionBuilderImpl.addAnnotation | public void addAnnotation(String type) {
if (!Strings.isEmpty(type)) {
XAnnotation annotation = XAnnotationsFactory.eINSTANCE.createXAnnotation();
annotation.setAnnotationType(newTypeRef(getSarlAction(), type).getType());
getSarlAction().getAnnotations().add(annotation);
}
} | java | public void addAnnotation(String type) {
if (!Strings.isEmpty(type)) {
XAnnotation annotation = XAnnotationsFactory.eINSTANCE.createXAnnotation();
annotation.setAnnotationType(newTypeRef(getSarlAction(), type).getType());
getSarlAction().getAnnotations().add(annotation);
}
} | [
"public",
"void",
"addAnnotation",
"(",
"String",
"type",
")",
"{",
"if",
"(",
"!",
"Strings",
".",
"isEmpty",
"(",
"type",
")",
")",
"{",
"XAnnotation",
"annotation",
"=",
"XAnnotationsFactory",
".",
"eINSTANCE",
".",
"createXAnnotation",
"(",
")",
";",
"... | Add an annotation.
@param type the qualified name of the annotation | [
"Add",
"an",
"annotation",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlActionBuilderImpl.java#L171-L177 |
56,934 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java | LoggerCreator.useJanusMessageFormat | public static void useJanusMessageFormat() {
final String format = System.getProperty(FORMAT_PROPERTY_KEY, null);
if (format == null || format.isEmpty()) {
System.setProperty(FORMAT_PROPERTY_KEY, JANUS_FORMAT);
}
} | java | public static void useJanusMessageFormat() {
final String format = System.getProperty(FORMAT_PROPERTY_KEY, null);
if (format == null || format.isEmpty()) {
System.setProperty(FORMAT_PROPERTY_KEY, JANUS_FORMAT);
}
} | [
"public",
"static",
"void",
"useJanusMessageFormat",
"(",
")",
"{",
"final",
"String",
"format",
"=",
"System",
".",
"getProperty",
"(",
"FORMAT_PROPERTY_KEY",
",",
"null",
")",
";",
"if",
"(",
"format",
"==",
"null",
"||",
"format",
".",
"isEmpty",
"(",
"... | Change the configuration of the root logger for using the Janus format for the messages. | [
"Change",
"the",
"configuration",
"of",
"the",
"root",
"logger",
"for",
"using",
"the",
"Janus",
"format",
"for",
"the",
"messages",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java#L67-L72 |
56,935 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java | LoggerCreator.createPlatformLogger | public static Logger createPlatformLogger() {
final Logger logger = Logger.getAnonymousLogger();
for (final Handler handler : logger.getHandlers()) {
logger.removeHandler(handler);
}
final Handler stderr = new StandardErrorOutputConsoleHandler();
stderr.setLevel(Level.ALL);
final Handler stdout = new Sta... | java | public static Logger createPlatformLogger() {
final Logger logger = Logger.getAnonymousLogger();
for (final Handler handler : logger.getHandlers()) {
logger.removeHandler(handler);
}
final Handler stderr = new StandardErrorOutputConsoleHandler();
stderr.setLevel(Level.ALL);
final Handler stdout = new Sta... | [
"public",
"static",
"Logger",
"createPlatformLogger",
"(",
")",
"{",
"final",
"Logger",
"logger",
"=",
"Logger",
".",
"getAnonymousLogger",
"(",
")",
";",
"for",
"(",
"final",
"Handler",
"handler",
":",
"logger",
".",
"getHandlers",
"(",
")",
")",
"{",
"lo... | Create a logger with the given name for the platform.
<p>The platform logger has the level {@link Level#ALL}. It override the
output handlers with handlers for the standard output and standard error.
The platform logger is a root logger.
@return the logger. | [
"Create",
"a",
"logger",
"with",
"the",
"given",
"name",
"for",
"the",
"platform",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java#L83-L97 |
56,936 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java | LoggerCreator.getLoggingLevelFromProperties | public static Level getLoggingLevelFromProperties() {
if (levelFromProperties == null) {
final String verboseLevel = JanusConfig.getSystemProperty(JanusConfig.VERBOSE_LEVEL_NAME, JanusConfig.VERBOSE_LEVEL_VALUE);
levelFromProperties = parseLoggingLevel(verboseLevel);
}
return levelFromProperties;
} | java | public static Level getLoggingLevelFromProperties() {
if (levelFromProperties == null) {
final String verboseLevel = JanusConfig.getSystemProperty(JanusConfig.VERBOSE_LEVEL_NAME, JanusConfig.VERBOSE_LEVEL_VALUE);
levelFromProperties = parseLoggingLevel(verboseLevel);
}
return levelFromProperties;
} | [
"public",
"static",
"Level",
"getLoggingLevelFromProperties",
"(",
")",
"{",
"if",
"(",
"levelFromProperties",
"==",
"null",
")",
"{",
"final",
"String",
"verboseLevel",
"=",
"JanusConfig",
".",
"getSystemProperty",
"(",
"JanusConfig",
".",
"VERBOSE_LEVEL_NAME",
","... | Extract the logging level from the system properties.
@return the logging level. | [
"Extract",
"the",
"logging",
"level",
"from",
"the",
"system",
"properties",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java#L126-L132 |
56,937 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java | LoggerCreator.parseLoggingLevel | @SuppressWarnings({ "checkstyle:returncount", "checkstyle:cyclomaticcomplexity" })
public static Level parseLoggingLevel(String level) {
if (level == null) {
return Level.INFO;
}
switch (level.toLowerCase()) {
case "none": //$NON-NLS-1$
case "false": //$NON-NLS-1$
case "0": //$NON-NLS-1$
return Level... | java | @SuppressWarnings({ "checkstyle:returncount", "checkstyle:cyclomaticcomplexity" })
public static Level parseLoggingLevel(String level) {
if (level == null) {
return Level.INFO;
}
switch (level.toLowerCase()) {
case "none": //$NON-NLS-1$
case "false": //$NON-NLS-1$
case "0": //$NON-NLS-1$
return Level... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"checkstyle:returncount\"",
",",
"\"checkstyle:cyclomaticcomplexity\"",
"}",
")",
"public",
"static",
"Level",
"parseLoggingLevel",
"(",
"String",
"level",
")",
"{",
"if",
"(",
"level",
"==",
"null",
")",
"{",
"return",
"Level"... | Extract the logging level from the given string.
@param level
- the string representation of the logging level.
@return the logging level. | [
"Extract",
"the",
"logging",
"level",
"from",
"the",
"given",
"string",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java#L141-L185 |
56,938 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java | LoggerCreator.fromInt | @SuppressWarnings({ "checkstyle:magicnumber", "checkstyle:returncount" })
public static Level fromInt(int num) {
switch (num) {
case 0:
return Level.OFF;
case 1:
return Level.SEVERE;
case 2:
return Level.WARNING;
case 3:
return Level.INFO;
case 4:
return Level.FINE;
case 5:
return Level... | java | @SuppressWarnings({ "checkstyle:magicnumber", "checkstyle:returncount" })
public static Level fromInt(int num) {
switch (num) {
case 0:
return Level.OFF;
case 1:
return Level.SEVERE;
case 2:
return Level.WARNING;
case 3:
return Level.INFO;
case 4:
return Level.FINE;
case 5:
return Level... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"checkstyle:magicnumber\"",
",",
"\"checkstyle:returncount\"",
"}",
")",
"public",
"static",
"Level",
"fromInt",
"(",
"int",
"num",
")",
"{",
"switch",
"(",
"num",
")",
"{",
"case",
"0",
":",
"return",
"Level",
".",
"OFF"... | Convert a numerical representation of logging level to the logging level.
@param num
- the numerical index that corresponds to the given level.
@return the logging level. | [
"Convert",
"a",
"numerical",
"representation",
"of",
"logging",
"level",
"to",
"the",
"logging",
"level",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java#L194-L219 |
56,939 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java | LoggerCreator.toInt | @SuppressWarnings({ "checkstyle:magicnumber", "checkstyle:returncount", "checkstyle:npathcomplexity" })
public static int toInt(Level level) {
if (level == Level.OFF) {
return 0;
}
if (level == Level.SEVERE) {
return 1;
}
if (level == Level.WARNING) {
return 2;
}
if (level == Level.INFO) {
re... | java | @SuppressWarnings({ "checkstyle:magicnumber", "checkstyle:returncount", "checkstyle:npathcomplexity" })
public static int toInt(Level level) {
if (level == Level.OFF) {
return 0;
}
if (level == Level.SEVERE) {
return 1;
}
if (level == Level.WARNING) {
return 2;
}
if (level == Level.INFO) {
re... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"checkstyle:magicnumber\"",
",",
"\"checkstyle:returncount\"",
",",
"\"checkstyle:npathcomplexity\"",
"}",
")",
"public",
"static",
"int",
"toInt",
"(",
"Level",
"level",
")",
"{",
"if",
"(",
"level",
"==",
"Level",
".",
"OFF",... | Convert a logging level to its numerical equivalent.
@param level
- the logging level.
@return the numerical index that corresponds to the given level. | [
"Convert",
"a",
"logging",
"level",
"to",
"its",
"numerical",
"equivalent",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java#L228-L258 |
56,940 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/services/Services.java | Services.startServices | public static void startServices(IServiceManager manager) {
final List<Service> otherServices = new ArrayList<>();
final List<Service> infraServices = new ArrayList<>();
final LinkedList<DependencyNode> serviceQueue = new LinkedList<>();
final Accessors accessors = new StartingPhaseAccessors();
// Build the ... | java | public static void startServices(IServiceManager manager) {
final List<Service> otherServices = new ArrayList<>();
final List<Service> infraServices = new ArrayList<>();
final LinkedList<DependencyNode> serviceQueue = new LinkedList<>();
final Accessors accessors = new StartingPhaseAccessors();
// Build the ... | [
"public",
"static",
"void",
"startServices",
"(",
"IServiceManager",
"manager",
")",
"{",
"final",
"List",
"<",
"Service",
">",
"otherServices",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"final",
"List",
"<",
"Service",
">",
"infraServices",
"=",
"new",
... | Start the services associated to the given service manager.
<p>This starting function supports the {@link DependentService prioritized services}.
@param manager the manager of the services to start. | [
"Start",
"the",
"services",
"associated",
"to",
"the",
"given",
"service",
"manager",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/services/Services.java#L75-L88 |
56,941 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/services/Services.java | Services.stopServices | public static void stopServices(IServiceManager manager) {
final List<Service> otherServices = new ArrayList<>();
final List<Service> infraServices = new ArrayList<>();
final LinkedList<DependencyNode> serviceQueue = new LinkedList<>();
final Accessors accessors = new StoppingPhaseAccessors();
// Build the d... | java | public static void stopServices(IServiceManager manager) {
final List<Service> otherServices = new ArrayList<>();
final List<Service> infraServices = new ArrayList<>();
final LinkedList<DependencyNode> serviceQueue = new LinkedList<>();
final Accessors accessors = new StoppingPhaseAccessors();
// Build the d... | [
"public",
"static",
"void",
"stopServices",
"(",
"IServiceManager",
"manager",
")",
"{",
"final",
"List",
"<",
"Service",
">",
"otherServices",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"final",
"List",
"<",
"Service",
">",
"infraServices",
"=",
"new",
... | Stop the services associated to the given service manager.
<p>This stopping function supports the {@link DependentService prioritized services}.
@param manager the manager of the services to stop. | [
"Stop",
"the",
"services",
"associated",
"to",
"the",
"given",
"service",
"manager",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/services/Services.java#L108-L121 |
56,942 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/services/Services.java | Services.runDependencyGraph | @SuppressWarnings("checkstyle:npathcomplexity")
private static void runDependencyGraph(Queue<DependencyNode> roots, List<Service> infraServices, List<Service> freeServices,
Accessors accessors) {
final boolean async = accessors.isAsyncStateWaitingEnabled();
final Set<Class<? extends Service>> executed = new Tre... | java | @SuppressWarnings("checkstyle:npathcomplexity")
private static void runDependencyGraph(Queue<DependencyNode> roots, List<Service> infraServices, List<Service> freeServices,
Accessors accessors) {
final boolean async = accessors.isAsyncStateWaitingEnabled();
final Set<Class<? extends Service>> executed = new Tre... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:npathcomplexity\"",
")",
"private",
"static",
"void",
"runDependencyGraph",
"(",
"Queue",
"<",
"DependencyNode",
">",
"roots",
",",
"List",
"<",
"Service",
">",
"infraServices",
",",
"List",
"<",
"Service",
">",
"freeSer... | Run the dependency graph for the services.
@param roots filled with the services that have no dependency.
@param infraServices filled with the infrastructure services.
@param freeServices filled with the services that are executed before/after all the dependent services.
@param accessors permits to retreive informatio... | [
"Run",
"the",
"dependency",
"graph",
"for",
"the",
"services",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/services/Services.java#L280-L309 |
56,943 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/bic/BuiltinCapacityUtil.java | BuiltinCapacityUtil.getContextsOf | public static SynchronizedIterable<AgentContext> getContextsOf(Agent agent) throws Exception {
final ExternalContextAccess skill = SREutils.getInternalSkill(agent, ExternalContextAccess.class);
assert skill != null;
return skill.getAllContexts();
} | java | public static SynchronizedIterable<AgentContext> getContextsOf(Agent agent) throws Exception {
final ExternalContextAccess skill = SREutils.getInternalSkill(agent, ExternalContextAccess.class);
assert skill != null;
return skill.getAllContexts();
} | [
"public",
"static",
"SynchronizedIterable",
"<",
"AgentContext",
">",
"getContextsOf",
"(",
"Agent",
"agent",
")",
"throws",
"Exception",
"{",
"final",
"ExternalContextAccess",
"skill",
"=",
"SREutils",
".",
"getInternalSkill",
"(",
"agent",
",",
"ExternalContextAcces... | Replies the contexts in which the agent is located.
@param agent the agent for which the contexts must be retrieved.
@return the contexts of the agents.
@throws Exception - when it is not possible to retrieve the contexts. | [
"Replies",
"the",
"contexts",
"in",
"which",
"the",
"agent",
"is",
"located",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/bic/BuiltinCapacityUtil.java#L52-L56 |
56,944 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/bic/BuiltinCapacityUtil.java | BuiltinCapacityUtil.getContextIn | public static AgentContext getContextIn(Agent agent) throws Exception {
final InnerContextAccess skill = SREutils.getInternalSkill(agent, InnerContextAccess.class);
if (skill instanceof InnerContextSkill) {
final InnerContextSkill janusSkill = (InnerContextSkill) skill;
if (janusSkill.hasInnerContext()) {
... | java | public static AgentContext getContextIn(Agent agent) throws Exception {
final InnerContextAccess skill = SREutils.getInternalSkill(agent, InnerContextAccess.class);
if (skill instanceof InnerContextSkill) {
final InnerContextSkill janusSkill = (InnerContextSkill) skill;
if (janusSkill.hasInnerContext()) {
... | [
"public",
"static",
"AgentContext",
"getContextIn",
"(",
"Agent",
"agent",
")",
"throws",
"Exception",
"{",
"final",
"InnerContextAccess",
"skill",
"=",
"SREutils",
".",
"getInternalSkill",
"(",
"agent",
",",
"InnerContextAccess",
".",
"class",
")",
";",
"if",
"... | Replies the inner context of the agent, if it was created.
@param agent the agent for which the inner context must be retreived.
@return the inner context, or <code>null</code>.
@throws Exception - when it is not possible to retreive the inner context. | [
"Replies",
"the",
"inner",
"context",
"of",
"the",
"agent",
"if",
"it",
"was",
"created",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/bic/BuiltinCapacityUtil.java#L65-L79 |
56,945 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SarlCompiler.java | SarlCompiler._toJavaStatement | @SuppressWarnings("static-method")
protected void _toJavaStatement(SarlBreakExpression breakExpression, ITreeAppendable appendable, boolean isReferenced) {
appendable.newLine().append("break;"); //$NON-NLS-1$
} | java | @SuppressWarnings("static-method")
protected void _toJavaStatement(SarlBreakExpression breakExpression, ITreeAppendable appendable, boolean isReferenced) {
appendable.newLine().append("break;"); //$NON-NLS-1$
} | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"protected",
"void",
"_toJavaStatement",
"(",
"SarlBreakExpression",
"breakExpression",
",",
"ITreeAppendable",
"appendable",
",",
"boolean",
"isReferenced",
")",
"{",
"appendable",
".",
"newLine",
"(",
")",
".",... | Generate the Java code related to the preparation statements for the break keyword.
@param breakExpression the expression.
@param appendable the output.
@param isReferenced indicates if the expression is referenced. | [
"Generate",
"the",
"Java",
"code",
"related",
"to",
"the",
"preparation",
"statements",
"for",
"the",
"break",
"keyword",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SarlCompiler.java#L528-L531 |
56,946 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SarlCompiler.java | SarlCompiler.getReferencedLocalVariable | @SuppressWarnings("static-method")
protected Map<XVariableDeclaration, XFeatureCall> getReferencedLocalVariable(XExpression expression, boolean onlyWritable) {
final Map<XVariableDeclaration, XFeatureCall> localVariables = new TreeMap<>((k1, k2) -> {
return k1.getIdentifier().compareTo(k2.getIdentifier());
});
... | java | @SuppressWarnings("static-method")
protected Map<XVariableDeclaration, XFeatureCall> getReferencedLocalVariable(XExpression expression, boolean onlyWritable) {
final Map<XVariableDeclaration, XFeatureCall> localVariables = new TreeMap<>((k1, k2) -> {
return k1.getIdentifier().compareTo(k2.getIdentifier());
});
... | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"protected",
"Map",
"<",
"XVariableDeclaration",
",",
"XFeatureCall",
">",
"getReferencedLocalVariable",
"(",
"XExpression",
"expression",
",",
"boolean",
"onlyWritable",
")",
"{",
"final",
"Map",
"<",
"XVariable... | Replies all the variables that are referenced into the given expression.
@param expression the expression.
@param onlyWritable if {@code true} only the writable variables are replied. Otherwise, all variables are replied.
@return the referenced variables. | [
"Replies",
"all",
"the",
"variables",
"that",
"are",
"referenced",
"into",
"the",
"given",
"expression",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SarlCompiler.java#L654-L668 |
56,947 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SarlCompiler.java | SarlCompiler.isAtLeastJava8 | protected boolean isAtLeastJava8(EObject context) {
return this.generatorConfigProvider.get(EcoreUtil.getRootContainer(context)).getJavaSourceVersion().isAtLeast(JavaVersion.JAVA8);
} | java | protected boolean isAtLeastJava8(EObject context) {
return this.generatorConfigProvider.get(EcoreUtil.getRootContainer(context)).getJavaSourceVersion().isAtLeast(JavaVersion.JAVA8);
} | [
"protected",
"boolean",
"isAtLeastJava8",
"(",
"EObject",
"context",
")",
"{",
"return",
"this",
".",
"generatorConfigProvider",
".",
"get",
"(",
"EcoreUtil",
".",
"getRootContainer",
"(",
"context",
")",
")",
".",
"getJavaSourceVersion",
"(",
")",
".",
"isAtLea... | Replies if the generation is for Java version 8 at least.
@param context the context.
@return {@code true} if Java 8 or newer. | [
"Replies",
"if",
"the",
"generation",
"is",
"for",
"Java",
"version",
"8",
"at",
"least",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SarlCompiler.java#L675-L677 |
56,948 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SarlCompiler.java | SarlCompiler._toJavaExpression | protected void _toJavaExpression(SarlAssertExpression assertExpression, ITreeAppendable appendable) {
if (!assertExpression.isIsStatic() && isAtLeastJava8(assertExpression)) {
appendable.append("/* error - couldn't compile nested assert */"); //$NON-NLS-1$
}
} | java | protected void _toJavaExpression(SarlAssertExpression assertExpression, ITreeAppendable appendable) {
if (!assertExpression.isIsStatic() && isAtLeastJava8(assertExpression)) {
appendable.append("/* error - couldn't compile nested assert */"); //$NON-NLS-1$
}
} | [
"protected",
"void",
"_toJavaExpression",
"(",
"SarlAssertExpression",
"assertExpression",
",",
"ITreeAppendable",
"appendable",
")",
"{",
"if",
"(",
"!",
"assertExpression",
".",
"isIsStatic",
"(",
")",
"&&",
"isAtLeastJava8",
"(",
"assertExpression",
")",
")",
"{"... | Generate the Java code related to the expression for the assert keyword.
@param assertExpression the expression.
@param appendable the output. | [
"Generate",
"the",
"Java",
"code",
"related",
"to",
"the",
"expression",
"for",
"the",
"assert",
"keyword",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SarlCompiler.java#L705-L709 |
56,949 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SarlCompiler.java | SarlCompiler.jvmOperationCallToJavaExpression | protected void jvmOperationCallToJavaExpression(final XExpression sourceObject, final JvmOperation operation,
XExpression receiver, List<XExpression> arguments, ITreeAppendable appendable) {
String name = null;
assert operation != null;
if (appendable.hasName(operation)) {
name = appendable.getName(operatio... | java | protected void jvmOperationCallToJavaExpression(final XExpression sourceObject, final JvmOperation operation,
XExpression receiver, List<XExpression> arguments, ITreeAppendable appendable) {
String name = null;
assert operation != null;
if (appendable.hasName(operation)) {
name = appendable.getName(operatio... | [
"protected",
"void",
"jvmOperationCallToJavaExpression",
"(",
"final",
"XExpression",
"sourceObject",
",",
"final",
"JvmOperation",
"operation",
",",
"XExpression",
"receiver",
",",
"List",
"<",
"XExpression",
">",
"arguments",
",",
"ITreeAppendable",
"appendable",
")",... | Generate the Java expression for the given JVM operation.
@param sourceObject the object into the source tree that is the source for the call.
@param operation the JVM operation to call.
@param receiver the receiver of the call.
@param arguments the arguments to pass to the called operation.
@param appendable the rece... | [
"Generate",
"the",
"Java",
"expression",
"for",
"the",
"given",
"JVM",
"operation",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SarlCompiler.java#L835-L869 |
56,950 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SarlCompiler.java | SarlCompiler.canBeNotStaticAnonymousClass | @SuppressWarnings("static-method")
protected boolean canBeNotStaticAnonymousClass(XClosure closure, LightweightTypeReference typeRef,
JvmOperation operation) {
return !typeRef.isSubtypeOf(Serializable.class);
} | java | @SuppressWarnings("static-method")
protected boolean canBeNotStaticAnonymousClass(XClosure closure, LightweightTypeReference typeRef,
JvmOperation operation) {
return !typeRef.isSubtypeOf(Serializable.class);
} | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"protected",
"boolean",
"canBeNotStaticAnonymousClass",
"(",
"XClosure",
"closure",
",",
"LightweightTypeReference",
"typeRef",
",",
"JvmOperation",
"operation",
")",
"{",
"return",
"!",
"typeRef",
".",
"isSubtypeO... | Replies if the given closure could be represented by an not static anonymous class.
@param closure the closure.
@param typeRef the type of the closure.
@param operation the operation to implement.
@return {@code true} if the given closure could be represented by a not-static anonymous class.
@since 0.8.6 | [
"Replies",
"if",
"the",
"given",
"closure",
"could",
"be",
"represented",
"by",
"an",
"not",
"static",
"anonymous",
"class",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SarlCompiler.java#L1289-L1293 |
56,951 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/AbstractDMultiMapView.java | AbstractDMultiMapView.wrapValues | Collection<V> wrapValues(K key, Collection<V> values) {
final Object backEnd = DataViewDelegate.undelegate(values);
if (backEnd instanceof List<?>) {
return new SingleKeyValueListView(key, (List<V>) values);
}
if (backEnd instanceof Set<?>) {
return new SingleKeyValueSetView(key, (Set<V>) values);
}
t... | java | Collection<V> wrapValues(K key, Collection<V> values) {
final Object backEnd = DataViewDelegate.undelegate(values);
if (backEnd instanceof List<?>) {
return new SingleKeyValueListView(key, (List<V>) values);
}
if (backEnd instanceof Set<?>) {
return new SingleKeyValueSetView(key, (Set<V>) values);
}
t... | [
"Collection",
"<",
"V",
">",
"wrapValues",
"(",
"K",
"key",
",",
"Collection",
"<",
"V",
">",
"values",
")",
"{",
"final",
"Object",
"backEnd",
"=",
"DataViewDelegate",
".",
"undelegate",
"(",
"values",
")",
";",
"if",
"(",
"backEnd",
"instanceof",
"List... | Wrap the given values into a dedicated view.
<p>The replies view may be a {@link SingleKeyValueListView} or a {@link SingleKeyValueSetView} according to the type of the
given values' collection.
@param key the key of the values.
@param values the values.
@return the wrapper. | [
"Wrap",
"the",
"given",
"values",
"into",
"a",
"dedicated",
"view",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/AbstractDMultiMapView.java#L90-L99 |
56,952 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/AbstractDMultiMapView.java | AbstractDMultiMapView.copyValues | @SuppressWarnings({ "unchecked", "checkstyle:illegaltype" })
Collection<V> copyValues(Collection<V> values) {
final Object backEnd = DataViewDelegate.undelegate(values);
if (backEnd instanceof List<?>) {
return Lists.newArrayList(values);
}
if (backEnd instanceof TreeSet<?>) {
TreeSet<V> c = (TreeSet<V>)... | java | @SuppressWarnings({ "unchecked", "checkstyle:illegaltype" })
Collection<V> copyValues(Collection<V> values) {
final Object backEnd = DataViewDelegate.undelegate(values);
if (backEnd instanceof List<?>) {
return Lists.newArrayList(values);
}
if (backEnd instanceof TreeSet<?>) {
TreeSet<V> c = (TreeSet<V>)... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
",",
"\"checkstyle:illegaltype\"",
"}",
")",
"Collection",
"<",
"V",
">",
"copyValues",
"(",
"Collection",
"<",
"V",
">",
"values",
")",
"{",
"final",
"Object",
"backEnd",
"=",
"DataViewDelegate",
".",
"undel... | Copy the given values.
<p>The replies collection may be a {@link List} or a {@link Set} according to the type of the given values' collection.
@param values the values.
@return the copy. | [
"Copy",
"the",
"given",
"values",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/AbstractDMultiMapView.java#L109-L128 |
56,953 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.generatePlistFile | protected void generatePlistFile(CombinedTmAppendable it) {
final String language = getLanguageSimpleName().toLowerCase();
final String newBasename = getBasename(MessageFormat.format(BASENAME_PATTERN_NEW, language));
writeFile(newBasename, it.getNewSyntaxContent());
} | java | protected void generatePlistFile(CombinedTmAppendable it) {
final String language = getLanguageSimpleName().toLowerCase();
final String newBasename = getBasename(MessageFormat.format(BASENAME_PATTERN_NEW, language));
writeFile(newBasename, it.getNewSyntaxContent());
} | [
"protected",
"void",
"generatePlistFile",
"(",
"CombinedTmAppendable",
"it",
")",
"{",
"final",
"String",
"language",
"=",
"getLanguageSimpleName",
"(",
")",
".",
"toLowerCase",
"(",
")",
";",
"final",
"String",
"newBasename",
"=",
"getBasename",
"(",
"MessageForm... | Generate the Plist file.
@param it the appendable used for generated the "tmLanguage" file. | [
"Generate",
"the",
"Plist",
"file",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L210-L214 |
56,954 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.generateLicenseFile | protected void generateLicenseFile() {
final CharSequence licenseText = getLicenseText();
if (licenseText != null) {
final String text = licenseText.toString();
if (!Strings.isEmpty(text)) {
writeFile(LICENSE_FILE, text.getBytes());
}
}
} | java | protected void generateLicenseFile() {
final CharSequence licenseText = getLicenseText();
if (licenseText != null) {
final String text = licenseText.toString();
if (!Strings.isEmpty(text)) {
writeFile(LICENSE_FILE, text.getBytes());
}
}
} | [
"protected",
"void",
"generateLicenseFile",
"(",
")",
"{",
"final",
"CharSequence",
"licenseText",
"=",
"getLicenseText",
"(",
")",
";",
"if",
"(",
"licenseText",
"!=",
"null",
")",
"{",
"final",
"String",
"text",
"=",
"licenseText",
".",
"toString",
"(",
")... | Generate the LICENSE file. | [
"Generate",
"the",
"LICENSE",
"file",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L218-L226 |
56,955 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.getLicenseText | protected CharSequence getLicenseText() {
final URL url = getClass().getResource(LICENSE_FILE);
if (url != null) {
final File filename = new File(url.getPath());
try {
return Files.toString(filename, Charset.defaultCharset());
} catch (IOException exception) {
throw new RuntimeException(exception);... | java | protected CharSequence getLicenseText() {
final URL url = getClass().getResource(LICENSE_FILE);
if (url != null) {
final File filename = new File(url.getPath());
try {
return Files.toString(filename, Charset.defaultCharset());
} catch (IOException exception) {
throw new RuntimeException(exception);... | [
"protected",
"CharSequence",
"getLicenseText",
"(",
")",
"{",
"final",
"URL",
"url",
"=",
"getClass",
"(",
")",
".",
"getResource",
"(",
"LICENSE_FILE",
")",
";",
"if",
"(",
"url",
"!=",
"null",
")",
"{",
"final",
"File",
"filename",
"=",
"new",
"File",
... | Replies the text of the license to write to the generated output.
@return the text. | [
"Replies",
"the",
"text",
"of",
"the",
"license",
"to",
"write",
"to",
"the",
"generated",
"output",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L232-L243 |
56,956 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.createPatterns | protected List<?> createPatterns(Set<String> literals, Set<String> expressionKeywords,
Set<String> modifiers, Set<String> primitiveTypes, Set<String> punctuation, Set<String> ignored,
Set<String> specialKeywords, Set<String> typeDeclarationKeywords) {
final List<Map<String, ?>> patterns = new ArrayList<>();
... | java | protected List<?> createPatterns(Set<String> literals, Set<String> expressionKeywords,
Set<String> modifiers, Set<String> primitiveTypes, Set<String> punctuation, Set<String> ignored,
Set<String> specialKeywords, Set<String> typeDeclarationKeywords) {
final List<Map<String, ?>> patterns = new ArrayList<>();
... | [
"protected",
"List",
"<",
"?",
">",
"createPatterns",
"(",
"Set",
"<",
"String",
">",
"literals",
",",
"Set",
"<",
"String",
">",
"expressionKeywords",
",",
"Set",
"<",
"String",
">",
"modifiers",
",",
"Set",
"<",
"String",
">",
"primitiveTypes",
",",
"S... | Create the patterns.
@param literals the SARL literals.
@param expressionKeywords the SARL keywords, usually within expressions.
@param modifiers the modifier keywords.
@param primitiveTypes the primitive types.
@param punctuation the SARL punctuation symbols.
@param ignored the ignored literals (mostly for informatio... | [
"Create",
"the",
"patterns",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L257-L280 |
56,957 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.generateAnnotations | protected List<Map<String, ?>> generateAnnotations() {
final List<Map<String, ?>> list = new ArrayList<>();
list.add(pattern(it -> {
it.matches("\\@[_a-zA-Z$][_0-9a-zA-Z$]*"); //$NON-NLS-1$
it.style(ANNOTATION_STYLE);
it.comment("Annotations"); //$NON-NLS-1$
}));
return list;
} | java | protected List<Map<String, ?>> generateAnnotations() {
final List<Map<String, ?>> list = new ArrayList<>();
list.add(pattern(it -> {
it.matches("\\@[_a-zA-Z$][_0-9a-zA-Z$]*"); //$NON-NLS-1$
it.style(ANNOTATION_STYLE);
it.comment("Annotations"); //$NON-NLS-1$
}));
return list;
} | [
"protected",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"generateAnnotations",
"(",
")",
"{",
"final",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"list",
".",
"add",
"(... | Generate the rules for the annotations.
@return the rules. | [
"Generate",
"the",
"rules",
"for",
"the",
"annotations",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L286-L294 |
56,958 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.generateComments | protected List<Map<String, ?>> generateComments() {
final List<Map<String, ?>> list = new ArrayList<>();
// Block comment
list.add(pattern(it -> {
it.delimiters("(/\\*+)", "(\\*/)"); //$NON-NLS-1$ //$NON-NLS-2$
it.style(BLOCK_COMMENT_STYLE);
it.beginStyle(BLOCK_COMMENT_DELIMITER_STYLE);
it.endStyle(BL... | java | protected List<Map<String, ?>> generateComments() {
final List<Map<String, ?>> list = new ArrayList<>();
// Block comment
list.add(pattern(it -> {
it.delimiters("(/\\*+)", "(\\*/)"); //$NON-NLS-1$ //$NON-NLS-2$
it.style(BLOCK_COMMENT_STYLE);
it.beginStyle(BLOCK_COMMENT_DELIMITER_STYLE);
it.endStyle(BL... | [
"protected",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"generateComments",
"(",
")",
"{",
"final",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"// Block comment",
"list",
... | Generate the rules for the comments.
@return the rules. | [
"Generate",
"the",
"rules",
"for",
"the",
"comments",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L300-L322 |
56,959 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.generateStrings | protected List<Map<String, ?>> generateStrings() {
final List<Map<String, ?>> list = new ArrayList<>();
// Double quote
list.add(pattern(it -> {
it.delimiters("\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$
it.style(DOUBLE_QUOTE_STRING_STYLE);
it.beginStyle(STRING_BEGIN_STYLE);
it.endStyle(STRING_END_STYLE);... | java | protected List<Map<String, ?>> generateStrings() {
final List<Map<String, ?>> list = new ArrayList<>();
// Double quote
list.add(pattern(it -> {
it.delimiters("\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$
it.style(DOUBLE_QUOTE_STRING_STYLE);
it.beginStyle(STRING_BEGIN_STYLE);
it.endStyle(STRING_END_STYLE);... | [
"protected",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"generateStrings",
"(",
")",
"{",
"final",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"// Double quote",
"list",
"... | Generates the rules for the strings of characters.
@return the rules. | [
"Generates",
"the",
"rules",
"for",
"the",
"strings",
"of",
"characters",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L328-L355 |
56,960 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.generateNumericConstants | protected List<Map<String, ?>> generateNumericConstants() {
final List<Map<String, ?>> list = new ArrayList<>();
list.add(pattern(it -> {
it.matches(
"(?:" //$NON-NLS-1$
+ "[0-9][0-9]*\\.[0-9]+([eE][0-9]+)?[fFdD]?" //$NON-NLS-1$
+ ")|(?:" //$NON-NLS-1$
+ "0[xX][0-9a-fA-F]+" //$NON-NLS-1$
... | java | protected List<Map<String, ?>> generateNumericConstants() {
final List<Map<String, ?>> list = new ArrayList<>();
list.add(pattern(it -> {
it.matches(
"(?:" //$NON-NLS-1$
+ "[0-9][0-9]*\\.[0-9]+([eE][0-9]+)?[fFdD]?" //$NON-NLS-1$
+ ")|(?:" //$NON-NLS-1$
+ "0[xX][0-9a-fA-F]+" //$NON-NLS-1$
... | [
"protected",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"generateNumericConstants",
"(",
")",
"{",
"final",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"list",
".",
"add",... | Generate the rules for the numeric constants.
@return the rules. | [
"Generate",
"the",
"rules",
"for",
"the",
"numeric",
"constants",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L361-L376 |
56,961 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.generatePrimitiveTypes | protected List<Map<String, ?>> generatePrimitiveTypes(Set<String> primitiveTypes) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!primitiveTypes.isEmpty()) {
list.add(pattern(it -> {
it.matches(keywordRegex(primitiveTypes) + "(?:\\s*\\[\\s*\\])*"); //$NON-NLS-1$
it.style(PRIMITIVE_TYPE_STYLE)... | java | protected List<Map<String, ?>> generatePrimitiveTypes(Set<String> primitiveTypes) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!primitiveTypes.isEmpty()) {
list.add(pattern(it -> {
it.matches(keywordRegex(primitiveTypes) + "(?:\\s*\\[\\s*\\])*"); //$NON-NLS-1$
it.style(PRIMITIVE_TYPE_STYLE)... | [
"protected",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"generatePrimitiveTypes",
"(",
"Set",
"<",
"String",
">",
"primitiveTypes",
")",
"{",
"final",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"list",
"=",
"new",
"ArrayList",
... | Generate the rules for the primitive types.
@param primitiveTypes the primitive types.
@return the rules. | [
"Generate",
"the",
"rules",
"for",
"the",
"primitive",
"types",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L383-L393 |
56,962 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.generateLiterals | protected List<Map<String, ?>> generateLiterals(Set<String> literals) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!literals.isEmpty()) {
list.add(pattern(it -> {
it.matches(keywordRegex(literals));
it.style(LITERAL_STYLE);
it.comment("SARL Literals and Constants"); //$NON-NLS-1$
}))... | java | protected List<Map<String, ?>> generateLiterals(Set<String> literals) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!literals.isEmpty()) {
list.add(pattern(it -> {
it.matches(keywordRegex(literals));
it.style(LITERAL_STYLE);
it.comment("SARL Literals and Constants"); //$NON-NLS-1$
}))... | [
"protected",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"generateLiterals",
"(",
"Set",
"<",
"String",
">",
"literals",
")",
"{",
"final",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"("... | Generate the rules for the literals.
@param literals the literals.
@return the rules. | [
"Generate",
"the",
"rules",
"for",
"the",
"literals",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L400-L410 |
56,963 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.generatePunctuation | protected List<Map<String, ?>> generatePunctuation(Set<String> punctuation) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!punctuation.isEmpty()) {
list.add(pattern(it -> {
it.matches(orRegex(punctuation));
it.style(PUNCTUATION_STYLE);
it.comment("Operators and Punctuations"); //$NON-NLS... | java | protected List<Map<String, ?>> generatePunctuation(Set<String> punctuation) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!punctuation.isEmpty()) {
list.add(pattern(it -> {
it.matches(orRegex(punctuation));
it.style(PUNCTUATION_STYLE);
it.comment("Operators and Punctuations"); //$NON-NLS... | [
"protected",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"generatePunctuation",
"(",
"Set",
"<",
"String",
">",
"punctuation",
")",
"{",
"final",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"list",
"=",
"new",
"ArrayList",
"<>",... | Generate the rules for the punctuation symbols.
@param punctuation the punctuation symbols.
@return the rules. | [
"Generate",
"the",
"rules",
"for",
"the",
"punctuation",
"symbols",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L417-L427 |
56,964 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.generateModifiers | protected List<Map<String, ?>> generateModifiers(Set<String> modifiers) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!modifiers.isEmpty()) {
list.add(pattern(it -> {
it.matches(keywordRegex(modifiers));
it.style(MODIFIER_STYLE);
it.comment("Modifiers"); //$NON-NLS-1$
}));
}
retur... | java | protected List<Map<String, ?>> generateModifiers(Set<String> modifiers) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!modifiers.isEmpty()) {
list.add(pattern(it -> {
it.matches(keywordRegex(modifiers));
it.style(MODIFIER_STYLE);
it.comment("Modifiers"); //$NON-NLS-1$
}));
}
retur... | [
"protected",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"generateModifiers",
"(",
"Set",
"<",
"String",
">",
"modifiers",
")",
"{",
"final",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"... | Generate the rules for the modifier keywords.
@param modifiers the modifier keywords.
@return the rules. | [
"Generate",
"the",
"rules",
"for",
"the",
"modifier",
"keywords",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L434-L444 |
56,965 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.generateSpecialKeywords | protected List<Map<String, ?>> generateSpecialKeywords(Set<String> keywords) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!keywords.isEmpty()) {
list.add(pattern(it -> {
it.matches(keywordRegex(keywords));
it.style(SPECIAL_KEYWORD_STYLE);
it.comment("Special Keywords"); //$NON-NLS-1$
... | java | protected List<Map<String, ?>> generateSpecialKeywords(Set<String> keywords) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!keywords.isEmpty()) {
list.add(pattern(it -> {
it.matches(keywordRegex(keywords));
it.style(SPECIAL_KEYWORD_STYLE);
it.comment("Special Keywords"); //$NON-NLS-1$
... | [
"protected",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"generateSpecialKeywords",
"(",
"Set",
"<",
"String",
">",
"keywords",
")",
"{",
"final",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"list",
"=",
"new",
"ArrayList",
"<>"... | Generate the rules for the special keywords.
@param keywords the special keywords.
@return the rules. | [
"Generate",
"the",
"rules",
"for",
"the",
"special",
"keywords",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L451-L461 |
56,966 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.generateStandardKeywords | protected List<Map<String, ?>> generateStandardKeywords(Set<String> keywords) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!keywords.isEmpty()) {
list.add(pattern(it -> {
it.matches(keywordRegex(keywords));
it.style(KEYWORD_STYLE);
it.comment("Standard Keywords"); //$NON-NLS-1$
}));
... | java | protected List<Map<String, ?>> generateStandardKeywords(Set<String> keywords) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!keywords.isEmpty()) {
list.add(pattern(it -> {
it.matches(keywordRegex(keywords));
it.style(KEYWORD_STYLE);
it.comment("Standard Keywords"); //$NON-NLS-1$
}));
... | [
"protected",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"generateStandardKeywords",
"(",
"Set",
"<",
"String",
">",
"keywords",
")",
"{",
"final",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"list",
"=",
"new",
"ArrayList",
"<>... | Generate the rules for the standard keywords.
@param keywords the standard keywords.
@return the rules. | [
"Generate",
"the",
"rules",
"for",
"the",
"standard",
"keywords",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L468-L478 |
56,967 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.generateTypeDeclarations | protected List<Map<String, ?>> generateTypeDeclarations(Set<String> declarators) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!declarators.isEmpty()) {
list.add(pattern(it -> {
it.matches(keywordRegex(declarators));
it.style(TYPE_DECLARATION_STYLE);
it.comment("Type Declarations"); //$N... | java | protected List<Map<String, ?>> generateTypeDeclarations(Set<String> declarators) {
final List<Map<String, ?>> list = new ArrayList<>();
if (!declarators.isEmpty()) {
list.add(pattern(it -> {
it.matches(keywordRegex(declarators));
it.style(TYPE_DECLARATION_STYLE);
it.comment("Type Declarations"); //$N... | [
"protected",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"generateTypeDeclarations",
"(",
"Set",
"<",
"String",
">",
"declarators",
")",
"{",
"final",
"List",
"<",
"Map",
"<",
"String",
",",
"?",
">",
">",
"list",
"=",
"new",
"ArrayList",
... | Generate the rules for the type declaration keywords.
@param declarators the type declaration keywords.
@return the rules. | [
"Generate",
"the",
"rules",
"for",
"the",
"type",
"declaration",
"keywords",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L485-L495 |
56,968 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java | TextMateGenerator2.pattern | protected Map<String, ?> pattern(Procedure1<? super Pattern> proc) {
final Pattern patternDefinition = new Pattern();
proc.apply(patternDefinition);
return patternDefinition.getDefinition();
} | java | protected Map<String, ?> pattern(Procedure1<? super Pattern> proc) {
final Pattern patternDefinition = new Pattern();
proc.apply(patternDefinition);
return patternDefinition.getDefinition();
} | [
"protected",
"Map",
"<",
"String",
",",
"?",
">",
"pattern",
"(",
"Procedure1",
"<",
"?",
"super",
"Pattern",
">",
"proc",
")",
"{",
"final",
"Pattern",
"patternDefinition",
"=",
"new",
"Pattern",
"(",
")",
";",
"proc",
".",
"apply",
"(",
"patternDefinit... | Build a pattern definition.
@param proc the initializer.
@return the definition. | [
"Build",
"a",
"pattern",
"definition",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/textmate/TextMateGenerator2.java#L502-L506 |
56,969 | sarl/sarl | products/sarlc/src/main/java/io/sarl/lang/sarlc/modules/commands/ExtraLanguageListCommandModule.java | ExtraLanguageListCommandModule.provideExtraLanguageListCommand | @SuppressWarnings("static-method")
@Provides
@Singleton
public ExtraLanguageListCommand provideExtraLanguageListCommand(BootLogger bootLogger,
Provider<IExtraLanguageContributions> contributions) {
return new ExtraLanguageListCommand(bootLogger, contributions);
} | java | @SuppressWarnings("static-method")
@Provides
@Singleton
public ExtraLanguageListCommand provideExtraLanguageListCommand(BootLogger bootLogger,
Provider<IExtraLanguageContributions> contributions) {
return new ExtraLanguageListCommand(bootLogger, contributions);
} | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"@",
"Provides",
"@",
"Singleton",
"public",
"ExtraLanguageListCommand",
"provideExtraLanguageListCommand",
"(",
"BootLogger",
"bootLogger",
",",
"Provider",
"<",
"IExtraLanguageContributions",
">",
"contributions",
")... | Provide the command for displaying the available extra-language generators.
@param bootLogger the logger.
@param contributions the provider of the extra-language contributions.
@return the command. | [
"Provide",
"the",
"command",
"for",
"displaying",
"the",
"available",
"extra",
"-",
"language",
"generators",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/products/sarlc/src/main/java/io/sarl/lang/sarlc/modules/commands/ExtraLanguageListCommandModule.java#L56-L62 |
56,970 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java | SARLFormatter._format | protected void _format(SarlEvent event, IFormattableDocument document) {
formatAnnotations(event, document, XbaseFormatterPreferenceKeys.newLineAfterClassAnnotations);
formatModifiers(event, document);
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(event);
document.append(regionFo... | java | protected void _format(SarlEvent event, IFormattableDocument document) {
formatAnnotations(event, document, XbaseFormatterPreferenceKeys.newLineAfterClassAnnotations);
formatModifiers(event, document);
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(event);
document.append(regionFo... | [
"protected",
"void",
"_format",
"(",
"SarlEvent",
"event",
",",
"IFormattableDocument",
"document",
")",
"{",
"formatAnnotations",
"(",
"event",
",",
"document",
",",
"XbaseFormatterPreferenceKeys",
".",
"newLineAfterClassAnnotations",
")",
";",
"formatModifiers",
"(",
... | Format the given SARL event.
@param event the SARL component.
@param document the document. | [
"Format",
"the",
"given",
"SARL",
"event",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java#L195-L206 |
56,971 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java | SARLFormatter._format | protected void _format(SarlCapacity capacity, IFormattableDocument document) {
formatAnnotations(capacity, document, XbaseFormatterPreferenceKeys.newLineAfterClassAnnotations);
formatModifiers(capacity, document);
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(capacity);
document... | java | protected void _format(SarlCapacity capacity, IFormattableDocument document) {
formatAnnotations(capacity, document, XbaseFormatterPreferenceKeys.newLineAfterClassAnnotations);
formatModifiers(capacity, document);
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(capacity);
document... | [
"protected",
"void",
"_format",
"(",
"SarlCapacity",
"capacity",
",",
"IFormattableDocument",
"document",
")",
"{",
"formatAnnotations",
"(",
"capacity",
",",
"document",
",",
"XbaseFormatterPreferenceKeys",
".",
"newLineAfterClassAnnotations",
")",
";",
"formatModifiers"... | Format the given SARL capacity.
@param capacity the SARL component.
@param document the document. | [
"Format",
"the",
"given",
"SARL",
"capacity",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java#L213-L225 |
56,972 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java | SARLFormatter._format | protected void _format(SarlAgent agent, IFormattableDocument document) {
formatAnnotations(agent, document, XbaseFormatterPreferenceKeys.newLineAfterClassAnnotations);
formatModifiers(agent, document);
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(agent);
document.append(regionFo... | java | protected void _format(SarlAgent agent, IFormattableDocument document) {
formatAnnotations(agent, document, XbaseFormatterPreferenceKeys.newLineAfterClassAnnotations);
formatModifiers(agent, document);
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(agent);
document.append(regionFo... | [
"protected",
"void",
"_format",
"(",
"SarlAgent",
"agent",
",",
"IFormattableDocument",
"document",
")",
"{",
"formatAnnotations",
"(",
"agent",
",",
"document",
",",
"XbaseFormatterPreferenceKeys",
".",
"newLineAfterClassAnnotations",
")",
";",
"formatModifiers",
"(",
... | Format the given SARL agent.
@param agent the SARL component.
@param document the document. | [
"Format",
"the",
"given",
"SARL",
"agent",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java#L232-L243 |
56,973 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java | SARLFormatter._format | protected void _format(SarlBehavior behavior, IFormattableDocument document) {
formatAnnotations(behavior, document, XbaseFormatterPreferenceKeys.newLineAfterClassAnnotations);
formatModifiers(behavior, document);
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(behavior);
document.... | java | protected void _format(SarlBehavior behavior, IFormattableDocument document) {
formatAnnotations(behavior, document, XbaseFormatterPreferenceKeys.newLineAfterClassAnnotations);
formatModifiers(behavior, document);
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(behavior);
document.... | [
"protected",
"void",
"_format",
"(",
"SarlBehavior",
"behavior",
",",
"IFormattableDocument",
"document",
")",
"{",
"formatAnnotations",
"(",
"behavior",
",",
"document",
",",
"XbaseFormatterPreferenceKeys",
".",
"newLineAfterClassAnnotations",
")",
";",
"formatModifiers"... | Format the given SARL behavior.
@param behavior the SARL component.
@param document the document. | [
"Format",
"the",
"given",
"SARL",
"behavior",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java#L250-L261 |
56,974 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java | SARLFormatter._format | protected void _format(SarlSkill skill, IFormattableDocument document) {
formatAnnotations(skill, document, XbaseFormatterPreferenceKeys.newLineAfterClassAnnotations);
formatModifiers(skill, document);
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(skill);
document.append(regionFo... | java | protected void _format(SarlSkill skill, IFormattableDocument document) {
formatAnnotations(skill, document, XbaseFormatterPreferenceKeys.newLineAfterClassAnnotations);
formatModifiers(skill, document);
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(skill);
document.append(regionFo... | [
"protected",
"void",
"_format",
"(",
"SarlSkill",
"skill",
",",
"IFormattableDocument",
"document",
")",
"{",
"formatAnnotations",
"(",
"skill",
",",
"document",
",",
"XbaseFormatterPreferenceKeys",
".",
"newLineAfterClassAnnotations",
")",
";",
"formatModifiers",
"(",
... | Format the given SARL skill.
@param skill the SARL component.
@param document the document. | [
"Format",
"the",
"given",
"SARL",
"skill",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java#L268-L282 |
56,975 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java | SARLFormatter._format | protected void _format(SarlBehaviorUnit behaviorUnit, IFormattableDocument document) {
formatAnnotations(behaviorUnit, document, XbaseFormatterPreferenceKeys.newLineAfterMethodAnnotations);
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(behaviorUnit);
document.append(regionFor.keyw... | java | protected void _format(SarlBehaviorUnit behaviorUnit, IFormattableDocument document) {
formatAnnotations(behaviorUnit, document, XbaseFormatterPreferenceKeys.newLineAfterMethodAnnotations);
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(behaviorUnit);
document.append(regionFor.keyw... | [
"protected",
"void",
"_format",
"(",
"SarlBehaviorUnit",
"behaviorUnit",
",",
"IFormattableDocument",
"document",
")",
"{",
"formatAnnotations",
"(",
"behaviorUnit",
",",
"document",
",",
"XbaseFormatterPreferenceKeys",
".",
"newLineAfterMethodAnnotations",
")",
";",
"fin... | Format a behavior unit.
@param behaviorUnit the behavior unit.
@param document the document. | [
"Format",
"a",
"behavior",
"unit",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java#L441-L468 |
56,976 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java | SARLFormatter._format | protected void _format(SarlCapacityUses capacityUses, IFormattableDocument document) {
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(capacityUses);
document.append(regionFor.keyword(this.keywords.getUsesKeyword()), ONE_SPACE);
formatCommaSeparatedList(capacityUses.getCapacities(), d... | java | protected void _format(SarlCapacityUses capacityUses, IFormattableDocument document) {
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(capacityUses);
document.append(regionFor.keyword(this.keywords.getUsesKeyword()), ONE_SPACE);
formatCommaSeparatedList(capacityUses.getCapacities(), d... | [
"protected",
"void",
"_format",
"(",
"SarlCapacityUses",
"capacityUses",
",",
"IFormattableDocument",
"document",
")",
"{",
"final",
"ISemanticRegionsFinder",
"regionFor",
"=",
"this",
".",
"textRegionExtensions",
".",
"regionFor",
"(",
"capacityUses",
")",
";",
"docu... | Format a capacity use.
@param capacityUses the capacity uses.
@param document the document. | [
"Format",
"a",
"capacity",
"use",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java#L475-L480 |
56,977 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java | SARLFormatter._format | protected void _format(SarlRequiredCapacity requiredCapacity, IFormattableDocument document) {
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(requiredCapacity);
document.append(regionFor.keyword(this.keywords.getRequiresKeyword()), ONE_SPACE);
formatCommaSeparatedList(requiredCapacit... | java | protected void _format(SarlRequiredCapacity requiredCapacity, IFormattableDocument document) {
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(requiredCapacity);
document.append(regionFor.keyword(this.keywords.getRequiresKeyword()), ONE_SPACE);
formatCommaSeparatedList(requiredCapacit... | [
"protected",
"void",
"_format",
"(",
"SarlRequiredCapacity",
"requiredCapacity",
",",
"IFormattableDocument",
"document",
")",
"{",
"final",
"ISemanticRegionsFinder",
"regionFor",
"=",
"this",
".",
"textRegionExtensions",
".",
"regionFor",
"(",
"requiredCapacity",
")",
... | Format a required capacity.
@param requiredCapacity the element ot format.
@param document the document. | [
"Format",
"a",
"required",
"capacity",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java#L487-L492 |
56,978 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java | SARLFormatter.formatCommaSeparatedList | protected void formatCommaSeparatedList(Collection<? extends EObject> elements, IFormattableDocument document) {
for (final EObject element : elements) {
document.format(element);
final ISemanticRegionFinder immediatelyFollowing = this.textRegionExtensions.immediatelyFollowing(element);
final ISemanticRegion... | java | protected void formatCommaSeparatedList(Collection<? extends EObject> elements, IFormattableDocument document) {
for (final EObject element : elements) {
document.format(element);
final ISemanticRegionFinder immediatelyFollowing = this.textRegionExtensions.immediatelyFollowing(element);
final ISemanticRegion... | [
"protected",
"void",
"formatCommaSeparatedList",
"(",
"Collection",
"<",
"?",
"extends",
"EObject",
">",
"elements",
",",
"IFormattableDocument",
"document",
")",
"{",
"for",
"(",
"final",
"EObject",
"element",
":",
"elements",
")",
"{",
"document",
".",
"format... | Format a list of comma separated elements.
<p>This function does not considerer opening and closing delimiters, as
{@link #formatCommaSeparatedList(Collection, ISemanticRegion, ISemanticRegion, IFormattableDocument)}.
@param elements the elements to format.
@param document the document. | [
"Format",
"a",
"list",
"of",
"comma",
"separated",
"elements",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java#L594-L602 |
56,979 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/validation/SARLUIStrings.java | SARLUIStrings.styledParameters | public StyledString styledParameters(JvmIdentifiableElement element) {
final StyledString str = new StyledString();
if (element instanceof JvmExecutable) {
final JvmExecutable executable = (JvmExecutable) element;
str.append(this.keywords.getLeftParenthesisKeyword());
str.append(parametersToStyledString(
... | java | public StyledString styledParameters(JvmIdentifiableElement element) {
final StyledString str = new StyledString();
if (element instanceof JvmExecutable) {
final JvmExecutable executable = (JvmExecutable) element;
str.append(this.keywords.getLeftParenthesisKeyword());
str.append(parametersToStyledString(
... | [
"public",
"StyledString",
"styledParameters",
"(",
"JvmIdentifiableElement",
"element",
")",
"{",
"final",
"StyledString",
"str",
"=",
"new",
"StyledString",
"(",
")",
";",
"if",
"(",
"element",
"instanceof",
"JvmExecutable",
")",
"{",
"final",
"JvmExecutable",
"e... | Replies the styled parameters.
@param element the element from which the parameters are extracted.
@return the styled parameters
@since 0.6 | [
"Replies",
"the",
"styled",
"parameters",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/validation/SARLUIStrings.java#L86-L98 |
56,980 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/validation/SARLUIStrings.java | SARLUIStrings.parametersToStyledString | protected StyledString parametersToStyledString(Iterable<? extends JvmFormalParameter> elements, boolean isVarArgs, boolean includeName) {
return getParameterStyledString(elements, isVarArgs, includeName, this.keywords, this.annotationFinder, this);
} | java | protected StyledString parametersToStyledString(Iterable<? extends JvmFormalParameter> elements, boolean isVarArgs, boolean includeName) {
return getParameterStyledString(elements, isVarArgs, includeName, this.keywords, this.annotationFinder, this);
} | [
"protected",
"StyledString",
"parametersToStyledString",
"(",
"Iterable",
"<",
"?",
"extends",
"JvmFormalParameter",
">",
"elements",
",",
"boolean",
"isVarArgs",
",",
"boolean",
"includeName",
")",
"{",
"return",
"getParameterStyledString",
"(",
"elements",
",",
"isV... | Replies the styled string representation of the parameters.
@param elements the parameters.
@param isVarArgs indicates if the last parameter is variadic.
@param includeName indicates if the names are included.
@return the styled string.
@since 0.6 | [
"Replies",
"the",
"styled",
"string",
"representation",
"of",
"the",
"parameters",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/validation/SARLUIStrings.java#L113-L115 |
56,981 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/validation/SARLUIStrings.java | SARLUIStrings.getParameterString | public static String getParameterString(Iterable<? extends JvmFormalParameter> elements, boolean isVarArgs,
boolean includeName, SARLGrammarKeywordAccess keywords, AnnotationLookup annotationFinder, UIStrings utils) {
final StringBuilder result = new StringBuilder();
boolean needsSeparator = false;
final Itera... | java | public static String getParameterString(Iterable<? extends JvmFormalParameter> elements, boolean isVarArgs,
boolean includeName, SARLGrammarKeywordAccess keywords, AnnotationLookup annotationFinder, UIStrings utils) {
final StringBuilder result = new StringBuilder();
boolean needsSeparator = false;
final Itera... | [
"public",
"static",
"String",
"getParameterString",
"(",
"Iterable",
"<",
"?",
"extends",
"JvmFormalParameter",
">",
"elements",
",",
"boolean",
"isVarArgs",
",",
"boolean",
"includeName",
",",
"SARLGrammarKeywordAccess",
"keywords",
",",
"AnnotationLookup",
"annotation... | Format the parameters.
@param elements the list of the formal parameters.
@param isVarArgs indicates if the function has var args.
@param includeName indicates if the names are included in the replied valued.
@param keywords the keyword provider.
@param annotationFinder the finder of attached annotations.
@param utils... | [
"Format",
"the",
"parameters",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/validation/SARLUIStrings.java#L127-L159 |
56,982 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/explorer/SARLElementImageProvider.java | SARLElementImageProvider.setFileExtensions | @Inject
public void setFileExtensions(@Named(Constants.FILE_EXTENSIONS) String fileExtensions) {
this.fileExtensions.clear();
this.fileExtensions.addAll(Arrays.asList(fileExtensions.split("[,;: ]+"))); //$NON-NLS-1$
} | java | @Inject
public void setFileExtensions(@Named(Constants.FILE_EXTENSIONS) String fileExtensions) {
this.fileExtensions.clear();
this.fileExtensions.addAll(Arrays.asList(fileExtensions.split("[,;: ]+"))); //$NON-NLS-1$
} | [
"@",
"Inject",
"public",
"void",
"setFileExtensions",
"(",
"@",
"Named",
"(",
"Constants",
".",
"FILE_EXTENSIONS",
")",
"String",
"fileExtensions",
")",
"{",
"this",
".",
"fileExtensions",
".",
"clear",
"(",
")",
";",
"this",
".",
"fileExtensions",
".",
"add... | Set the file extensions.
@param fileExtensions the file extensions. | [
"Set",
"the",
"file",
"extensions",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/explorer/SARLElementImageProvider.java#L63-L67 |
56,983 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/explorer/SARLElementImageProvider.java | SARLElementImageProvider.getPackageFragmentIcon | @SuppressWarnings("checkstyle:all")
private ImageDescriptor getPackageFragmentIcon(IPackageFragment fragment) {
boolean containsJavaElements = false;
try {
containsJavaElements = fragment.hasChildren();
} catch (JavaModelException e) {
// assuming no children;
}
try {
if (!containsJavaElements) {
... | java | @SuppressWarnings("checkstyle:all")
private ImageDescriptor getPackageFragmentIcon(IPackageFragment fragment) {
boolean containsJavaElements = false;
try {
containsJavaElements = fragment.hasChildren();
} catch (JavaModelException e) {
// assuming no children;
}
try {
if (!containsJavaElements) {
... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:all\"",
")",
"private",
"ImageDescriptor",
"getPackageFragmentIcon",
"(",
"IPackageFragment",
"fragment",
")",
"{",
"boolean",
"containsJavaElements",
"=",
"false",
";",
"try",
"{",
"containsJavaElements",
"=",
"fragment",
"."... | Replies the image description of the package fragment.
@param fragment the element.
@return the descriptor. | [
"Replies",
"the",
"image",
"description",
"of",
"the",
"package",
"fragment",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/explorer/SARLElementImageProvider.java#L93-L120 |
56,984 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/explorer/SARLElementImageProvider.java | SARLElementImageProvider.isSarlResource | protected boolean isSarlResource(Object resource) {
if (resource instanceof IFile) {
final IFile file = (IFile) resource;
return getFileExtensions().contains(file.getFileExtension());
}
return false;
} | java | protected boolean isSarlResource(Object resource) {
if (resource instanceof IFile) {
final IFile file = (IFile) resource;
return getFileExtensions().contains(file.getFileExtension());
}
return false;
} | [
"protected",
"boolean",
"isSarlResource",
"(",
"Object",
"resource",
")",
"{",
"if",
"(",
"resource",
"instanceof",
"IFile",
")",
"{",
"final",
"IFile",
"file",
"=",
"(",
"IFile",
")",
"resource",
";",
"return",
"getFileExtensions",
"(",
")",
".",
"contains"... | Replies if the given resource is a SARL resource.
@param resource the resource.
@return {@code true} if the given resource is a SARL resource. | [
"Replies",
"if",
"the",
"given",
"resource",
"is",
"a",
"SARL",
"resource",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/explorer/SARLElementImageProvider.java#L127-L133 |
56,985 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/StandardSREInstall.java | StandardSREInstall.setJarFile | public void setJarFile(IPath jarFile) {
if (!Objects.equal(jarFile, this.jarFile)) {
final PropertyChangeEvent event = new PropertyChangeEvent(this, ISREInstallChangedListener.PROPERTY_JAR_FILE,
this.jarFile, jarFile);
this.jarFile = jarFile;
setDirty(true);
if (getNotify()) {
SARLRuntime.fireSRE... | java | public void setJarFile(IPath jarFile) {
if (!Objects.equal(jarFile, this.jarFile)) {
final PropertyChangeEvent event = new PropertyChangeEvent(this, ISREInstallChangedListener.PROPERTY_JAR_FILE,
this.jarFile, jarFile);
this.jarFile = jarFile;
setDirty(true);
if (getNotify()) {
SARLRuntime.fireSRE... | [
"public",
"void",
"setJarFile",
"(",
"IPath",
"jarFile",
")",
"{",
"if",
"(",
"!",
"Objects",
".",
"equal",
"(",
"jarFile",
",",
"this",
".",
"jarFile",
")",
")",
"{",
"final",
"PropertyChangeEvent",
"event",
"=",
"new",
"PropertyChangeEvent",
"(",
"this",... | Change the path to the JAR file that is supporting this SRE installation.
@param jarFile the path to the JAR file. Must not be <code>null</code>. | [
"Change",
"the",
"path",
"to",
"the",
"JAR",
"file",
"that",
"is",
"supporting",
"this",
"SRE",
"installation",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/StandardSREInstall.java#L167-L177 |
56,986 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/StandardSREInstall.java | StandardSREInstall.parsePath | private static IPath parsePath(String path, IPath defaultPath, IPath rootPath) {
if (!Strings.isNullOrEmpty(path)) {
try {
final IPath pathObject = Path.fromPortableString(path);
if (pathObject != null) {
if (rootPath != null && !pathObject.isAbsolute()) {
return rootPath.append(pathObject);
... | java | private static IPath parsePath(String path, IPath defaultPath, IPath rootPath) {
if (!Strings.isNullOrEmpty(path)) {
try {
final IPath pathObject = Path.fromPortableString(path);
if (pathObject != null) {
if (rootPath != null && !pathObject.isAbsolute()) {
return rootPath.append(pathObject);
... | [
"private",
"static",
"IPath",
"parsePath",
"(",
"String",
"path",
",",
"IPath",
"defaultPath",
",",
"IPath",
"rootPath",
")",
"{",
"if",
"(",
"!",
"Strings",
".",
"isNullOrEmpty",
"(",
"path",
")",
")",
"{",
"try",
"{",
"final",
"IPath",
"pathObject",
"=... | Path the given string for extracting a path.
@param path the string representation of the path to parse.
@param defaultPath the default path.
@param rootPath the root path to use is the given path is not absolute.
@return the absolute path. | [
"Path",
"the",
"given",
"string",
"for",
"extracting",
"a",
"path",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/StandardSREInstall.java#L515-L530 |
56,987 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java | AbstractExtraLanguageGenerator.loadPropertyFile | public static List<Pair<String, String>> loadPropertyFile(String filename, Plugin bundledPlugin,
Class<?> readerClass,
Function1<IOException, IStatus> statusBuilder) {
final URL url;
if (bundledPlugin != null) {
url = FileLocator.find(
bundledPlugin.getBundle(),
Path.fromPortableString(filename),... | java | public static List<Pair<String, String>> loadPropertyFile(String filename, Plugin bundledPlugin,
Class<?> readerClass,
Function1<IOException, IStatus> statusBuilder) {
final URL url;
if (bundledPlugin != null) {
url = FileLocator.find(
bundledPlugin.getBundle(),
Path.fromPortableString(filename),... | [
"public",
"static",
"List",
"<",
"Pair",
"<",
"String",
",",
"String",
">",
">",
"loadPropertyFile",
"(",
"String",
"filename",
",",
"Plugin",
"bundledPlugin",
",",
"Class",
"<",
"?",
">",
"readerClass",
",",
"Function1",
"<",
"IOException",
",",
"IStatus",
... | Load a property file from the resources.
This function is able to get the resource from an OSGi bundles if it is specified,
or from the application classpath.
@param filename the name of the resource, without the starting slash character.
@param bundledPlugin the plugin that is able to provide the bundle that contains... | [
"Load",
"a",
"property",
"file",
"from",
"the",
"resources",
".",
"This",
"function",
"is",
"able",
"to",
"get",
"the",
"resource",
"from",
"an",
"OSGi",
"bundles",
"if",
"it",
"is",
"specified",
"or",
"from",
"the",
"application",
"classpath",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java#L169-L195 |
56,988 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java | AbstractExtraLanguageGenerator.getAssociatedExpression | protected XExpression getAssociatedExpression(JvmMember object) {
final XExpression expr = getTypeBuilder().getExpression(object);
if (expr == null) {
// The member may be a automatically generated code with dynamic code-building strategies
final Procedure1<? super ITreeAppendable> strategy = getTypeExtension... | java | protected XExpression getAssociatedExpression(JvmMember object) {
final XExpression expr = getTypeBuilder().getExpression(object);
if (expr == null) {
// The member may be a automatically generated code with dynamic code-building strategies
final Procedure1<? super ITreeAppendable> strategy = getTypeExtension... | [
"protected",
"XExpression",
"getAssociatedExpression",
"(",
"JvmMember",
"object",
")",
"{",
"final",
"XExpression",
"expr",
"=",
"getTypeBuilder",
"(",
")",
".",
"getExpression",
"(",
"object",
")",
";",
"if",
"(",
"expr",
"==",
"null",
")",
"{",
"// The memb... | Replies the expression associated to the given object.
Usually, the expression is inside the given object.
@param object the object.
@return the expression, or {@code null} if none. | [
"Replies",
"the",
"expression",
"associated",
"to",
"the",
"given",
"object",
".",
"Usually",
"the",
"expression",
"is",
"inside",
"the",
"given",
"object",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java#L409-L424 |
56,989 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java | AbstractExtraLanguageGenerator.toFilename | protected String toFilename(QualifiedName name, String separator) {
final List<String> segments = name.getSegments();
if (segments.isEmpty()) {
return ""; //$NON-NLS-1$
}
final StringBuilder builder = new StringBuilder();
builder.append(name.toString(separator));
builder.append(getFilenameExtension());
... | java | protected String toFilename(QualifiedName name, String separator) {
final List<String> segments = name.getSegments();
if (segments.isEmpty()) {
return ""; //$NON-NLS-1$
}
final StringBuilder builder = new StringBuilder();
builder.append(name.toString(separator));
builder.append(getFilenameExtension());
... | [
"protected",
"String",
"toFilename",
"(",
"QualifiedName",
"name",
",",
"String",
"separator",
")",
"{",
"final",
"List",
"<",
"String",
">",
"segments",
"=",
"name",
".",
"getSegments",
"(",
")",
";",
"if",
"(",
"segments",
".",
"isEmpty",
"(",
")",
")"... | Replies the filename for the qualified name.
@param name the qualified name.
@param separator the filename separator.
@return the filename. | [
"Replies",
"the",
"filename",
"for",
"the",
"qualified",
"name",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java#L438-L447 |
56,990 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java | AbstractExtraLanguageGenerator.writeFile | protected boolean writeFile(QualifiedName name, ExtraLanguageAppendable appendable, IExtraLanguageGeneratorContext context) {
final ExtraLanguageAppendable fileAppendable = createAppendable(null, context);
generateFileHeader(name, fileAppendable, context);
final ImportManager importManager = appendable.getImport... | java | protected boolean writeFile(QualifiedName name, ExtraLanguageAppendable appendable, IExtraLanguageGeneratorContext context) {
final ExtraLanguageAppendable fileAppendable = createAppendable(null, context);
generateFileHeader(name, fileAppendable, context);
final ImportManager importManager = appendable.getImport... | [
"protected",
"boolean",
"writeFile",
"(",
"QualifiedName",
"name",
",",
"ExtraLanguageAppendable",
"appendable",
",",
"IExtraLanguageGeneratorContext",
"context",
")",
"{",
"final",
"ExtraLanguageAppendable",
"fileAppendable",
"=",
"createAppendable",
"(",
"null",
",",
"c... | Write the given file.
@param name the name of the type to write.
@param appendable the content to be written.
@param context the generator context.
@return {@code true} if the file was written. | [
"Write",
"the",
"given",
"file",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java#L477-L504 |
56,991 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java | AbstractExtraLanguageGenerator.createGeneratorContext | protected IExtraLanguageGeneratorContext createGeneratorContext(IFileSystemAccess2 fsa, IGeneratorContext context,
Resource resource) {
if (context instanceof IExtraLanguageGeneratorContext) {
return (IExtraLanguageGeneratorContext) context;
}
return new ExtraLanguageGeneratorContext(context, fsa, this, res... | java | protected IExtraLanguageGeneratorContext createGeneratorContext(IFileSystemAccess2 fsa, IGeneratorContext context,
Resource resource) {
if (context instanceof IExtraLanguageGeneratorContext) {
return (IExtraLanguageGeneratorContext) context;
}
return new ExtraLanguageGeneratorContext(context, fsa, this, res... | [
"protected",
"IExtraLanguageGeneratorContext",
"createGeneratorContext",
"(",
"IFileSystemAccess2",
"fsa",
",",
"IGeneratorContext",
"context",
",",
"Resource",
"resource",
")",
"{",
"if",
"(",
"context",
"instanceof",
"IExtraLanguageGeneratorContext",
")",
"{",
"return",
... | Create the generator context for this generator.
@param fsa the file system access.
@param context the global context.
@param resource the resource.
@return the context. | [
"Create",
"the",
"generator",
"context",
"for",
"this",
"generator",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java#L593-L599 |
56,992 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java | AbstractExtraLanguageGenerator._generate | protected void _generate(SarlScript script, IExtraLanguageGeneratorContext context) {
if (script != null) {
for (final XtendTypeDeclaration content : script.getXtendTypes()) {
if (context.getCancelIndicator().isCanceled()) {
return;
}
try {
generate(content, context);
} finally {
con... | java | protected void _generate(SarlScript script, IExtraLanguageGeneratorContext context) {
if (script != null) {
for (final XtendTypeDeclaration content : script.getXtendTypes()) {
if (context.getCancelIndicator().isCanceled()) {
return;
}
try {
generate(content, context);
} finally {
con... | [
"protected",
"void",
"_generate",
"(",
"SarlScript",
"script",
",",
"IExtraLanguageGeneratorContext",
"context",
")",
"{",
"if",
"(",
"script",
"!=",
"null",
")",
"{",
"for",
"(",
"final",
"XtendTypeDeclaration",
"content",
":",
"script",
".",
"getXtendTypes",
"... | Generate the given script.
@param script the script.
@param context the context. | [
"Generate",
"the",
"given",
"script",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java#L678-L691 |
56,993 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java | AbstractExtraLanguageGenerator.getSuperTypes | protected static List<JvmTypeReference> getSuperTypes(JvmTypeReference extension, List<? extends JvmTypeReference> implemented) {
final List<JvmTypeReference> list = new ArrayList<>();
if (extension != null) {
list.add(extension);
}
if (implemented != null) {
list.addAll(implemented);
}
return list;
... | java | protected static List<JvmTypeReference> getSuperTypes(JvmTypeReference extension, List<? extends JvmTypeReference> implemented) {
final List<JvmTypeReference> list = new ArrayList<>();
if (extension != null) {
list.add(extension);
}
if (implemented != null) {
list.addAll(implemented);
}
return list;
... | [
"protected",
"static",
"List",
"<",
"JvmTypeReference",
">",
"getSuperTypes",
"(",
"JvmTypeReference",
"extension",
",",
"List",
"<",
"?",
"extends",
"JvmTypeReference",
">",
"implemented",
")",
"{",
"final",
"List",
"<",
"JvmTypeReference",
">",
"list",
"=",
"n... | Replies the merged list with the extended and implemented types.
@param extension the extended type.
@param implemented the implemented types.
@return the super types. | [
"Replies",
"the",
"merged",
"list",
"with",
"the",
"extended",
"and",
"implemented",
"types",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java#L761-L770 |
56,994 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java | AbstractExtraLanguageGenerator.getExpectedType | protected LightweightTypeReference getExpectedType(XExpression expr) {
final IResolvedTypes resolvedTypes = getTypeResolver().resolveTypes(expr);
final LightweightTypeReference actualType = resolvedTypes.getActualType(expr);
return actualType;
} | java | protected LightweightTypeReference getExpectedType(XExpression expr) {
final IResolvedTypes resolvedTypes = getTypeResolver().resolveTypes(expr);
final LightweightTypeReference actualType = resolvedTypes.getActualType(expr);
return actualType;
} | [
"protected",
"LightweightTypeReference",
"getExpectedType",
"(",
"XExpression",
"expr",
")",
"{",
"final",
"IResolvedTypes",
"resolvedTypes",
"=",
"getTypeResolver",
"(",
")",
".",
"resolveTypes",
"(",
"expr",
")",
";",
"final",
"LightweightTypeReference",
"actualType",... | Compute the expected type of the given expression.
@param expr the expression.
@return the expected type of the argument. | [
"Compute",
"the",
"expected",
"type",
"of",
"the",
"given",
"expression",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java#L777-L781 |
56,995 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java | AbstractExtraLanguageGenerator.getExpectedType | protected LightweightTypeReference getExpectedType(XtendExecutable executable, JvmTypeReference declaredReturnType) {
if (declaredReturnType == null) {
// Try to get any inferred return type.
if (executable instanceof XtendFunction) {
final XtendFunction function = (XtendFunction) executable;
final JvmO... | java | protected LightweightTypeReference getExpectedType(XtendExecutable executable, JvmTypeReference declaredReturnType) {
if (declaredReturnType == null) {
// Try to get any inferred return type.
if (executable instanceof XtendFunction) {
final XtendFunction function = (XtendFunction) executable;
final JvmO... | [
"protected",
"LightweightTypeReference",
"getExpectedType",
"(",
"XtendExecutable",
"executable",
",",
"JvmTypeReference",
"declaredReturnType",
")",
"{",
"if",
"(",
"declaredReturnType",
"==",
"null",
")",
"{",
"// Try to get any inferred return type.",
"if",
"(",
"executa... | Replies the expected type of the given executable.
@param executable the executable.
@param declaredReturnType the declared return type, if one.
@return the expected type or {@code null} if none ({@code void}). | [
"Replies",
"the",
"expected",
"type",
"of",
"the",
"given",
"executable",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java#L789-L808 |
56,996 | sarl/sarl | main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/util/SerializableProxy.java | SerializableProxy.readResolve | private Object readResolve() throws ObjectStreamException {
Constructor<?> compatible = null;
for (final Constructor<?> candidate : this.proxyType.getDeclaredConstructors()) {
if (candidate != null && isCompatible(candidate)) {
if (compatible != null) {
throw new IllegalStateException();
}
compa... | java | private Object readResolve() throws ObjectStreamException {
Constructor<?> compatible = null;
for (final Constructor<?> candidate : this.proxyType.getDeclaredConstructors()) {
if (candidate != null && isCompatible(candidate)) {
if (compatible != null) {
throw new IllegalStateException();
}
compa... | [
"private",
"Object",
"readResolve",
"(",
")",
"throws",
"ObjectStreamException",
"{",
"Constructor",
"<",
"?",
">",
"compatible",
"=",
"null",
";",
"for",
"(",
"final",
"Constructor",
"<",
"?",
">",
"candidate",
":",
"this",
".",
"proxyType",
".",
"getDeclar... | This function enables to deserialize an instance of this proxy.
@throws ObjectStreamException if the deserialization fails | [
"This",
"function",
"enables",
"to",
"deserialize",
"an",
"instance",
"of",
"this",
"proxy",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/util/SerializableProxy.java#L73-L96 |
56,997 | sarl/sarl | main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/config/SARLProjectConfigurator.java | SARLProjectConfigurator.addPreferences | @SuppressWarnings("static-method")
protected void addPreferences(
IMavenProjectFacade facade, SARLConfiguration config,
IProgressMonitor monitor) throws CoreException {
final IPath outputPath = makeProjectRelativePath(facade, config.getOutput());
// Set the SARL preferences
SARLPreferences.setSpecificSARLC... | java | @SuppressWarnings("static-method")
protected void addPreferences(
IMavenProjectFacade facade, SARLConfiguration config,
IProgressMonitor monitor) throws CoreException {
final IPath outputPath = makeProjectRelativePath(facade, config.getOutput());
// Set the SARL preferences
SARLPreferences.setSpecificSARLC... | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"protected",
"void",
"addPreferences",
"(",
"IMavenProjectFacade",
"facade",
",",
"SARLConfiguration",
"config",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"CoreException",
"{",
"final",
"IPath",
"outputPat... | Invoked to add the preferences dedicated to SARL, JRE, etc.
@param facade the Maven face.
@param config the configuration.
@param monitor the monitor.
@throws CoreException if cannot add the source folders. | [
"Invoked",
"to",
"add",
"the",
"preferences",
"dedicated",
"to",
"SARL",
"JRE",
"etc",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/config/SARLProjectConfigurator.java#L108-L116 |
56,998 | sarl/sarl | main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/config/SARLProjectConfigurator.java | SARLProjectConfigurator.addSourceFolders | @SuppressWarnings({"checkstyle:magicnumber", "checkstyle:npathcomplexity"})
protected void addSourceFolders(
IMavenProjectFacade facade, SARLConfiguration config,
IClasspathDescriptor classpath, IProgressMonitor monitor)
throws CoreException {
assertHasNature(facade.getProject(), SARLEclipseConfig.NATURE... | java | @SuppressWarnings({"checkstyle:magicnumber", "checkstyle:npathcomplexity"})
protected void addSourceFolders(
IMavenProjectFacade facade, SARLConfiguration config,
IClasspathDescriptor classpath, IProgressMonitor monitor)
throws CoreException {
assertHasNature(facade.getProject(), SARLEclipseConfig.NATURE... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"checkstyle:magicnumber\"",
",",
"\"checkstyle:npathcomplexity\"",
"}",
")",
"protected",
"void",
"addSourceFolders",
"(",
"IMavenProjectFacade",
"facade",
",",
"SARLConfiguration",
"config",
",",
"IClasspathDescriptor",
"classpath",
","... | Invoked to add the source folders.
@param facade the facade of the Maven project.
@param config the configuration.
@param classpath the project classpath.
@param monitor the monitor.
@throws CoreException if cannot add the source folders. | [
"Invoked",
"to",
"add",
"the",
"source",
"folders",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/config/SARLProjectConfigurator.java#L157-L229 |
56,999 | sarl/sarl | main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/config/SARLProjectConfigurator.java | SARLProjectConfigurator.getParameterValue | protected <T> T getParameterValue(MavenProject project, String parameter, Class<T> asType,
MojoExecution mojoExecution, IProgressMonitor monitor, T defaultValue) throws CoreException {
T value = getParameterValue(project, parameter, asType, mojoExecution, monitor);
if (value == null) {
value = defaultValue;
... | java | protected <T> T getParameterValue(MavenProject project, String parameter, Class<T> asType,
MojoExecution mojoExecution, IProgressMonitor monitor, T defaultValue) throws CoreException {
T value = getParameterValue(project, parameter, asType, mojoExecution, monitor);
if (value == null) {
value = defaultValue;
... | [
"protected",
"<",
"T",
">",
"T",
"getParameterValue",
"(",
"MavenProject",
"project",
",",
"String",
"parameter",
",",
"Class",
"<",
"T",
">",
"asType",
",",
"MojoExecution",
"mojoExecution",
",",
"IProgressMonitor",
"monitor",
",",
"T",
"defaultValue",
")",
"... | Replies the configuration value.
@param <T> - the expected type.
@param project the project.
@param parameter the parameter name.
@param asType the expected type.
@param mojoExecution the mojo execution.
@param monitor the monitor.
@param defaultValue the default value.
@return the value of the parameter.
@throws Core... | [
"Replies",
"the",
"configuration",
"value",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/config/SARLProjectConfigurator.java#L243-L250 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.