input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
protected provisioning ui get provisioning ui return provisioning ui get default ui | returns the provisioning ui |
protected shell get shell return platform ui get workbench get modal dialog shell provider get shell | return a shell appropriate for parenting dialogs of this handler |
private string strip bundle id final string raw bundle id final int index raw bundle id index of bundle id separator return index 0 raw bundle id raw bundle id substring 0 index trim | strips the bundle id from the given quot raw quot id |
public string get id return plugin id | returns the id of the plug in |
public string get version return plugin version | returns the version of the plug in |
public string get path return plugin path | returns the path of the plug in relative to the eclipse installation |
private string extract path of eclipse install final document document final element element find element document get root element ixml names elem path of eclipse install return element null null element get attribute ixml names attr name get value | extracts the path of the eclipse installation from the given document |
private string extract destination name final document document final element element find element document get root element ixml names elem destination file return element null null element get attribute ixml names attr name get value | extracts the name of the destination file from the given document |
public void display welcome message logger info bundles info creator version app version non nls 1 logger info c app years digital cure org and contributors non nls 1 non nls 2 logger info this software is part of the luna rcp project http lunarcp sourceforge net non nls 1 | displays a welcome message |
private string extract default start level final document document final element element find element document get root element ixml names elem default start level return element null null element get attribute ixml names attr value get value | extracts the default start level for all plug ins from the given document |
public boolean check command line args final string args return args null args length 1 | checks the given command line arguments |
public void display usage logger info usage bundles info creator name of config file non nls 1 | displays the usage of this application |
private element find element final element parent final string element name final list parent content parent get content for final object object parent content final content content content object if content instanceof element continue final element element element content if element get name equals element name return element not found so enter recursion final element result find element element element name if result null return result return null | recursively searches the content of the given element and returns the |
public boolean read configuration file final string args config new creator configuration return config read from file args 0 | reads parses and validates the configuration file of the application |
public boolean scan plugin paths plugins new tree map string plugin properties final string eclipse path config get path of eclipse install final iterator string path iter config get paths to be examined iterator while path iter has next final string path to be examined path iter next final plugin scanner scanner new plugin scanner eclipse path path to be examined final list plugin properties new plugins scanner scan if new plugins null return false merge plugin properties into map new plugins return true | scans the plug in paths from the configuration file for plug ins and |
public string get path of eclipse install return path of eclipse install | returns the path of the eclipse installation |
private void merge plugin properties into map final list plugin properties new plugins for final plugin properties new plugin new plugins final string plugin id new plugin get id final plugin properties old plugin plugins get plugin id if old plugin null no old plug in found so store the new one plugins put plugin id new plugin else final string old version old plugin get version final string new version new plugin get version if old version compare to new version 0 new plug in has a higher version number plugins put plugin id new plugin | merges the given list of plug in properties into the internal map of |
public string get destination name return desti name | returns the name of the destination file |
public boolean write destination file final bundles info writer writer new bundles info writer config return writer write plugins values iterator | writes the destination file from the configuration file |
public string get start level final string plugin id if start level map null return default start level final string start level start level map get plugin id return start level null default start level start level | returns the start level for the plug in with the given id |
protected void activate final component context context database controller context context | called when this service is going to be activated |
protected void deactivate final component context context database controller context null | called when this service is going to be deactivated |
public void add listener final idelayed database change listener listener synchronized listeners if listeners contains listener listeners add listener | adds the given delayed database change listener to the internal list of |
public void remove listener final idelayed database change listener listener synchronized listeners listeners remove listener | removes the given delayed database change listener from the internal list |
protected void fire change event final type change type final object object synchronized listeners for final idelayed database change listener listener listeners listener database changed delayed change type object | fires the given database change event as delayed database change event |
protected void fire change event final type change type final list object object list synchronized listeners for final idelayed database change listener listener listeners listener database changed delayed change type object list | fires the given database change event as delayed database change event |
public void cancel if delayed change timer null delayed change timer is alive cancel the current timer delayed change timer cancel | cancels the currently scheduled task |
private string get jdbc connection url final string database path get database path logger debug database controller get jdbc connection url database location database path non nls 1 construct connection string return jdbc hsqldb database path file separator idatabase properties database name non nls 1 | returns the jdbc url connection string of the database |
private boolean check for hsql driver try class for name idatabase properties database driver name return true catch final exception exception logger error database controller check for hsql driver non nls 1 unable to find hsqldb driver idatabase properties database driver name exception non nls 1 return false | checks if the database driver has been found |
public boolean is alive return task null | returns whether or not this timer is still alive |
public boolean delays for final object other synchronized this if change object null return change object list null false change object list equals other else return change object equals other | returns whether or not the currently scheduled task delays a database |
public boolean extend delay synchronized this if task null cancel the task delay and re schedule the task task cancel create and schedule task return true return false | extends the delay of the currently scheduled task |
public boolean cancel delay synchronized this if task null cancel the task delay and run the task immediately task cancel task run return true return false | cancels the delay of the currently scheduled task and executes it |
public void throw change event final idatabase change listener type change type final t object final list idatabase change listener listeners database change listener services binder get services static if listeners null listeners is empty nothing to do return call all listeners final iterator idatabase change listener iter listeners iterator while iter has next iter next database changed change type object | throws a database change event to all database change listeners |
public void throw change event final idatabase change listener type change type final list t object list final list idatabase change listener listeners database change listener services binder get services static if listeners null listeners is empty nothing to do return call all listeners final iterator idatabase change listener iter listeners iterator while iter has next iter next database changed change type object list | throws a database change event to all database change listeners |
public string get bundle version of copied exe return get dialog settings get key bundle version of exe copy | returns the bundle version of the last copied gpsbabel executable |
public void update bundle version of copied exe final version bundle version activator get default get bundle get version get dialog settings put key bundle version of exe copy bundle version to string save dialog settings | updates the bundle version of the copied gpsbabel executable to the |
private string enclose file name final string file name if os name starts with windows non nls 1 return file name non nls 1 non nls 2 return file name | if we are running under windows operating system the given file name |
private file build temp exe file final string temp folder name system get property java io tmpdir non nls 1 final string src file name if os name starts with windows non nls 1 src file name resource windows gpsbabel substring resource windows gpsbabel last index of 1 else if os name starts with linux non nls 1 src file name resource linux gpsbabel substring resource linux gpsbabel last index of 1 else note add more operating systems here return null return new file temp folder name temporary location file prefix src file name | returns the file object of the copied gpsbabel executable in the |
private void delete temp files if file operations delete file forced get test file 5 logger error test file operations delete temp files unable to delete get test file non nls 1 if file operations delete file forced get copy file 5 logger error test file operations delete temp files unable to delete get copy file non nls 1 if file operations delete file forced get extraction folder 5 logger error test file operations delete temp files unable to delete get extraction folder non nls 1 | deletes the copied file and all other copies |
private file get test file final file temp folder get temp folder return new file temp folder temp file name | returns the test file inside the temporary folder of the system |
private file get extraction folder final file temp folder get temp folder return new file temp folder extraction folder | returns the folder for the extraction of the archive file |
private file get extracted test file final int index final file extraction folder get extraction folder final string entry name get zip file entry name index return new file extraction folder entry name | returns the extracted file for the given index |
private boolean compare file stream contents final input stream stream1 final input stream stream2 throws ioexception int value1 int value2 boolean equal true boolean next loop true int count 0 do value1 stream1 read value2 stream2 read equal value1 value2 next loop value1 eof value2 eof if equal logger debug test file operations compare file stream contents count char value1 char value2 non nls 1 non nls 2 non nls 3 count while equal next loop return equal | compares the contents of the two given input streams |
private void write file contents final file file final string contents assert assert true deletion of the file failed file operations delete file forced file 2 non nls 1 try final output stream o stream new file output stream file final buffered writer writer new buffered writer new output stream writer o stream for int line 0 line contents length line writer write contents line writer new line writer flush writer close catch final ioexception exception assert fail creation of the file failed non nls 1 | writes the given context line by line into the given file |
public void add event plugin event get event list add event | adds a new event |
public string run event int id plugin event get event list get id event check system out println event get output return event get output | runs event specified |
public void add server server server server list add server | adds a new server |
public string send do real logic return success | method that is backed to a submit button of a form |
private int next lock id if next lock id integer max value next lock id integer min value return next lock id | generate an id for a new lock |
private void decrement lock object key lock lock throws cache exception decrement the lock lock unlock cache next timestamp if cache instanceof cluster cache cluster cache cache put quiet key lock else cache put key lock | decrement a lock and put it back in the cache |
public object get object key throws cache exception try if log is debug enabled log debug key key if key null return null else element element cache get serializable key if element null if log is debug enabled log debug element for key is null return null else return element get value catch net sf ehcache cache exception e throw new cache exception e | gets a value of an element which matches the given key |
public void put object key object value throws cache exception try element element new element serializable key serializable value cache put element catch illegal argument exception e throw new cache exception e catch illegal state exception e throw new cache exception e | puts an object into the cache |
public void remove object key throws cache exception try cache remove serializable key catch class cast exception e throw new cache exception e catch illegal state exception e throw new cache exception e | removes the element which matches the key |
public void clear throws cache exception try cache remove all catch illegal state exception e throw new cache exception e catch ioexception e throw new cache exception e | remove all elements in the cache but leave the cache |
public void destroy throws cache exception try cache manager get instance remove cache cache get name catch illegal state exception e throw new cache exception e catch net sf ehcache cache exception e throw new cache exception e | remove the cache and make it unuseable |
public void lock object key throws cache exception | calls to this method should perform there own synchronization |
public void unlock object key throws cache exception | calls to this method should perform there own synchronization |
public long get fresh timestamp return fresh timestamp | the timestamp on the cached data |
public long next timestamp return timestamper next | gets the next timestamp |
public int get timeout 60 second lock timeout return timestamper one ms 60000 | returns the lock timeout for this cache |
public object get value return value | the actual cached data |
public lock lock long timeout int id return new lock timeout id version | lock the item |
public boolean is lock return false | not a lock |
public boolean is gettable long tx timestamp return fresh timestamp tx timestamp | is this item visible to the timestamped |
public boolean is puttable long tx timestamp object new version comparator comparator we really could refresh the item if it is not a lock but it might be slower return fresh timestamp tx timestamp return version null new version null comparator compare version new version 0 | dont overwite already cached items |
public boolean greater than lock mode mode return level mode level | check if this lock mode is more restrictive than the given lock mode |
public boolean less than lock mode mode return level mode level | check if this lock mode is less restrictive than the given lock mode |
public lock lock long timeout int id concurrent lock true multiplicity this timeout timeout return this | increment the lock setting the |
public void unlock long current timestamp if multiplicity 0 unlock timestamp current timestamp | decrement the lock setting the unlock |
public boolean is puttable long tx timestamp object new version comparator comparator if timeout tx timestamp return true if multiplicity 0 return false return version null new version null unlock timestamp tx timestamp comparator compare version new version 0 by requiring we rely on lock timeout in the case of an unsuccessful update | can the timestamped transaction re cache this |
public boolean was locked concurrently return concurrent lock | was this lock held concurrently by multiple |
public boolean is lock return true | yes this is a lock |
public boolean is gettable long tx timestamp return false | locks are not returned to the client |
public mapper create mapper throws build exception if mapper null throw new build exception cannot define more than one mapper mapper new mapper this get project return mapper | defines the mapper to map source to destination files |
public void set ant install lib file ant install lib this ant install lib ant install lib file set set new file set set set file new file ant install lib tikal antinstaller jar set set file new file ant install lib sysout jar add zip group fileset set | the location of ant installer |
public void set ant lib file ant lib this ant lib ant lib file set set new file set set set file new file ant lib tikal ant jar set set file new file ant lib ant launcher jar add zip group fileset set | the location of ant |
public list get keys with expiry check throws illegal state exception cache exception list all key list get keys remove keys of expired elements array list non expired keys new array list all key list size int all key list size all key list size for int i 0 i all key list size i serializable key serializable all key list get i element element get quiet key if element null non expired keys add key non expired keys trim to size return non expired keys | returns a list of all elements in the cache |
public long get memory store size throws illegal state exception check status return memory store get size | returns the number of elements in the memory store |
public int get disk store size throws illegal state exception check status if overflow to disk return disk store get size else return 0 | returns the number of elements in the disk store |
public status get status return status | gets the status attribute of the cache |
public void set document locator locator locator this locator locator | receive a locator object for document events |
public int get memory store hit count throws illegal state exception check status return memory store hit count | number of times a requested item was found in the memory store |
public int get disk store hit count throws illegal state exception check status return disk store hit count | number of times a requested item was found in the disk store |
private method find create method class obj class string name final string method name make method name create name final method methods obj class get methods for int i 0 i methods length i final method method methods i if method get name equals method name continue if modifier is static method get modifiers continue if method get parameter types length 0 continue if method get return type is primitive method get return type is array continue return method return null | finds a creator method |
private string make method name final string prefix final string name return prefix character to upper case name char at 0 name substring 1 | builds a method name from an element or attribute name |
public int get miss count not found throws illegal state exception check status return miss count not found | number of times a requested element was not found in the cache |
public int get miss count expired throws illegal state exception check status return miss count expired | number of times a requested element was found but was expired |
public string get name return name | gets the cache name |
private string get location return locator get system id locator get line number | formats the current document location |
public long get time to idle seconds return time to idle seconds | gets time to idle seconds |
public long get time to live seconds return time to live seconds | gets time to live seconds |
public boolean is overflow to disk return overflow to disk | does the overflow go to disk |
public int get max elements in memory return max elements in memory | gets the maximum number of elements to hold in memory |
public memory store eviction policy get memory store eviction policy return memory store eviction policy | the policy used to evict elements from the |
public string get disk cache path if disk store null return disk store path else return null | gets the disk cache path |
public set get cache key set return caches key set | gets a map of caches |
public boolean is expired element element throws illegal state exception null pointer exception check status boolean expired synchronized element if element get value null expired true if eternal expired check expiration for not eternal element else expired false if log is debug enabled serializable key null if element null key element get key log debug get name is element with key key expired expired return expired | checks whether this cache element has expired |
public object clone throws clone not supported exception if memory store null disk store null throw new clone not supported exception cannot clone an initialized cache added by yanai cache cache cache super clone cache cache event notification service new cache event notification service cache return cache end of add | clones a cache |
public void set class string fully qualified class path this fully qualified class path fully qualified class path | sets the class name |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.