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
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/util/ConfigObjectRecord.java
ConfigObjectRecord.readRecordFromLDAP
public static List<ConfigObjectRecord> readRecordFromLDAP( final ChaiEntry ldapEntry, final String attr, final String recordType, final Set guid1, final Set guid2 ) throws ChaiOperationException, ChaiUnavailableException { if ( ldap...
java
public static List<ConfigObjectRecord> readRecordFromLDAP( final ChaiEntry ldapEntry, final String attr, final String recordType, final Set guid1, final Set guid2 ) throws ChaiOperationException, ChaiUnavailableException { if ( ldap...
[ "public", "static", "List", "<", "ConfigObjectRecord", ">", "readRecordFromLDAP", "(", "final", "ChaiEntry", "ldapEntry", ",", "final", "String", "attr", ",", "final", "String", "recordType", ",", "final", "Set", "guid1", ",", "final", "Set", "guid2", ")", "th...
Retreive matching config object records from the directory. @param ldapEntry The ldapEntry object to examine. Must be a valid entry. @param attr The attribute used to store COR's @param recordType the record recordType to use, can not be null. @param guid1 GUID1 value to match on, may be null if no guid1 ...
[ "Retreive", "matching", "config", "object", "records", "from", "the", "directory", "." ]
a6d4b5dbfa4e270db0ce70892512cbe39e64b874
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/util/ConfigObjectRecord.java#L146-L198
train
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/util/ChaiUtility.java
ChaiUtility.createGroup
public static ChaiGroup createGroup( final String parentDN, final String name, final ChaiProvider provider ) throws ChaiOperationException, ChaiUnavailableException { //Get a good CN for it final String objectCN = findUniqueName( name, parentDN, provider ); //Concantonate the en...
java
public static ChaiGroup createGroup( final String parentDN, final String name, final ChaiProvider provider ) throws ChaiOperationException, ChaiUnavailableException { //Get a good CN for it final String objectCN = findUniqueName( name, parentDN, provider ); //Concantonate the en...
[ "public", "static", "ChaiGroup", "createGroup", "(", "final", "String", "parentDN", ",", "final", "String", "name", ",", "final", "ChaiProvider", "provider", ")", "throws", "ChaiOperationException", ",", "ChaiUnavailableException", "{", "//Get a good CN for it", "final"...
Creates a new group entry in the ldap directory. A new "groupOfNames" object is created. The "cn" and "description" ldap attributes are set to the supplied name. @param parentDN the entryDN of the new group. @param name name of the group @param provider a ldap provider be used to create the group. @return an inst...
[ "Creates", "a", "new", "group", "entry", "in", "the", "ldap", "directory", ".", "A", "new", "groupOfNames", "object", "is", "created", ".", "The", "cn", "and", "description", "ldap", "attributes", "are", "set", "to", "the", "supplied", "name", "." ]
a6d4b5dbfa4e270db0ce70892512cbe39e64b874
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/util/ChaiUtility.java#L68-L92
train
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/util/ChaiUtility.java
ChaiUtility.findUniqueName
public static String findUniqueName( final String baseName, final String containerDN, final ChaiProvider provider ) throws ChaiOperationException, ChaiUnavailableException { char ch; final StringBuilder cnStripped = new StringBuilder(); final String effectiveBasename = ( baseNam...
java
public static String findUniqueName( final String baseName, final String containerDN, final ChaiProvider provider ) throws ChaiOperationException, ChaiUnavailableException { char ch; final StringBuilder cnStripped = new StringBuilder(); final String effectiveBasename = ( baseNam...
[ "public", "static", "String", "findUniqueName", "(", "final", "String", "baseName", ",", "final", "String", "containerDN", ",", "final", "ChaiProvider", "provider", ")", "throws", "ChaiOperationException", ",", "ChaiUnavailableException", "{", "char", "ch", ";", "fi...
Derives a unique entry name for an ldap container. Assumes CN as the naming attribute. @param baseName A text name that will be used for the base of the obejct name. Punctuation and spaces will be stripped. @param containerDN Directory container in which to check for a unique name @param provider ChaiProvider t...
[ "Derives", "a", "unique", "entry", "name", "for", "an", "ldap", "container", ".", "Assumes", "CN", "as", "the", "naming", "attribute", "." ]
a6d4b5dbfa4e270db0ce70892512cbe39e64b874
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/util/ChaiUtility.java#L104-L169
train
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/util/ChaiUtility.java
ChaiUtility.entryToLDIF
public static String entryToLDIF( final ChaiEntry theEntry ) throws ChaiUnavailableException, ChaiOperationException { final StringBuilder sb = new StringBuilder(); sb.append( "dn: " ).append( theEntry.getEntryDN() ).append( "\n" ); final Map<String, Map<String, List<String>>> r...
java
public static String entryToLDIF( final ChaiEntry theEntry ) throws ChaiUnavailableException, ChaiOperationException { final StringBuilder sb = new StringBuilder(); sb.append( "dn: " ).append( theEntry.getEntryDN() ).append( "\n" ); final Map<String, Map<String, List<String>>> r...
[ "public", "static", "String", "entryToLDIF", "(", "final", "ChaiEntry", "theEntry", ")", "throws", "ChaiUnavailableException", ",", "ChaiOperationException", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(",...
Convert to an LDIF format. Useful for debugging or other purposes @param theEntry A valid {@code ChaiEntry} @return A string containing a properly formatted LDIF view of the entry. @throws ChaiOperationException If there is an error during the operation @throws ChaiUnavailableException If the directory server(s) ar...
[ "Convert", "to", "an", "LDIF", "format", ".", "Useful", "for", "debugging", "or", "other", "purposes" ]
a6d4b5dbfa4e270db0ce70892512cbe39e64b874
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/util/ChaiUtility.java#L204-L229
train
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/util/ChaiUtility.java
ChaiUtility.determineDirectoryVendor
public static DirectoryVendor determineDirectoryVendor( final ChaiEntry rootDSE ) throws ChaiUnavailableException, ChaiOperationException { final Set<String> interestedAttributes = new HashSet<>(); for ( final DirectoryVendor directoryVendor : DirectoryVendor.values() ) { ...
java
public static DirectoryVendor determineDirectoryVendor( final ChaiEntry rootDSE ) throws ChaiUnavailableException, ChaiOperationException { final Set<String> interestedAttributes = new HashSet<>(); for ( final DirectoryVendor directoryVendor : DirectoryVendor.values() ) { ...
[ "public", "static", "DirectoryVendor", "determineDirectoryVendor", "(", "final", "ChaiEntry", "rootDSE", ")", "throws", "ChaiUnavailableException", ",", "ChaiOperationException", "{", "final", "Set", "<", "String", ">", "interestedAttributes", "=", "new", "HashSet", "<>...
Determines the vendor of a the ldap directory by reading RootDSE attributes. @param rootDSE A valid entry @return the proper directory vendor, or {@link DirectoryVendor#GENERIC} if the vendor can not be determined. @throws ChaiUnavailableException If the directory is unreachable @throws ChaiOperationException If the...
[ "Determines", "the", "vendor", "of", "a", "the", "ldap", "directory", "by", "reading", "RootDSE", "attributes", "." ]
a6d4b5dbfa4e270db0ce70892512cbe39e64b874
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/util/ChaiUtility.java#L450-L479
train
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/exception/ChaiErrors.java
ChaiErrors.isAuthenticationRelated
static boolean isAuthenticationRelated ( final String message ) { for ( final DirectoryVendor vendor : DirectoryVendor.values() ) { final ErrorMap errorMap = vendor.getVendorFactory().getErrorMap(); if ( errorMap.isAuthenticationRelated( message ) ) { ...
java
static boolean isAuthenticationRelated ( final String message ) { for ( final DirectoryVendor vendor : DirectoryVendor.values() ) { final ErrorMap errorMap = vendor.getVendorFactory().getErrorMap(); if ( errorMap.isAuthenticationRelated( message ) ) { ...
[ "static", "boolean", "isAuthenticationRelated", "(", "final", "String", "message", ")", "{", "for", "(", "final", "DirectoryVendor", "vendor", ":", "DirectoryVendor", ".", "values", "(", ")", ")", "{", "final", "ErrorMap", "errorMap", "=", "vendor", ".", "getV...
Indicates if the error is related to authentication. @param message error message debug text @return true if the error is defined as being related to authentication.
[ "Indicates", "if", "the", "error", "is", "related", "to", "authentication", "." ]
a6d4b5dbfa4e270db0ce70892512cbe39e64b874
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/exception/ChaiErrors.java#L55-L67
train
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/util/SearchHelper.java
SearchHelper.setFilterNot
public void setFilterNot( final String attributeName, final String value ) { this.setFilter( attributeName, value ); filter = "(!" + filter + ")"; }
java
public void setFilterNot( final String attributeName, final String value ) { this.setFilter( attributeName, value ); filter = "(!" + filter + ")"; }
[ "public", "void", "setFilterNot", "(", "final", "String", "attributeName", ",", "final", "String", "value", ")", "{", "this", ".", "setFilter", "(", "attributeName", ",", "value", ")", ";", "filter", "=", "\"(!\"", "+", "filter", "+", "\")\"", ";", "}" ]
Set up a not exists filter for an attribute name and value pair. <table border="1"><caption>Example Values</caption> <tr><td><b>Attribute</b></td><td><b>Value</b></td></tr> <tr><td>givenName</td><td>John</td></tr> </table> <p><i>Result</i></p> <code>(!(givenName=John))</code> @param attributeName A valid attribute na...
[ "Set", "up", "a", "not", "exists", "filter", "for", "an", "attribute", "name", "and", "value", "pair", "." ]
a6d4b5dbfa4e270db0ce70892512cbe39e64b874
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/util/SearchHelper.java#L575-L579
train
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/util/SearchHelper.java
SearchHelper.setFilter
public void setFilter( final String attributeName, final String value ) { filter = new FilterSequence( attributeName, value ).toString(); }
java
public void setFilter( final String attributeName, final String value ) { filter = new FilterSequence( attributeName, value ).toString(); }
[ "public", "void", "setFilter", "(", "final", "String", "attributeName", ",", "final", "String", "value", ")", "{", "filter", "=", "new", "FilterSequence", "(", "attributeName", ",", "value", ")", ".", "toString", "(", ")", ";", "}" ]
Set up a standard filter attribute name and value pair. <table border="1"><caption>Example Values</caption> <tr><td><b>Attribute</b></td><td><b>Value</b></td></tr> <tr><td>givenName</td><td>John</td></tr> </table> <p><i>Result</i></p> <code>(givenName=John)</code> @param attributeName A valid attribute name @param va...
[ "Set", "up", "a", "standard", "filter", "attribute", "name", "and", "value", "pair", "." ]
a6d4b5dbfa4e270db0ce70892512cbe39e64b874
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/util/SearchHelper.java#L594-L597
train
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/util/SearchHelper.java
SearchHelper.setFilterOr
public void setFilterOr( final Map<String, String> nameValuePairs ) { if ( nameValuePairs == null ) { throw new NullPointerException(); } if ( nameValuePairs.size() < 1 ) { throw new IllegalArgumentException( "requires at least one key" ); } ...
java
public void setFilterOr( final Map<String, String> nameValuePairs ) { if ( nameValuePairs == null ) { throw new NullPointerException(); } if ( nameValuePairs.size() < 1 ) { throw new IllegalArgumentException( "requires at least one key" ); } ...
[ "public", "void", "setFilterOr", "(", "final", "Map", "<", "String", ",", "String", ">", "nameValuePairs", ")", "{", "if", "(", "nameValuePairs", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "if", "(", "nameValuePairs...
Set up an OR filter for each map key and value. Consider the following example. <table border="1"><caption>Example Values</caption> <tr><td><b>Attribute</b></td><td><b>Value</b></td></tr> <tr><td>givenName</td><td>John</td></tr> <tr><td>sn</td><td>Smith</td></tr> </table> <p><i>Result</i></p> <code>(|(givenName=John)...
[ "Set", "up", "an", "OR", "filter", "for", "each", "map", "key", "and", "value", ".", "Consider", "the", "following", "example", "." ]
a6d4b5dbfa4e270db0ce70892512cbe39e64b874
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/util/SearchHelper.java#L612-L630
train
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/util/StringHelper.java
StringHelper.convertStrToBoolean
public static boolean convertStrToBoolean( final String string ) { return !( string == null || string.length() < 1 ) && ( "true".equalsIgnoreCase( string ) || "1".equalsIgnoreCase( string ) || "yes".equalsIgnoreCase( string ) || "y".equalsIgnoreCase( string ) ...
java
public static boolean convertStrToBoolean( final String string ) { return !( string == null || string.length() < 1 ) && ( "true".equalsIgnoreCase( string ) || "1".equalsIgnoreCase( string ) || "yes".equalsIgnoreCase( string ) || "y".equalsIgnoreCase( string ) ...
[ "public", "static", "boolean", "convertStrToBoolean", "(", "final", "String", "string", ")", "{", "return", "!", "(", "string", "==", "null", "||", "string", ".", "length", "(", ")", "<", "1", ")", "&&", "(", "\"true\"", ".", "equalsIgnoreCase", "(", "st...
Convert a string value to a boolean. If the value is a common positive string value such as "1", "true", "y" or "yes" then TRUE is returned. For any other value or null, FALSE is returned. @param string value to test @return true if the string resolves to a positive value.
[ "Convert", "a", "string", "value", "to", "a", "boolean", ".", "If", "the", "value", "is", "a", "common", "positive", "string", "value", "such", "as", "1", "true", "y", "or", "yes", "then", "TRUE", "is", "returned", ".", "For", "any", "other", "value", ...
a6d4b5dbfa4e270db0ce70892512cbe39e64b874
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/util/StringHelper.java#L46-L53
train
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/impl/openldap/entry/OpenLDAPModifyPasswordRequest.java
OpenLDAPModifyPasswordRequest.getEncodedValue
public byte[] getEncodedValue() { final String characterEncoding = this.chaiConfiguration.getSetting( ChaiSetting.LDAP_CHARACTER_ENCODING ); final byte[] password = modifyPassword.getBytes( Charset.forName( characterEncoding ) ); final byte[] dn = modifyDn.getBytes( Charset.forName( characte...
java
public byte[] getEncodedValue() { final String characterEncoding = this.chaiConfiguration.getSetting( ChaiSetting.LDAP_CHARACTER_ENCODING ); final byte[] password = modifyPassword.getBytes( Charset.forName( characterEncoding ) ); final byte[] dn = modifyDn.getBytes( Charset.forName( characte...
[ "public", "byte", "[", "]", "getEncodedValue", "(", ")", "{", "final", "String", "characterEncoding", "=", "this", ".", "chaiConfiguration", ".", "getSetting", "(", "ChaiSetting", ".", "LDAP_CHARACTER_ENCODING", ")", ";", "final", "byte", "[", "]", "password", ...
Get the BER encoded value for this operation. @return a bytearray containing the BER sequence.
[ "Get", "the", "BER", "encoded", "value", "for", "this", "operation", "." ]
a6d4b5dbfa4e270db0ce70892512cbe39e64b874
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/impl/openldap/entry/OpenLDAPModifyPasswordRequest.java#L142-L177
train
toddfast/typeconverter
src/main/java/com/toddfast/util/convert/TypeConverter.java
TypeConverter.registerTypeConversion
public static void registerTypeConversion(Conversion<?> conversion) { Object[] keys=conversion.getTypeKeys(); if (keys==null) { return; } for (int i=0; i<keys.length; i++) { registerTypeConversion(keys[i],conversion); } }
java
public static void registerTypeConversion(Conversion<?> conversion) { Object[] keys=conversion.getTypeKeys(); if (keys==null) { return; } for (int i=0; i<keys.length; i++) { registerTypeConversion(keys[i],conversion); } }
[ "public", "static", "void", "registerTypeConversion", "(", "Conversion", "<", "?", ">", "conversion", ")", "{", "Object", "[", "]", "keys", "=", "conversion", ".", "getTypeKeys", "(", ")", ";", "if", "(", "keys", "==", "null", ")", "{", "return", ";", ...
Register a type conversion object under the specified keys. This method can be used by developers to register custom type conversion objects.
[ "Register", "a", "type", "conversion", "object", "under", "the", "specified", "keys", ".", "This", "method", "can", "be", "used", "by", "developers", "to", "register", "custom", "type", "conversion", "objects", "." ]
44efa352254faa49edaba5c5935389705aa12b90
https://github.com/toddfast/typeconverter/blob/44efa352254faa49edaba5c5935389705aa12b90/src/main/java/com/toddfast/util/convert/TypeConverter.java#L205-L215
train
toddfast/typeconverter
src/main/java/com/toddfast/util/convert/TypeConverter.java
TypeConverter.getTypeKeys
private static List<Object> getTypeKeys(Conversion<?> conversion) { List<Object> result=new ArrayList<Object>(); synchronized (typeConversions) { // Clone the conversions Map<Object,Conversion<?>> map= new HashMap<Object,Conversion<?>>(typeConversions); // Find all keys that map to this conversion i...
java
private static List<Object> getTypeKeys(Conversion<?> conversion) { List<Object> result=new ArrayList<Object>(); synchronized (typeConversions) { // Clone the conversions Map<Object,Conversion<?>> map= new HashMap<Object,Conversion<?>>(typeConversions); // Find all keys that map to this conversion i...
[ "private", "static", "List", "<", "Object", ">", "getTypeKeys", "(", "Conversion", "<", "?", ">", "conversion", ")", "{", "List", "<", "Object", ">", "result", "=", "new", "ArrayList", "<", "Object", ">", "(", ")", ";", "synchronized", "(", "typeConversi...
Discover all the type key mappings for this conversion
[ "Discover", "all", "the", "type", "key", "mappings", "for", "this", "conversion" ]
44efa352254faa49edaba5c5935389705aa12b90
https://github.com/toddfast/typeconverter/blob/44efa352254faa49edaba5c5935389705aa12b90/src/main/java/com/toddfast/util/convert/TypeConverter.java#L244-L262
train
toddfast/typeconverter
src/main/java/com/toddfast/util/convert/TypeConverter.java
TypeConverter.getTypeConversion
private static Conversion<?> getTypeConversion( Object typeKey, Object value) { // Check if the provided value is already of the target type if (typeKey instanceof Class && ((Class)typeKey)!=Object.class && ((Class)typeKey).isInstance(value)) { return IDENTITY_CONVERSION; } // Find the type conversi...
java
private static Conversion<?> getTypeConversion( Object typeKey, Object value) { // Check if the provided value is already of the target type if (typeKey instanceof Class && ((Class)typeKey)!=Object.class && ((Class)typeKey).isInstance(value)) { return IDENTITY_CONVERSION; } // Find the type conversi...
[ "private", "static", "Conversion", "<", "?", ">", "getTypeConversion", "(", "Object", "typeKey", ",", "Object", "value", ")", "{", "// Check if the provided value is already of the target type", "if", "(", "typeKey", "instanceof", "Class", "&&", "(", "(", "Class", "...
Obtain a conversion for the specified type key and value
[ "Obtain", "a", "conversion", "for", "the", "specified", "type", "key", "and", "value" ]
44efa352254faa49edaba5c5935389705aa12b90
https://github.com/toddfast/typeconverter/blob/44efa352254faa49edaba5c5935389705aa12b90/src/main/java/com/toddfast/util/convert/TypeConverter.java#L412-L425
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/jedit/NonWrappingTextPane.java
NonWrappingTextPane.getScrollableTracksViewportWidth
@Override public boolean getScrollableTracksViewportWidth() { Component parent = getParent(); ComponentUI myui = getUI(); return parent == null || (myui.getPreferredSize(this).width <= parent.getSize().width); }
java
@Override public boolean getScrollableTracksViewportWidth() { Component parent = getParent(); ComponentUI myui = getUI(); return parent == null || (myui.getPreferredSize(this).width <= parent.getSize().width); }
[ "@", "Override", "public", "boolean", "getScrollableTracksViewportWidth", "(", ")", "{", "Component", "parent", "=", "getParent", "(", ")", ";", "ComponentUI", "myui", "=", "getUI", "(", ")", ";", "return", "parent", "==", "null", "||", "(", "myui", ".", "...
to preserve the full width of the text
[ "to", "preserve", "the", "full", "width", "of", "the", "text" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/jedit/NonWrappingTextPane.java#L266-L272
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/jedit/NonWrappingTextPane.java
NonWrappingTextPane.yToLine
public int yToLine(int y) { FontMetrics fm = this.getFontMetrics(this.getFont()); int height = fm.getHeight(); Document doc = this.getDocument(); int length = doc.getLength(); Element map = doc.getDefaultRootElement(); int startLine = map.getElementIndex(0); int e...
java
public int yToLine(int y) { FontMetrics fm = this.getFontMetrics(this.getFont()); int height = fm.getHeight(); Document doc = this.getDocument(); int length = doc.getLength(); Element map = doc.getDefaultRootElement(); int startLine = map.getElementIndex(0); int e...
[ "public", "int", "yToLine", "(", "int", "y", ")", "{", "FontMetrics", "fm", "=", "this", ".", "getFontMetrics", "(", "this", ".", "getFont", "(", ")", ")", ";", "int", "height", "=", "fm", ".", "getHeight", "(", ")", ";", "Document", "doc", "=", "t...
Converts a y co-ordinate to a line index. @param y The y co-ordinate
[ "Converts", "a", "y", "co", "-", "ordinate", "to", "a", "line", "index", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/jedit/NonWrappingTextPane.java#L372-L382
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/kernel/campaign/CampaignManager.java
CampaignManager.readFile
public Campaign readFile(String fileName) throws Exception { Campaign result = new Campaign(); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(fileName); doc.getDocumentElement().normalize(...
java
public Campaign readFile(String fileName) throws Exception { Campaign result = new Campaign(); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(fileName); doc.getDocumentElement().normalize(...
[ "public", "Campaign", "readFile", "(", "String", "fileName", ")", "throws", "Exception", "{", "Campaign", "result", "=", "new", "Campaign", "(", ")", ";", "DocumentBuilderFactory", "dbf", "=", "DocumentBuilderFactory", ".", "newInstance", "(", ")", ";", "Documen...
Read the xml campaign file @param fileName the xml campaign file @return an object describing the campaign @throws java.lang.Exception
[ "Read", "the", "xml", "campaign", "file" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/kernel/campaign/CampaignManager.java#L83-L142
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/kernel/campaign/CampaignManager.java
CampaignManager.execute
public boolean execute(Campaign campaign) { boolean campaignResult = true; currentCampaign = campaign; campaignStartTimeStamp = new Date(); try { createReport(); for (CampaignRun run : currentCampaign.getRuns()) { if (TestEngine.isAbortedByUser())...
java
public boolean execute(Campaign campaign) { boolean campaignResult = true; currentCampaign = campaign; campaignStartTimeStamp = new Date(); try { createReport(); for (CampaignRun run : currentCampaign.getRuns()) { if (TestEngine.isAbortedByUser())...
[ "public", "boolean", "execute", "(", "Campaign", "campaign", ")", "{", "boolean", "campaignResult", "=", "true", ";", "currentCampaign", "=", "campaign", ";", "campaignStartTimeStamp", "=", "new", "Date", "(", ")", ";", "try", "{", "createReport", "(", ")", ...
Executes a campaign @param campaign the campaign to execute.
[ "Executes", "a", "campaign" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/kernel/campaign/CampaignManager.java#L167-L199
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/kernel/campaign/CampaignManager.java
CampaignManager.createReport
private void createReport() { CampaignReportManager.getInstance().startReport(campaignStartTimeStamp, currentCampaign.getName()); for (CampaignRun run : currentCampaign.getRuns()) { CampaignResult result = new CampaignResult(run.getTestbed()); result.setStatus(Status.NOT_EXECUTED...
java
private void createReport() { CampaignReportManager.getInstance().startReport(campaignStartTimeStamp, currentCampaign.getName()); for (CampaignRun run : currentCampaign.getRuns()) { CampaignResult result = new CampaignResult(run.getTestbed()); result.setStatus(Status.NOT_EXECUTED...
[ "private", "void", "createReport", "(", ")", "{", "CampaignReportManager", ".", "getInstance", "(", ")", ".", "startReport", "(", "campaignStartTimeStamp", ",", "currentCampaign", ".", "getName", "(", ")", ")", ";", "for", "(", "CampaignRun", "run", ":", "curr...
Create a empty report. All campaign run will be "Not Executed"
[ "Create", "a", "empty", "report", ".", "All", "campaign", "run", "will", "be", "Not", "Executed" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/kernel/campaign/CampaignManager.java#L215-L224
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/db/impl/JDBCClientImpl.java
JDBCClientImpl.open
public void open() throws SQLException, ClassNotFoundException { logger.info("Using database driver: " + jdbcDriver); Class.forName(jdbcDriver); logger.info("Using database.url: " + jdbcURL); // connect login/pass con = DriverManager.getConnection(jdbcURL, user, password); ...
java
public void open() throws SQLException, ClassNotFoundException { logger.info("Using database driver: " + jdbcDriver); Class.forName(jdbcDriver); logger.info("Using database.url: " + jdbcURL); // connect login/pass con = DriverManager.getConnection(jdbcURL, user, password); ...
[ "public", "void", "open", "(", ")", "throws", "SQLException", ",", "ClassNotFoundException", "{", "logger", ".", "info", "(", "\"Using database driver: \"", "+", "jdbcDriver", ")", ";", "Class", ".", "forName", "(", "jdbcDriver", ")", ";", "logger", ".", "info...
Open a JDBC connection to the database @throws java.sql.SQLException If a SQL error occurs @throws java.lang.ClassNotFoundException If the driver class does not exists
[ "Open", "a", "JDBC", "connection", "to", "the", "database" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/db/impl/JDBCClientImpl.java#L77-L85
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/db/impl/JDBCClientImpl.java
JDBCClientImpl.executeQuery
public ResultSet executeQuery(String query) throws SQLException, ClassNotFoundException { if (!connected) { open(); } Statement stmt = con.createStatement(); return stmt.executeQuery(query); }
java
public ResultSet executeQuery(String query) throws SQLException, ClassNotFoundException { if (!connected) { open(); } Statement stmt = con.createStatement(); return stmt.executeQuery(query); }
[ "public", "ResultSet", "executeQuery", "(", "String", "query", ")", "throws", "SQLException", ",", "ClassNotFoundException", "{", "if", "(", "!", "connected", ")", "{", "open", "(", ")", ";", "}", "Statement", "stmt", "=", "con", ".", "createStatement", "(",...
Execute the specified query If the SQL connection if not open, it will be opened automatically @param query The specified query @return the ResultSet object. The returned ResultSet has to be closed manually. @throws java.sql.SQLException If a SQL error occurs @throws java.lang.ClassNotFoundException If the driver clas...
[ "Execute", "the", "specified", "query", "If", "the", "SQL", "connection", "if", "not", "open", "it", "will", "be", "opened", "automatically" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/db/impl/JDBCClientImpl.java#L131-L138
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/db/impl/JDBCClientImpl.java
JDBCClientImpl.executeCommand
public boolean executeCommand(String query) throws SQLException, ClassNotFoundException { if (!connected) { open(); } Statement stmt = con.createStatement(); return stmt.execute(query); }
java
public boolean executeCommand(String query) throws SQLException, ClassNotFoundException { if (!connected) { open(); } Statement stmt = con.createStatement(); return stmt.execute(query); }
[ "public", "boolean", "executeCommand", "(", "String", "query", ")", "throws", "SQLException", ",", "ClassNotFoundException", "{", "if", "(", "!", "connected", ")", "{", "open", "(", ")", ";", "}", "Statement", "stmt", "=", "con", ".", "createStatement", "(",...
Execute the specified SQL command If the SQL connection if not open, it will be opened automatically @param query The specified query @return the ResultSet object. The returned ResultSet has to be closed manually. @throws java.sql.SQLException If a SQL error occurs @throws java.lang.ClassNotFoundException If the drive...
[ "Execute", "the", "specified", "SQL", "command", "If", "the", "SQL", "connection", "if", "not", "open", "it", "will", "be", "opened", "automatically" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/db/impl/JDBCClientImpl.java#L149-L156
train
qspin/qtaste
plugins_src/sikuli/src/main/java/com/qspin/qtaste/sikuli/Area.java
Area.doubleClick
public void doubleClick(String fileName) throws QTasteException { try { new Region(this.rect).doubleClick(fileName); } catch(Exception ex) { throw new QTasteException(ex.getMessage(), ex); } }
java
public void doubleClick(String fileName) throws QTasteException { try { new Region(this.rect).doubleClick(fileName); } catch(Exception ex) { throw new QTasteException(ex.getMessage(), ex); } }
[ "public", "void", "doubleClick", "(", "String", "fileName", ")", "throws", "QTasteException", "{", "try", "{", "new", "Region", "(", "this", ".", "rect", ")", ".", "doubleClick", "(", "fileName", ")", ";", "}", "catch", "(", "Exception", "ex", ")", "{", ...
Simulates a double click on the specified image of the area. @param fileName The image to find. @throws QTasteException if the file doesn't exist or if no occurrence is found.
[ "Simulates", "a", "double", "click", "on", "the", "specified", "image", "of", "the", "area", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/plugins_src/sikuli/src/main/java/com/qspin/qtaste/sikuli/Area.java#L115-L125
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/OS.java
OS.getType
public static Type getType() { String osName = System.getProperty("os.name").toLowerCase(); if (osName.contains("windows")) { return Type.WINDOWS; } else if (osName.contains("linux")) { return Type.LINUX; } else if (osName.contains("mac")) { return Ty...
java
public static Type getType() { String osName = System.getProperty("os.name").toLowerCase(); if (osName.contains("windows")) { return Type.WINDOWS; } else if (osName.contains("linux")) { return Type.LINUX; } else if (osName.contains("mac")) { return Ty...
[ "public", "static", "Type", "getType", "(", ")", "{", "String", "osName", "=", "System", ".", "getProperty", "(", "\"os.name\"", ")", ".", "toLowerCase", "(", ")", ";", "if", "(", "osName", ".", "contains", "(", "\"windows\"", ")", ")", "{", "return", ...
Get OS type. @return OS type
[ "Get", "OS", "type", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/OS.java#L39-L51
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/tools/Utils.java
Utils.copyFiles
public static void copyFiles(File src, File dest) throws IOException { if (src.isDirectory()) { dest.mkdirs(); String list[] = src.list(); for (String fileName : list) { String dest1 = dest.getPath() + "/" + fileName; String src1 = src.getPath(...
java
public static void copyFiles(File src, File dest) throws IOException { if (src.isDirectory()) { dest.mkdirs(); String list[] = src.list(); for (String fileName : list) { String dest1 = dest.getPath() + "/" + fileName; String src1 = src.getPath(...
[ "public", "static", "void", "copyFiles", "(", "File", "src", ",", "File", "dest", ")", "throws", "IOException", "{", "if", "(", "src", ".", "isDirectory", "(", ")", ")", "{", "dest", ".", "mkdirs", "(", ")", ";", "String", "list", "[", "]", "=", "s...
The method copyFiles being defined
[ "The", "method", "copyFiles", "being", "defined" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/tools/Utils.java#L75-L100
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/tools/Utils.java
Utils.collapseJTreeNode
public static int collapseJTreeNode(javax.swing.JTree tree, javax.swing.tree.TreeModel model, Object node, int row, int depth) { if (node != null && !model.isLeaf(node)) { tree.collapseRow(row); if (depth != 0) { for (int index = 0; row + 1 < tree.getRowCount() ...
java
public static int collapseJTreeNode(javax.swing.JTree tree, javax.swing.tree.TreeModel model, Object node, int row, int depth) { if (node != null && !model.isLeaf(node)) { tree.collapseRow(row); if (depth != 0) { for (int index = 0; row + 1 < tree.getRowCount() ...
[ "public", "static", "int", "collapseJTreeNode", "(", "javax", ".", "swing", ".", "JTree", "tree", ",", "javax", ".", "swing", ".", "tree", ".", "TreeModel", "model", ",", "Object", "node", ",", "int", "row", ",", "int", "depth", ")", "{", "if", "(", ...
Expands a given node in a JTree. @param tree The JTree to expand. @param model The TreeModel for tree. @param node The node within tree to expand. @param row The displayed row in tree that represents node. @param depth The depth to which the tree should be expanded. Zero will just expand node, a negative value will fu...
[ "Expands", "a", "given", "node", "in", "a", "JTree", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/tools/Utils.java#L182-L205
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/db/impl/ResultSetXMLConverter.java
ResultSetXMLConverter.getDocumentAsXmlString
public static String getDocumentAsXmlString(Document doc) throws TransformerConfigurationException, TransformerException { DOMSource domSource = new DOMSource(doc); TransformerFactory tf = TransformerFactory.newInstance(); try { tf.setAttribute("indent-number", 4); } catch (I...
java
public static String getDocumentAsXmlString(Document doc) throws TransformerConfigurationException, TransformerException { DOMSource domSource = new DOMSource(doc); TransformerFactory tf = TransformerFactory.newInstance(); try { tf.setAttribute("indent-number", 4); } catch (I...
[ "public", "static", "String", "getDocumentAsXmlString", "(", "Document", "doc", ")", "throws", "TransformerConfigurationException", ",", "TransformerException", "{", "DOMSource", "domSource", "=", "new", "DOMSource", "(", "doc", ")", ";", "TransformerFactory", "tf", "...
Return the XMLDocument formatted as a String @param doc the XML Document @return A String representation of the XML Document @throws javax.xml.transform.TransformerConfigurationException @throws javax.xml.transform.TransformerException
[ "Return", "the", "XMLDocument", "formatted", "as", "a", "String" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/db/impl/ResultSetXMLConverter.java#L168-L187
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/rlogin/RLogin.java
RLogin.connect
public boolean connect() { if (client.isConnected()) { logger.warn("Already connected"); return true; } try { logger.info("Connecting to remote host " + remoteHost); client.connect(remoteHost); client.rlogin(localUser, remoteUser, termi...
java
public boolean connect() { if (client.isConnected()) { logger.warn("Already connected"); return true; } try { logger.info("Connecting to remote host " + remoteHost); client.connect(remoteHost); client.rlogin(localUser, remoteUser, termi...
[ "public", "boolean", "connect", "(", ")", "{", "if", "(", "client", ".", "isConnected", "(", ")", ")", "{", "logger", ".", "warn", "(", "\"Already connected\"", ")", ";", "return", "true", ";", "}", "try", "{", "logger", ".", "info", "(", "\"Connecting...
Create a rlogin connection to the specified remote host. @return true if connected, false otherwise
[ "Create", "a", "rlogin", "connection", "to", "the", "specified", "remote", "host", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/rlogin/RLogin.java#L90-L121
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/rlogin/RLogin.java
RLogin.reboot
public boolean reboot() { if (!sendCommand("reboot")) { return false; } // wait 1 second try { Thread.sleep(1000); } catch (InterruptedException ex) { } disconnect(); // check that remote host is not accessible anymore //...
java
public boolean reboot() { if (!sendCommand("reboot")) { return false; } // wait 1 second try { Thread.sleep(1000); } catch (InterruptedException ex) { } disconnect(); // check that remote host is not accessible anymore //...
[ "public", "boolean", "reboot", "(", ")", "{", "if", "(", "!", "sendCommand", "(", "\"reboot\"", ")", ")", "{", "return", "false", ";", "}", "// wait 1 second", "try", "{", "Thread", ".", "sleep", "(", "1000", ")", ";", "}", "catch", "(", "InterruptedEx...
Reboot the remote host by sending the reboot command and check that the remote host is not accessible anymore. @return true if success, false otherwise
[ "Reboot", "the", "remote", "host", "by", "sending", "the", "reboot", "command", "and", "check", "that", "the", "remote", "host", "is", "not", "accessible", "anymore", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/rlogin/RLogin.java#L129-L159
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/rlogin/RLogin.java
RLogin.sendCommand
public boolean sendCommand(String command) { if (writer != null) { try { logger.info("Sending command " + command + " to remote host " + remoteHost); writer.write(command); writer.write('\r'); writer.flush(); } catch (IOExce...
java
public boolean sendCommand(String command) { if (writer != null) { try { logger.info("Sending command " + command + " to remote host " + remoteHost); writer.write(command); writer.write('\r'); writer.flush(); } catch (IOExce...
[ "public", "boolean", "sendCommand", "(", "String", "command", ")", "{", "if", "(", "writer", "!=", "null", ")", "{", "try", "{", "logger", ".", "info", "(", "\"Sending command \"", "+", "command", "+", "\" to remote host \"", "+", "remoteHost", ")", ";", "...
Send the specified command to the remote host @param command command line, without terminating character @return true if success, false otherwise
[ "Send", "the", "specified", "command", "to", "the", "remote", "host" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/rlogin/RLogin.java#L167-L182
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/rlogin/RLogin.java
RLogin.disconnect
public void disconnect() { try { if (client.isConnected()) { client.disconnect(); } if (standardInputReaderThread != null) { standardInputReaderThread = null; } if (outputReaderThread != null) { outputRea...
java
public void disconnect() { try { if (client.isConnected()) { client.disconnect(); } if (standardInputReaderThread != null) { standardInputReaderThread = null; } if (outputReaderThread != null) { outputRea...
[ "public", "void", "disconnect", "(", ")", "{", "try", "{", "if", "(", "client", ".", "isConnected", "(", ")", ")", "{", "client", ".", "disconnect", "(", ")", ";", "}", "if", "(", "standardInputReaderThread", "!=", "null", ")", "{", "standardInputReaderT...
Disconnect the rlogin client from the remote host.
[ "Disconnect", "the", "rlogin", "client", "from", "the", "remote", "host", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/rlogin/RLogin.java#L196-L213
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/widget/StepLabelUI.java
StepLabelUI.paintDisabledText
protected void paintDisabledText(JLabel pLabel, Graphics pG, String pStr, int pTextX, int pTextY) { Graphics2D g2 = (Graphics2D) pG; pG.setColor(Color.GRAY); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); pG.drawString(pStr, pTextX, pTextY); ...
java
protected void paintDisabledText(JLabel pLabel, Graphics pG, String pStr, int pTextX, int pTextY) { Graphics2D g2 = (Graphics2D) pG; pG.setColor(Color.GRAY); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); pG.drawString(pStr, pTextX, pTextY); ...
[ "protected", "void", "paintDisabledText", "(", "JLabel", "pLabel", ",", "Graphics", "pG", ",", "String", "pStr", ",", "int", "pTextX", ",", "int", "pTextY", ")", "{", "Graphics2D", "g2", "=", "(", "Graphics2D", ")", "pG", ";", "pG", ".", "setColor", "(",...
private static final int SPACE_INC = 12;
[ "private", "static", "final", "int", "SPACE_INC", "=", "12", ";" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/widget/StepLabelUI.java#L36-L51
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/toolbox/doclet/HTMLFileWriter.java
HTMLFileWriter.close
public void close() { if (mWithBody) { mOut.println("</BODY>"); } mOut.println("</HTML>"); mOut.close(); mOut = null; }
java
public void close() { if (mWithBody) { mOut.println("</BODY>"); } mOut.println("</HTML>"); mOut.close(); mOut = null; }
[ "public", "void", "close", "(", ")", "{", "if", "(", "mWithBody", ")", "{", "mOut", ".", "println", "(", "\"</BODY>\"", ")", ";", "}", "mOut", ".", "println", "(", "\"</HTML>\"", ")", ";", "mOut", ".", "close", "(", ")", ";", "mOut", "=", "null", ...
Writes HTML body ending tag if needed and HTML footer and closes file.
[ "Writes", "HTML", "body", "ending", "tag", "if", "needed", "and", "HTML", "footer", "and", "closes", "file", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/toolbox/doclet/HTMLFileWriter.java#L85-L92
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/toolbox/doclet/HTMLFileWriter.java
HTMLFileWriter.printMethodsSummary
public void printMethodsSummary(ClassDoc classDoc) { MethodDoc[] methodDocs = TestAPIDoclet.getTestAPIComponentMethods(classDoc); if (methodDocs.length > 0) { mOut.println("<P>"); mOut.println("<TABLE BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">")...
java
public void printMethodsSummary(ClassDoc classDoc) { MethodDoc[] methodDocs = TestAPIDoclet.getTestAPIComponentMethods(classDoc); if (methodDocs.length > 0) { mOut.println("<P>"); mOut.println("<TABLE BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">")...
[ "public", "void", "printMethodsSummary", "(", "ClassDoc", "classDoc", ")", "{", "MethodDoc", "[", "]", "methodDocs", "=", "TestAPIDoclet", ".", "getTestAPIComponentMethods", "(", "classDoc", ")", ";", "if", "(", "methodDocs", ".", "length", ">", "0", ")", "{",...
Prints summary of Test API methods, excluding old-style verbs, in HTML format. @param classDoc the classDoc of the Test API component
[ "Prints", "summary", "of", "Test", "API", "methods", "excluding", "old", "-", "style", "verbs", "in", "HTML", "format", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/toolbox/doclet/HTMLFileWriter.java#L139-L162
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/toolbox/doclet/HTMLFileWriter.java
HTMLFileWriter.getTypeString
private String getTypeString(Type type) { String typeQualifiedName = type.qualifiedTypeName().replaceFirst("^java\\.lang\\.", ""); typeQualifiedName = typeQualifiedName.replaceFirst("^com\\.qspin\\.qtaste\\.testsuite\\.(QTaste\\w*Exception)", "$1"); String typeDocFileName = null; if (typ...
java
private String getTypeString(Type type) { String typeQualifiedName = type.qualifiedTypeName().replaceFirst("^java\\.lang\\.", ""); typeQualifiedName = typeQualifiedName.replaceFirst("^com\\.qspin\\.qtaste\\.testsuite\\.(QTaste\\w*Exception)", "$1"); String typeDocFileName = null; if (typ...
[ "private", "String", "getTypeString", "(", "Type", "type", ")", "{", "String", "typeQualifiedName", "=", "type", ".", "qualifiedTypeName", "(", ")", ".", "replaceFirst", "(", "\"^java\\\\.lang\\\\.\"", ",", "\"\"", ")", ";", "typeQualifiedName", "=", "typeQualifie...
Returns type string. @param type type for which to return type string @return type string, including parametrized types, dimensions and links.
[ "Returns", "type", "string", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/toolbox/doclet/HTMLFileWriter.java#L284-L311
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/toolbox/doclet/HTMLFileWriter.java
HTMLFileWriter.printInlineTags
private void printInlineTags(Tag[] tags, ClassDoc classDoc) { for (Tag tag : tags) { if ((tag instanceof SeeTag) && tag.name().equals("@link")) { SeeTag seeTag = (SeeTag) tag; boolean sameClass = seeTag.referencedClass() == classDoc; String fullClassNa...
java
private void printInlineTags(Tag[] tags, ClassDoc classDoc) { for (Tag tag : tags) { if ((tag instanceof SeeTag) && tag.name().equals("@link")) { SeeTag seeTag = (SeeTag) tag; boolean sameClass = seeTag.referencedClass() == classDoc; String fullClassNa...
[ "private", "void", "printInlineTags", "(", "Tag", "[", "]", "tags", ",", "ClassDoc", "classDoc", ")", "{", "for", "(", "Tag", "tag", ":", "tags", ")", "{", "if", "(", "(", "tag", "instanceof", "SeeTag", ")", "&&", "tag", ".", "name", "(", ")", ".",...
Prints inline tags, in HTML format. @param tags the array of Tag to print
[ "Prints", "inline", "tags", "in", "HTML", "format", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/toolbox/doclet/HTMLFileWriter.java#L358-L396
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/jedit/LineNumberPanel.java
LineNumberPanel.updateSize
private void updateSize() { int newLineCount = ActionUtils.getLineCount(pane); if (newLineCount == lineCount) { return; } lineCount = newLineCount; int h = (int) pane.getPreferredSize().getHeight(); int d = (int) Math.log10(lineCount) + 1; if (d < 1) {...
java
private void updateSize() { int newLineCount = ActionUtils.getLineCount(pane); if (newLineCount == lineCount) { return; } lineCount = newLineCount; int h = (int) pane.getPreferredSize().getHeight(); int d = (int) Math.log10(lineCount) + 1; if (d < 1) {...
[ "private", "void", "updateSize", "(", ")", "{", "int", "newLineCount", "=", "ActionUtils", ".", "getLineCount", "(", "pane", ")", ";", "if", "(", "newLineCount", "==", "lineCount", ")", "{", "return", ";", "}", "lineCount", "=", "newLineCount", ";", "int",...
Update the size of the line numbers based on the length of the document
[ "Update", "the", "size", "of", "the", "line", "numbers", "based", "on", "the", "length", "of", "the", "document" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/jedit/LineNumberPanel.java#L146-L161
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/jedit/LineNumberPanel.java
LineNumberPanel.getScrollPane
public JScrollPane getScrollPane(JTextComponent editorPane) { Container p = editorPane.getParent(); while (p != null) { if (p instanceof JScrollPane) { return (JScrollPane) p; } p = p.getParent(); } return null; }
java
public JScrollPane getScrollPane(JTextComponent editorPane) { Container p = editorPane.getParent(); while (p != null) { if (p instanceof JScrollPane) { return (JScrollPane) p; } p = p.getParent(); } return null; }
[ "public", "JScrollPane", "getScrollPane", "(", "JTextComponent", "editorPane", ")", "{", "Container", "p", "=", "editorPane", ".", "getParent", "(", ")", ";", "while", "(", "p", "!=", "null", ")", "{", "if", "(", "p", "instanceof", "JScrollPane", ")", "{",...
Get the JscrollPane that contains an editor pane, or null if none. @param editorPane an editor pane @return the JscrollPane that contains the editor pane, or null if none
[ "Get", "the", "JscrollPane", "that", "contains", "an", "editor", "pane", "or", "null", "if", "none", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/jedit/LineNumberPanel.java#L169-L178
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/FileUtilities.java
FileUtilities.copy
public static void copy(File source, File dest) throws IOException { if (dest.isDirectory()) { dest = new File(dest + File.separator + source.getName()); } FileChannel in = null, out = null; try { in = new FileInputStream(source).getChannel(); out = n...
java
public static void copy(File source, File dest) throws IOException { if (dest.isDirectory()) { dest = new File(dest + File.separator + source.getName()); } FileChannel in = null, out = null; try { in = new FileInputStream(source).getChannel(); out = n...
[ "public", "static", "void", "copy", "(", "File", "source", ",", "File", "dest", ")", "throws", "IOException", "{", "if", "(", "dest", ".", "isDirectory", "(", ")", ")", "{", "dest", "=", "new", "File", "(", "dest", "+", "File", ".", "separator", "+",...
Fast and simple file copy. @param source source file @param dest destination file or directory
[ "Fast", "and", "simple", "file", "copy", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/FileUtilities.java#L94-L116
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/FileUtilities.java
FileUtilities.readFileContent
public static String readFileContent(String filename) throws FileNotFoundException, IOException { BufferedReader reader = new BufferedReader(new FileReader(filename)); StringBuilder content = new StringBuilder(); String line; final String eol = System.getProperty("line.separator"); ...
java
public static String readFileContent(String filename) throws FileNotFoundException, IOException { BufferedReader reader = new BufferedReader(new FileReader(filename)); StringBuilder content = new StringBuilder(); String line; final String eol = System.getProperty("line.separator"); ...
[ "public", "static", "String", "readFileContent", "(", "String", "filename", ")", "throws", "FileNotFoundException", ",", "IOException", "{", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "FileReader", "(", "filename", ")", ")", ";", "String...
Reads file content. @param filename name of the file to read @return string containing the file content @throws java.io.FileNotFoundException @throws java.io.IOException
[ "Reads", "file", "content", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/FileUtilities.java#L159-L170
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/FileUtilities.java
FileUtilities.listResourceFiles
public static String[] listResourceFiles(Class<?> clazz, String resourceDirName) throws URISyntaxException, IOException { if (!resourceDirName.endsWith("/")) { resourceDirName = resourceDirName + "/"; } URL dirURL = clazz.getResource(resourceDirName); if (dirURL == null) { ...
java
public static String[] listResourceFiles(Class<?> clazz, String resourceDirName) throws URISyntaxException, IOException { if (!resourceDirName.endsWith("/")) { resourceDirName = resourceDirName + "/"; } URL dirURL = clazz.getResource(resourceDirName); if (dirURL == null) { ...
[ "public", "static", "String", "[", "]", "listResourceFiles", "(", "Class", "<", "?", ">", "clazz", ",", "String", "resourceDirName", ")", "throws", "URISyntaxException", ",", "IOException", "{", "if", "(", "!", "resourceDirName", ".", "endsWith", "(", "\"/\"",...
List directory files in a resource folder. Not recursive. Works for regular files and also JARs. @param clazz Any java class that lives in the same place as the resources you want. @param resourceDirName resource folder path. @return the full path name of each folder file, not the full paths. @throws URISyntaxExceptio...
[ "List", "directory", "files", "in", "a", "resource", "folder", ".", "Not", "recursive", ".", "Works", "for", "regular", "files", "and", "also", "JARs", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/FileUtilities.java#L226-L265
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/tools/FileMask.java
FileMask.accept
public boolean accept(File f) { if (f != null) { if (f.isDirectory()) { return false; } String extension = getExtension(f); if (extension != null && filters.get(getExtension(f)) != null) { return true; } } ...
java
public boolean accept(File f) { if (f != null) { if (f.isDirectory()) { return false; } String extension = getExtension(f); if (extension != null && filters.get(getExtension(f)) != null) { return true; } } ...
[ "public", "boolean", "accept", "(", "File", "f", ")", "{", "if", "(", "f", "!=", "null", ")", "{", "if", "(", "f", ".", "isDirectory", "(", ")", ")", "{", "return", "false", ";", "}", "String", "extension", "=", "getExtension", "(", "f", ")", ";"...
Retourne true si le fichier doit etre montre dans le repertoire, false s'il ne doit pas l'etre. Les fichier commencant par "." sont ignores. @see #getExtension @see FileFilter#accept
[ "Retourne", "true", "si", "le", "fichier", "doit", "etre", "montre", "dans", "le", "repertoire", "false", "s", "il", "ne", "doit", "pas", "l", "etre", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/tools/FileMask.java#L119-L130
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/tools/FileMask.java
FileMask.getExtension
public String getExtension(File f) { if (f != null) { String filename = f.getName(); int i = filename.lastIndexOf('.'); if (i > 0 && i < filename.length() - 1) { return filename.substring(i + 1).toLowerCase(); } } return null; }
java
public String getExtension(File f) { if (f != null) { String filename = f.getName(); int i = filename.lastIndexOf('.'); if (i > 0 && i < filename.length() - 1) { return filename.substring(i + 1).toLowerCase(); } } return null; }
[ "public", "String", "getExtension", "(", "File", "f", ")", "{", "if", "(", "f", "!=", "null", ")", "{", "String", "filename", "=", "f", ".", "getName", "(", ")", ";", "int", "i", "=", "filename", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if",...
Retourne l'extention du nom du fichier. @see #getExtension @see FileFilter#accept
[ "Retourne", "l", "extention", "du", "nom", "du", "fichier", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/tools/FileMask.java#L138-L147
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/config/XMLConfiguration.java
XMLConfiguration.getProperty
@Override public List<Object> getProperty(String key) { List<?> nodes = fetchNodeList(key); if (nodes.size() == 0) { return null; } else { List<Object> list = new ArrayList<>(); for (Object node : nodes) { ConfigurationNode configurationNo...
java
@Override public List<Object> getProperty(String key) { List<?> nodes = fetchNodeList(key); if (nodes.size() == 0) { return null; } else { List<Object> list = new ArrayList<>(); for (Object node : nodes) { ConfigurationNode configurationNo...
[ "@", "Override", "public", "List", "<", "Object", ">", "getProperty", "(", "String", "key", ")", "{", "List", "<", "?", ">", "nodes", "=", "fetchNodeList", "(", "key", ")", ";", "if", "(", "nodes", ".", "size", "(", ")", "==", "0", ")", "{", "ret...
Fetches the specified property. This task is delegated to the associated expression engine. @param key the key to be looked up @return the found value
[ "Fetches", "the", "specified", "property", ".", "This", "task", "is", "delegated", "to", "the", "associated", "expression", "engine", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/config/XMLConfiguration.java#L46-L67
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/addon/AddOnManager.java
AddOnManager.loadAddOns
public void loadAddOns() { List<String> addonToLoad = getAddOnClasses(); for (File f : new File(StaticConfiguration.PLUGINS_HOME).listFiles()) { if (f.isFile() && f.getName().toUpperCase().endsWith(".JAR")) { AddOnMetadata meta = AddOnMetadata.createAddOnMetadata(f); ...
java
public void loadAddOns() { List<String> addonToLoad = getAddOnClasses(); for (File f : new File(StaticConfiguration.PLUGINS_HOME).listFiles()) { if (f.isFile() && f.getName().toUpperCase().endsWith(".JAR")) { AddOnMetadata meta = AddOnMetadata.createAddOnMetadata(f); ...
[ "public", "void", "loadAddOns", "(", ")", "{", "List", "<", "String", ">", "addonToLoad", "=", "getAddOnClasses", "(", ")", ";", "for", "(", "File", "f", ":", "new", "File", "(", "StaticConfiguration", ".", "PLUGINS_HOME", ")", ".", "listFiles", "(", ")"...
Loads and registers all add-ons references in the engine configuration file.
[ "Loads", "and", "registers", "all", "add", "-", "ons", "references", "in", "the", "engine", "configuration", "file", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/addon/AddOnManager.java#L37-L51
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/addon/AddOnManager.java
AddOnManager.registerAddOn
boolean registerAddOn(AddOn pAddOn) { if (!mRegisteredAddOns.containsKey(pAddOn.getAddOnId())) { mRegisteredAddOns.put(pAddOn.getAddOnId(), pAddOn); if (pAddOn.hasConfiguration()) { addConfiguration(pAddOn.getAddOnId(), pAddOn.getConfigurationPane()); } ...
java
boolean registerAddOn(AddOn pAddOn) { if (!mRegisteredAddOns.containsKey(pAddOn.getAddOnId())) { mRegisteredAddOns.put(pAddOn.getAddOnId(), pAddOn); if (pAddOn.hasConfiguration()) { addConfiguration(pAddOn.getAddOnId(), pAddOn.getConfigurationPane()); } ...
[ "boolean", "registerAddOn", "(", "AddOn", "pAddOn", ")", "{", "if", "(", "!", "mRegisteredAddOns", ".", "containsKey", "(", "pAddOn", ".", "getAddOnId", "(", ")", ")", ")", "{", "mRegisteredAddOns", ".", "put", "(", "pAddOn", ".", "getAddOnId", "(", ")", ...
Registers the add-on. If the add-on is not loaded, loads it. @param pAddOn The add-on to register. @return <code>true</code> if the add-on is successfully registered.
[ "Registers", "the", "add", "-", "on", ".", "If", "the", "add", "-", "on", "is", "not", "loaded", "loads", "it", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/addon/AddOnManager.java#L137-L149
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/addon/AddOnManager.java
AddOnManager.getAddOn
public AddOn getAddOn(String pAddOnId) { if (mRegisteredAddOns.containsKey(pAddOnId)) { return mRegisteredAddOns.get(pAddOnId); } else { LOGGER.warn("Add-on " + pAddOnId + " is not loaded."); return null; } }
java
public AddOn getAddOn(String pAddOnId) { if (mRegisteredAddOns.containsKey(pAddOnId)) { return mRegisteredAddOns.get(pAddOnId); } else { LOGGER.warn("Add-on " + pAddOnId + " is not loaded."); return null; } }
[ "public", "AddOn", "getAddOn", "(", "String", "pAddOnId", ")", "{", "if", "(", "mRegisteredAddOns", ".", "containsKey", "(", "pAddOnId", ")", ")", "{", "return", "mRegisteredAddOns", ".", "get", "(", "pAddOnId", ")", ";", "}", "else", "{", "LOGGER", ".", ...
Returns the registered add-on identified by the identifier. @param pAddOnId The add-on's identifier. @return The registered add-on identified by the identifier.
[ "Returns", "the", "registered", "add", "-", "on", "identified", "by", "the", "identifier", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/addon/AddOnManager.java#L157-L165
train
qspin/qtaste
plugins_src/javagui-fx/src/main/java/com/qspin/qtaste/javaguifx/server/PopupTextSetter.java
PopupTextSetter.executeCommand
@Override public Boolean executeCommand(int timeout, String componentName, Object... data) throws QTasteException { setData(data); long maxTime = System.currentTimeMillis() + 1000 * timeout; while (System.currentTimeMillis() < maxTime) { Stage targetPopup = null; for...
java
@Override public Boolean executeCommand(int timeout, String componentName, Object... data) throws QTasteException { setData(data); long maxTime = System.currentTimeMillis() + 1000 * timeout; while (System.currentTimeMillis() < maxTime) { Stage targetPopup = null; for...
[ "@", "Override", "public", "Boolean", "executeCommand", "(", "int", "timeout", ",", "String", "componentName", ",", "Object", "...", "data", ")", "throws", "QTasteException", "{", "setData", "(", "data", ")", ";", "long", "maxTime", "=", "System", ".", "curr...
Commander which sets a value in the input field of a popup. @param data INTEGER - the timeout value; OBJECT - with the value to insert. The toString method will be used on the object. @return true if the command is successfully performed. @throws QTasteException
[ "Commander", "which", "sets", "a", "value", "in", "the", "input", "field", "of", "a", "popup", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/plugins_src/javagui-fx/src/main/java/com/qspin/qtaste/javaguifx/server/PopupTextSetter.java#L48-L102
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/jedit/TextUtilities.java
TextUtilities.tabsToSpaces
public static String tabsToSpaces(String in, int tabSize) { StringBuilder buf = new StringBuilder(); int width = 0; for (int i = 0; i < in.length(); i++) { switch (in.charAt(i)) { case '\t': int count = tabSize - (width % tabSize); ...
java
public static String tabsToSpaces(String in, int tabSize) { StringBuilder buf = new StringBuilder(); int width = 0; for (int i = 0; i < in.length(); i++) { switch (in.charAt(i)) { case '\t': int count = tabSize - (width % tabSize); ...
[ "public", "static", "String", "tabsToSpaces", "(", "String", "in", ",", "int", "tabSize", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "int", "width", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", ...
Converts tabs to consecutive spaces in the specified string. @param in The string @param tabSize The tab size
[ "Converts", "tabs", "to", "consecutive", "spaces", "in", "the", "specified", "string", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/jedit/TextUtilities.java#L239-L262
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/jedit/TextUtilities.java
TextUtilities.toTitleCase
public static String toTitleCase(String str) { if (str.length() == 0) { return str; } else { return Character.toUpperCase(str.charAt(0)) + str.substring(1).toLowerCase(); } }
java
public static String toTitleCase(String str) { if (str.length() == 0) { return str; } else { return Character.toUpperCase(str.charAt(0)) + str.substring(1).toLowerCase(); } }
[ "public", "static", "String", "toTitleCase", "(", "String", "str", ")", "{", "if", "(", "str", ".", "length", "(", ")", "==", "0", ")", "{", "return", "str", ";", "}", "else", "{", "return", "Character", ".", "toUpperCase", "(", "str", ".", "charAt",...
Converts the specified string to title case, by capitalizing the first letter. @param str The string @since jEdit 4.0pre1
[ "Converts", "the", "specified", "string", "to", "title", "case", "by", "capitalizing", "the", "first", "letter", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/jedit/TextUtilities.java#L328-L334
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/Version.java
Version.getManifestAttributeValue
protected String getManifestAttributeValue(Attributes.Name attributeName) { try { String value = attributes.getValue(attributeName); return value != null ? value : "undefined"; } catch (NullPointerException e) { return "undefined"; } catch (IllegalArgumentExce...
java
protected String getManifestAttributeValue(Attributes.Name attributeName) { try { String value = attributes.getValue(attributeName); return value != null ? value : "undefined"; } catch (NullPointerException e) { return "undefined"; } catch (IllegalArgumentExce...
[ "protected", "String", "getManifestAttributeValue", "(", "Attributes", ".", "Name", "attributeName", ")", "{", "try", "{", "String", "value", "=", "attributes", ".", "getValue", "(", "attributeName", ")", ";", "return", "value", "!=", "null", "?", "value", ":"...
Gets the value of an attribute of the manifest. @param attributeName the name of the attribute @return the value of the attribute, or "undefined" if the attribute couldn't be read
[ "Gets", "the", "value", "of", "an", "attribute", "of", "the", "manifest", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/Version.java#L112-L122
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/config/StaticConfiguration.java
StaticConfiguration.getQTasteRoot
private static String getQTasteRoot() { String qtasteRoot = System.getenv("QTASTE_ROOT"); if (qtasteRoot == null) { System.err.println("QTASTE_ROOT environment variable is not defined"); System.exit(1); } try { qtasteRoot = new File(qtasteRoot).getCano...
java
private static String getQTasteRoot() { String qtasteRoot = System.getenv("QTASTE_ROOT"); if (qtasteRoot == null) { System.err.println("QTASTE_ROOT environment variable is not defined"); System.exit(1); } try { qtasteRoot = new File(qtasteRoot).getCano...
[ "private", "static", "String", "getQTasteRoot", "(", ")", "{", "String", "qtasteRoot", "=", "System", ".", "getenv", "(", "\"QTASTE_ROOT\"", ")", ";", "if", "(", "qtasteRoot", "==", "null", ")", "{", "System", ".", "err", ".", "println", "(", "\"QTASTE_ROO...
Get QTaste root directory from QTASTE_ROOT environment variable. @return the QTaste root directory
[ "Get", "QTaste", "root", "directory", "from", "QTASTE_ROOT", "environment", "variable", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/config/StaticConfiguration.java#L74-L87
train
qspin/qtaste
plugins_src/javagui-fx/src/main/java/com/qspin/qtaste/javaguifx/server/ComponentCommander.java
ComponentCommander.findPopups
protected static List<Stage> findPopups() throws QTasteTestFailException { //find all popups List<Stage> popupFound = new ArrayList<>(); for (Stage stage : getStages()) { Parent root = stage.getScene().getRoot(); if (isAPopup(stage)) { //it's maybe a popup...
java
protected static List<Stage> findPopups() throws QTasteTestFailException { //find all popups List<Stage> popupFound = new ArrayList<>(); for (Stage stage : getStages()) { Parent root = stage.getScene().getRoot(); if (isAPopup(stage)) { //it's maybe a popup...
[ "protected", "static", "List", "<", "Stage", ">", "findPopups", "(", ")", "throws", "QTasteTestFailException", "{", "//find all popups", "List", "<", "Stage", ">", "popupFound", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Stage", "stage", ":",...
Finds all popups. A Component is a popup if it's a DialogPane, modal and not resizable. @return the list of all found popups.
[ "Finds", "all", "popups", ".", "A", "Component", "is", "a", "popup", "if", "it", "s", "a", "DialogPane", "modal", "and", "not", "resizable", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/plugins_src/javagui-fx/src/main/java/com/qspin/qtaste/javaguifx/server/ComponentCommander.java#L155-L168
train
qspin/qtaste
plugins_src/javagui-fx/src/main/java/com/qspin/qtaste/javaguifx/server/ComponentCommander.java
ComponentCommander.activateAndFocusWindow
protected boolean activateAndFocusWindow(Stage window) { if (!window.isFocused()) { if (!window.isShowing()) { LOGGER.trace("cannot activate and focus the window '" + window.getTitle() + "' cause its window is not showing"); return false; } LOG...
java
protected boolean activateAndFocusWindow(Stage window) { if (!window.isFocused()) { if (!window.isShowing()) { LOGGER.trace("cannot activate and focus the window '" + window.getTitle() + "' cause its window is not showing"); return false; } LOG...
[ "protected", "boolean", "activateAndFocusWindow", "(", "Stage", "window", ")", "{", "if", "(", "!", "window", ".", "isFocused", "(", ")", ")", "{", "if", "(", "!", "window", ".", "isShowing", "(", ")", ")", "{", "LOGGER", ".", "trace", "(", "\"cannot a...
Try to activate and focus the stage window. @param window the stage window to activate. @return <code>true</code> only if the stage window is active at the end of the activation process.
[ "Try", "to", "activate", "and", "focus", "the", "stage", "window", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/plugins_src/javagui-fx/src/main/java/com/qspin/qtaste/javaguifx/server/ComponentCommander.java#L224-L251
train
qspin/qtaste
plugins_src/javagui/src/main/java/com/qspin/qtaste/javagui/server/ComponentCommander.java
ComponentCommander.findPopups
protected static List<JDialog> findPopups() { //find all popups List<JDialog> popupFound = new ArrayList<>(); for (Window window : getDisplayableWindows()) { // LOGGER.debug("parse window - type : " + window.getClass()); if (isAPopup(window)) { //it's ma...
java
protected static List<JDialog> findPopups() { //find all popups List<JDialog> popupFound = new ArrayList<>(); for (Window window : getDisplayableWindows()) { // LOGGER.debug("parse window - type : " + window.getClass()); if (isAPopup(window)) { //it's ma...
[ "protected", "static", "List", "<", "JDialog", ">", "findPopups", "(", ")", "{", "//find all popups", "List", "<", "JDialog", ">", "popupFound", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Window", "window", ":", "getDisplayableWindows", "(", ...
Finds all popups. A Component is a popup if it's a JDialog, modal and not resizable. @return the list of all found popups.
[ "Finds", "all", "popups", ".", "A", "Component", "is", "a", "popup", "if", "it", "s", "a", "JDialog", "modal", "and", "not", "resizable", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/plugins_src/javagui/src/main/java/com/qspin/qtaste/javagui/server/ComponentCommander.java#L148-L161
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/PythonHelper.java
PythonHelper.execute
public static String execute(String fileName, String... arguments) throws PyException { return execute(fileName, true, arguments); }
java
public static String execute(String fileName, String... arguments) throws PyException { return execute(fileName, true, arguments); }
[ "public", "static", "String", "execute", "(", "String", "fileName", ",", "String", "...", "arguments", ")", "throws", "PyException", "{", "return", "execute", "(", "fileName", ",", "true", ",", "arguments", ")", ";", "}" ]
Executes a python script and return its output. @param fileName the filename of the python script to execute @param arguments the arguments to pass to the python script @return the output of the python script execution (combined standard and error outputs) @throws PyException in case of exception during Python script ...
[ "Executes", "a", "python", "script", "and", "return", "its", "output", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/PythonHelper.java#L47-L49
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/PythonHelper.java
PythonHelper.execute
public static String execute(String fileName, boolean redirectOutput, String... arguments) throws PyException { Properties properties = new Properties(); properties.setProperty("python.home", StaticConfiguration.JYTHON_HOME); properties.setProperty("python.path", StaticConfiguration.FORMATTER_DI...
java
public static String execute(String fileName, boolean redirectOutput, String... arguments) throws PyException { Properties properties = new Properties(); properties.setProperty("python.home", StaticConfiguration.JYTHON_HOME); properties.setProperty("python.path", StaticConfiguration.FORMATTER_DI...
[ "public", "static", "String", "execute", "(", "String", "fileName", ",", "boolean", "redirectOutput", ",", "String", "...", "arguments", ")", "throws", "PyException", "{", "Properties", "properties", "=", "new", "Properties", "(", ")", ";", "properties", ".", ...
Executes a python script, returning its output or not. @param fileName the filename of the python script to execute @param redirectOutput true to redirect outputs and return them, false otherwise @param arguments the arguments to pass to the python script @return the output of the python script execution (combined sta...
[ "Executes", "a", "python", "script", "returning", "its", "output", "or", "not", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/PythonHelper.java#L61-L81
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/Strings.java
Strings.toNullTerminatedFixedSizeByteArray
public static byte[] toNullTerminatedFixedSizeByteArray(String s, int length) { if (s.length() >= length) { s = s.substring(0, length - 1); } while (s.length() < length) { s += '\0'; } return s.getBytes(); }
java
public static byte[] toNullTerminatedFixedSizeByteArray(String s, int length) { if (s.length() >= length) { s = s.substring(0, length - 1); } while (s.length() < length) { s += '\0'; } return s.getBytes(); }
[ "public", "static", "byte", "[", "]", "toNullTerminatedFixedSizeByteArray", "(", "String", "s", ",", "int", "length", ")", "{", "if", "(", "s", ".", "length", "(", ")", ">=", "length", ")", "{", "s", "=", "s", ".", "substring", "(", "0", ",", "length...
Converts a string to a null-terminated fixed size byte array. @param s string to convert @param length size of the byte array to return @return byte array of specified length containing the string s null-terminated
[ "Converts", "a", "string", "to", "a", "null", "-", "terminated", "fixed", "size", "byte", "array", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/Strings.java#L85-L93
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/Strings.java
Strings.fromNullTerminatedByteArray
public static String fromNullTerminatedByteArray(byte[] array) { int stringSize = array.length; for (int i = 0; i < array.length; i++) { if (array[i] == 0) { stringSize = i; break; } } return new String(array, 0, stringSize); }
java
public static String fromNullTerminatedByteArray(byte[] array) { int stringSize = array.length; for (int i = 0; i < array.length; i++) { if (array[i] == 0) { stringSize = i; break; } } return new String(array, 0, stringSize); }
[ "public", "static", "String", "fromNullTerminatedByteArray", "(", "byte", "[", "]", "array", ")", "{", "int", "stringSize", "=", "array", ".", "length", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "array", ".", "length", ";", "i", "++", ")"...
Converts a null-terminated byte array into a string. @param array byte array containing a null-terminated string @return string from array
[ "Converts", "a", "null", "-", "terminated", "byte", "array", "into", "a", "string", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/Strings.java#L101-L111
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/jmx/impl/JMXAgent.java
JMXAgent.register
public synchronized void register() throws Exception { if (mbeanName != null) { throw new Exception("Agent already registered"); } mbeanName = new ObjectName(getClass().getPackage().getName() + ":type=" + getClass().getSimpleName()); logger.info("Registering JMX agent " + mbe...
java
public synchronized void register() throws Exception { if (mbeanName != null) { throw new Exception("Agent already registered"); } mbeanName = new ObjectName(getClass().getPackage().getName() + ":type=" + getClass().getSimpleName()); logger.info("Registering JMX agent " + mbe...
[ "public", "synchronized", "void", "register", "(", ")", "throws", "Exception", "{", "if", "(", "mbeanName", "!=", "null", ")", "{", "throw", "new", "Exception", "(", "\"Agent already registered\"", ")", ";", "}", "mbeanName", "=", "new", "ObjectName", "(", "...
Register the JMX agent @throws java.lang.Exception
[ "Register", "the", "JMX", "agent" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/jmx/impl/JMXAgent.java#L74-L82
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/jmx/impl/JMXAgent.java
JMXAgent.unregister
public synchronized void unregister() throws Exception { if (mbeanName == null) { throw new Exception("Agent not registered"); } logger.info("Unregistering JMX agent " + mbeanName); ManagementFactory.getPlatformMBeanServer().unregisterMBean(mbeanName); logger.info("JM...
java
public synchronized void unregister() throws Exception { if (mbeanName == null) { throw new Exception("Agent not registered"); } logger.info("Unregistering JMX agent " + mbeanName); ManagementFactory.getPlatformMBeanServer().unregisterMBean(mbeanName); logger.info("JM...
[ "public", "synchronized", "void", "unregister", "(", ")", "throws", "Exception", "{", "if", "(", "mbeanName", "==", "null", ")", "{", "throw", "new", "Exception", "(", "\"Agent not registered\"", ")", ";", "}", "logger", ".", "info", "(", "\"Unregistering JMX ...
Unregister the JMX agent
[ "Unregister", "the", "JMX", "agent" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/jmx/impl/JMXAgent.java#L87-L94
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/jmx/impl/JMXAgent.java
JMXAgent.sendNotification
public synchronized void sendNotification(PropertyChangeEvent pEvt) { String oldValue = pEvt.getOldValue() == null ? "null" : pEvt.getOldValue().toString(); String newValue = pEvt.getNewValue() == null ? "null" : pEvt.getNewValue().toString(); String sourceName = pEvt.getSource().getClass().getC...
java
public synchronized void sendNotification(PropertyChangeEvent pEvt) { String oldValue = pEvt.getOldValue() == null ? "null" : pEvt.getOldValue().toString(); String newValue = pEvt.getNewValue() == null ? "null" : pEvt.getNewValue().toString(); String sourceName = pEvt.getSource().getClass().getC...
[ "public", "synchronized", "void", "sendNotification", "(", "PropertyChangeEvent", "pEvt", ")", "{", "String", "oldValue", "=", "pEvt", ".", "getOldValue", "(", ")", "==", "null", "?", "\"null\"", ":", "pEvt", ".", "getOldValue", "(", ")", ".", "toString", "(...
Send a JMX notification of a property change event @param pEvt a property change event
[ "Send", "a", "JMX", "notification", "of", "a", "property", "change", "event" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/jmx/impl/JMXAgent.java#L101-L110
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/Exec.java
Exec.exec
public int exec(String cmd, Map<String, String> env) throws IOException, InterruptedException { return exec(cmd, env, System.out, System.err, null); }
java
public int exec(String cmd, Map<String, String> env) throws IOException, InterruptedException { return exec(cmd, env, System.out, System.err, null); }
[ "public", "int", "exec", "(", "String", "cmd", ",", "Map", "<", "String", ",", "String", ">", "env", ")", "throws", "IOException", ",", "InterruptedException", "{", "return", "exec", "(", "cmd", ",", "env", ",", "System", ".", "out", ",", "System", "."...
Executes the a command specified in parameter. @param cmd a specified system command @param env the environment variables map to use or null to inherit process environment @return the cancel value of the process. By convention, 0 indicates normal termination
[ "Executes", "the", "a", "command", "specified", "in", "parameter", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/Exec.java#L63-L65
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/Exec.java
Exec.exec
public int exec(String cmd, Map<String, String> env, OutputStream stdout, OutputStream stderr, ByteArrayOutputStream output, File dir) throws IOException, InterruptedException { //logger.debug("Executing '" + cmd + "'"); if (output == null) { output = new ByteArrayOutputS...
java
public int exec(String cmd, Map<String, String> env, OutputStream stdout, OutputStream stderr, ByteArrayOutputStream output, File dir) throws IOException, InterruptedException { //logger.debug("Executing '" + cmd + "'"); if (output == null) { output = new ByteArrayOutputS...
[ "public", "int", "exec", "(", "String", "cmd", ",", "Map", "<", "String", ",", "String", ">", "env", ",", "OutputStream", "stdout", ",", "OutputStream", "stderr", ",", "ByteArrayOutputStream", "output", ",", "File", "dir", ")", "throws", "IOException", ",", ...
Executes the a command specified in the specified directory. @param cmd a specified system command @param env the environment variables map to use or null to inherit process environment @param stdout an OutputStream for stdout @param stderr an OutputStream for stderr @param output the ByteArrayOutputStream will get a ...
[ "Executes", "the", "a", "command", "specified", "in", "the", "specified", "directory", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/Exec.java#L137-L175
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/GeneratePythonlibDoc.java
GeneratePythonlibDoc.generate
public static synchronized void generate() { LOGGER.debug("Generating documentation of test documentation included in pythonlib directories."); try { IS_RUNNING = true; List<File> pythonLibDirectories = findPythonLibDirectories(ROOT_SCRIPT_DIRECTORY); List<File> pyth...
java
public static synchronized void generate() { LOGGER.debug("Generating documentation of test documentation included in pythonlib directories."); try { IS_RUNNING = true; List<File> pythonLibDirectories = findPythonLibDirectories(ROOT_SCRIPT_DIRECTORY); List<File> pyth...
[ "public", "static", "synchronized", "void", "generate", "(", ")", "{", "LOGGER", ".", "debug", "(", "\"Generating documentation of test documentation included in pythonlib directories.\"", ")", ";", "try", "{", "IS_RUNNING", "=", "true", ";", "List", "<", "File", ">",...
Generates the documentation of scripts located in a pythonlib directory.
[ "Generates", "the", "documentation", "of", "scripts", "located", "in", "a", "pythonlib", "directory", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/GeneratePythonlibDoc.java#L84-L102
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/GeneratePythonlibDoc.java
GeneratePythonlibDoc.findPythonScripts
private static List<File> findPythonScripts(List<File> pythonLibDirectories) { List<File> scripts = new ArrayList<>(); for (File dir : pythonLibDirectories) { if (dir.exists()) { scripts.addAll(Arrays.asList(dir.listFiles(PYTHON_SCRIPT_FILE_FILTER))); } } ...
java
private static List<File> findPythonScripts(List<File> pythonLibDirectories) { List<File> scripts = new ArrayList<>(); for (File dir : pythonLibDirectories) { if (dir.exists()) { scripts.addAll(Arrays.asList(dir.listFiles(PYTHON_SCRIPT_FILE_FILTER))); } } ...
[ "private", "static", "List", "<", "File", ">", "findPythonScripts", "(", "List", "<", "File", ">", "pythonLibDirectories", ")", "{", "List", "<", "File", ">", "scripts", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "File", "dir", ":", "pyt...
Searches for all python script files contains in the directories. @param pythonLibDirectories A list of directories to scan. @return A list of all found files.
[ "Searches", "for", "all", "python", "script", "files", "contains", "in", "the", "directories", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/GeneratePythonlibDoc.java#L139-L147
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/PropertiesHistory.java
PropertiesHistory.checkPropertyValueOrTransition
public void checkPropertyValueOrTransition(String propertyValueOrTransition, double maxTime) throws QTasteDataException, QTasteTestFailException { long beginTime_ms = System.currentTimeMillis(); long maxTime_ms = Math.round(maxTime * 1000); propertyValueOrTransition = propertyValueOrTr...
java
public void checkPropertyValueOrTransition(String propertyValueOrTransition, double maxTime) throws QTasteDataException, QTasteTestFailException { long beginTime_ms = System.currentTimeMillis(); long maxTime_ms = Math.round(maxTime * 1000); propertyValueOrTransition = propertyValueOrTr...
[ "public", "void", "checkPropertyValueOrTransition", "(", "String", "propertyValueOrTransition", ",", "double", "maxTime", ")", "throws", "QTasteDataException", ",", "QTasteTestFailException", "{", "long", "beginTime_ms", "=", "System", ".", "currentTimeMillis", "(", ")", ...
Checks that a property reaches a given value or do a given values transition within given time. If found, remove old values from history. @param propertyValueOrTransition the property value or transition to check (case insensitive) <dl> <dd>Format: "<code><i>property</i>:</code>[<code>[</code>]<code><i>expected_value<...
[ "Checks", "that", "a", "property", "reaches", "a", "given", "value", "or", "do", "a", "given", "values", "transition", "within", "given", "time", ".", "If", "found", "remove", "old", "values", "from", "history", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/PropertiesHistory.java#L228-L258
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/util/HashtableLinkedList.java
HashtableLinkedList.readObject
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // rebuild hash hashtable hash = new Hashtable<>(); for (NameValue<N, V> nameValue : order) { putInHash(nameValue.name, nameValue.value); ...
java
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // rebuild hash hashtable hash = new Hashtable<>(); for (NameValue<N, V> nameValue : order) { putInHash(nameValue.name, nameValue.value); ...
[ "private", "synchronized", "void", "readObject", "(", "java", ".", "io", ".", "ObjectInputStream", "in", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "in", ".", "defaultReadObject", "(", ")", ";", "// rebuild hash hashtable", "hash", "=", "new...
and rebuild hash hashtable
[ "and", "rebuild", "hash", "hashtable" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/util/HashtableLinkedList.java#L158-L166
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/jmx/impl/JMXClient.java
JMXClient.removeNotificationListener
public boolean removeNotificationListener(String mbeanName, NotificationListener listener) throws Exception { if (isConnected()) { ObjectName objectName = new ObjectName(mbeanName); mbsc.removeNotificationListener(objectName, listener, null, null); jmxc.removeConnectionNotifi...
java
public boolean removeNotificationListener(String mbeanName, NotificationListener listener) throws Exception { if (isConnected()) { ObjectName objectName = new ObjectName(mbeanName); mbsc.removeNotificationListener(objectName, listener, null, null); jmxc.removeConnectionNotifi...
[ "public", "boolean", "removeNotificationListener", "(", "String", "mbeanName", ",", "NotificationListener", "listener", ")", "throws", "Exception", "{", "if", "(", "isConnected", "(", ")", ")", "{", "ObjectName", "objectName", "=", "new", "ObjectName", "(", "mbean...
Removes listener as notification and connection notification listener. @return true if successful, false otherwise @throws java.lang.Exception
[ "Removes", "listener", "as", "notification", "and", "connection", "notification", "listener", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/jmx/impl/JMXClient.java#L113-L122
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/jedit/PythonIndentAction.java
PythonIndentAction.getIndent
public static String getIndent(String line) { if (line == null || line.length() == 0) { return ""; } int i = 0; while (i < line.length() && line.charAt(i) == '\t') { i++; } return line.substring(0, i); }
java
public static String getIndent(String line) { if (line == null || line.length() == 0) { return ""; } int i = 0; while (i < line.length() && line.charAt(i) == '\t') { i++; } return line.substring(0, i); }
[ "public", "static", "String", "getIndent", "(", "String", "line", ")", "{", "if", "(", "line", "==", "null", "||", "line", ".", "length", "(", ")", "==", "0", ")", "{", "return", "\"\"", ";", "}", "int", "i", "=", "0", ";", "while", "(", "i", "...
Get the indentation of a line of text. This is the subString from beginning of line to the first non-space char @param line the line of text @return indentation of line.
[ "Get", "the", "indentation", "of", "a", "line", "of", "text", ".", "This", "is", "the", "subString", "from", "beginning", "of", "line", "to", "the", "first", "non", "-", "space", "char" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/jedit/PythonIndentAction.java#L71-L80
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/toolbox/simulators/SimulatorImpl.java
SimulatorImpl.scheduleTask
public void scheduleTask(PyObject task, double delay) { mTimer.schedule(new PythonCallTimerTask(task), Math.round(delay * 1000)); }
java
public void scheduleTask(PyObject task, double delay) { mTimer.schedule(new PythonCallTimerTask(task), Math.round(delay * 1000)); }
[ "public", "void", "scheduleTask", "(", "PyObject", "task", ",", "double", "delay", ")", "{", "mTimer", ".", "schedule", "(", "new", "PythonCallTimerTask", "(", "task", ")", ",", "Math", ".", "round", "(", "delay", "*", "1000", ")", ")", ";", "}" ]
Schedules the specified task for execution after the specified delay. @param task Python object callable without arguments, to schedule @param delay delay in seconds before task is to be executed
[ "Schedules", "the", "specified", "task", "for", "execution", "after", "the", "specified", "delay", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/toolbox/simulators/SimulatorImpl.java#L116-L118
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/toolbox/simulators/SimulatorImpl.java
SimulatorImpl.logAndThrowException
private static void logAndThrowException(String message, PyException e) throws Exception { LOGGER.error(message, e); throw new Exception(message + ":\n" + PythonHelper.getMessage(e)); }
java
private static void logAndThrowException(String message, PyException e) throws Exception { LOGGER.error(message, e); throw new Exception(message + ":\n" + PythonHelper.getMessage(e)); }
[ "private", "static", "void", "logAndThrowException", "(", "String", "message", ",", "PyException", "e", ")", "throws", "Exception", "{", "LOGGER", ".", "error", "(", "message", ",", "e", ")", ";", "throw", "new", "Exception", "(", "message", "+", "\":\\n\"",...
Logs message and exception and throws Exception. @param message message @param e PyException @throws java.lang.Exception Exception built with 'message + ":\n" + message_of_e'
[ "Logs", "message", "and", "exception", "and", "throws", "Exception", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/toolbox/simulators/SimulatorImpl.java#L281-L284
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/reporter/ReportFormatter.java
ReportFormatter.getSubstitutedTemplateContent
protected static String getSubstitutedTemplateContent(String templateContent, NamesValuesList<String, String> namesValues) { String templateContentSubst = templateContent; // substitute the name/values for (NameValue<String, String> nameValue : namesValues) { templateContentSubst = ...
java
protected static String getSubstitutedTemplateContent(String templateContent, NamesValuesList<String, String> namesValues) { String templateContentSubst = templateContent; // substitute the name/values for (NameValue<String, String> nameValue : namesValues) { templateContentSubst = ...
[ "protected", "static", "String", "getSubstitutedTemplateContent", "(", "String", "templateContent", ",", "NamesValuesList", "<", "String", ",", "String", ">", "namesValues", ")", "{", "String", "templateContentSubst", "=", "templateContent", ";", "// substitute the name/v...
Substitutes names by values in template and return result. @param templateContent content of the template to substitute @param namesValues list of names/values to substitute @return result of substitution
[ "Substitutes", "names", "by", "values", "in", "template", "and", "return", "result", "." ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/reporter/ReportFormatter.java#L78-L86
train
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/tools/HTMLDocumentLoader.java
HTMLDocumentLoader.getParser
public synchronized HTMLEditorKit.Parser getParser() { if (parser == null) { try { Class<?> c = Class.forName("javax.swing.text.html.parser.ParserDelegator"); parser = (HTMLEditorKit.Parser) c.newInstance(); } catch (Exception e) { } } ...
java
public synchronized HTMLEditorKit.Parser getParser() { if (parser == null) { try { Class<?> c = Class.forName("javax.swing.text.html.parser.ParserDelegator"); parser = (HTMLEditorKit.Parser) c.newInstance(); } catch (Exception e) { } } ...
[ "public", "synchronized", "HTMLEditorKit", ".", "Parser", "getParser", "(", ")", "{", "if", "(", "parser", "==", "null", ")", "{", "try", "{", "Class", "<", "?", ">", "c", "=", "Class", ".", "forName", "(", "\"javax.swing.text.html.parser.ParserDelegator\"", ...
Methods that allow customization of the parser and the callback
[ "Methods", "that", "allow", "customization", "of", "the", "parser", "and", "the", "callback" ]
ba45d4d86eb29b92f157c6e98536dee2002ddfdc
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/tools/HTMLDocumentLoader.java#L100-L109
train
tango-controls/JTango
server/src/main/java/org/tango/orb/IORDump.java
IORDump.iorAnalysis
private void iorAnalysis() throws DevFailed { if (!iorString.startsWith("IOR:")) { throw DevFailedUtils.newDevFailed("CORBA_ERROR", iorString + " not an IOR"); } final ORB orb = ORBManager.getOrb(); final ParsedIOR pior = new ParsedIOR((org.jacorb.orb.ORB) orb, iorString); ...
java
private void iorAnalysis() throws DevFailed { if (!iorString.startsWith("IOR:")) { throw DevFailedUtils.newDevFailed("CORBA_ERROR", iorString + " not an IOR"); } final ORB orb = ORBManager.getOrb(); final ParsedIOR pior = new ParsedIOR((org.jacorb.orb.ORB) orb, iorString); ...
[ "private", "void", "iorAnalysis", "(", ")", "throws", "DevFailed", "{", "if", "(", "!", "iorString", ".", "startsWith", "(", "\"IOR:\"", ")", ")", "{", "throw", "DevFailedUtils", ".", "newDevFailed", "(", "\"CORBA_ERROR\"", ",", "iorString", "+", "\" not an IO...
Make the IOR analyse
[ "Make", "the", "IOR", "analyse" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/orb/IORDump.java#L70-L122
train
tango-controls/JTango
dao/src/main/java/fr/esrf/TangoDs/TemplCommand.java
TemplCommand.analyse_methods
public void analyse_methods() throws DevFailed { // // Analyse the execution method given by the user // this.exe_method = analyse_method_exe(device_class_name,exe_method_name); // // Analyse the state method if one is given by the user // if (state_method_name != null) this.state_method = analyse_method...
java
public void analyse_methods() throws DevFailed { // // Analyse the execution method given by the user // this.exe_method = analyse_method_exe(device_class_name,exe_method_name); // // Analyse the state method if one is given by the user // if (state_method_name != null) this.state_method = analyse_method...
[ "public", "void", "analyse_methods", "(", ")", "throws", "DevFailed", "{", "//", "// Analyse the execution method given by the user", "//", "this", ".", "exe_method", "=", "analyse_method_exe", "(", "device_class_name", ",", "exe_method_name", ")", ";", "//", "// Analys...
Analyse the method given at construction time. This method check if the method(s) given at construction time fulfill the required specification. It always analyse the execution method and eventually the command allowed method. @exception DevFailed If one of the method does not fulfill the requirements. Click <a href=...
[ "Analyse", "the", "method", "given", "at", "construction", "time", "." ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/TemplCommand.java#L366-L382
train
tango-controls/JTango
dao/src/main/java/fr/esrf/TangoDs/TemplCommand.java
TemplCommand.find_method
protected Method find_method(Method[] meth_list,String meth_name) throws DevFailed { int i; Method meth_found = null; for (i = 0;i < meth_list.length;i++) { if (meth_name.equals(meth_list[i].getName())) { for (int j = i + 1;j < meth_list.length;j++) { if (meth_name.equals(meth_list[j].get...
java
protected Method find_method(Method[] meth_list,String meth_name) throws DevFailed { int i; Method meth_found = null; for (i = 0;i < meth_list.length;i++) { if (meth_name.equals(meth_list[i].getName())) { for (int j = i + 1;j < meth_list.length;j++) { if (meth_name.equals(meth_list[j].get...
[ "protected", "Method", "find_method", "(", "Method", "[", "]", "meth_list", ",", "String", "meth_name", ")", "throws", "DevFailed", "{", "int", "i", ";", "Method", "meth_found", "=", "null", ";", "for", "(", "i", "=", "0", ";", "i", "<", "meth_list", "...
Retrieve a Method object from a Method list from its name. @param meth_list The Method object list @return The wanted method @exception DevFailed If the method is not known or if two methods are found with the same name Click <a href="../../tango_basic/idl_html/Tango.html#DevFailed">here</a> to read <b>DevFailed</b> e...
[ "Retrieve", "a", "Method", "object", "from", "a", "Method", "list", "from", "its", "name", "." ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/TemplCommand.java#L708-L747
train
tango-controls/JTango
dao/src/main/java/fr/esrf/TangoDs/TemplCommand.java
TemplCommand.get_tango_type
protected int get_tango_type(Class type_cl) throws DevFailed { int type = 0; // // For arrays // if (type_cl.isArray() == true) { String type_name = type_cl.getComponentType().getName(); if (type_name.equals("byte")) type = Tango_DEVVAR_CHARARRAY; else if (type_name.equals("short")) type = T...
java
protected int get_tango_type(Class type_cl) throws DevFailed { int type = 0; // // For arrays // if (type_cl.isArray() == true) { String type_name = type_cl.getComponentType().getName(); if (type_name.equals("byte")) type = Tango_DEVVAR_CHARARRAY; else if (type_name.equals("short")) type = T...
[ "protected", "int", "get_tango_type", "(", "Class", "type_cl", ")", "throws", "DevFailed", "{", "int", "type", "=", "0", ";", "//", "// For arrays", "//", "if", "(", "type_cl", ".", "isArray", "(", ")", "==", "true", ")", "{", "String", "type_name", "=",...
Get the TANGO type for a command argument. This type is retrieved from the method executing the command argument Class object reference @param type_cl The argument Class object @return The TANGO type @exception DevFailed If the argument is not a TANGO supported type Click <a href="../../tango_basic/idl_html/Tango.htm...
[ "Get", "the", "TANGO", "type", "for", "a", "command", "argument", "." ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/TemplCommand.java#L777-L852
train
tango-controls/JTango
dao/src/main/java/fr/esrf/TangoDs/TemplCommand.java
TemplCommand.is_allowed
public boolean is_allowed(DeviceImpl dev,Any data_in) { if (state_method == null) return true; else { // // If the Method reference is not null, execute the method with the invoke // method // try { java.lang.Object[] meth_param = new java.lang.Object[1]; meth_param[0] = data_in; java.lang...
java
public boolean is_allowed(DeviceImpl dev,Any data_in) { if (state_method == null) return true; else { // // If the Method reference is not null, execute the method with the invoke // method // try { java.lang.Object[] meth_param = new java.lang.Object[1]; meth_param[0] = data_in; java.lang...
[ "public", "boolean", "is_allowed", "(", "DeviceImpl", "dev", ",", "Any", "data_in", ")", "{", "if", "(", "state_method", "==", "null", ")", "return", "true", ";", "else", "{", "//", "// If the Method reference is not null, execute the method with the invoke", "// meth...
Invoke the command allowed method given at object creation time. This method is automtically called by the TANGO core classes when the associated command is requested by a client to check if the command is allowed in the actual device state. If the user give a command allowed method at object creation time, this metho...
[ "Invoke", "the", "command", "allowed", "method", "given", "at", "object", "creation", "time", "." ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/TemplCommand.java#L889-L921
train
tango-controls/JTango
dao/src/main/java/fr/esrf/TangoApi/helpers/CommandHelper.java
CommandHelper.extract
public static Object extract(final DeviceData deviceDataArgout) throws DevFailed { Object argout = null; switch (deviceDataArgout.getType()) { case TangoConst.Tango_DEV_SHORT: argout = Short.valueOf(deviceDataArgout.extractShort()); break; case TangoConst.Tango_DEV_USHORT: argout = Integer.valueOf(de...
java
public static Object extract(final DeviceData deviceDataArgout) throws DevFailed { Object argout = null; switch (deviceDataArgout.getType()) { case TangoConst.Tango_DEV_SHORT: argout = Short.valueOf(deviceDataArgout.extractShort()); break; case TangoConst.Tango_DEV_USHORT: argout = Integer.valueOf(de...
[ "public", "static", "Object", "extract", "(", "final", "DeviceData", "deviceDataArgout", ")", "throws", "DevFailed", "{", "Object", "argout", "=", "null", ";", "switch", "(", "deviceDataArgout", ".", "getType", "(", ")", ")", "{", "case", "TangoConst", ".", ...
Extract data to DeviceData to an Object @param deviceDataArgout the DeviceData to read @return Object, possibles Classe : Short, String, Long, Float, Boolean, Integer, Double, DevState, DevVarDoubleStringArray or DevVarLongStringArray. @throws DevFailed
[ "Extract", "data", "to", "DeviceData", "to", "an", "Object" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/CommandHelper.java#L113-L176
train
tango-controls/JTango
server/src/main/java/org/tango/logging/LoggingManager.java
LoggingManager.setLoggingLevel
public void setLoggingLevel(final String deviceName, final int loggingLevel) { System.out.println("set logging level " + deviceName + "-" + LoggingLevel.getLevelFromInt(loggingLevel)); logger.debug("set logging level to {} on {}", LoggingLevel.getLevelFromInt(loggingLevel), deviceName); if (root...
java
public void setLoggingLevel(final String deviceName, final int loggingLevel) { System.out.println("set logging level " + deviceName + "-" + LoggingLevel.getLevelFromInt(loggingLevel)); logger.debug("set logging level to {} on {}", LoggingLevel.getLevelFromInt(loggingLevel), deviceName); if (root...
[ "public", "void", "setLoggingLevel", "(", "final", "String", "deviceName", ",", "final", "int", "loggingLevel", ")", "{", "System", ".", "out", ".", "println", "(", "\"set logging level \"", "+", "deviceName", "+", "\"-\"", "+", "LoggingLevel", ".", "getLevelFro...
Set the logging level of a device @param deviceName the device name @param loggingLevel the level
[ "Set", "the", "logging", "level", "of", "a", "device" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/logging/LoggingManager.java#L103-L123
train
tango-controls/JTango
server/src/main/java/org/tango/logging/LoggingManager.java
LoggingManager.setRootLoggingLevel
public void setRootLoggingLevel(final int loggingLevel) { rootLoggingLevel = loggingLevel; if (rootLoggerBack != null) { rootLoggerBack.setLevel(LoggingLevel.getLevelFromInt(loggingLevel)); } }
java
public void setRootLoggingLevel(final int loggingLevel) { rootLoggingLevel = loggingLevel; if (rootLoggerBack != null) { rootLoggerBack.setLevel(LoggingLevel.getLevelFromInt(loggingLevel)); } }
[ "public", "void", "setRootLoggingLevel", "(", "final", "int", "loggingLevel", ")", "{", "rootLoggingLevel", "=", "loggingLevel", ";", "if", "(", "rootLoggerBack", "!=", "null", ")", "{", "rootLoggerBack", ".", "setLevel", "(", "LoggingLevel", ".", "getLevelFromInt...
Set the level of the root logger @param loggingLevel
[ "Set", "the", "level", "of", "the", "root", "logger" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/logging/LoggingManager.java#L130-L135
train
tango-controls/JTango
server/src/main/java/org/tango/logging/LoggingManager.java
LoggingManager.setLoggingLevel
public void setLoggingLevel(final int loggingLevel, final Class<?>... deviceClassNames) { if (rootLoggingLevel < loggingLevel) { setRootLoggingLevel(loggingLevel); } System.out.println("set logging to " + LoggingLevel.getLevelFromInt(loggingLevel)); final Logger tangoLogger ...
java
public void setLoggingLevel(final int loggingLevel, final Class<?>... deviceClassNames) { if (rootLoggingLevel < loggingLevel) { setRootLoggingLevel(loggingLevel); } System.out.println("set logging to " + LoggingLevel.getLevelFromInt(loggingLevel)); final Logger tangoLogger ...
[ "public", "void", "setLoggingLevel", "(", "final", "int", "loggingLevel", ",", "final", "Class", "<", "?", ">", "...", "deviceClassNames", ")", "{", "if", "(", "rootLoggingLevel", "<", "loggingLevel", ")", "{", "setRootLoggingLevel", "(", "loggingLevel", ")", ...
Set the level of all loggers of JTangoServer @param loggingLevel
[ "Set", "the", "level", "of", "all", "loggers", "of", "JTangoServer" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/logging/LoggingManager.java#L142-L166
train
tango-controls/JTango
server/src/main/java/org/tango/logging/LoggingManager.java
LoggingManager.addDeviceAppender
public void addDeviceAppender(final String deviceTargetName, final Class<?> deviceClassName, final String loggingDeviceName) throws DevFailed { if (rootLoggerBack != null) { logger.debug("add device appender {} on {}", deviceTargetName, loggingDeviceName); final DeviceAppende...
java
public void addDeviceAppender(final String deviceTargetName, final Class<?> deviceClassName, final String loggingDeviceName) throws DevFailed { if (rootLoggerBack != null) { logger.debug("add device appender {} on {}", deviceTargetName, loggingDeviceName); final DeviceAppende...
[ "public", "void", "addDeviceAppender", "(", "final", "String", "deviceTargetName", ",", "final", "Class", "<", "?", ">", "deviceClassName", ",", "final", "String", "loggingDeviceName", ")", "throws", "DevFailed", "{", "if", "(", "rootLoggerBack", "!=", "null", "...
Logging of device sent to logviewer device @param deviceTargetName @param deviceClassName @param loggingDeviceName @throws DevFailed
[ "Logging", "of", "device", "sent", "to", "logviewer", "device" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/logging/LoggingManager.java#L176-L188
train
tango-controls/JTango
server/src/main/java/org/tango/logging/LoggingManager.java
LoggingManager.addFileAppender
public void addFileAppender(final String fileName, final String deviceName) throws DevFailed { if (rootLoggerBack != null) { logger.debug("add file appender of {} in {}", deviceName, fileName); final String deviceNameLower = deviceName.toLowerCase(Locale.ENGLISH); final File ...
java
public void addFileAppender(final String fileName, final String deviceName) throws DevFailed { if (rootLoggerBack != null) { logger.debug("add file appender of {} in {}", deviceName, fileName); final String deviceNameLower = deviceName.toLowerCase(Locale.ENGLISH); final File ...
[ "public", "void", "addFileAppender", "(", "final", "String", "fileName", ",", "final", "String", "deviceName", ")", "throws", "DevFailed", "{", "if", "(", "rootLoggerBack", "!=", "null", ")", "{", "logger", ".", "debug", "(", "\"add file appender of {} in {}\"", ...
Add an file appender for a device @param fileName @param deviceName @throws DevFailed
[ "Add", "an", "file", "appender", "for", "a", "device" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/logging/LoggingManager.java#L197-L257
train
tango-controls/JTango
server/src/main/java/org/tango/server/export/TangoExporter.java
TangoExporter.exportAll
@Override public void exportAll() throws DevFailed { // load tango db cache DatabaseFactory.getDatabase().loadCache(serverName, hostName); // special case for admin device final DeviceClassBuilder clazz = new DeviceClassBuilder(AdminDevice.class, Constants.ADMIN_SERVER_CLASS_NAME); ...
java
@Override public void exportAll() throws DevFailed { // load tango db cache DatabaseFactory.getDatabase().loadCache(serverName, hostName); // special case for admin device final DeviceClassBuilder clazz = new DeviceClassBuilder(AdminDevice.class, Constants.ADMIN_SERVER_CLASS_NAME); ...
[ "@", "Override", "public", "void", "exportAll", "(", ")", "throws", "DevFailed", "{", "// load tango db cache", "DatabaseFactory", ".", "getDatabase", "(", ")", ".", "loadCache", "(", "serverName", ",", "hostName", ")", ";", "// special case for admin device", "fina...
Build all devices of all classes that are is this executable @throws DevFailed
[ "Build", "all", "devices", "of", "all", "classes", "that", "are", "is", "this", "executable" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/export/TangoExporter.java#L75-L94
train
tango-controls/JTango
server/src/main/java/org/tango/server/export/TangoExporter.java
TangoExporter.exportDevices
@Override public void exportDevices() throws DevFailed { // load server class for (final Entry<String, Class<?>> entry : tangoClasses.entrySet()) { final String tangoClass = entry.getKey(); final Class<?> deviceClass = entry.getValue(); logger.debug("loading class...
java
@Override public void exportDevices() throws DevFailed { // load server class for (final Entry<String, Class<?>> entry : tangoClasses.entrySet()) { final String tangoClass = entry.getKey(); final Class<?> deviceClass = entry.getValue(); logger.debug("loading class...
[ "@", "Override", "public", "void", "exportDevices", "(", ")", "throws", "DevFailed", "{", "// load server class", "for", "(", "final", "Entry", "<", "String", ",", "Class", "<", "?", ">", ">", "entry", ":", "tangoClasses", ".", "entrySet", "(", ")", ")", ...
Export all devices except admin device @throws DevFailed
[ "Export", "all", "devices", "except", "admin", "device" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/export/TangoExporter.java#L101-L121
train
tango-controls/JTango
server/src/main/java/org/tango/server/export/TangoExporter.java
TangoExporter.unexportDevices
@Override public void unexportDevices() throws DevFailed { xlogger.entry(); final List<DeviceClassBuilder> clazzToRemove = new ArrayList<DeviceClassBuilder>(); for (final DeviceClassBuilder clazz : deviceClassList) { if (!clazz.getDeviceClass().equals(AdminDevice.class)) { ...
java
@Override public void unexportDevices() throws DevFailed { xlogger.entry(); final List<DeviceClassBuilder> clazzToRemove = new ArrayList<DeviceClassBuilder>(); for (final DeviceClassBuilder clazz : deviceClassList) { if (!clazz.getDeviceClass().equals(AdminDevice.class)) { ...
[ "@", "Override", "public", "void", "unexportDevices", "(", ")", "throws", "DevFailed", "{", "xlogger", ".", "entry", "(", ")", ";", "final", "List", "<", "DeviceClassBuilder", ">", "clazzToRemove", "=", "new", "ArrayList", "<", "DeviceClassBuilder", ">", "(", ...
Unexport all except admin device @throws DevFailed
[ "Unexport", "all", "except", "admin", "device" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/export/TangoExporter.java#L128-L148
train
tango-controls/JTango
server/src/main/java/org/tango/server/properties/DevicePropertiesImpl.java
DevicePropertiesImpl.update
public void update() throws DevFailed { xlogger.entry(); final Map<String, String[]> property = PropertiesUtils.getDeviceProperties(deviceName); if (property != null && property.size() != 0) { try { propertyMethod.invoke(businessObject, property); } catch (final IllegalArgumentException e) { throw Dev...
java
public void update() throws DevFailed { xlogger.entry(); final Map<String, String[]> property = PropertiesUtils.getDeviceProperties(deviceName); if (property != null && property.size() != 0) { try { propertyMethod.invoke(businessObject, property); } catch (final IllegalArgumentException e) { throw Dev...
[ "public", "void", "update", "(", ")", "throws", "DevFailed", "{", "xlogger", ".", "entry", "(", ")", ";", "final", "Map", "<", "String", ",", "String", "[", "]", ">", "property", "=", "PropertiesUtils", ".", "getDeviceProperties", "(", "deviceName", ")", ...
update all properties and values of this device @throws DevFailed
[ "update", "all", "properties", "and", "values", "of", "this", "device" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/properties/DevicePropertiesImpl.java#L55-L73
train
tango-controls/JTango
client/src/main/java/fr/esrf/TangoApi/Group/AttributeGroup.java
AttributeGroup.add
private synchronized void add(final String... attributes) throws DevFailed { userAttributesNames = new String[attributes.length]; devices = new DeviceProxy[attributes.length]; int i = 0; for (final String attributeName : attributes) { final String deviceName = TangoUtil.getfu...
java
private synchronized void add(final String... attributes) throws DevFailed { userAttributesNames = new String[attributes.length]; devices = new DeviceProxy[attributes.length]; int i = 0; for (final String attributeName : attributes) { final String deviceName = TangoUtil.getfu...
[ "private", "synchronized", "void", "add", "(", "final", "String", "...", "attributes", ")", "throws", "DevFailed", "{", "userAttributesNames", "=", "new", "String", "[", "attributes", ".", "length", "]", ";", "devices", "=", "new", "DeviceProxy", "[", "attribu...
Add a list of devices in the group or add a list of patterns @param attributes The attribute list @throws DevFailed
[ "Add", "a", "list", "of", "devices", "in", "the", "group", "or", "add", "a", "list", "of", "patterns" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/client/src/main/java/fr/esrf/TangoApi/Group/AttributeGroup.java#L90-L125
train
tango-controls/JTango
client/src/main/java/fr/soleil/tango/clientapi/util/TypeConversionUtil.java
TypeConversionUtil.getWritePart
public static Object getWritePart(final Object array, final AttrWriteType writeType) { if (writeType.equals(AttrWriteType.READ_WRITE)) { return Array.get(array, 1); } else { return Array.get(array, 0); } }
java
public static Object getWritePart(final Object array, final AttrWriteType writeType) { if (writeType.equals(AttrWriteType.READ_WRITE)) { return Array.get(array, 1); } else { return Array.get(array, 0); } }
[ "public", "static", "Object", "getWritePart", "(", "final", "Object", "array", ",", "final", "AttrWriteType", "writeType", ")", "{", "if", "(", "writeType", ".", "equals", "(", "AttrWriteType", ".", "READ_WRITE", ")", ")", "{", "return", "Array", ".", "get",...
Extract the write part of a scalar attribute @param array @param writeType @return
[ "Extract", "the", "write", "part", "of", "a", "scalar", "attribute" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/client/src/main/java/fr/soleil/tango/clientapi/util/TypeConversionUtil.java#L35-L41
train
tango-controls/JTango
client/src/main/java/fr/soleil/tango/clientapi/util/TypeConversionUtil.java
TypeConversionUtil.castToType
@SuppressWarnings("unchecked") public static <T> T castToType(final Class<T> type, final Object val) throws DevFailed { T result; if (val == null) { result = null; } else if (type.isAssignableFrom(val.getClass())) { result = (T) val; } else { LOGGER.debug("converting {} to {}", val.getClass().ge...
java
@SuppressWarnings("unchecked") public static <T> T castToType(final Class<T> type, final Object val) throws DevFailed { T result; if (val == null) { result = null; } else if (type.isAssignableFrom(val.getClass())) { result = (T) val; } else { LOGGER.debug("converting {} to {}", val.getClass().ge...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "castToType", "(", "final", "Class", "<", "T", ">", "type", ",", "final", "Object", "val", ")", "throws", "DevFailed", "{", "T", "result", ";", "if", "(", "val"...
Convert an object to another object. @see Transmorph @param <T> @param type @param val @return @throws DevFailed
[ "Convert", "an", "object", "to", "another", "object", "." ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/client/src/main/java/fr/soleil/tango/clientapi/util/TypeConversionUtil.java#L94-L121
train
tango-controls/JTango
client/src/main/java/fr/soleil/tango/clientapi/util/TypeConversionUtil.java
TypeConversionUtil.extractReadOrWrite
public static Object extractReadOrWrite(final Part part, final DeviceAttribute da, final Object readWrite) throws DevFailed { // separate read and written values final Object result; final int dimRead; if (da.getDimY() != 0) { dimRead = da.getDimX() * da.getDimY(); } else { dimRead = da.getDimX(); ...
java
public static Object extractReadOrWrite(final Part part, final DeviceAttribute da, final Object readWrite) throws DevFailed { // separate read and written values final Object result; final int dimRead; if (da.getDimY() != 0) { dimRead = da.getDimX() * da.getDimY(); } else { dimRead = da.getDimX(); ...
[ "public", "static", "Object", "extractReadOrWrite", "(", "final", "Part", "part", ",", "final", "DeviceAttribute", "da", ",", "final", "Object", "readWrite", ")", "throws", "DevFailed", "{", "// separate read and written values", "final", "Object", "result", ";", "f...
Extract read or write part of a Tango attribute. For spectrum and image @param part @param da @param readWrite @return @throws DevFailed
[ "Extract", "read", "or", "write", "part", "of", "a", "Tango", "attribute", ".", "For", "spectrum", "and", "image" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/client/src/main/java/fr/soleil/tango/clientapi/util/TypeConversionUtil.java#L143-L165
train
tango-controls/JTango
dao/src/main/java/fr/esrf/TangoDs/GetLoggingLevelCmd.java
GetLoggingLevelCmd.execute
public Any execute(DeviceImpl device, Any in_any) throws DevFailed { Util.out4.println("GetLoggingLevelCmd::execute(): arrived"); String[] dvsa = null; try { dvsa = extract_DevVarStringArray(in_any); } catch (DevFailed df) { Util.out3.println("GetLoggingLevelCmd::execute() --> Wrong argument ...
java
public Any execute(DeviceImpl device, Any in_any) throws DevFailed { Util.out4.println("GetLoggingLevelCmd::execute(): arrived"); String[] dvsa = null; try { dvsa = extract_DevVarStringArray(in_any); } catch (DevFailed df) { Util.out3.println("GetLoggingLevelCmd::execute() --> Wrong argument ...
[ "public", "Any", "execute", "(", "DeviceImpl", "device", ",", "Any", "in_any", ")", "throws", "DevFailed", "{", "Util", ".", "out4", ".", "println", "(", "\"GetLoggingLevelCmd::execute(): arrived\"", ")", ";", "String", "[", "]", "dvsa", "=", "null", ";", "t...
Executes the GetLoggingLevelCmd TANGO command
[ "Executes", "the", "GetLoggingLevelCmd", "TANGO", "command" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/GetLoggingLevelCmd.java#L55-L76
train
tango-controls/JTango
common/src/main/java/org/tango/TangoHostManager.java
TangoHostManager.getFirstFullTangoHost
public static String getFirstFullTangoHost() throws DevFailed { // TODO final String TANGO_HOST_ERROR = "API_GetTangoHostFailed"; // Get the tango_host String host = getFirstHost(); try { // Get FQDN for host final InetAddress iadd = InetAddress.getByNam...
java
public static String getFirstFullTangoHost() throws DevFailed { // TODO final String TANGO_HOST_ERROR = "API_GetTangoHostFailed"; // Get the tango_host String host = getFirstHost(); try { // Get FQDN for host final InetAddress iadd = InetAddress.getByNam...
[ "public", "static", "String", "getFirstFullTangoHost", "(", ")", "throws", "DevFailed", "{", "// TODO", "final", "String", "TANGO_HOST_ERROR", "=", "\"API_GetTangoHostFailed\"", ";", "// Get the tango_host", "String", "host", "=", "getFirstHost", "(", ")", ";", "try",...
Returns the TANGO_HOST with full qualified name. @param tangoHost default Tango_host @return the TANGO_HOST with full qualified name. @throws DevFailed if TANGO_HOST value has a bad syntax.
[ "Returns", "the", "TANGO_HOST", "with", "full", "qualified", "name", "." ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/org/tango/TangoHostManager.java#L103-L119
train
tango-controls/JTango
common/src/main/java/fr/esrf/TangoApi/Group/Group.java
Group.get_hierarchy
private Vector get_hierarchy() { synchronized (this) { final Vector h = new Vector(); final Iterator it = elements.iterator(); while (it.hasNext()) { final GroupElement e = (GroupElement) it.next(); if (e instanceof GroupDeviceElement) { h.add(e); } else { h.add(((Group) e).get_hierarc...
java
private Vector get_hierarchy() { synchronized (this) { final Vector h = new Vector(); final Iterator it = elements.iterator(); while (it.hasNext()) { final GroupElement e = (GroupElement) it.next(); if (e instanceof GroupDeviceElement) { h.add(e); } else { h.add(((Group) e).get_hierarc...
[ "private", "Vector", "get_hierarchy", "(", ")", "{", "synchronized", "(", "this", ")", "{", "final", "Vector", "h", "=", "new", "Vector", "(", ")", ";", "final", "Iterator", "it", "=", "elements", ".", "iterator", "(", ")", ";", "while", "(", "it", "...
Returns the group's hierarchy
[ "Returns", "the", "group", "s", "hierarchy" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/fr/esrf/TangoApi/Group/Group.java#L423-L437
train
tango-controls/JTango
common/src/main/java/fr/esrf/TangoApi/Group/Group.java
Group.get_size_i
private int get_size_i(final boolean fwd) { int size = 0; final Iterator it = elements.iterator(); while (it.hasNext()) { final GroupElement e = (GroupElement) it.next(); if (e instanceof GroupDeviceElement || fwd) { size += e.get_size(true); } } return size; }
java
private int get_size_i(final boolean fwd) { int size = 0; final Iterator it = elements.iterator(); while (it.hasNext()) { final GroupElement e = (GroupElement) it.next(); if (e instanceof GroupDeviceElement || fwd) { size += e.get_size(true); } } return size; }
[ "private", "int", "get_size_i", "(", "final", "boolean", "fwd", ")", "{", "int", "size", "=", "0", ";", "final", "Iterator", "it", "=", "elements", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "hasNext", "(", ")", ")", "{", "final", "Gr...
Returns the group's size - internal impl
[ "Returns", "the", "group", "s", "size", "-", "internal", "impl" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/fr/esrf/TangoApi/Group/Group.java#L440-L450
train
tango-controls/JTango
common/src/main/java/fr/esrf/TangoApi/Group/Group.java
Group.add_i
private boolean add_i(final GroupElement e) { if (e == null || e == this) { // -DEBUG System.out.println("Group::add_i::failed to add " + e.get_name() + " (null or self)"); return false; } final GroupElement ge = find_i(e.get_name(), e instanceof Group ? false : true); if (ge != null && ge != this) {...
java
private boolean add_i(final GroupElement e) { if (e == null || e == this) { // -DEBUG System.out.println("Group::add_i::failed to add " + e.get_name() + " (null or self)"); return false; } final GroupElement ge = find_i(e.get_name(), e instanceof Group ? false : true); if (ge != null && ge != this) {...
[ "private", "boolean", "add_i", "(", "final", "GroupElement", "e", ")", "{", "if", "(", "e", "==", "null", "||", "e", "==", "this", ")", "{", "// -DEBUG", "System", ".", "out", ".", "println", "(", "\"Group::add_i::failed to add \"", "+", "e", ".", "get_n...
Adds an element to the group
[ "Adds", "an", "element", "to", "the", "group" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/fr/esrf/TangoApi/Group/Group.java#L492-L507
train
tango-controls/JTango
dao/src/main/java/fr/esrf/TangoDs/Command.java
Command.insert
public Any insert(boolean data) throws DevFailed { Any out_any = alloc_any(); out_any.insert_boolean(data); return out_any; }
java
public Any insert(boolean data) throws DevFailed { Any out_any = alloc_any(); out_any.insert_boolean(data); return out_any; }
[ "public", "Any", "insert", "(", "boolean", "data", ")", "throws", "DevFailed", "{", "Any", "out_any", "=", "alloc_any", "(", ")", ";", "out_any", ".", "insert_boolean", "(", "data", ")", ";", "return", "out_any", ";", "}" ]
Create a CORBA Any object and insert a boolean data in it. @param data The boolean data to be inserted into the Any object @exception DevFailed If the Any object creation failed. Click <a href="../../tango_basic/idl_html/Tango.html#DevFailed">here</a> to read <b>DevFailed</b> exception specification
[ "Create", "a", "CORBA", "Any", "object", "and", "insert", "a", "boolean", "data", "in", "it", "." ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/Command.java#L410-L415
train
tango-controls/JTango
dao/src/main/java/fr/esrf/TangoDs/Command.java
Command.insert
public Any insert(short data) throws DevFailed { Any out_any = alloc_any(); out_any.insert_short(data); return out_any; }
java
public Any insert(short data) throws DevFailed { Any out_any = alloc_any(); out_any.insert_short(data); return out_any; }
[ "public", "Any", "insert", "(", "short", "data", ")", "throws", "DevFailed", "{", "Any", "out_any", "=", "alloc_any", "(", ")", ";", "out_any", ".", "insert_short", "(", "data", ")", ";", "return", "out_any", ";", "}" ]
Create a CORBA Any object and insert a short data in it. @param data The short data to be inserted into the Any object @exception DevFailed If the Any object creation failed. Click <a href="../../tango_basic/idl_html/Tango.html#DevFailed">here</a> to read <b>DevFailed</b> exception specification
[ "Create", "a", "CORBA", "Any", "object", "and", "insert", "a", "short", "data", "in", "it", "." ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/Command.java#L426-L431
train