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
partition
stringclasses
1 value
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSInputStream.java
COSInputStream.reopen
private synchronized void reopen(String reason, long targetPos, long length) throws IOException { if (wrappedStream != null) { closeStream("reopen(" + reason + ")", contentRangeFinish, false); } contentRangeFinish = calculateRequestLimit(inputPolicy, targetPos, length, contentLength, r...
java
private synchronized void reopen(String reason, long targetPos, long length) throws IOException { if (wrappedStream != null) { closeStream("reopen(" + reason + ")", contentRangeFinish, false); } contentRangeFinish = calculateRequestLimit(inputPolicy, targetPos, length, contentLength, r...
[ "private", "synchronized", "void", "reopen", "(", "String", "reason", ",", "long", "targetPos", ",", "long", "length", ")", "throws", "IOException", "{", "if", "(", "wrappedStream", "!=", "null", ")", "{", "closeStream", "(", "\"reopen(\"", "+", "reason", "+...
Opens up the stream at specified target position and for given length. @param reason reason for reopen @param targetPos target position @param length length requested @throws IOException on any failure to open the object
[ "Opens", "up", "the", "stream", "at", "specified", "target", "position", "and", "for", "given", "length", "." ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSInputStream.java#L104-L131
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSInputStream.java
COSInputStream.lazySeek
private void lazySeek(long targetPos, long len) throws IOException { //For lazy seek seekInStream(targetPos, len); //re-open at specific location if needed if (wrappedStream == null) { reopen("read from new offset", targetPos, len); } }
java
private void lazySeek(long targetPos, long len) throws IOException { //For lazy seek seekInStream(targetPos, len); //re-open at specific location if needed if (wrappedStream == null) { reopen("read from new offset", targetPos, len); } }
[ "private", "void", "lazySeek", "(", "long", "targetPos", ",", "long", "len", ")", "throws", "IOException", "{", "//For lazy seek", "seekInStream", "(", "targetPos", ",", "len", ")", ";", "//re-open at specific location if needed", "if", "(", "wrappedStream", "==", ...
Perform lazy seek and adjust stream to correct position for reading. @param targetPos position from where data should be read @param len length of the content that needs to be read
[ "Perform", "lazy", "seek", "and", "adjust", "stream", "to", "correct", "position", "for", "reading", "." ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSInputStream.java#L245-L253
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSInputStream.java
COSInputStream.calculateRequestLimit
static long calculateRequestLimit( COSInputPolicy inputPolicy, long targetPos, long length, long contentLength, long readahead) { long rangeLimit; switch (inputPolicy) { case Random: // positioned. // read either this block, or the here + readahead value. ...
java
static long calculateRequestLimit( COSInputPolicy inputPolicy, long targetPos, long length, long contentLength, long readahead) { long rangeLimit; switch (inputPolicy) { case Random: // positioned. // read either this block, or the here + readahead value. ...
[ "static", "long", "calculateRequestLimit", "(", "COSInputPolicy", "inputPolicy", ",", "long", "targetPos", ",", "long", "length", ",", "long", "contentLength", ",", "long", "readahead", ")", "{", "long", "rangeLimit", ";", "switch", "(", "inputPolicy", ")", "{",...
Calculate the limit for a get request, based on input policy and state of object. @param inputPolicy input policy @param targetPos position of the read @param length length of bytes requested; if less than zero "unknown" @param contentLength total length of file @param readahead current readahead value @return the abso...
[ "Calculate", "the", "limit", "for", "a", "get", "request", "based", "on", "input", "policy", "and", "state", "of", "object", "." ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSInputStream.java#L604-L631
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/common/Utils.java
Utils.getContainerName
public static String getContainerName(String hostname, boolean serviceRequired) throws IOException { int i = hostname.lastIndexOf("."); if (i <= 0) { if (serviceRequired) { throw badHostName(hostname); } return hostname; } return hostname.substring(0, i); }
java
public static String getContainerName(String hostname, boolean serviceRequired) throws IOException { int i = hostname.lastIndexOf("."); if (i <= 0) { if (serviceRequired) { throw badHostName(hostname); } return hostname; } return hostname.substring(0, i); }
[ "public", "static", "String", "getContainerName", "(", "String", "hostname", ",", "boolean", "serviceRequired", ")", "throws", "IOException", "{", "int", "i", "=", "hostname", ".", "lastIndexOf", "(", "\".\"", ")", ";", "if", "(", "i", "<=", "0", ")", "{",...
Extracts container name from the container.service or container @param hostname hostname to split @param serviceRequired flag if service name required as part of hostname @return the container @throws IOException if hostname is invalid
[ "Extracts", "container", "name", "from", "the", "container", ".", "service", "or", "container" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/common/Utils.java#L85-L95
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/common/Utils.java
Utils.getServiceName
public static String getServiceName(String hostname) throws IOException { int i = hostname.lastIndexOf("."); if (i <= 0) { throw badHostName(hostname); } String service = hostname.substring(i + 1); if (service.isEmpty() || service.contains(".")) { throw badHostName(hostname); } r...
java
public static String getServiceName(String hostname) throws IOException { int i = hostname.lastIndexOf("."); if (i <= 0) { throw badHostName(hostname); } String service = hostname.substring(i + 1); if (service.isEmpty() || service.contains(".")) { throw badHostName(hostname); } r...
[ "public", "static", "String", "getServiceName", "(", "String", "hostname", ")", "throws", "IOException", "{", "int", "i", "=", "hostname", ".", "lastIndexOf", "(", "\".\"", ")", ";", "if", "(", "i", "<=", "0", ")", "{", "throw", "badHostName", "(", "host...
Extracts service name from the container.service @param hostname hostname @return the separated out service name @throws IOException if the hostname was invalid
[ "Extracts", "service", "name", "from", "the", "container", ".", "service" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/common/Utils.java#L104-L114
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/common/Utils.java
Utils.validSchema
public static boolean validSchema(URI uri) throws IOException { LOG.trace("Checking schema {}", uri.toString()); String hostName = Utils.getHost(uri); LOG.trace("Got hostname as {}", hostName); int i = hostName.lastIndexOf("."); if (i < 0) { return false; } String service = hostName.su...
java
public static boolean validSchema(URI uri) throws IOException { LOG.trace("Checking schema {}", uri.toString()); String hostName = Utils.getHost(uri); LOG.trace("Got hostname as {}", hostName); int i = hostName.lastIndexOf("."); if (i < 0) { return false; } String service = hostName.su...
[ "public", "static", "boolean", "validSchema", "(", "URI", "uri", ")", "throws", "IOException", "{", "LOG", ".", "trace", "(", "\"Checking schema {}\"", ",", "uri", ".", "toString", "(", ")", ")", ";", "String", "hostName", "=", "Utils", ".", "getHost", "("...
Test if hostName of the form container.service @param uri schema URI @return true if hostName of the form container.service @throws IOException if error
[ "Test", "if", "hostName", "of", "the", "form", "container", ".", "service" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/common/Utils.java#L143-L157
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/common/Utils.java
Utils.getHost
public static String getHost(URI uri) throws IOException { String host = uri.getHost(); if (host != null) { return host; } host = uri.toString(); int sInd = host.indexOf("//") + 2; host = host.substring(sInd); int eInd = host.indexOf("/"); if (eInd != -1) { host = host.substr...
java
public static String getHost(URI uri) throws IOException { String host = uri.getHost(); if (host != null) { return host; } host = uri.toString(); int sInd = host.indexOf("//") + 2; host = host.substring(sInd); int eInd = host.indexOf("/"); if (eInd != -1) { host = host.substr...
[ "public", "static", "String", "getHost", "(", "URI", "uri", ")", "throws", "IOException", "{", "String", "host", "=", "uri", ".", "getHost", "(", ")", ";", "if", "(", "host", "!=", "null", ")", "{", "return", "host", ";", "}", "host", "=", "uri", "...
Extract host name from the URI @param uri object store uri @return host name @throws IOException if error
[ "Extract", "host", "name", "from", "the", "URI" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/common/Utils.java#L174-L188
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/common/Utils.java
Utils.getOption
public static String getOption(Properties props, String key) throws IOException { String val = props.getProperty(key); if (val == null) { throw new IOException("Undefined property: " + key); } return val; }
java
public static String getOption(Properties props, String key) throws IOException { String val = props.getProperty(key); if (val == null) { throw new IOException("Undefined property: " + key); } return val; }
[ "public", "static", "String", "getOption", "(", "Properties", "props", ",", "String", "key", ")", "throws", "IOException", "{", "String", "val", "=", "props", ".", "getProperty", "(", "key", ")", ";", "if", "(", "val", "==", "null", ")", "{", "throw", ...
Get a mandatory configuration option @param props property set @param key key @return value of the configuration @throws IOException if there was no match for the key
[ "Get", "a", "mandatory", "configuration", "option" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/common/Utils.java#L198-L204
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/common/Utils.java
Utils.updateProperty
public static void updateProperty(Configuration conf, String prefix, String[] altPrefix, String key, Properties props, String propsKey, boolean required) throws ConfigurationParseException { String val = conf.get(prefix + key); String altKey = prefix + key; if (val == null) { // try altern...
java
public static void updateProperty(Configuration conf, String prefix, String[] altPrefix, String key, Properties props, String propsKey, boolean required) throws ConfigurationParseException { String val = conf.get(prefix + key); String altKey = prefix + key; if (val == null) { // try altern...
[ "public", "static", "void", "updateProperty", "(", "Configuration", "conf", ",", "String", "prefix", ",", "String", "[", "]", "altPrefix", ",", "String", "key", ",", "Properties", "props", ",", "String", "propsKey", ",", "boolean", "required", ")", "throws", ...
Read key from core-site.xml and parse it to connector configuration @param conf source configuration @param prefix configuration key prefix @param altPrefix alternative prefix list. The last on the list wins @param key key in the configuration file @param props destination property set @param propsKey key in the prope...
[ "Read", "key", "from", "core", "-", "site", ".", "xml", "and", "parse", "it", "to", "connector", "configuration" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/common/Utils.java#L219-L238
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/common/Utils.java
Utils.extractTaskID
public static String extractTaskID(String path, String identifier) { LOG.debug("extract task id for {}", path); if (path.contains(HADOOP_ATTEMPT)) { String prf = path.substring(path.indexOf(HADOOP_ATTEMPT)); if (prf.contains("/")) { return TaskAttemptID.forName(prf.substring(0, prf.indexOf("...
java
public static String extractTaskID(String path, String identifier) { LOG.debug("extract task id for {}", path); if (path.contains(HADOOP_ATTEMPT)) { String prf = path.substring(path.indexOf(HADOOP_ATTEMPT)); if (prf.contains("/")) { return TaskAttemptID.forName(prf.substring(0, prf.indexOf("...
[ "public", "static", "String", "extractTaskID", "(", "String", "path", ",", "String", "identifier", ")", "{", "LOG", ".", "debug", "(", "\"extract task id for {}\"", ",", "path", ")", ";", "if", "(", "path", ".", "contains", "(", "HADOOP_ATTEMPT", ")", ")", ...
Extract Hadoop Task ID from path @param path path to extract attempt id @param identifier identifier to extract id @return task id
[ "Extract", "Hadoop", "Task", "ID", "from", "path" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/common/Utils.java#L371-L391
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/common/Utils.java
Utils.lastModifiedAsLong
public static long lastModifiedAsLong(String strTime) throws IOException { final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(TIME_PATTERN, Locale.US); try { long lastModified = simpleDateFormat.parse(strTime).getTime(); if (lastModified == 0) { lastModified = System.curr...
java
public static long lastModifiedAsLong(String strTime) throws IOException { final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(TIME_PATTERN, Locale.US); try { long lastModified = simpleDateFormat.parse(strTime).getTime(); if (lastModified == 0) { lastModified = System.curr...
[ "public", "static", "long", "lastModifiedAsLong", "(", "String", "strTime", ")", "throws", "IOException", "{", "final", "SimpleDateFormat", "simpleDateFormat", "=", "new", "SimpleDateFormat", "(", "TIME_PATTERN", ",", "Locale", ".", "US", ")", ";", "try", "{", "...
Transforms last modified time stamp from String to the long format @param strTime time in string format as returned from Swift @return time in long format @throws IOException if failed to parse time stamp
[ "Transforms", "last", "modified", "time", "stamp", "from", "String", "to", "the", "long", "format" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/common/Utils.java#L483-L495
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSUtils.java
COSUtils.extractException
public static IOException extractException(String operation, String path, ExecutionException ee) { IOException ioe; Throwable cause = ee.getCause(); if (cause instanceof AmazonClientException) { ioe = translateException(operation, path, (AmazonClientException) cause); } else if (cause instan...
java
public static IOException extractException(String operation, String path, ExecutionException ee) { IOException ioe; Throwable cause = ee.getCause(); if (cause instanceof AmazonClientException) { ioe = translateException(operation, path, (AmazonClientException) cause); } else if (cause instan...
[ "public", "static", "IOException", "extractException", "(", "String", "operation", ",", "String", "path", ",", "ExecutionException", "ee", ")", "{", "IOException", "ioe", ";", "Throwable", "cause", "=", "ee", ".", "getCause", "(", ")", ";", "if", "(", "cause...
Extract an exception from a failed future, and convert to an IOE. @param operation operation which failed @param path path operated on (may be null) @param ee execution exception @return an IOE which can be thrown
[ "Extract", "an", "exception", "from", "a", "failed", "future", "and", "convert", "to", "an", "IOE", "." ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSUtils.java#L164-L176
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSUtils.java
COSUtils.containsInterruptedException
static boolean containsInterruptedException(Throwable thrown) { if (thrown == null) { return false; } if (thrown instanceof InterruptedException || thrown instanceof InterruptedIOException) { return true; } // tail recurse return containsInterruptedException(thrown.getCause()); }
java
static boolean containsInterruptedException(Throwable thrown) { if (thrown == null) { return false; } if (thrown instanceof InterruptedException || thrown instanceof InterruptedIOException) { return true; } // tail recurse return containsInterruptedException(thrown.getCause()); }
[ "static", "boolean", "containsInterruptedException", "(", "Throwable", "thrown", ")", "{", "if", "(", "thrown", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "thrown", "instanceof", "InterruptedException", "||", "thrown", "instanceof", "Interru...
Recurse down the exception loop looking for any inner details about an interrupted exception. @param thrown exception thrown @return true if down the execution chain the operation was an interrupt
[ "Recurse", "down", "the", "exception", "loop", "looking", "for", "any", "inner", "details", "about", "an", "interrupted", "exception", "." ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSUtils.java#L185-L194
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSUtils.java
COSUtils.ensureOutputParameterInRange
public static int ensureOutputParameterInRange(String name, long size) { if (size > Integer.MAX_VALUE) { LOG.warn("cos: {} capped to ~2.14GB" + " (maximum allowed size with current output mechanism)", name); return Integer.MAX_VALUE; } else { return (int) size; } }
java
public static int ensureOutputParameterInRange(String name, long size) { if (size > Integer.MAX_VALUE) { LOG.warn("cos: {} capped to ~2.14GB" + " (maximum allowed size with current output mechanism)", name); return Integer.MAX_VALUE; } else { return (int) size; } }
[ "public", "static", "int", "ensureOutputParameterInRange", "(", "String", "name", ",", "long", "size", ")", "{", "if", "(", "size", ">", "Integer", ".", "MAX_VALUE", ")", "{", "LOG", ".", "warn", "(", "\"cos: {} capped to ~2.14GB\"", "+", "\" (maximum allowed si...
Ensure that the long value is in the range of an integer. @param name property name for error messages @param size original size @return the size, guaranteed to be less than or equal to the max value of an integer
[ "Ensure", "that", "the", "long", "value", "is", "in", "the", "range", "of", "an", "integer", "." ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSUtils.java#L224-L232
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSUtils.java
COSUtils.createFileStatus
public static COSFileStatus createFileStatus(Path keyPath, S3ObjectSummary summary, long blockSize) { long size = summary.getSize(); return createFileStatus(keyPath, objectRepresentsDirectory(summary.getKey(), size), size, summary.getLastModified(), blockSize); }
java
public static COSFileStatus createFileStatus(Path keyPath, S3ObjectSummary summary, long blockSize) { long size = summary.getSize(); return createFileStatus(keyPath, objectRepresentsDirectory(summary.getKey(), size), size, summary.getLastModified(), blockSize); }
[ "public", "static", "COSFileStatus", "createFileStatus", "(", "Path", "keyPath", ",", "S3ObjectSummary", "summary", ",", "long", "blockSize", ")", "{", "long", "size", "=", "summary", ".", "getSize", "(", ")", ";", "return", "createFileStatus", "(", "keyPath", ...
Create a files status instance from a listing. @param keyPath path to entry @param summary summary from AWS @param blockSize block size to declare @return a status entry
[ "Create", "a", "files", "status", "instance", "from", "a", "listing", "." ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSUtils.java#L241-L248
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/ObjectStoreVisitor.java
ObjectStoreVisitor.getStoreClient
public static IStoreClient getStoreClient(URI fsuri, Configuration conf) throws IOException { final String fsSchema = fsuri.toString().substring(0, fsuri.toString().indexOf("://")); final ClassLoader classLoader = ObjectStoreVisitor.class.getClassLoader(); String[] supportedSchemas = conf.get("fs.stocator.s...
java
public static IStoreClient getStoreClient(URI fsuri, Configuration conf) throws IOException { final String fsSchema = fsuri.toString().substring(0, fsuri.toString().indexOf("://")); final ClassLoader classLoader = ObjectStoreVisitor.class.getClassLoader(); String[] supportedSchemas = conf.get("fs.stocator.s...
[ "public", "static", "IStoreClient", "getStoreClient", "(", "URI", "fsuri", ",", "Configuration", "conf", ")", "throws", "IOException", "{", "final", "String", "fsSchema", "=", "fsuri", ".", "toString", "(", ")", ".", "substring", "(", "0", ",", "fsuri", ".",...
fs.stocator.scheme.list contains comma separated list of the provided back-end storage drivers. If none provided or key is not present, then 'swift' is the default value. For each provided scheme: fs.stocator.provided scheme.scheme - scheme value. If none provided, 'swift2d' is the default value fs.stocator.provided ...
[ "fs", ".", "stocator", ".", "scheme", ".", "list", "contains", "comma", "separated", "list", "of", "the", "provided", "back", "-", "end", "storage", "drivers", ".", "If", "none", "provided", "or", "key", "is", "not", "present", "then", "swift", "is", "th...
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/ObjectStoreVisitor.java#L98-L139
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/swift/auth/JossAccount.java
JossAccount.createAccount
public void createAccount() { mAccount = new AccountFactory(mAccountConfig).setHttpClient(httpclient).createAccount(); mAccess = mAccount.getAccess(); if (mRegion != null) { mAccess.setPreferredRegion(mRegion); } }
java
public void createAccount() { mAccount = new AccountFactory(mAccountConfig).setHttpClient(httpclient).createAccount(); mAccess = mAccount.getAccess(); if (mRegion != null) { mAccess.setPreferredRegion(mRegion); } }
[ "public", "void", "createAccount", "(", ")", "{", "mAccount", "=", "new", "AccountFactory", "(", "mAccountConfig", ")", ".", "setHttpClient", "(", "httpclient", ")", ".", "createAccount", "(", ")", ";", "mAccess", "=", "mAccount", ".", "getAccess", "(", ")",...
Creates account model
[ "Creates", "account", "model" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/swift/auth/JossAccount.java#L89-L95
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/swift/auth/JossAccount.java
JossAccount.createDummyAccount
public void createDummyAccount() { mAccount = new DummyAccountFactory(mAccountConfig).setHttpClient(httpclient).createAccount(); mAccess = mAccount.getAccess(); }
java
public void createDummyAccount() { mAccount = new DummyAccountFactory(mAccountConfig).setHttpClient(httpclient).createAccount(); mAccess = mAccount.getAccess(); }
[ "public", "void", "createDummyAccount", "(", ")", "{", "mAccount", "=", "new", "DummyAccountFactory", "(", "mAccountConfig", ")", ".", "setHttpClient", "(", "httpclient", ")", ".", "createAccount", "(", ")", ";", "mAccess", "=", "mAccount", ".", "getAccess", "...
Creates virtual account. Used for public containers
[ "Creates", "virtual", "account", ".", "Used", "for", "public", "containers" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/swift/auth/JossAccount.java#L100-L103
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/swift/auth/JossAccount.java
JossAccount.authenticate
public void authenticate() { if (mAccount == null) { // Create account also performs authentication. createAccount(); } else { mAccess = mAccount.authenticate(); if (mRegion != null) { mAccess.setPreferredRegion(mRegion); } } }
java
public void authenticate() { if (mAccount == null) { // Create account also performs authentication. createAccount(); } else { mAccess = mAccount.authenticate(); if (mRegion != null) { mAccess.setPreferredRegion(mRegion); } } }
[ "public", "void", "authenticate", "(", ")", "{", "if", "(", "mAccount", "==", "null", ")", "{", "// Create account also performs authentication.", "createAccount", "(", ")", ";", "}", "else", "{", "mAccess", "=", "mAccount", ".", "authenticate", "(", ")", ";",...
Authenticates and renew the token
[ "Authenticates", "and", "renew", "the", "token" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/swift/auth/JossAccount.java#L108-L118
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/swift/auth/JossAccount.java
JossAccount.getAccessURL
public String getAccessURL() { if (mUsePublicURL) { LOG.trace("Using public URL: " + mAccess.getPublicURL()); return mAccess.getPublicURL(); } LOG.trace("Using internal URL: " + mAccess.getInternalURL()); return mAccess.getInternalURL(); }
java
public String getAccessURL() { if (mUsePublicURL) { LOG.trace("Using public URL: " + mAccess.getPublicURL()); return mAccess.getPublicURL(); } LOG.trace("Using internal URL: " + mAccess.getInternalURL()); return mAccess.getInternalURL(); }
[ "public", "String", "getAccessURL", "(", ")", "{", "if", "(", "mUsePublicURL", ")", "{", "LOG", ".", "trace", "(", "\"Using public URL: \"", "+", "mAccess", ".", "getPublicURL", "(", ")", ")", ";", "return", "mAccess", ".", "getPublicURL", "(", ")", ";", ...
Get authenticated URL @return access URL, public or internal
[ "Get", "authenticated", "URL" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/swift/auth/JossAccount.java#L134-L141
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSBlockOutputStream.java
COSBlockOutputStream.createBlockIfNeeded
private synchronized COSDataBlocks.DataBlock createBlockIfNeeded() throws IOException { if (activeBlock == null) { blockCount++; if (blockCount >= COSConstants.MAX_MULTIPART_COUNT) { LOG.error("Number of partitions in stream exceeds limit for S3: " + COSConstants.MAX_MULTIPART_COUNT ...
java
private synchronized COSDataBlocks.DataBlock createBlockIfNeeded() throws IOException { if (activeBlock == null) { blockCount++; if (blockCount >= COSConstants.MAX_MULTIPART_COUNT) { LOG.error("Number of partitions in stream exceeds limit for S3: " + COSConstants.MAX_MULTIPART_COUNT ...
[ "private", "synchronized", "COSDataBlocks", ".", "DataBlock", "createBlockIfNeeded", "(", ")", "throws", "IOException", "{", "if", "(", "activeBlock", "==", "null", ")", "{", "blockCount", "++", ";", "if", "(", "blockCount", ">=", "COSConstants", ".", "MAX_MULTI...
Demand create a destination block. @return the active block; null if there isn't one @throws IOException on any failure to create
[ "Demand", "create", "a", "destination", "block", "." ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSBlockOutputStream.java#L166-L177
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSBlockOutputStream.java
COSBlockOutputStream.uploadCurrentBlock
private synchronized void uploadCurrentBlock() throws IOException { if (!hasActiveBlock()) { throw new IllegalStateException("No active block"); } LOG.debug("Writing block # {}", blockCount); if (multiPartUpload == null) { LOG.debug("Initiating Multipart upload"); multiPartUpload = new...
java
private synchronized void uploadCurrentBlock() throws IOException { if (!hasActiveBlock()) { throw new IllegalStateException("No active block"); } LOG.debug("Writing block # {}", blockCount); if (multiPartUpload == null) { LOG.debug("Initiating Multipart upload"); multiPartUpload = new...
[ "private", "synchronized", "void", "uploadCurrentBlock", "(", ")", "throws", "IOException", "{", "if", "(", "!", "hasActiveBlock", "(", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"No active block\"", ")", ";", "}", "LOG", ".", "debug", "(",...
Start an asynchronous upload of the current block. @throws IOException Problems opening the destination for upload or initializing the upload
[ "Start", "an", "asynchronous", "upload", "of", "the", "current", "block", "." ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSBlockOutputStream.java#L294-L309
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSBlockOutputStream.java
COSBlockOutputStream.putObject
private void putObject() throws IOException { LOG.debug("Executing regular upload for {}", writeOperationHelper); final COSDataBlocks.DataBlock block = getActiveBlock(); int size = block.dataSize(); final COSDataBlocks.BlockUploadData uploadData = block.startUpload(); final PutObjectRequest putObje...
java
private void putObject() throws IOException { LOG.debug("Executing regular upload for {}", writeOperationHelper); final COSDataBlocks.DataBlock block = getActiveBlock(); int size = block.dataSize(); final COSDataBlocks.BlockUploadData uploadData = block.startUpload(); final PutObjectRequest putObje...
[ "private", "void", "putObject", "(", ")", "throws", "IOException", "{", "LOG", ".", "debug", "(", "\"Executing regular upload for {}\"", ",", "writeOperationHelper", ")", ";", "final", "COSDataBlocks", ".", "DataBlock", "block", "=", "getActiveBlock", "(", ")", ";...
Upload the current block as a single PUT request; if the buffer is empty a 0-byte PUT will be invoked, as it is needed to create an entry at the far end. @throws IOException any problem
[ "Upload", "the", "current", "block", "as", "a", "single", "PUT", "request", ";", "if", "the", "buffer", "is", "empty", "a", "0", "-", "byte", "PUT", "will", "be", "invoked", "as", "it", "is", "needed", "to", "create", "an", "entry", "at", "the", "far...
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSBlockOutputStream.java#L371-L414
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/swift/SwiftAPIClient.java
SwiftAPIClient.createObject
@Override public FSDataOutputStream createObject(String objName, String contentType, Map<String, String> metadata, Statistics statistics) throws IOException { final URL url = new URL(mJossAccount.getAccessURL() + "/" + getURLEncodedObjName(objName)); LOG.debug("PUT {}. Content-Type : {}", url.toString()...
java
@Override public FSDataOutputStream createObject(String objName, String contentType, Map<String, String> metadata, Statistics statistics) throws IOException { final URL url = new URL(mJossAccount.getAccessURL() + "/" + getURLEncodedObjName(objName)); LOG.debug("PUT {}. Content-Type : {}", url.toString()...
[ "@", "Override", "public", "FSDataOutputStream", "createObject", "(", "String", "objName", ",", "String", "contentType", ",", "Map", "<", "String", ",", "String", ">", "metadata", ",", "Statistics", "statistics", ")", "throws", "IOException", "{", "final", "URL"...
Direct HTTP PUT request without JOSS package @param objName name of the object @param contentType content type @return HttpURLConnection
[ "Direct", "HTTP", "PUT", "request", "without", "JOSS", "package" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/swift/SwiftAPIClient.java#L641-L665
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/swift/SwiftAPIClient.java
SwiftAPIClient.setCorrectSize
private void setCorrectSize(StoredObject tmp, Container cObj) { long objectSize = tmp.getContentLength(); if (objectSize == 0) { // we may hit a well known Swift bug. // container listing reports 0 for large objects. StoredObject soDirect = cObj .getObject(tmp.getName()); long ...
java
private void setCorrectSize(StoredObject tmp, Container cObj) { long objectSize = tmp.getContentLength(); if (objectSize == 0) { // we may hit a well known Swift bug. // container listing reports 0 for large objects. StoredObject soDirect = cObj .getObject(tmp.getName()); long ...
[ "private", "void", "setCorrectSize", "(", "StoredObject", "tmp", ",", "Container", "cObj", ")", "{", "long", "objectSize", "=", "tmp", ".", "getContentLength", "(", ")", ";", "if", "(", "objectSize", "==", "0", ")", "{", "// we may hit a well known Swift bug.", ...
Swift has a bug where container listing might wrongly report size 0 for large objects. It's seems to be a well known issue in Swift without solution. We have to provide work around for this. If container listing reports size 0 for some object, we send additional HEAD on that object to verify it's size. @param tmp JOSS...
[ "Swift", "has", "a", "bug", "where", "container", "listing", "might", "wrongly", "report", "size", "0", "for", "large", "objects", ".", "It", "s", "seems", "to", "be", "a", "well", "known", "issue", "in", "Swift", "without", "solution", ".", "We", "have"...
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/swift/SwiftAPIClient.java#L839-L851
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/swift/SwiftAPIClient.java
SwiftAPIClient.createFileStatus
private FileStatus createFileStatus(StoredObject tmp, Container cObj, String hostName, Path path) throws IllegalArgumentException, IOException { String newMergedPath = getMergedPath(hostName, path, tmp.getName()); return new FileStatus(tmp.getContentLength(), false, 1, blockSize, Utils.lastModifie...
java
private FileStatus createFileStatus(StoredObject tmp, Container cObj, String hostName, Path path) throws IllegalArgumentException, IOException { String newMergedPath = getMergedPath(hostName, path, tmp.getName()); return new FileStatus(tmp.getContentLength(), false, 1, blockSize, Utils.lastModifie...
[ "private", "FileStatus", "createFileStatus", "(", "StoredObject", "tmp", ",", "Container", "cObj", ",", "String", "hostName", ",", "Path", "path", ")", "throws", "IllegalArgumentException", ",", "IOException", "{", "String", "newMergedPath", "=", "getMergedPath", "(...
Maps StoredObject of JOSS into Hadoop FileStatus @param tmp Stored Object @param cObj Container Object @param hostName host name @param path path to the object @return FileStatus representing current object @throws IllegalArgumentException if error @throws IOException if error
[ "Maps", "StoredObject", "of", "JOSS", "into", "Hadoop", "FileStatus" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/swift/SwiftAPIClient.java#L872-L878
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/ConfigurationHandler.java
ConfigurationHandler.initialize
public static Properties initialize(URI uri, Configuration conf, String scheme) throws IOException { LOG.debug("COS driver: initialize start for {} ", uri.toString()); String host = Utils.getHost(uri); LOG.debug("extracted host name from {} is {}", uri.toString(), host); String bucket = Utils.getC...
java
public static Properties initialize(URI uri, Configuration conf, String scheme) throws IOException { LOG.debug("COS driver: initialize start for {} ", uri.toString()); String host = Utils.getHost(uri); LOG.debug("extracted host name from {} is {}", uri.toString(), host); String bucket = Utils.getC...
[ "public", "static", "Properties", "initialize", "(", "URI", "uri", ",", "Configuration", "conf", ",", "String", "scheme", ")", "throws", "IOException", "{", "LOG", ".", "debug", "(", "\"COS driver: initialize start for {} \"", ",", "uri", ".", "toString", "(", "...
Parse configuration properties from the core-site.xml and initialize COS configuration @param uri uri of the file system @param conf configuration @param scheme connector supposed scheme @return parsed configuration for the COS driver @throws IOException if the configuration is invalid
[ "Parse", "configuration", "properties", "from", "the", "core", "-", "site", ".", "xml", "and", "initialize", "COS", "configuration" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/ConfigurationHandler.java#L67-L109
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/swift/http/SwiftConnectionManager.java
SwiftConnectionManager.getRetryHandler
private HttpRequestRetryHandler getRetryHandler() { final HttpRequestRetryHandler myRetryHandler = new HttpRequestRetryHandler() { public boolean retryRequest(IOException exception, int executionCount, HttpContext context) { if (executionCount >= connectionConfiguration.getExecutionCount()) { ...
java
private HttpRequestRetryHandler getRetryHandler() { final HttpRequestRetryHandler myRetryHandler = new HttpRequestRetryHandler() { public boolean retryRequest(IOException exception, int executionCount, HttpContext context) { if (executionCount >= connectionConfiguration.getExecutionCount()) { ...
[ "private", "HttpRequestRetryHandler", "getRetryHandler", "(", ")", "{", "final", "HttpRequestRetryHandler", "myRetryHandler", "=", "new", "HttpRequestRetryHandler", "(", ")", "{", "public", "boolean", "retryRequest", "(", "IOException", "exception", ",", "int", "executi...
Creates custom retry handler to be used if HTTP exception happens @return retry handler
[ "Creates", "custom", "retry", "handler", "to", "be", "used", "if", "HTTP", "exception", "happens" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/swift/http/SwiftConnectionManager.java#L134-L183
train
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/swift/http/SwiftConnectionManager.java
SwiftConnectionManager.createHttpConnection
public CloseableHttpClient createHttpConnection() { LOG.trace("HTTP build new connection based on connection pool"); return HttpClients .custom() .setRetryHandler(getRetryHandler()) .setConnectionManager(connectionPool) .setDefaultRequestConfig(rConfig) ...
java
public CloseableHttpClient createHttpConnection() { LOG.trace("HTTP build new connection based on connection pool"); return HttpClients .custom() .setRetryHandler(getRetryHandler()) .setConnectionManager(connectionPool) .setDefaultRequestConfig(rConfig) ...
[ "public", "CloseableHttpClient", "createHttpConnection", "(", ")", "{", "LOG", ".", "trace", "(", "\"HTTP build new connection based on connection pool\"", ")", ";", "return", "HttpClients", ".", "custom", "(", ")", ".", "setRetryHandler", "(", "getRetryHandler", "(", ...
Creates HTTP connection based on the connection pool @return HTTP client
[ "Creates", "HTTP", "connection", "based", "on", "the", "connection", "pool" ]
35969cadd2e8faa6fdac45e8bec1799fdd3d8299
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/swift/http/SwiftConnectionManager.java#L213-L222
train
eclipse/xtext-extras
org.eclipse.xtext.generator/src/org/eclipse/xtext/generator/parseTreeConstructor/ParseTreeConstructorFragment.java
ParseTreeConstructorFragment.setGraphvizCommand
public void setGraphvizCommand(String cmd) { if (cmd != null && cmd.length() == 0) cmd = null; graphvizCommand = cmd; }
java
public void setGraphvizCommand(String cmd) { if (cmd != null && cmd.length() == 0) cmd = null; graphvizCommand = cmd; }
[ "public", "void", "setGraphvizCommand", "(", "String", "cmd", ")", "{", "if", "(", "cmd", "!=", "null", "&&", "cmd", ".", "length", "(", ")", "==", "0", ")", "cmd", "=", "null", ";", "graphvizCommand", "=", "cmd", ";", "}" ]
Set the Graphviz command that is issued to paint a debugging diagram. @param cmd
[ "Set", "the", "Graphviz", "command", "that", "is", "issued", "to", "paint", "a", "debugging", "diagram", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/src/org/eclipse/xtext/generator/parseTreeConstructor/ParseTreeConstructorFragment.java#L101-L105
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/JvmModelGenerator.java
JvmModelGenerator.javaName
public String javaName(final JvmVisibility visibility) { if ((visibility != null)) { String _switchResult = null; if (visibility != null) { switch (visibility) { case PRIVATE: _switchResult = "private "; break; case PUBLIC: _switchResult = ...
java
public String javaName(final JvmVisibility visibility) { if ((visibility != null)) { String _switchResult = null; if (visibility != null) { switch (visibility) { case PRIVATE: _switchResult = "private "; break; case PUBLIC: _switchResult = ...
[ "public", "String", "javaName", "(", "final", "JvmVisibility", "visibility", ")", "{", "if", "(", "(", "visibility", "!=", "null", ")", ")", "{", "String", "_switchResult", "=", "null", ";", "if", "(", "visibility", "!=", "null", ")", "{", "switch", "(",...
Returns the visibility modifier and a space as suffix if not empty
[ "Returns", "the", "visibility", "modifier", "and", "a", "space", "as", "suffix", "if", "not", "empty" ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/JvmModelGenerator.java#L616-L641
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/DefaultReentrantTypeResolver.java
DefaultReentrantTypeResolver.getInvalidWritableVariableAccessMessage
protected String getInvalidWritableVariableAccessMessage(XVariableDeclaration variable, XAbstractFeatureCall featureCall, IResolvedTypes resolvedTypes) { // TODO this should be part of a separate validation service XClosure containingClosure = EcoreUtil2.getContainerOfType(featureCall, XClosure.class); if (contai...
java
protected String getInvalidWritableVariableAccessMessage(XVariableDeclaration variable, XAbstractFeatureCall featureCall, IResolvedTypes resolvedTypes) { // TODO this should be part of a separate validation service XClosure containingClosure = EcoreUtil2.getContainerOfType(featureCall, XClosure.class); if (contai...
[ "protected", "String", "getInvalidWritableVariableAccessMessage", "(", "XVariableDeclaration", "variable", ",", "XAbstractFeatureCall", "featureCall", ",", "IResolvedTypes", "resolvedTypes", ")", "{", "// TODO this should be part of a separate validation service", "XClosure", "contai...
Provide the error message for mutable variables that may not be captured in lambdas. @param variable the writable variable declaration @param featureCall the reference to the variable @param resolvedTypes type information
[ "Provide", "the", "error", "message", "for", "mutable", "variables", "that", "may", "not", "be", "captured", "in", "lambdas", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/DefaultReentrantTypeResolver.java#L208-L215
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/jvmmodel/JvmTypesBuilder.java
JvmTypesBuilder.setDocumentation
public void setDocumentation(/* @Nullable */ JvmIdentifiableElement jvmElement, /* @Nullable */ String documentation) { if(jvmElement == null || documentation == null) return; DocumentationAdapter documentationAdapter = new DocumentationAdapter(); documentationAdapter.setDocumentation(documentation); jvmElem...
java
public void setDocumentation(/* @Nullable */ JvmIdentifiableElement jvmElement, /* @Nullable */ String documentation) { if(jvmElement == null || documentation == null) return; DocumentationAdapter documentationAdapter = new DocumentationAdapter(); documentationAdapter.setDocumentation(documentation); jvmElem...
[ "public", "void", "setDocumentation", "(", "/* @Nullable */", "JvmIdentifiableElement", "jvmElement", ",", "/* @Nullable */", "String", "documentation", ")", "{", "if", "(", "jvmElement", "==", "null", "||", "documentation", "==", "null", ")", "return", ";", "Docume...
Attaches the given documentation to the given jvmElement.
[ "Attaches", "the", "given", "documentation", "to", "the", "given", "jvmElement", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/jvmmodel/JvmTypesBuilder.java#L265-L271
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/jvmmodel/JvmTypesBuilder.java
JvmTypesBuilder.copyDocumentationTo
public void copyDocumentationTo(/* @Nullable */ final EObject source, /* @Nullable */ JvmIdentifiableElement jvmElement) { if(source == null || jvmElement == null) return; DocumentationAdapter documentationAdapter = new DocumentationAdapter() { private boolean computed = false; @Override public Strin...
java
public void copyDocumentationTo(/* @Nullable */ final EObject source, /* @Nullable */ JvmIdentifiableElement jvmElement) { if(source == null || jvmElement == null) return; DocumentationAdapter documentationAdapter = new DocumentationAdapter() { private boolean computed = false; @Override public Strin...
[ "public", "void", "copyDocumentationTo", "(", "/* @Nullable */", "final", "EObject", "source", ",", "/* @Nullable */", "JvmIdentifiableElement", "jvmElement", ")", "{", "if", "(", "source", "==", "null", "||", "jvmElement", "==", "null", ")", "return", ";", "Docum...
Attaches the given documentation of the source element to the given jvmElement. The documentation is computed lazily.
[ "Attaches", "the", "given", "documentation", "of", "the", "source", "element", "to", "the", "given", "jvmElement", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/jvmmodel/JvmTypesBuilder.java#L278-L300
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/jvmmodel/JvmTypesBuilder.java
JvmTypesBuilder.isPrimitiveBoolean
protected boolean isPrimitiveBoolean(JvmTypeReference typeRef) { if (InferredTypeIndicator.isInferred(typeRef)) { return false; } return typeRef != null && typeRef.getType() != null && !typeRef.getType().eIsProxy() && "boolean".equals(typeRef.getType().getIdentifier()); }
java
protected boolean isPrimitiveBoolean(JvmTypeReference typeRef) { if (InferredTypeIndicator.isInferred(typeRef)) { return false; } return typeRef != null && typeRef.getType() != null && !typeRef.getType().eIsProxy() && "boolean".equals(typeRef.getType().getIdentifier()); }
[ "protected", "boolean", "isPrimitiveBoolean", "(", "JvmTypeReference", "typeRef", ")", "{", "if", "(", "InferredTypeIndicator", ".", "isInferred", "(", "typeRef", ")", ")", "{", "return", "false", ";", "}", "return", "typeRef", "!=", "null", "&&", "typeRef", "...
Detects whether the type reference refers to primitive boolean. @since 2.9
[ "Detects", "whether", "the", "type", "reference", "refers", "to", "primitive", "boolean", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/jvmmodel/JvmTypesBuilder.java#L768-L776
train
eclipse/xtext-extras
org.eclipse.xtext.generator/src/org/eclipse/xtext/ui/generator/projectWizard/SimpleProjectWizardFragment.java
SimpleProjectWizardFragment.setGeneratorProjectName
public void setGeneratorProjectName(String generatorProjectName) { if (generatorProjectName == null || "".equals(generatorProjectName.trim())) { return; } this.generatorProjectName = generatorProjectName.trim(); }
java
public void setGeneratorProjectName(String generatorProjectName) { if (generatorProjectName == null || "".equals(generatorProjectName.trim())) { return; } this.generatorProjectName = generatorProjectName.trim(); }
[ "public", "void", "setGeneratorProjectName", "(", "String", "generatorProjectName", ")", "{", "if", "(", "generatorProjectName", "==", "null", "||", "\"\"", ".", "equals", "(", "generatorProjectName", ".", "trim", "(", ")", ")", ")", "{", "return", ";", "}", ...
Sets the name of the generator project. @param generatorProjectName
[ "Sets", "the", "name", "of", "the", "generator", "project", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/src/org/eclipse/xtext/ui/generator/projectWizard/SimpleProjectWizardFragment.java#L119-L124
train
eclipse/xtext-extras
org.eclipse.xtext.generator/src/org/eclipse/xtext/ui/generator/projectWizard/SimpleProjectWizardFragment.java
SimpleProjectWizardFragment.setFileExtension
public void setFileExtension(String modelFileExtension) { if (modelFileExtension == null || "".equals(modelFileExtension.trim())) { return; } this.modelFileExtension = modelFileExtension.trim(); }
java
public void setFileExtension(String modelFileExtension) { if (modelFileExtension == null || "".equals(modelFileExtension.trim())) { return; } this.modelFileExtension = modelFileExtension.trim(); }
[ "public", "void", "setFileExtension", "(", "String", "modelFileExtension", ")", "{", "if", "(", "modelFileExtension", "==", "null", "||", "\"\"", ".", "equals", "(", "modelFileExtension", ".", "trim", "(", ")", ")", ")", "{", "return", ";", "}", "this", "....
Sets the file extension used when creating the initial sample model. @param modelFileExtension @since 2.4
[ "Sets", "the", "file", "extension", "used", "when", "creating", "the", "initial", "sample", "model", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/src/org/eclipse/xtext/ui/generator/projectWizard/SimpleProjectWizardFragment.java#L132-L137
train
eclipse/xtext-extras
org.eclipse.xtext.generator/src/org/eclipse/xtext/generator/grammarAccess/UnicodeCharacterDatabaseNames.java
UnicodeCharacterDatabaseNames.getCharacterName
public static String getCharacterName(char character) { String transliterated = transliterator.transliterate(String.valueOf(character)); // returns strings in the for of SEMICOLON} return transliterated.substring("\\N{".length(),transliterated.length()-"}".length()); }
java
public static String getCharacterName(char character) { String transliterated = transliterator.transliterate(String.valueOf(character)); // returns strings in the for of SEMICOLON} return transliterated.substring("\\N{".length(),transliterated.length()-"}".length()); }
[ "public", "static", "String", "getCharacterName", "(", "char", "character", ")", "{", "String", "transliterated", "=", "transliterator", ".", "transliterate", "(", "String", ".", "valueOf", "(", "character", ")", ")", ";", "// returns strings in the for of SEMICOLON}"...
Returns the Unicode string name for a character.
[ "Returns", "the", "Unicode", "string", "name", "for", "a", "character", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/src/org/eclipse/xtext/generator/grammarAccess/UnicodeCharacterDatabaseNames.java#L24-L28
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/output/ImportingStringConcatenation.java
ImportingStringConcatenation.getSignificantContent
@Override protected List<String> getSignificantContent() { final List<String> result = super.getSignificantContent(); if (((result.size() >= 1) && Objects.equal(this.getLineDelimiter(), IterableExtensions.<String>last(result)))) { int _size = result.size(); int _minus = (_size - 1); return r...
java
@Override protected List<String> getSignificantContent() { final List<String> result = super.getSignificantContent(); if (((result.size() >= 1) && Objects.equal(this.getLineDelimiter(), IterableExtensions.<String>last(result)))) { int _size = result.size(); int _minus = (_size - 1); return r...
[ "@", "Override", "protected", "List", "<", "String", ">", "getSignificantContent", "(", ")", "{", "final", "List", "<", "String", ">", "result", "=", "super", ".", "getSignificantContent", "(", ")", ";", "if", "(", "(", "(", "result", ".", "size", "(", ...
A potentially contained trailing line delimiter is ignored.
[ "A", "potentially", "contained", "trailing", "line", "delimiter", "is", "ignored", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/output/ImportingStringConcatenation.java#L71-L80
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/ClosureTypeComputer.java
ClosureTypeComputer.selectStrategy
public void selectStrategy() { LightweightTypeReference expectedType = expectation.getExpectedType(); if (expectedType == null) { strategy = getClosureWithoutExpectationHelper(); } else { JvmOperation operation = functionTypes.findImplementingOperation(expectedType); JvmType type = expectedType.getType()...
java
public void selectStrategy() { LightweightTypeReference expectedType = expectation.getExpectedType(); if (expectedType == null) { strategy = getClosureWithoutExpectationHelper(); } else { JvmOperation operation = functionTypes.findImplementingOperation(expectedType); JvmType type = expectedType.getType()...
[ "public", "void", "selectStrategy", "(", ")", "{", "LightweightTypeReference", "expectedType", "=", "expectation", ".", "getExpectedType", "(", ")", ";", "if", "(", "expectedType", "==", "null", ")", "{", "strategy", "=", "getClosureWithoutExpectationHelper", "(", ...
This method is only public for testing purpose. @noreference This method is not intended to be referenced by clients.
[ "This", "method", "is", "only", "public", "for", "testing", "purpose", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/ClosureTypeComputer.java#L57-L79
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractBatchTypeResolver.java
AbstractBatchTypeResolver.validateResourceState
protected void validateResourceState(Resource resource) { if (resource instanceof StorageAwareResource && ((StorageAwareResource) resource).isLoadedFromStorage()) { LOG.error("Discouraged attempt to compute types for resource that was loaded from storage. Resource was : "+resource.getURI(), new Exception()); } ...
java
protected void validateResourceState(Resource resource) { if (resource instanceof StorageAwareResource && ((StorageAwareResource) resource).isLoadedFromStorage()) { LOG.error("Discouraged attempt to compute types for resource that was loaded from storage. Resource was : "+resource.getURI(), new Exception()); } ...
[ "protected", "void", "validateResourceState", "(", "Resource", "resource", ")", "{", "if", "(", "resource", "instanceof", "StorageAwareResource", "&&", "(", "(", "StorageAwareResource", ")", "resource", ")", ".", "isLoadedFromStorage", "(", ")", ")", "{", "LOG", ...
Checks the internal state of the resource and logs if type resolution was triggered unexpectedly.
[ "Checks", "the", "internal", "state", "of", "the", "resource", "and", "logs", "if", "type", "resolution", "was", "triggered", "unexpectedly", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractBatchTypeResolver.java#L75-L79
train
eclipse/xtext-extras
org.eclipse.xtext.smap/src/org/eclipse/xtext/smap/SmapGenerator.java
SmapGenerator.getString
public synchronized String getString() { // check state and initialize buffer if (outputFileName == null) throw new IllegalStateException(); StringBuffer out = new StringBuffer(); // start the SMAP out.append("SMAP\n"); out.append(outputFileName + '\n'); out.append(defaultStratum + '\n'); // includ...
java
public synchronized String getString() { // check state and initialize buffer if (outputFileName == null) throw new IllegalStateException(); StringBuffer out = new StringBuffer(); // start the SMAP out.append("SMAP\n"); out.append(outputFileName + '\n'); out.append(defaultStratum + '\n'); // includ...
[ "public", "synchronized", "String", "getString", "(", ")", "{", "// check state and initialize buffer", "if", "(", "outputFileName", "==", "null", ")", "throw", "new", "IllegalStateException", "(", ")", ";", "StringBuffer", "out", "=", "new", "StringBuffer", "(", ...
Methods for serializing the logical SMAP
[ "Methods", "for", "serializing", "the", "logical", "SMAP" ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.smap/src/org/eclipse/xtext/smap/SmapGenerator.java#L104-L134
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/validation/XbaseDiagnostician.java
XbaseDiagnostician.doValidateLambdaContents
@Deprecated protected boolean doValidateLambdaContents(XClosure closure, DiagnosticChain diagnostics, Map<Object, Object> context) { return true; }
java
@Deprecated protected boolean doValidateLambdaContents(XClosure closure, DiagnosticChain diagnostics, Map<Object, Object> context) { return true; }
[ "@", "Deprecated", "protected", "boolean", "doValidateLambdaContents", "(", "XClosure", "closure", ",", "DiagnosticChain", "diagnostics", ",", "Map", "<", "Object", ",", "Object", ">", "context", ")", "{", "return", "true", ";", "}" ]
This was here for EMF 2.5 compatibility and was refactored to a no-op.
[ "This", "was", "here", "for", "EMF", "2", ".", "5", "compatibility", "and", "was", "refactored", "to", "a", "no", "-", "op", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/validation/XbaseDiagnostician.java#L49-L52
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/util/XSwitchExpressions.java
XSwitchExpressions.isJavaSwitchExpression
public boolean isJavaSwitchExpression(final XSwitchExpression it) { boolean _xblockexpression = false; { final LightweightTypeReference switchType = this.getSwitchVariableType(it); if ((switchType == null)) { return false; } boolean _isSubtypeOf = switchType.isSubtypeOf(Integer.T...
java
public boolean isJavaSwitchExpression(final XSwitchExpression it) { boolean _xblockexpression = false; { final LightweightTypeReference switchType = this.getSwitchVariableType(it); if ((switchType == null)) { return false; } boolean _isSubtypeOf = switchType.isSubtypeOf(Integer.T...
[ "public", "boolean", "isJavaSwitchExpression", "(", "final", "XSwitchExpression", "it", ")", "{", "boolean", "_xblockexpression", "=", "false", ";", "{", "final", "LightweightTypeReference", "switchType", "=", "this", ".", "getSwitchVariableType", "(", "it", ")", ";...
Determine whether the given switch expression is valid for Java version 6 or lower.
[ "Determine", "whether", "the", "given", "switch", "expression", "is", "valid", "for", "Java", "version", "6", "or", "lower", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/util/XSwitchExpressions.java#L40-L58
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/util/XSwitchExpressions.java
XSwitchExpressions.isJava7SwitchExpression
public boolean isJava7SwitchExpression(final XSwitchExpression it) { boolean _xblockexpression = false; { final LightweightTypeReference switchType = this.getSwitchVariableType(it); if ((switchType == null)) { return false; } boolean _isSubtypeOf = switchType.isSubtypeOf(Integer....
java
public boolean isJava7SwitchExpression(final XSwitchExpression it) { boolean _xblockexpression = false; { final LightweightTypeReference switchType = this.getSwitchVariableType(it); if ((switchType == null)) { return false; } boolean _isSubtypeOf = switchType.isSubtypeOf(Integer....
[ "public", "boolean", "isJava7SwitchExpression", "(", "final", "XSwitchExpression", "it", ")", "{", "boolean", "_xblockexpression", "=", "false", ";", "{", "final", "LightweightTypeReference", "switchType", "=", "this", ".", "getSwitchVariableType", "(", "it", ")", "...
Determine whether the given switch expression is valid for Java version 7 or higher.
[ "Determine", "whether", "the", "given", "switch", "expression", "is", "valid", "for", "Java", "version", "7", "or", "higher", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/util/XSwitchExpressions.java#L63-L85
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting/XbaseFormatter2.java
XbaseFormatter2.isMultilineLambda
protected boolean isMultilineLambda(final XClosure closure) { final ILeafNode closingBracket = this._nodeModelAccess.nodeForKeyword(closure, "]"); HiddenLeafs _hiddenLeafsBefore = null; if (closingBracket!=null) { _hiddenLeafsBefore=this._hiddenLeafAccess.getHiddenLeafsBefore(closingBracket); } ...
java
protected boolean isMultilineLambda(final XClosure closure) { final ILeafNode closingBracket = this._nodeModelAccess.nodeForKeyword(closure, "]"); HiddenLeafs _hiddenLeafsBefore = null; if (closingBracket!=null) { _hiddenLeafsBefore=this._hiddenLeafAccess.getHiddenLeafsBefore(closingBracket); } ...
[ "protected", "boolean", "isMultilineLambda", "(", "final", "XClosure", "closure", ")", "{", "final", "ILeafNode", "closingBracket", "=", "this", ".", "_nodeModelAccess", ".", "nodeForKeyword", "(", "closure", ",", "\"]\"", ")", ";", "HiddenLeafs", "_hiddenLeafsBefor...
checks whether the given lambda should be formatted as a block. That includes newlines after and before the brackets, and a fresh line for each expression.
[ "checks", "whether", "the", "given", "lambda", "should", "be", "formatted", "as", "a", "block", ".", "That", "includes", "newlines", "after", "and", "before", "the", "brackets", "and", "a", "fresh", "line", "for", "each", "expression", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting/XbaseFormatter2.java#L799-L822
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/parser/TokenSequencePreservingPartialParsingHelper.java
TokenSequencePreservingPartialParsingHelper.internalFindValidReplaceRootNodeForChangeRegion
protected List<ICompositeNode> internalFindValidReplaceRootNodeForChangeRegion(List<ICompositeNode> nodesEnclosingRegion) { List<ICompositeNode> result = new ArrayList<ICompositeNode>(); boolean mustSkipNext = false; for (int i = 0; i < nodesEnclosingRegion.size(); i++) { ICompositeNode node = nodesEnclosingRe...
java
protected List<ICompositeNode> internalFindValidReplaceRootNodeForChangeRegion(List<ICompositeNode> nodesEnclosingRegion) { List<ICompositeNode> result = new ArrayList<ICompositeNode>(); boolean mustSkipNext = false; for (int i = 0; i < nodesEnclosingRegion.size(); i++) { ICompositeNode node = nodesEnclosingRe...
[ "protected", "List", "<", "ICompositeNode", ">", "internalFindValidReplaceRootNodeForChangeRegion", "(", "List", "<", "ICompositeNode", ">", "nodesEnclosingRegion", ")", "{", "List", "<", "ICompositeNode", ">", "result", "=", "new", "ArrayList", "<", "ICompositeNode", ...
Investigates the composite nodes containing the changed region and collects a list of nodes which could possibly replaced by a partial parse. Such a node has a parent that consumes all his current lookahead tokens and all of these tokens are located before the changed region.
[ "Investigates", "the", "composite", "nodes", "containing", "the", "changed", "region", "and", "collects", "a", "list", "of", "nodes", "which", "could", "possibly", "replaced", "by", "a", "partial", "parse", ".", "Such", "a", "node", "has", "a", "parent", "th...
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/parser/TokenSequencePreservingPartialParsingHelper.java#L345-L362
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/override/OverrideHelper.java
OverrideHelper.getResolvedFeatures
public ResolvedFeatures getResolvedFeatures(LightweightTypeReference contextType, JavaVersion targetVersion) { return new ResolvedFeatures(contextType, overrideTester, targetVersion); }
java
public ResolvedFeatures getResolvedFeatures(LightweightTypeReference contextType, JavaVersion targetVersion) { return new ResolvedFeatures(contextType, overrideTester, targetVersion); }
[ "public", "ResolvedFeatures", "getResolvedFeatures", "(", "LightweightTypeReference", "contextType", ",", "JavaVersion", "targetVersion", ")", "{", "return", "new", "ResolvedFeatures", "(", "contextType", ",", "overrideTester", ",", "targetVersion", ")", ";", "}" ]
Returns the resolved features targeting a specific Java version in order to support new language features.
[ "Returns", "the", "resolved", "features", "targeting", "a", "specific", "Java", "version", "in", "order", "to", "support", "new", "language", "features", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/override/OverrideHelper.java#L236-L238
train
eclipse/xtext-extras
org.eclipse.xtext.generator/src-gen/org/eclipse/xtext/generator/parser/antlr/debug/AbstractSimpleAntlrRuntimeModule.java
AbstractSimpleAntlrRuntimeModule.bindIParseTreeConstructor
public Class<? extends org.eclipse.xtext.parsetree.reconstr.IParseTreeConstructor> bindIParseTreeConstructor() { return org.eclipse.xtext.generator.parser.antlr.debug.parseTreeConstruction.SimpleAntlrParsetreeConstructor.class; }
java
public Class<? extends org.eclipse.xtext.parsetree.reconstr.IParseTreeConstructor> bindIParseTreeConstructor() { return org.eclipse.xtext.generator.parser.antlr.debug.parseTreeConstruction.SimpleAntlrParsetreeConstructor.class; }
[ "public", "Class", "<", "?", "extends", "org", ".", "eclipse", ".", "xtext", ".", "parsetree", ".", "reconstr", ".", "IParseTreeConstructor", ">", "bindIParseTreeConstructor", "(", ")", "{", "return", "org", ".", "eclipse", ".", "xtext", ".", "generator", "....
contributed by org.eclipse.xtext.generator.parseTreeConstructor.ParseTreeConstructorFragment
[ "contributed", "by", "org", ".", "eclipse", ".", "xtext", ".", "generator", ".", "parseTreeConstructor", ".", "ParseTreeConstructorFragment" ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/src-gen/org/eclipse/xtext/generator/parser/antlr/debug/AbstractSimpleAntlrRuntimeModule.java#L47-L49
train
eclipse/xtext-extras
org.eclipse.xtext.generator/src-gen/org/eclipse/xtext/generator/parser/antlr/debug/AbstractSimpleAntlrRuntimeModule.java
AbstractSimpleAntlrRuntimeModule.bindSimpleAntlrJavaValidator
@org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.eclipse.xtext.generator.parser.antlr.debug.validation.SimpleAntlrJavaValidator> bindSimpleAntlrJavaValidator() { return org.eclipse.xtext.generator.parser.antlr.debug.validation.SimpleAntlrJavaValidator.class; }
java
@org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.eclipse.xtext.generator.parser.antlr.debug.validation.SimpleAntlrJavaValidator> bindSimpleAntlrJavaValidator() { return org.eclipse.xtext.generator.parser.antlr.debug.validation.SimpleAntlrJavaValidator.class; }
[ "@", "org", ".", "eclipse", ".", "xtext", ".", "service", ".", "SingletonBinding", "(", "eager", "=", "true", ")", "public", "Class", "<", "?", "extends", "org", ".", "eclipse", ".", "xtext", ".", "generator", ".", "parser", ".", "antlr", ".", "debug",...
contributed by org.eclipse.xtext.generator.validation.JavaValidatorFragment
[ "contributed", "by", "org", ".", "eclipse", ".", "xtext", ".", "generator", ".", "validation", ".", "JavaValidatorFragment" ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/src-gen/org/eclipse/xtext/generator/parser/antlr/debug/AbstractSimpleAntlrRuntimeModule.java#L87-L89
train
eclipse/xtext-extras
org.eclipse.xtext.generator/src-gen/org/eclipse/xtext/generator/parser/antlr/debug/AbstractSimpleAntlrRuntimeModule.java
AbstractSimpleAntlrRuntimeModule.bindIFormatter
public Class<? extends org.eclipse.xtext.formatting.IFormatter> bindIFormatter() { return org.eclipse.xtext.generator.parser.antlr.debug.formatting.SimpleAntlrFormatter.class; }
java
public Class<? extends org.eclipse.xtext.formatting.IFormatter> bindIFormatter() { return org.eclipse.xtext.generator.parser.antlr.debug.formatting.SimpleAntlrFormatter.class; }
[ "public", "Class", "<", "?", "extends", "org", ".", "eclipse", ".", "xtext", ".", "formatting", ".", "IFormatter", ">", "bindIFormatter", "(", ")", "{", "return", "org", ".", "eclipse", ".", "xtext", ".", "generator", ".", "parser", ".", "antlr", ".", ...
contributed by org.eclipse.xtext.generator.formatting.FormatterFragment
[ "contributed", "by", "org", ".", "eclipse", ".", "xtext", ".", "generator", ".", "formatting", ".", "FormatterFragment" ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/src-gen/org/eclipse/xtext/generator/parser/antlr/debug/AbstractSimpleAntlrRuntimeModule.java#L92-L94
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/XbaseTypeComputer.java
XbaseTypeComputer.addLocalToCurrentScope
protected void addLocalToCurrentScope(XExpression expression, ITypeComputationState state) { if (expression instanceof XVariableDeclaration) { addLocalToCurrentScope((XVariableDeclaration)expression, state); } }
java
protected void addLocalToCurrentScope(XExpression expression, ITypeComputationState state) { if (expression instanceof XVariableDeclaration) { addLocalToCurrentScope((XVariableDeclaration)expression, state); } }
[ "protected", "void", "addLocalToCurrentScope", "(", "XExpression", "expression", ",", "ITypeComputationState", "state", ")", "{", "if", "(", "expression", "instanceof", "XVariableDeclaration", ")", "{", "addLocalToCurrentScope", "(", "(", "XVariableDeclaration", ")", "e...
If the expression is a variable declaration, then add it to the current scope; DSLs introducing new containers for variable declarations should override this method and explicitly add nested variable declarations. @since 2.9
[ "If", "the", "expression", "is", "a", "variable", "declaration", "then", "add", "it", "to", "the", "current", "scope", ";", "DSLs", "introducing", "new", "containers", "for", "variable", "declarations", "should", "override", "this", "method", "and", "explicitly"...
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/XbaseTypeComputer.java#L511-L515
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/XbaseTypeComputer.java
XbaseTypeComputer._computeTypes
protected void _computeTypes(XDoWhileExpression object, ITypeComputationState state) { ITypeComputationResult loopBodyResult = computeWhileLoopBody(object, state, false); boolean noImplicitReturn = (loopBodyResult.getConformanceFlags() & ConformanceFlags.NO_IMPLICIT_RETURN) != 0; LightweightTypeReference primitiv...
java
protected void _computeTypes(XDoWhileExpression object, ITypeComputationState state) { ITypeComputationResult loopBodyResult = computeWhileLoopBody(object, state, false); boolean noImplicitReturn = (loopBodyResult.getConformanceFlags() & ConformanceFlags.NO_IMPLICIT_RETURN) != 0; LightweightTypeReference primitiv...
[ "protected", "void", "_computeTypes", "(", "XDoWhileExpression", "object", ",", "ITypeComputationState", "state", ")", "{", "ITypeComputationResult", "loopBodyResult", "=", "computeWhileLoopBody", "(", "object", ",", "state", ",", "false", ")", ";", "boolean", "noImpl...
Since we are sure that the loop body is executed at least once, the early exit information of the loop body expression can be used for the outer expression.
[ "Since", "we", "are", "sure", "that", "the", "loop", "body", "is", "executed", "at", "least", "once", "the", "early", "exit", "information", "of", "the", "loop", "body", "expression", "can", "be", "used", "for", "the", "outer", "expression", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/XbaseTypeComputer.java#L953-L961
train
eclipse/xtext-extras
org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/impl/IndexedJvmTypeAccess.java
IndexedJvmTypeAccess.findAccessibleType
protected EObject findAccessibleType(String fragment, ResourceSet resourceSet, Iterator<IEObjectDescription> fromIndex) throws UnknownNestedTypeException { IEObjectDescription description = fromIndex.next(); return getAccessibleType(description, fragment, resourceSet); }
java
protected EObject findAccessibleType(String fragment, ResourceSet resourceSet, Iterator<IEObjectDescription> fromIndex) throws UnknownNestedTypeException { IEObjectDescription description = fromIndex.next(); return getAccessibleType(description, fragment, resourceSet); }
[ "protected", "EObject", "findAccessibleType", "(", "String", "fragment", ",", "ResourceSet", "resourceSet", ",", "Iterator", "<", "IEObjectDescription", ">", "fromIndex", ")", "throws", "UnknownNestedTypeException", "{", "IEObjectDescription", "description", "=", "fromInd...
Returns the first type that was found in the index. May be overridden to honor visibility semantics. The given iterator is never empty. @since 2.8
[ "Returns", "the", "first", "type", "that", "was", "found", "in", "the", "index", ".", "May", "be", "overridden", "to", "honor", "visibility", "semantics", ".", "The", "given", "iterator", "is", "never", "empty", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/impl/IndexedJvmTypeAccess.java#L129-L132
train
eclipse/xtext-extras
org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/impl/IndexedJvmTypeAccess.java
IndexedJvmTypeAccess.getAccessibleType
protected EObject getAccessibleType(IEObjectDescription description, String fragment, ResourceSet resourceSet) throws UnknownNestedTypeException { EObject typeProxy = description.getEObjectOrProxy(); if (typeProxy.eIsProxy()) { typeProxy = EcoreUtil.resolve(typeProxy, resourceSet); } if (!typeProxy.eIsProxy(...
java
protected EObject getAccessibleType(IEObjectDescription description, String fragment, ResourceSet resourceSet) throws UnknownNestedTypeException { EObject typeProxy = description.getEObjectOrProxy(); if (typeProxy.eIsProxy()) { typeProxy = EcoreUtil.resolve(typeProxy, resourceSet); } if (!typeProxy.eIsProxy(...
[ "protected", "EObject", "getAccessibleType", "(", "IEObjectDescription", "description", ",", "String", "fragment", ",", "ResourceSet", "resourceSet", ")", "throws", "UnknownNestedTypeException", "{", "EObject", "typeProxy", "=", "description", ".", "getEObjectOrProxy", "(...
Read and resolve the EObject from the given description and navigate to its children according to the given fragment. @since 2.8
[ "Read", "and", "resolve", "the", "EObject", "from", "the", "given", "description", "and", "navigate", "to", "its", "children", "according", "to", "the", "given", "fragment", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/impl/IndexedJvmTypeAccess.java#L139-L153
train
eclipse/xtext-extras
org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/impl/IndexedJvmTypeAccess.java
IndexedJvmTypeAccess.resolveJavaObject
public EObject resolveJavaObject(JvmType rootType, String fragment) throws UnknownNestedTypeException { if (fragment.endsWith("[]")) { return resolveJavaArrayObject(rootType, fragment); } int slash = fragment.indexOf('/'); if (slash != -1) { if (slash == 0) return null; String containerFragment = ...
java
public EObject resolveJavaObject(JvmType rootType, String fragment) throws UnknownNestedTypeException { if (fragment.endsWith("[]")) { return resolveJavaArrayObject(rootType, fragment); } int slash = fragment.indexOf('/'); if (slash != -1) { if (slash == 0) return null; String containerFragment = ...
[ "public", "EObject", "resolveJavaObject", "(", "JvmType", "rootType", ",", "String", "fragment", ")", "throws", "UnknownNestedTypeException", "{", "if", "(", "fragment", ".", "endsWith", "(", "\"[]\"", ")", ")", "{", "return", "resolveJavaArrayObject", "(", "rootT...
Locate a locale type with the given fragment. Does not consider types that are defined in operations or constructors as inner classes.
[ "Locate", "a", "locale", "type", "with", "the", "given", "fragment", ".", "Does", "not", "consider", "types", "that", "are", "defined", "in", "operations", "or", "constructors", "as", "inner", "classes", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/impl/IndexedJvmTypeAccess.java#L159-L202
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/conformance/TypeConformanceComputer.java
TypeConformanceComputer.cumulateDistance
protected void cumulateDistance(final List<LightweightTypeReference> references, Multimap<JvmType, LightweightTypeReference> all, Multiset<JvmType> cumulatedDistance) { for(LightweightTypeReference other: references) { Multiset<JvmType> otherDistance = LinkedHashMultiset.create(); initializeDistance(other, a...
java
protected void cumulateDistance(final List<LightweightTypeReference> references, Multimap<JvmType, LightweightTypeReference> all, Multiset<JvmType> cumulatedDistance) { for(LightweightTypeReference other: references) { Multiset<JvmType> otherDistance = LinkedHashMultiset.create(); initializeDistance(other, a...
[ "protected", "void", "cumulateDistance", "(", "final", "List", "<", "LightweightTypeReference", ">", "references", ",", "Multimap", "<", "JvmType", ",", "LightweightTypeReference", ">", "all", ",", "Multiset", "<", "JvmType", ">", "cumulatedDistance", ")", "{", "f...
Keeps the cumulated distance for all the common raw super types of the given references. Interfaces that are more directly implemented will get a lower total count than more general interfaces.
[ "Keeps", "the", "cumulated", "distance", "for", "all", "the", "common", "raw", "super", "types", "of", "the", "given", "references", ".", "Interfaces", "that", "are", "more", "directly", "implemented", "will", "get", "a", "lower", "total", "count", "than", "...
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/conformance/TypeConformanceComputer.java#L703-L714
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src-gen/org/eclipse/xtext/xbase/AbstractXtypeRuntimeModule.java
AbstractXtypeRuntimeModule.configureFormatterPreferences
public void configureFormatterPreferences(Binder binder) { binder.bind(IPreferenceValuesProvider.class).annotatedWith(FormatterPreferences.class).to(FormatterPreferenceValuesProvider.class); }
java
public void configureFormatterPreferences(Binder binder) { binder.bind(IPreferenceValuesProvider.class).annotatedWith(FormatterPreferences.class).to(FormatterPreferenceValuesProvider.class); }
[ "public", "void", "configureFormatterPreferences", "(", "Binder", "binder", ")", "{", "binder", ".", "bind", "(", "IPreferenceValuesProvider", ".", "class", ")", ".", "annotatedWith", "(", "FormatterPreferences", ".", "class", ")", ".", "to", "(", "FormatterPrefer...
contributed by org.eclipse.xtext.xtext.generator.formatting.Formatter2Fragment2
[ "contributed", "by", "org", ".", "eclipse", ".", "xtext", ".", "xtext", ".", "generator", ".", "formatting", ".", "Formatter2Fragment2" ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src-gen/org/eclipse/xtext/xbase/AbstractXtypeRuntimeModule.java#L96-L98
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/resource/BatchLinkableResource.java
BatchLinkableResource.resolveLazyCrossReferences
@Override public void resolveLazyCrossReferences(CancelIndicator monitor) { IParseResult parseResult = getParseResult(); if (parseResult != null) { batchLinkingService.resolveBatched(parseResult.getRootASTElement(), monitor); } operationCanceledManager.checkCanceled(monitor); super.resolveLazyCrossReferen...
java
@Override public void resolveLazyCrossReferences(CancelIndicator monitor) { IParseResult parseResult = getParseResult(); if (parseResult != null) { batchLinkingService.resolveBatched(parseResult.getRootASTElement(), monitor); } operationCanceledManager.checkCanceled(monitor); super.resolveLazyCrossReferen...
[ "@", "Override", "public", "void", "resolveLazyCrossReferences", "(", "CancelIndicator", "monitor", ")", "{", "IParseResult", "parseResult", "=", "getParseResult", "(", ")", ";", "if", "(", "parseResult", "!=", "null", ")", "{", "batchLinkingService", ".", "resolv...
Delegates to the BatchLinkingService to resolve all references. The linking service is responsible to lock the resource or resource set.
[ "Delegates", "to", "the", "BatchLinkingService", "to", "resolve", "all", "references", ".", "The", "linking", "service", "is", "responsible", "to", "lock", "the", "resource", "or", "resource", "set", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/resource/BatchLinkableResource.java#L161-L169
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/resource/BatchLinkableResource.java
BatchLinkableResource.markPendingInitialization
private void markPendingInitialization(JvmDeclaredTypeImplCustom type) { type.setPendingInitialization(true); for (JvmMember member : type.basicGetMembers()) { if (member instanceof JvmDeclaredTypeImplCustom) { markPendingInitialization((JvmDeclaredTypeImplCustom) member); } } }
java
private void markPendingInitialization(JvmDeclaredTypeImplCustom type) { type.setPendingInitialization(true); for (JvmMember member : type.basicGetMembers()) { if (member instanceof JvmDeclaredTypeImplCustom) { markPendingInitialization((JvmDeclaredTypeImplCustom) member); } } }
[ "private", "void", "markPendingInitialization", "(", "JvmDeclaredTypeImplCustom", "type", ")", "{", "type", ".", "setPendingInitialization", "(", "true", ")", ";", "for", "(", "JvmMember", "member", ":", "type", ".", "basicGetMembers", "(", ")", ")", "{", "if", ...
Recursively traverse the types in this resource to mark them as lazy initialized types.
[ "Recursively", "traverse", "the", "types", "in", "this", "resource", "to", "mark", "them", "as", "lazy", "initialized", "types", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/resource/BatchLinkableResource.java#L286-L293
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/LogicalContainerAwareReentrantTypeResolver.java
LogicalContainerAwareReentrantTypeResolver.prepare
protected Map<JvmIdentifiableElement, ResolvedTypes> prepare(ResolvedTypes resolvedTypes, IFeatureScopeSession featureScopeSession) { Map<JvmIdentifiableElement, ResolvedTypes> resolvedTypesByContext = Maps.newHashMapWithExpectedSize(3); JvmType root = getRootJvmType(); rootedInstances.add(root); recordExpress...
java
protected Map<JvmIdentifiableElement, ResolvedTypes> prepare(ResolvedTypes resolvedTypes, IFeatureScopeSession featureScopeSession) { Map<JvmIdentifiableElement, ResolvedTypes> resolvedTypesByContext = Maps.newHashMapWithExpectedSize(3); JvmType root = getRootJvmType(); rootedInstances.add(root); recordExpress...
[ "protected", "Map", "<", "JvmIdentifiableElement", ",", "ResolvedTypes", ">", "prepare", "(", "ResolvedTypes", "resolvedTypes", ",", "IFeatureScopeSession", "featureScopeSession", ")", "{", "Map", "<", "JvmIdentifiableElement", ",", "ResolvedTypes", ">", "resolvedTypesByC...
Assign computed type references to the identifiable structural elements in the processed type. @return the stacked resolved types that shall be used in the computation.
[ "Assign", "computed", "type", "references", "to", "the", "identifiable", "structural", "elements", "in", "the", "processed", "type", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/LogicalContainerAwareReentrantTypeResolver.java#L404-L411
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/LogicalContainerAwareReentrantTypeResolver.java
LogicalContainerAwareReentrantTypeResolver.getInferredFrom
protected XExpression getInferredFrom(JvmTypeReference typeReference) { if (InferredTypeIndicator.isInferred(typeReference)) { XComputedTypeReference computed = (XComputedTypeReference) typeReference; if (computed.getEquivalent() instanceof XComputedTypeReference) { XComputedTypeReference inferred = (XCompu...
java
protected XExpression getInferredFrom(JvmTypeReference typeReference) { if (InferredTypeIndicator.isInferred(typeReference)) { XComputedTypeReference computed = (XComputedTypeReference) typeReference; if (computed.getEquivalent() instanceof XComputedTypeReference) { XComputedTypeReference inferred = (XCompu...
[ "protected", "XExpression", "getInferredFrom", "(", "JvmTypeReference", "typeReference", ")", "{", "if", "(", "InferredTypeIndicator", ".", "isInferred", "(", "typeReference", ")", ")", "{", "XComputedTypeReference", "computed", "=", "(", "XComputedTypeReference", ")", ...
Returns the expression that will be used to infer the given type from. If the type is already resolved, the result will be null. If no expression can be determined, null is also returned.
[ "Returns", "the", "expression", "that", "will", "be", "used", "to", "infer", "the", "given", "type", "from", ".", "If", "the", "type", "is", "already", "resolved", "the", "result", "will", "be", "null", ".", "If", "no", "expression", "can", "be", "determ...
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/LogicalContainerAwareReentrantTypeResolver.java#L678-L690
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/ParameterizedTypeReference.java
ParameterizedTypeReference.isRawType
private boolean isRawType(JvmTypeParameter current, RecursionGuard<JvmTypeParameter> guard) { if (guard.tryNext(current)) { List<JvmTypeConstraint> constraints = current.getConstraints(); for(int i = 0, size = constraints.size(); i < size; i++) { JvmTypeConstraint constraint = constraints.get(i); if (co...
java
private boolean isRawType(JvmTypeParameter current, RecursionGuard<JvmTypeParameter> guard) { if (guard.tryNext(current)) { List<JvmTypeConstraint> constraints = current.getConstraints(); for(int i = 0, size = constraints.size(); i < size; i++) { JvmTypeConstraint constraint = constraints.get(i); if (co...
[ "private", "boolean", "isRawType", "(", "JvmTypeParameter", "current", ",", "RecursionGuard", "<", "JvmTypeParameter", ">", "guard", ")", "{", "if", "(", "guard", ".", "tryNext", "(", "current", ")", ")", "{", "List", "<", "JvmTypeConstraint", ">", "constraint...
Here we already know that we don't have type arguments
[ "Here", "we", "already", "know", "that", "we", "don", "t", "have", "type", "arguments" ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/ParameterizedTypeReference.java#L188-L217
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/ParameterizedTypeReference.java
ParameterizedTypeReference.toInstanceTypeReference
public ParameterizedTypeReference toInstanceTypeReference() { ParameterizedTypeReference result = getOwner().newParameterizedTypeReference(getType()); for(LightweightTypeReference typeArgument: getTypeArguments()) { result.addTypeArgument(typeArgument.getInvariantBoundSubstitute()); } return result; }
java
public ParameterizedTypeReference toInstanceTypeReference() { ParameterizedTypeReference result = getOwner().newParameterizedTypeReference(getType()); for(LightweightTypeReference typeArgument: getTypeArguments()) { result.addTypeArgument(typeArgument.getInvariantBoundSubstitute()); } return result; }
[ "public", "ParameterizedTypeReference", "toInstanceTypeReference", "(", ")", "{", "ParameterizedTypeReference", "result", "=", "getOwner", "(", ")", ".", "newParameterizedTypeReference", "(", "getType", "(", ")", ")", ";", "for", "(", "LightweightTypeReference", "typeAr...
Returns a projection of this type to the instance level. That is, type arguments will be replaced by their invariant bounds. The instance projection of <code>ArrayList&lt;? extends Iterable&lt;? extends String&gt;&gt;</code> is <code>ArrayList&lt;Iterable&lt;? extends String&gt;&gt;</code> since it is possible to crea...
[ "Returns", "a", "projection", "of", "this", "type", "to", "the", "instance", "level", ".", "That", "is", "type", "arguments", "will", "be", "replaced", "by", "their", "invariant", "bounds", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/ParameterizedTypeReference.java#L918-L924
train
eclipse/xtext-extras
org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/binary/asm/JvmAnnotationReferenceBuilder.java
JvmAnnotationReferenceBuilder.visit
@Override public void visit(final String name, final Object value) { JvmAnnotationValue annotationValue = proxies.createAnnotationValue(value); annotationValue.setOperation(proxies.createMethodProxy(annotationType, name)); values.addUnique(annotationValue); }
java
@Override public void visit(final String name, final Object value) { JvmAnnotationValue annotationValue = proxies.createAnnotationValue(value); annotationValue.setOperation(proxies.createMethodProxy(annotationType, name)); values.addUnique(annotationValue); }
[ "@", "Override", "public", "void", "visit", "(", "final", "String", "name", ",", "final", "Object", "value", ")", "{", "JvmAnnotationValue", "annotationValue", "=", "proxies", ".", "createAnnotationValue", "(", "value", ")", ";", "annotationValue", ".", "setOper...
Visits a primitive value of the annotation. @param name the value name. @param value the actual value, whose type must be {@link Byte}, {@link Boolean}, {@link Character}, {@link Short}, {@link Integer}, {@link Long}, {@link Float}, {@link Double}, {@link String} or {@link Type}. This value can also be an array of byt...
[ "Visits", "a", "primitive", "value", "of", "the", "annotation", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/binary/asm/JvmAnnotationReferenceBuilder.java#L58-L63
train
eclipse/xtext-extras
org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/xtext/AbstractProjectAwareResourceDescriptionsProvider.java
AbstractProjectAwareResourceDescriptionsProvider.getResourceDescriptions
@Override public IResourceDescriptions getResourceDescriptions(ResourceSet resourceSet) { IResourceDescriptions result = super.getResourceDescriptions(resourceSet); if (compilerPhases.isIndexing(resourceSet)) { // during indexing we don't want to see any local files String projectName = getProjectName(resou...
java
@Override public IResourceDescriptions getResourceDescriptions(ResourceSet resourceSet) { IResourceDescriptions result = super.getResourceDescriptions(resourceSet); if (compilerPhases.isIndexing(resourceSet)) { // during indexing we don't want to see any local files String projectName = getProjectName(resou...
[ "@", "Override", "public", "IResourceDescriptions", "getResourceDescriptions", "(", "ResourceSet", "resourceSet", ")", "{", "IResourceDescriptions", "result", "=", "super", ".", "getResourceDescriptions", "(", "resourceSet", ")", ";", "if", "(", "compilerPhases", ".", ...
And if we are in the indexing phase, we don't want to see the local resources.
[ "And", "if", "we", "are", "in", "the", "indexing", "phase", "we", "don", "t", "want", "to", "see", "the", "local", "resources", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/xtext/AbstractProjectAwareResourceDescriptionsProvider.java#L43-L66
train
eclipse/xtext-extras
org.eclipse.xtext.builder.standalone/xtend-gen/org/eclipse/xtext/builder/standalone/StandaloneBuilder.java
StandaloneBuilder.clearResourceSet
public void clearResourceSet(final ResourceSet resourceSet) { final boolean wasDeliver = resourceSet.eDeliver(); try { resourceSet.eSetDeliver(false); resourceSet.getResources().clear(); } finally { resourceSet.eSetDeliver(wasDeliver); } }
java
public void clearResourceSet(final ResourceSet resourceSet) { final boolean wasDeliver = resourceSet.eDeliver(); try { resourceSet.eSetDeliver(false); resourceSet.getResources().clear(); } finally { resourceSet.eSetDeliver(wasDeliver); } }
[ "public", "void", "clearResourceSet", "(", "final", "ResourceSet", "resourceSet", ")", "{", "final", "boolean", "wasDeliver", "=", "resourceSet", ".", "eDeliver", "(", ")", ";", "try", "{", "resourceSet", ".", "eSetDeliver", "(", "false", ")", ";", "resourceSe...
Clears the content of the resource set without sending notifications. This avoids unnecessary, explicit unloads.
[ "Clears", "the", "content", "of", "the", "resource", "set", "without", "sending", "notifications", ".", "This", "avoids", "unnecessary", "explicit", "unloads", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.builder.standalone/xtend-gen/org/eclipse/xtext/builder/standalone/StandaloneBuilder.java#L591-L599
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/SynonymTypesProvider.java
SynonymTypesProvider.announceSynonym
protected final boolean announceSynonym(LightweightTypeReference synonym, ConformanceHint hint, Acceptor acceptor) { if (synonym.isUnknown()) { return true; } return acceptor.accept(synonym, hint); }
java
protected final boolean announceSynonym(LightweightTypeReference synonym, ConformanceHint hint, Acceptor acceptor) { if (synonym.isUnknown()) { return true; } return acceptor.accept(synonym, hint); }
[ "protected", "final", "boolean", "announceSynonym", "(", "LightweightTypeReference", "synonym", ",", "ConformanceHint", "hint", ",", "Acceptor", "acceptor", ")", "{", "if", "(", "synonym", ".", "isUnknown", "(", ")", ")", "{", "return", "true", ";", "}", "retu...
Announce a synonym type with the given conformance hint.
[ "Announce", "a", "synonym", "type", "with", "the", "given", "conformance", "hint", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/SynonymTypesProvider.java#L160-L165
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/SynonymTypesProvider.java
SynonymTypesProvider.announceSynonym
protected final boolean announceSynonym(LightweightTypeReference synonym, EnumSet<ConformanceHint> hints, Acceptor acceptor) { if (synonym.isUnknown()) { return true; } return acceptor.accept(synonym, hints); }
java
protected final boolean announceSynonym(LightweightTypeReference synonym, EnumSet<ConformanceHint> hints, Acceptor acceptor) { if (synonym.isUnknown()) { return true; } return acceptor.accept(synonym, hints); }
[ "protected", "final", "boolean", "announceSynonym", "(", "LightweightTypeReference", "synonym", ",", "EnumSet", "<", "ConformanceHint", ">", "hints", ",", "Acceptor", "acceptor", ")", "{", "if", "(", "synonym", ".", "isUnknown", "(", ")", ")", "{", "return", "...
Announce a synonym type with the given conformance hints.
[ "Announce", "a", "synonym", "type", "with", "the", "given", "conformance", "hints", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/SynonymTypesProvider.java#L170-L175
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/SynonymTypesProvider.java
SynonymTypesProvider.announceSynonym
protected final boolean announceSynonym(LightweightTypeReference synonym, int flags, Acceptor acceptor) { if (synonym.isUnknown()) { return true; } return acceptor.accept(synonym, flags | ConformanceFlags.CHECKED_SUCCESS); }
java
protected final boolean announceSynonym(LightweightTypeReference synonym, int flags, Acceptor acceptor) { if (synonym.isUnknown()) { return true; } return acceptor.accept(synonym, flags | ConformanceFlags.CHECKED_SUCCESS); }
[ "protected", "final", "boolean", "announceSynonym", "(", "LightweightTypeReference", "synonym", ",", "int", "flags", ",", "Acceptor", "acceptor", ")", "{", "if", "(", "synonym", ".", "isUnknown", "(", ")", ")", "{", "return", "true", ";", "}", "return", "acc...
Announce a synonym type with the given conformance flags. @see ConformanceFlags
[ "Announce", "a", "synonym", "type", "with", "the", "given", "conformance", "flags", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/SynonymTypesProvider.java#L181-L186
train
eclipse/xtext-extras
org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/parser/antlr/XtextAntlrGeneratorComparisonFragment.java
XtextAntlrGeneratorComparisonFragment.getTmpFolder
protected File getTmpFolder() { final ArrayList<?> _cacheKey = CollectionLiterals.newArrayList(); final File _result; synchronized (_createCache_getTmpFolder) { if (_createCache_getTmpFolder.containsKey(_cacheKey)) { return _createCache_getTmpFolder.get(_cacheKey); } File _createTe...
java
protected File getTmpFolder() { final ArrayList<?> _cacheKey = CollectionLiterals.newArrayList(); final File _result; synchronized (_createCache_getTmpFolder) { if (_createCache_getTmpFolder.containsKey(_cacheKey)) { return _createCache_getTmpFolder.get(_cacheKey); } File _createTe...
[ "protected", "File", "getTmpFolder", "(", ")", "{", "final", "ArrayList", "<", "?", ">", "_cacheKey", "=", "CollectionLiterals", ".", "newArrayList", "(", ")", ";", "final", "File", "_result", ";", "synchronized", "(", "_createCache_getTmpFolder", ")", "{", "i...
offers a singleton temporary folder
[ "offers", "a", "singleton", "temporary", "folder" ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/parser/antlr/XtextAntlrGeneratorComparisonFragment.java#L468-L481
train
eclipse/xtext-extras
org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/parser/antlr/XtextAntlrGeneratorComparisonFragment.java
XtextAntlrGeneratorComparisonFragment.deleteDir
protected static void deleteDir(final File dir) { try { boolean _exists = dir.exists(); boolean _not = (!_exists); if (_not) { return; } org.eclipse.xtext.util.Files.sweepFolder(dir); try { dir.delete(); } finally { } } catch (Throwable _e) { ...
java
protected static void deleteDir(final File dir) { try { boolean _exists = dir.exists(); boolean _not = (!_exists); if (_not) { return; } org.eclipse.xtext.util.Files.sweepFolder(dir); try { dir.delete(); } finally { } } catch (Throwable _e) { ...
[ "protected", "static", "void", "deleteDir", "(", "final", "File", "dir", ")", "{", "try", "{", "boolean", "_exists", "=", "dir", ".", "exists", "(", ")", ";", "boolean", "_not", "=", "(", "!", "_exists", ")", ";", "if", "(", "_not", ")", "{", "retu...
little helper for cleaning up the temporary stuff.
[ "little", "helper", "for", "cleaning", "up", "the", "temporary", "stuff", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/parser/antlr/XtextAntlrGeneratorComparisonFragment.java#L507-L522
train
eclipse/xtext-extras
org.eclipse.xtext.generator/src/org/eclipse/xtext/generator/parser/antlr/AntlrGrammarGenUtil.java
AntlrGrammarGenUtil.getFirstSet
public static List<AbstractElement> getFirstSet(AbstractElement element) { return org.eclipse.xtext.xtext.generator.parser.antlr.AntlrGrammarGenUtil.getFirstSet(element); }
java
public static List<AbstractElement> getFirstSet(AbstractElement element) { return org.eclipse.xtext.xtext.generator.parser.antlr.AntlrGrammarGenUtil.getFirstSet(element); }
[ "public", "static", "List", "<", "AbstractElement", ">", "getFirstSet", "(", "AbstractElement", "element", ")", "{", "return", "org", ".", "eclipse", ".", "xtext", ".", "xtext", ".", "generator", ".", "parser", ".", "antlr", ".", "AntlrGrammarGenUtil", ".", ...
Returns the first-set of the given abstractElement. That is, all keywords with distinct values and all rule calls to distinct terminals. @since 2.6
[ "Returns", "the", "first", "-", "set", "of", "the", "given", "abstractElement", ".", "That", "is", "all", "keywords", "with", "distinct", "values", "and", "all", "rule", "calls", "to", "distinct", "terminals", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/src/org/eclipse/xtext/generator/parser/antlr/AntlrGrammarGenUtil.java#L122-L124
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.createSimpleFeatureCallScope
public IScope createSimpleFeatureCallScope(EObject context, IFeatureScopeSession session, IResolvedTypes resolvedTypes) { IScope root = IScope.NULLSCOPE; if (context instanceof XFeatureCall) { XFeatureCall featureCall = (XFeatureCall) context; if (!featureCall.isExplicitOperationCallOrBuilderSyntax()) { r...
java
public IScope createSimpleFeatureCallScope(EObject context, IFeatureScopeSession session, IResolvedTypes resolvedTypes) { IScope root = IScope.NULLSCOPE; if (context instanceof XFeatureCall) { XFeatureCall featureCall = (XFeatureCall) context; if (!featureCall.isExplicitOperationCallOrBuilderSyntax()) { r...
[ "public", "IScope", "createSimpleFeatureCallScope", "(", "EObject", "context", ",", "IFeatureScopeSession", "session", ",", "IResolvedTypes", "resolvedTypes", ")", "{", "IScope", "root", "=", "IScope", ".", "NULLSCOPE", ";", "if", "(", "context", "instanceof", "XFea...
This method serves as an entry point for the content assist scoping for simple feature calls. @param context the context e.g. a for loop expression, a block or a catch clause
[ "This", "method", "serves", "as", "an", "entry", "point", "for", "the", "content", "assist", "scoping", "for", "simple", "feature", "calls", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L104-L123
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.createFeatureCallScopeForReceiver
public IScope createFeatureCallScopeForReceiver(final XExpression featureCall, final XExpression receiver, IFeatureScopeSession session, IResolvedTypes resolvedTypes) { if (receiver == null || receiver.eIsProxy()) return IScope.NULLSCOPE; LightweightTypeReference receiverType = resolvedTypes.getActualType(receiv...
java
public IScope createFeatureCallScopeForReceiver(final XExpression featureCall, final XExpression receiver, IFeatureScopeSession session, IResolvedTypes resolvedTypes) { if (receiver == null || receiver.eIsProxy()) return IScope.NULLSCOPE; LightweightTypeReference receiverType = resolvedTypes.getActualType(receiv...
[ "public", "IScope", "createFeatureCallScopeForReceiver", "(", "final", "XExpression", "featureCall", ",", "final", "XExpression", "receiver", ",", "IFeatureScopeSession", "session", ",", "IResolvedTypes", "resolvedTypes", ")", "{", "if", "(", "receiver", "==", "null", ...
This method serves as an entry point for the content assist scoping for features. @param featureCall the context provides access to the resource set. If it is an assignment, it will be used to restrict scoping. @param receiver the receiver of the feature call. @param resolvedTypes TODO @param session TODO
[ "This", "method", "serves", "as", "an", "entry", "point", "for", "the", "content", "assist", "scoping", "for", "features", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L212-L255
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.createDynamicExtensionsScope
protected IScope createDynamicExtensionsScope( EObject featureCall, XExpression firstArgument, LightweightTypeReference firstArgumentType, boolean implicitArgument, IScope parent, IFeatureScopeSession session) { return new DynamicExtensionsScope(parent, session, firstArgument, firstArgumentType, imp...
java
protected IScope createDynamicExtensionsScope( EObject featureCall, XExpression firstArgument, LightweightTypeReference firstArgumentType, boolean implicitArgument, IScope parent, IFeatureScopeSession session) { return new DynamicExtensionsScope(parent, session, firstArgument, firstArgumentType, imp...
[ "protected", "IScope", "createDynamicExtensionsScope", "(", "EObject", "featureCall", ",", "XExpression", "firstArgument", ",", "LightweightTypeReference", "firstArgumentType", ",", "boolean", "implicitArgument", ",", "IScope", "parent", ",", "IFeatureScopeSession", "session"...
Create a scope that contains dynamic extension features, which are features that are contributed by an instance of a type. @param featureCall the feature call that is currently processed by the scoping infrastructure @param firstArgument an optionally available first argument expression. @param firstArgumentType optio...
[ "Create", "a", "scope", "that", "contains", "dynamic", "extension", "features", "which", "are", "features", "that", "are", "contributed", "by", "an", "instance", "of", "a", "type", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L548-L556
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.createStaticExtensionsScope
protected IScope createStaticExtensionsScope( EObject featureCall, XExpression firstArgument, LightweightTypeReference firstArgumentType, boolean implicitArgument, IScope parent, IFeatureScopeSession session) { return new StaticExtensionImportsScope(parent, session, firstArgument, firstArgumentType,...
java
protected IScope createStaticExtensionsScope( EObject featureCall, XExpression firstArgument, LightweightTypeReference firstArgumentType, boolean implicitArgument, IScope parent, IFeatureScopeSession session) { return new StaticExtensionImportsScope(parent, session, firstArgument, firstArgumentType,...
[ "protected", "IScope", "createStaticExtensionsScope", "(", "EObject", "featureCall", ",", "XExpression", "firstArgument", ",", "LightweightTypeReference", "firstArgumentType", ",", "boolean", "implicitArgument", ",", "IScope", "parent", ",", "IFeatureScopeSession", "session",...
Create a scope that contains static extension features, which are features that are contributed statically via an import. @param featureCall the feature call that is currently processed by the scoping infrastructure @param firstArgument an optionally available first argument expression. @param firstArgumentType option...
[ "Create", "a", "scope", "that", "contains", "static", "extension", "features", "which", "are", "features", "that", "are", "contributed", "statically", "via", "an", "import", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L568-L576
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.createNestedTypeLiteralScope
protected IScope createNestedTypeLiteralScope( EObject featureCall, LightweightTypeReference enclosingType, JvmDeclaredType rawEnclosingType, IScope parent, IFeatureScopeSession session) { return new NestedTypeLiteralScope(parent, session, asAbstractFeatureCall(featureCall), enclosingType, rawEnclosing...
java
protected IScope createNestedTypeLiteralScope( EObject featureCall, LightweightTypeReference enclosingType, JvmDeclaredType rawEnclosingType, IScope parent, IFeatureScopeSession session) { return new NestedTypeLiteralScope(parent, session, asAbstractFeatureCall(featureCall), enclosingType, rawEnclosing...
[ "protected", "IScope", "createNestedTypeLiteralScope", "(", "EObject", "featureCall", ",", "LightweightTypeReference", "enclosingType", ",", "JvmDeclaredType", "rawEnclosingType", ",", "IScope", "parent", ",", "IFeatureScopeSession", "session", ")", "{", "return", "new", ...
Create a scope that returns nested types. @param featureCall the feature call that is currently processed by the scoping infrastructure @param enclosingType the enclosing type including type parameters for the nested type literal scope. @param rawEnclosingType the raw type that is used to query the nested types. @para...
[ "Create", "a", "scope", "that", "returns", "nested", "types", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L600-L607
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.createStaticFeaturesScope
protected IScope createStaticFeaturesScope(EObject featureCall, IScope parent, IFeatureScopeSession session) { return new StaticImportsScope(parent, session, asAbstractFeatureCall(featureCall)); }
java
protected IScope createStaticFeaturesScope(EObject featureCall, IScope parent, IFeatureScopeSession session) { return new StaticImportsScope(parent, session, asAbstractFeatureCall(featureCall)); }
[ "protected", "IScope", "createStaticFeaturesScope", "(", "EObject", "featureCall", ",", "IScope", "parent", ",", "IFeatureScopeSession", "session", ")", "{", "return", "new", "StaticImportsScope", "(", "parent", ",", "session", ",", "asAbstractFeatureCall", "(", "feat...
Creates a scope for the statically imported features. @param featureCall the feature call that is currently processed by the scoping infrastructure @param parent the parent scope. Is never null. @param session the currently known scope session. Is never null.
[ "Creates", "a", "scope", "for", "the", "statically", "imported", "features", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L616-L618
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.createLocalVariableScope
protected IScope createLocalVariableScope(EObject featureCall, IScope parent, IFeatureScopeSession session, IResolvedTypes resolvedTypes) { return new LocalVariableScope(parent, session, asAbstractFeatureCall(featureCall)); }
java
protected IScope createLocalVariableScope(EObject featureCall, IScope parent, IFeatureScopeSession session, IResolvedTypes resolvedTypes) { return new LocalVariableScope(parent, session, asAbstractFeatureCall(featureCall)); }
[ "protected", "IScope", "createLocalVariableScope", "(", "EObject", "featureCall", ",", "IScope", "parent", ",", "IFeatureScopeSession", "session", ",", "IResolvedTypes", "resolvedTypes", ")", "{", "return", "new", "LocalVariableScope", "(", "parent", ",", "session", "...
Creates a scope for the local variables that have been registered in the given session. @param featureCall the feature call that is currently processed by the scoping infrastructure @param parent the parent scope. Is never null. @param session the currently known scope session. Is never null. @param resolvedTypes may ...
[ "Creates", "a", "scope", "for", "the", "local", "variables", "that", "have", "been", "registered", "in", "the", "given", "session", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L628-L630
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.createCompositeScope
protected CompositeScope createCompositeScope(EObject featureCall, IScope parent, IFeatureScopeSession session) { return new CompositeScope(parent, session, asAbstractFeatureCall(featureCall)); }
java
protected CompositeScope createCompositeScope(EObject featureCall, IScope parent, IFeatureScopeSession session) { return new CompositeScope(parent, session, asAbstractFeatureCall(featureCall)); }
[ "protected", "CompositeScope", "createCompositeScope", "(", "EObject", "featureCall", ",", "IScope", "parent", ",", "IFeatureScopeSession", "session", ")", "{", "return", "new", "CompositeScope", "(", "parent", ",", "session", ",", "asAbstractFeatureCall", "(", "featu...
Create a composite scope that returns description from multiple other scopes without applying shadowing semantics to then.
[ "Create", "a", "composite", "scope", "that", "returns", "description", "from", "multiple", "other", "scopes", "without", "applying", "shadowing", "semantics", "to", "then", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L643-L645
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.createReceiverFeatureScope
protected IScope createReceiverFeatureScope( EObject featureCall, XExpression receiver, LightweightTypeReference receiverType, JvmIdentifiableElement receiverFeature, boolean implicitReceiver, boolean validStatic, TypeBucket receiverBucket, IScope parent, IFeatureScopeSession session) { ret...
java
protected IScope createReceiverFeatureScope( EObject featureCall, XExpression receiver, LightweightTypeReference receiverType, JvmIdentifiableElement receiverFeature, boolean implicitReceiver, boolean validStatic, TypeBucket receiverBucket, IScope parent, IFeatureScopeSession session) { ret...
[ "protected", "IScope", "createReceiverFeatureScope", "(", "EObject", "featureCall", ",", "XExpression", "receiver", ",", "LightweightTypeReference", "receiverType", ",", "JvmIdentifiableElement", "receiverFeature", ",", "boolean", "implicitReceiver", ",", "boolean", "validSta...
Creates a scope that returns the features of a given receiver type. @param featureCall the feature call that is currently processed by the scoping infrastructure @param receiver an optionally available receiver expression @param receiverType the type of the receiver. It may be available even if the receiver itself is ...
[ "Creates", "a", "scope", "that", "returns", "the", "features", "of", "a", "given", "receiver", "type", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L660-L671
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/validation/UniqueClassNameValidator.java
UniqueClassNameValidator.addIssue
protected void addIssue(final JvmDeclaredType type, final String fileName) { StringConcatenation _builder = new StringConcatenation(); _builder.append("The type "); String _simpleName = type.getSimpleName(); _builder.append(_simpleName); _builder.append(" is already defined"); { if ((fileN...
java
protected void addIssue(final JvmDeclaredType type, final String fileName) { StringConcatenation _builder = new StringConcatenation(); _builder.append("The type "); String _simpleName = type.getSimpleName(); _builder.append(_simpleName); _builder.append(" is already defined"); { if ((fileN...
[ "protected", "void", "addIssue", "(", "final", "JvmDeclaredType", "type", ",", "final", "String", "fileName", ")", "{", "StringConcatenation", "_builder", "=", "new", "StringConcatenation", "(", ")", ";", "_builder", ".", "append", "(", "\"The type \"", ")", ";"...
Marks a type as already defined. @param type - the type to mark already defined. @param fileName - a file where the type is already defined. If fileName is null this information will not be part of the message.
[ "Marks", "a", "type", "as", "already", "defined", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/validation/UniqueClassNameValidator.java#L138-L159
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/CollectionLiteralsTypeComputer.java
CollectionLiteralsTypeComputer.handleCollectionTypeNotAvailable
protected void handleCollectionTypeNotAvailable(XCollectionLiteral literal, ITypeComputationState state, Class<?> clazz) { for(XExpression element: literal.getElements()) { state.withNonVoidExpectation().computeTypes(element); } state.acceptActualType(state.getReferenceOwner().newUnknownTypeReference(clazz.get...
java
protected void handleCollectionTypeNotAvailable(XCollectionLiteral literal, ITypeComputationState state, Class<?> clazz) { for(XExpression element: literal.getElements()) { state.withNonVoidExpectation().computeTypes(element); } state.acceptActualType(state.getReferenceOwner().newUnknownTypeReference(clazz.get...
[ "protected", "void", "handleCollectionTypeNotAvailable", "(", "XCollectionLiteral", "literal", ",", "ITypeComputationState", "state", ",", "Class", "<", "?", ">", "clazz", ")", "{", "for", "(", "XExpression", "element", ":", "literal", ".", "getElements", "(", ")"...
Process all children and assign an unknown type to the literal.
[ "Process", "all", "children", "and", "assign", "an", "unknown", "type", "to", "the", "literal", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/CollectionLiteralsTypeComputer.java#L208-L213
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/CollectionLiteralsTypeComputer.java
CollectionLiteralsTypeComputer.matchesExpectation
protected boolean matchesExpectation(LightweightTypeReference elementType, LightweightTypeReference expectation) { return expectation != null && expectation.isResolved() && !expectation.isWildcard() && expectation.isAssignableFrom(elementType); }
java
protected boolean matchesExpectation(LightweightTypeReference elementType, LightweightTypeReference expectation) { return expectation != null && expectation.isResolved() && !expectation.isWildcard() && expectation.isAssignableFrom(elementType); }
[ "protected", "boolean", "matchesExpectation", "(", "LightweightTypeReference", "elementType", ",", "LightweightTypeReference", "expectation", ")", "{", "return", "expectation", "!=", "null", "&&", "expectation", ".", "isResolved", "(", ")", "&&", "!", "expectation", "...
Implements fall-back strategy. If the expected type of a collection literal does not match the actual type, but the expected element types would match the actual element type, the collection literal will be successfully typed according to the expectation.
[ "Implements", "fall", "-", "back", "strategy", ".", "If", "the", "expected", "type", "of", "a", "collection", "literal", "does", "not", "match", "the", "actual", "type", "but", "the", "expected", "element", "types", "would", "match", "the", "actual", "elemen...
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/CollectionLiteralsTypeComputer.java#L290-L292
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/CollectionLiteralsTypeComputer.java
CollectionLiteralsTypeComputer.doNormalizeElementType
protected LightweightTypeReference doNormalizeElementType(LightweightTypeReference actual, LightweightTypeReference expected) { if (matchesExpectation(actual, expected)) { return expected; } return normalizeFunctionTypeReference(actual); }
java
protected LightweightTypeReference doNormalizeElementType(LightweightTypeReference actual, LightweightTypeReference expected) { if (matchesExpectation(actual, expected)) { return expected; } return normalizeFunctionTypeReference(actual); }
[ "protected", "LightweightTypeReference", "doNormalizeElementType", "(", "LightweightTypeReference", "actual", ",", "LightweightTypeReference", "expected", ")", "{", "if", "(", "matchesExpectation", "(", "actual", ",", "expected", ")", ")", "{", "return", "expected", ";"...
If the expected type is not a wildcard, it may supersede the actual element type.
[ "If", "the", "expected", "type", "is", "not", "a", "wildcard", "it", "may", "supersede", "the", "actual", "element", "type", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/CollectionLiteralsTypeComputer.java#L386-L391
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/CollectionLiteralsTypeComputer.java
CollectionLiteralsTypeComputer.computeCollectionTypeCandidates
protected List<LightweightTypeReference> computeCollectionTypeCandidates(XCollectionLiteral literal, JvmGenericType collectionType, LightweightTypeReference elementTypeExpectation, ITypeComputationState state) { List<XExpression> elements = literal.getElements(); if(!elements.isEmpty()) { List<LightweightTypeRef...
java
protected List<LightweightTypeReference> computeCollectionTypeCandidates(XCollectionLiteral literal, JvmGenericType collectionType, LightweightTypeReference elementTypeExpectation, ITypeComputationState state) { List<XExpression> elements = literal.getElements(); if(!elements.isEmpty()) { List<LightweightTypeRef...
[ "protected", "List", "<", "LightweightTypeReference", ">", "computeCollectionTypeCandidates", "(", "XCollectionLiteral", "literal", ",", "JvmGenericType", "collectionType", ",", "LightweightTypeReference", "elementTypeExpectation", ",", "ITypeComputationState", "state", ")", "{...
Creates a list of collection type references from the element types of a collection literal.
[ "Creates", "a", "list", "of", "collection", "type", "references", "from", "the", "element", "types", "of", "a", "collection", "literal", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/CollectionLiteralsTypeComputer.java#L396-L412
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/FeatureLinkingCandidate.java
FeatureLinkingCandidate.getArguments
@Override protected List<XExpression> getArguments() { List<XExpression> syntacticArguments = getSyntacticArguments(); XExpression firstArgument = getFirstArgument(); if (firstArgument != null) { return createArgumentList(firstArgument, syntacticArguments); } return syntacticArguments; }
java
@Override protected List<XExpression> getArguments() { List<XExpression> syntacticArguments = getSyntacticArguments(); XExpression firstArgument = getFirstArgument(); if (firstArgument != null) { return createArgumentList(firstArgument, syntacticArguments); } return syntacticArguments; }
[ "@", "Override", "protected", "List", "<", "XExpression", ">", "getArguments", "(", ")", "{", "List", "<", "XExpression", ">", "syntacticArguments", "=", "getSyntacticArguments", "(", ")", ";", "XExpression", "firstArgument", "=", "getFirstArgument", "(", ")", "...
Returns the actual arguments of the expression. These do not include the receiver.
[ "Returns", "the", "actual", "arguments", "of", "the", "expression", ".", "These", "do", "not", "include", "the", "receiver", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/FeatureLinkingCandidate.java#L122-L130
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/ConstructorScopes.java
ConstructorScopes.createAnonymousClassConstructorScope
protected IScope createAnonymousClassConstructorScope(final JvmGenericType anonymousType, EObject context, final IFeatureScopeSession session) { // we don't care about the type scope since the type is well known here IVisibilityHelper protectedIsVisible = new IVisibilityHelper() { @Override public boolean isV...
java
protected IScope createAnonymousClassConstructorScope(final JvmGenericType anonymousType, EObject context, final IFeatureScopeSession session) { // we don't care about the type scope since the type is well known here IVisibilityHelper protectedIsVisible = new IVisibilityHelper() { @Override public boolean isV...
[ "protected", "IScope", "createAnonymousClassConstructorScope", "(", "final", "JvmGenericType", "anonymousType", ",", "EObject", "context", ",", "final", "IFeatureScopeSession", "session", ")", "{", "// we don't care about the type scope since the type is well known here", "IVisibil...
Custom languages that allow to infer anonymous classes may want to use this helper to access the constructors of those classes. @param session subtypes may override and use the given session.
[ "Custom", "languages", "that", "allow", "to", "infer", "anonymous", "classes", "may", "want", "to", "use", "this", "helper", "to", "access", "the", "constructors", "of", "those", "classes", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/ConstructorScopes.java#L77-L125
train
eclipse/xtext-extras
org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/grammarAccess/GrammarAccess.java
GrammarAccess.toJavaIdentifier
public String toJavaIdentifier(final String text, final boolean uppercaseFirst) { return GrammarAccessUtil.toJavaIdentifier(text, Boolean.valueOf(uppercaseFirst)); }
java
public String toJavaIdentifier(final String text, final boolean uppercaseFirst) { return GrammarAccessUtil.toJavaIdentifier(text, Boolean.valueOf(uppercaseFirst)); }
[ "public", "String", "toJavaIdentifier", "(", "final", "String", "text", ",", "final", "boolean", "uppercaseFirst", ")", "{", "return", "GrammarAccessUtil", ".", "toJavaIdentifier", "(", "text", ",", "Boolean", ".", "valueOf", "(", "uppercaseFirst", ")", ")", ";"...
Converts an arbitary string to a valid Java identifier. The string is split up along the the characters that are not valid as Java identifier. The first character of each segments is made upper case which leads to a camel-case style. @param text the string @param uppercaseFirst whether the first character of the return...
[ "Converts", "an", "arbitary", "string", "to", "a", "valid", "Java", "identifier", ".", "The", "string", "is", "split", "up", "along", "the", "the", "characters", "that", "are", "not", "valid", "as", "Java", "identifier", ".", "The", "first", "character", "...
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/grammarAccess/GrammarAccess.java#L46-L48
train
eclipse/xtext-extras
org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/grammarAccess/GrammarAccess.java
GrammarAccess.gaRuleIdentifyer
public String gaRuleIdentifyer(final AbstractRule rule) { final String plainName = RuleNames.getRuleNames(rule).getUniqueRuleName(rule); return this.toJavaIdentifier(plainName, true); }
java
public String gaRuleIdentifyer(final AbstractRule rule) { final String plainName = RuleNames.getRuleNames(rule).getUniqueRuleName(rule); return this.toJavaIdentifier(plainName, true); }
[ "public", "String", "gaRuleIdentifyer", "(", "final", "AbstractRule", "rule", ")", "{", "final", "String", "plainName", "=", "RuleNames", ".", "getRuleNames", "(", "rule", ")", ".", "getUniqueRuleName", "(", "rule", ")", ";", "return", "this", ".", "toJavaIden...
Creates an identifier for a Rule which is a valid Java idetifier and unique within the Rule's grammar. @param rule the Rule @return the identifier
[ "Creates", "an", "identifier", "for", "a", "Rule", "which", "is", "a", "valid", "Java", "idetifier", "and", "unique", "within", "the", "Rule", "s", "grammar", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/grammarAccess/GrammarAccess.java#L56-L59
train
eclipse/xtext-extras
org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/grammarAccess/GrammarAccess.java
GrammarAccess.gaRuleAccessMethodName
public String gaRuleAccessMethodName(final AbstractRule rule) { String _gaRuleIdentifyer = this.gaRuleIdentifyer(rule); String _plus = ("get" + _gaRuleIdentifyer); return (_plus + "Rule"); }
java
public String gaRuleAccessMethodName(final AbstractRule rule) { String _gaRuleIdentifyer = this.gaRuleIdentifyer(rule); String _plus = ("get" + _gaRuleIdentifyer); return (_plus + "Rule"); }
[ "public", "String", "gaRuleAccessMethodName", "(", "final", "AbstractRule", "rule", ")", "{", "String", "_gaRuleIdentifyer", "=", "this", ".", "gaRuleIdentifyer", "(", "rule", ")", ";", "String", "_plus", "=", "(", "\"get\"", "+", "_gaRuleIdentifyer", ")", ";", ...
Returns the method name for accessing a rule via a GrammarAccess implementation. @param rule the rule for which the accessor method is needed @return the method's name.
[ "Returns", "the", "method", "name", "for", "accessing", "a", "rule", "via", "a", "GrammarAccess", "implementation", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/grammarAccess/GrammarAccess.java#L96-L100
train
eclipse/xtext-extras
org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/grammarAccess/GrammarAccess.java
GrammarAccess.gaRuleElementsMethodName
public String gaRuleElementsMethodName(final AbstractRule rule) { String _gaRuleIdentifyer = this.gaRuleIdentifyer(rule); String _plus = ("get" + _gaRuleIdentifyer); return (_plus + "Access"); }
java
public String gaRuleElementsMethodName(final AbstractRule rule) { String _gaRuleIdentifyer = this.gaRuleIdentifyer(rule); String _plus = ("get" + _gaRuleIdentifyer); return (_plus + "Access"); }
[ "public", "String", "gaRuleElementsMethodName", "(", "final", "AbstractRule", "rule", ")", "{", "String", "_gaRuleIdentifyer", "=", "this", ".", "gaRuleIdentifyer", "(", "rule", ")", ";", "String", "_plus", "=", "(", "\"get\"", "+", "_gaRuleIdentifyer", ")", ";"...
Returns the method name for accessing a rule's content via a ParseRuleAccess implementation. @param rule the rule for which the accessor method is needed @return the method's name.
[ "Returns", "the", "method", "name", "for", "accessing", "a", "rule", "s", "content", "via", "a", "ParseRuleAccess", "implementation", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/grammarAccess/GrammarAccess.java#L107-L111
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/serializer/SerializerScopeProvider.java
SerializerScopeProvider.createFeatureCallSerializationScope
public IScope createFeatureCallSerializationScope(EObject context) { if (!(context instanceof XAbstractFeatureCall)) { return IScope.NULLSCOPE; } XAbstractFeatureCall call = (XAbstractFeatureCall) context; JvmIdentifiableElement feature = call.getFeature(); // this and super - logical container aware Featu...
java
public IScope createFeatureCallSerializationScope(EObject context) { if (!(context instanceof XAbstractFeatureCall)) { return IScope.NULLSCOPE; } XAbstractFeatureCall call = (XAbstractFeatureCall) context; JvmIdentifiableElement feature = call.getFeature(); // this and super - logical container aware Featu...
[ "public", "IScope", "createFeatureCallSerializationScope", "(", "EObject", "context", ")", "{", "if", "(", "!", "(", "context", "instanceof", "XAbstractFeatureCall", ")", ")", "{", "return", "IScope", ".", "NULLSCOPE", ";", "}", "XAbstractFeatureCall", "call", "="...
which is quite hard anyway ...
[ "which", "is", "quite", "hard", "anyway", "..." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/serializer/SerializerScopeProvider.java#L134-L154
train
eclipse/xtext-extras
org.eclipse.xtext.smap/src/org/eclipse/xtext/smap/SmapStratum.java
SmapStratum.optimizeLineSection
public void optimizeLineSection() { /* Some debugging code for (int i = 0; i < lineData.size(); i++) { LineInfo li = (LineInfo)lineData.get(i); System.out.print(li.toString()); } */ //Incorporate each LineInfo into the previous LineInfo's //outputLineIncrement, ...
java
public void optimizeLineSection() { /* Some debugging code for (int i = 0; i < lineData.size(); i++) { LineInfo li = (LineInfo)lineData.get(i); System.out.print(li.toString()); } */ //Incorporate each LineInfo into the previous LineInfo's //outputLineIncrement, ...
[ "public", "void", "optimizeLineSection", "(", ")", "{", "/* Some debugging code\n for (int i = 0; i < lineData.size(); i++) {\n LineInfo li = (LineInfo)lineData.get(i);\n System.out.print(li.toString());\n }\n*/", "//Incorporate each LineInfo into the previous LineI...
Combines consecutive LineInfos wherever possible
[ "Combines", "consecutive", "LineInfos", "wherever", "possible" ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.smap/src/org/eclipse/xtext/smap/SmapStratum.java#L172-L221
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/GeneratorConfig.java
GeneratorConfig.copy
public GeneratorConfig copy(final GeneratorConfig other) { this.generateExpressions = other.generateExpressions; this.generateSyntheticSuppressWarnings = other.generateSyntheticSuppressWarnings; this.generateGeneratedAnnotation = other.generateGeneratedAnnotation; this.includeDateInGeneratedAnnotation =...
java
public GeneratorConfig copy(final GeneratorConfig other) { this.generateExpressions = other.generateExpressions; this.generateSyntheticSuppressWarnings = other.generateSyntheticSuppressWarnings; this.generateGeneratedAnnotation = other.generateGeneratedAnnotation; this.includeDateInGeneratedAnnotation =...
[ "public", "GeneratorConfig", "copy", "(", "final", "GeneratorConfig", "other", ")", "{", "this", ".", "generateExpressions", "=", "other", ".", "generateExpressions", ";", "this", ".", "generateSyntheticSuppressWarnings", "=", "other", ".", "generateSyntheticSuppressWar...
Copy the values of the given generator configuration.
[ "Copy", "the", "values", "of", "the", "given", "generator", "configuration", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/GeneratorConfig.java#L57-L65
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/conformance/ConformanceFlags.java
ConformanceFlags.compareFlags
public static int compareFlags(int left, int right) { if (left == right) { return 0; } int leftSuccess = left & SUCCESS_OR_LAMBDA; int rightSuccess = right & SUCCESS_OR_LAMBDA; if (leftSuccess != rightSuccess) { if (leftSuccess == 0) return 1; if (rightSuccess == 0) return -1; if (leftSucc...
java
public static int compareFlags(int left, int right) { if (left == right) { return 0; } int leftSuccess = left & SUCCESS_OR_LAMBDA; int rightSuccess = right & SUCCESS_OR_LAMBDA; if (leftSuccess != rightSuccess) { if (leftSuccess == 0) return 1; if (rightSuccess == 0) return -1; if (leftSucc...
[ "public", "static", "int", "compareFlags", "(", "int", "left", ",", "int", "right", ")", "{", "if", "(", "left", "==", "right", ")", "{", "return", "0", ";", "}", "int", "leftSuccess", "=", "left", "&", "SUCCESS_OR_LAMBDA", ";", "int", "rightSuccess", ...
Simple comparison of two flags. If both indicate compatibility, the one with the better compatibility level wins. Returns {@code -1} for the left, {@code 1} for the right or {@code 0} if undecided.
[ "Simple", "comparison", "of", "two", "flags", ".", "If", "both", "indicate", "compatibility", "the", "one", "with", "the", "better", "compatibility", "level", "wins", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/conformance/ConformanceFlags.java#L181-L202
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/conformance/ConformanceFlags.java
ConformanceFlags.sanityCheck
public static boolean sanityCheck(int flags) { doCheck(flags, ConformanceFlags.CHECKED | ConformanceFlags.UNCHECKED); if ((flags & ConformanceFlags.UNCHECKED) == 0) { doCheck(flags, ConformanceFlags.CHECK_RESULTS); } else if ((flags & (ConformanceFlags.SEALED | ConformanceFlags.CHECK_RESULTS)) != 0) { throw...
java
public static boolean sanityCheck(int flags) { doCheck(flags, ConformanceFlags.CHECKED | ConformanceFlags.UNCHECKED); if ((flags & ConformanceFlags.UNCHECKED) == 0) { doCheck(flags, ConformanceFlags.CHECK_RESULTS); } else if ((flags & (ConformanceFlags.SEALED | ConformanceFlags.CHECK_RESULTS)) != 0) { throw...
[ "public", "static", "boolean", "sanityCheck", "(", "int", "flags", ")", "{", "doCheck", "(", "flags", ",", "ConformanceFlags", ".", "CHECKED", "|", "ConformanceFlags", ".", "UNCHECKED", ")", ";", "if", "(", "(", "flags", "&", "ConformanceFlags", ".", "UNCHEC...
Simple sanity check for the given flags. Returns always {@code true} such that it can be used in Java assertions. Will throw an {@link IllegalArgumentException} if the flags appear to be bogus.
[ "Simple", "sanity", "check", "for", "the", "given", "flags", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/conformance/ConformanceFlags.java#L235-L243
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractPendingLinkingCandidate.java
AbstractPendingLinkingCandidate.getTypeParameterMapping
@Override protected Map<JvmTypeParameter, LightweightMergedBoundTypeArgument> getTypeParameterMapping() { if (typeParameterMapping == null) { typeParameterMapping = initializeTypeParameterMapping(); } return typeParameterMapping; }
java
@Override protected Map<JvmTypeParameter, LightweightMergedBoundTypeArgument> getTypeParameterMapping() { if (typeParameterMapping == null) { typeParameterMapping = initializeTypeParameterMapping(); } return typeParameterMapping; }
[ "@", "Override", "protected", "Map", "<", "JvmTypeParameter", ",", "LightweightMergedBoundTypeArgument", ">", "getTypeParameterMapping", "(", ")", "{", "if", "(", "typeParameterMapping", "==", "null", ")", "{", "typeParameterMapping", "=", "initializeTypeParameterMapping"...
Returns the mapping of type parameters to their bound arguments. @see #initializeTypeParameterMapping()
[ "Returns", "the", "mapping", "of", "type", "parameters", "to", "their", "bound", "arguments", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractPendingLinkingCandidate.java#L102-L108
train
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractPendingLinkingCandidate.java
AbstractPendingLinkingCandidate.getArgumentTypesAsString
protected String getArgumentTypesAsString() { if(!getArguments().isEmpty()) { StringBuilder b = new StringBuilder(); b.append("("); for(int i=0; i<getArguments().size(); ++i) { LightweightTypeReference actualType = getActualType(getArguments().get(i)); if(actualType != null) b.append(actualType...
java
protected String getArgumentTypesAsString() { if(!getArguments().isEmpty()) { StringBuilder b = new StringBuilder(); b.append("("); for(int i=0; i<getArguments().size(); ++i) { LightweightTypeReference actualType = getActualType(getArguments().get(i)); if(actualType != null) b.append(actualType...
[ "protected", "String", "getArgumentTypesAsString", "(", ")", "{", "if", "(", "!", "getArguments", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "StringBuilder", "b", "=", "new", "StringBuilder", "(", ")", ";", "b", ".", "append", "(", "\"(\"", ")", ";"...
Returns the resolved string representation of the argument types. The simple names of the types are used. The string representation includes the parenthesis.
[ "Returns", "the", "resolved", "string", "representation", "of", "the", "argument", "types", ".", "The", "simple", "names", "of", "the", "types", "are", "used", ".", "The", "string", "representation", "includes", "the", "parenthesis", "." ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/internal/AbstractPendingLinkingCandidate.java#L120-L137
train