input
stringlengths
10
828
output
stringlengths
5
107
public game event get events int index return game event events get index
return specified current non completed event
public long get time return time get engine start time return time source get current time
get current engine time in milliseconds from engine start
public long get engine start time return engine start time
get the time the engine started
public void victory victory true set event creation suspended true
set victory so that engine will simply display a victory event and stop
public void add yupo engine listener yupo engine listener listener listeners add listener
add a listener to be notified of events in the game engine
public void add engine hint listener engine hint listener listener hint listeners add listener
add a listener to be notified of hint events in the game engine
public void fire yupo match event yupo match event event for iterator it listeners iterator it has next yupo engine listener it next match made event
fire the match event to all listeners
public void fire engine hint event engine hint event event for iterator it hint listeners iterator it has next engine hint listener it next hint event
fire the hint event to all listeners
public void fire yupo new place event yupo new place event event for iterator it listeners iterator it has next yupo engine listener it next new place event
fire the match event to all listeners
public void fire yupo defeat event yupo defeat event event for iterator it listeners iterator it has next yupo engine listener it next defeated event
fire the defeat event to all listeners
public void fire yupo continue event yupo continue event event for iterator it listeners iterator it has next yupo engine listener it next continued event
fire the continue event to all listeners
public int get pending rotate return pending rotate
getter for property pending rotate
public void set pending rotate int pending rotate this pending rotate pending rotate
setter for property pending rotate
public int get pending shift return pending shift
getter for property pending shift
public void set pending shift int pending shift this pending shift pending shift
setter for property pending shift
public int get maximum consecutive pool drop return maximum consecutive pool drop
getter for property maximum consecutive pool drop
public void set maximum consecutive pool drop int maximum consecutive pool drop this maximum consecutive pool drop maximum consecutive pool drop
setter for property maximum consecutive pool drop
public void set drop queue org puzzlebeans beans two bean drop queue drop queue this drop queue drop queue
setter for property drop queue
public boolean is event creation suspended return event creation suspended
getter for property event creation suspended
public void set event creation suspended boolean event creation suspended this event creation suspended event creation suspended
setter for property event creation suspended
public void set ai org puzzlebeans ai two bean drop ai ai this ai ai
setter for property ai
public string get cookie try jsobject win jsobject jsobject get window this string cookie string win eval document cookie return cookie catch exception e return
reads the sessions cookie from the browser
public int get javascript status int c javascript command javascript command jscmd nothing return c
returns the javascript command status
private void insert new file jup file f system out println jup adding f get file get absolute path int index files add f js notifier notify add file index f get file get name f get file length true f release file
inserts a new file into the upload file list
public long get max file size return max file size
gets the maximal allowable file size
public float get random random random float min float max int i have to scale gaussian float flt gaus do if i 0 flt gaus flt meanx flt sigmax float random next gaussian else flt gaus flt meany flt sigmay float random next gaussian while flt gaus min flt gaus max return flt gaus
return a random number that follows the given distribution
public void create field editors add all fields to the page add field new boolean field editor viewer preference constants p viewonsave view document after saving the te x file get field editor parent
creates the field editors
public void create field editors this page is empty it has no other function than to list the subcategories
creates the field editors
public int get length return env get length
returns the length of the nested environment
protected void visit command argument iargument argument for ientity entity argument get argument entity accept this
visit a commands argument
protected void visit environment entry ientity entry entry accept this
visit an environment entry
public void fire environment about to change event ienvironment changed env navigable set ientity children environment change event event new environment change event this changed env children for ienvironement changed listener listener environment listener list listener environment about to change event
fires an environment change event with the children which are about to change
public boolean has next if tmp null tmp next return tmp null
checks whether there are more elements left
public void fire environment changed event ienvironment changed env navigable set ientity children environment change event event new environment change event this changed env children for ienvironement changed listener listener environment listener list listener environment changed event
fires an environment change event with the children which are changed
public ientity peek if tmp null tmp next return tmp
peeks for the next element
public boolean add environment changed listener ienvironement changed listener listener return environment listener list add listener
adds an ienvironment changed listener
public int get length if arguments null arguments is empty ientity end arg arguments get arguments size 1 return end arg get offset end arg get length get offset return opcode get length
calculate the length and return it
public boolean remove environment changed listener ienvironement changed listener listener return environment listener list remove listener
removes an ienvironment changed listener
protected idocument create document object element throws core exception if element instanceof istorage editor input idocument doc super create document element istorage editor input input istorage editor input element let document doc set input input let document doc parse document create a partitioner that uses the parsed model and attach it to the document fast partitioner partitioner new fast partitioner new let model partition scanner parse registry get instance get partition types doc set document partitioner partitioner partitioner connect doc true return doc else return null
requires that element is of type istorage editor input
public int get int value return combo box get selection index
returns this field editors current value
protected void value changed int old value int new value set presents default value false if old value new value fire value changed get preference name old value new value
informs this field editors listener if it has one about a change to
public void create bracket annotations selection changed event event throws bad location exception if event get selection instanceof itext selection return itext selection sel itext selection event get selection isource viewer viewer isource viewer event get source idocument document viewer get document int offset sel get offset if offset document get length offset 0 char ch document get char offset 1 if is bracket ch create bracket annotations offset ch document viewer get annotation model
whenever the selection is updated this method is called
public void set input istorage editor input input this input input
sets the editor input
private iresource environment add resource environment iresource environment res env environments put res env new tree map integer ienvironment return resource environments put res env get resource res env
add a resource environment to the map
public void do save iprogress monitor progress monitor super do save progress monitor ipreference store store let plugin get default get preference store look up if the document should be parsed after saving it if store get boolean editor preference constants p parseaftersave get current document parse document look up if the document should be build after saving it if store get boolean builder preference constants p buildonsave build
handles the saving
public void document about to be changed document event event try adapt the document shadow to the change if document shadow null document shadow new document get document shadow replace event get offset event get length event get text catch bad location exception e let plugin log istatus error e ienvironment environment document model get environment at offset incl event get offset if environment null prepare the environment ienvironment changed environment environment prepare event this document model update changed environment event get text length event get length update the environment changed environment process event this else parse document
removes the entities which are affected by the change from the document model
public ienvironment get environment at offset int offset boolean include disabled navigable map integer ienvironment envs get current environements if envs null return null integer key envs floor key offset if key null collection ienvironment possible envs envs head map key true descending map values for ienvironment environment possible envs if environment get offset environment get length offset environment handle separately include disabled return environment return current resource environment get root
searches for the environment which contains the given offset
public void document changed document event event
cannot be used because otherwise the document partitioning would
private iaction create sort action final ipreference store store let plugin get default get preference store iaction action new action action sort elements iaction as check box public void run store set value let outline page sortelements enabled is checked let outline page refresh action set tool tip text action sort elements action set image descriptor let plugin get image descriptor sort action set checked store get boolean let outline page sortelements enabled return action
create an action to be able to sort the outlines entries
public ienvironment get environment at offset int offset return get environment at offset offset false
searches for the environment which contains the given offset
public boolean select viewer viewer object parent element object element return invisible types contains outline node element get type
returns whether the given element is visible
public void set visible string node type boolean invisible if invisible invisible types remove node type else invisible types add node type
toggles a given outline node type visible or hidden
public ienvironment get environment at offset incl int offset navigable map integer ienvironment envs get current environements if envs null return null integer key envs floor key offset if key null collection ienvironment possible envs envs head map key true descending map values for ienvironment environment possible envs if environment get offset environment get length offset return environment return current resource environment get root
searches for the environment which contains the given offset
public image get image object element ientity entity outline node element get entity label provider provider get label provider entity if provider null return provider get image element return super get image element
returns an image for the given element
public string get text object element ientity entity outline node element get entity label provider provider get label provider entity if provider null return provider get text element return super get text element
returns the text description of the element
public ientity get entity at offset int offset boolean include disabled ientity entity get entity at or before offset offset include disabled if entity null offset entity get offset offset entity get offset entity get length return entity return null
search the entity at the given offset
private image descriptor get cached image descriptor string key if key null return null image registry reg get image registry image descriptor d reg get descriptor key if d null d image descriptor create from url get bundle get entry icons key gif reg put key d return d
cache the image descriptor if it is found
public void run iaction action if this project null return try string natures this project get description get nature ids string new natures new string natures length 1 system arraycopy natures 0 new natures 0 natures length new natures natures length let nature latex nature id iproject description description this project get description description set nature ids new natures this project set description description iresource force null catch core exception e throw new runtime exception e
if a project is selected see selection changed adds the latex nature to
public void selection changed iaction action iselection selection object selected istructured selection selection get first element if selected instanceof iproject this project iproject selected else this project null
notified when the a resource is selected
public void set file ifile file this file file try reader new pushback reader new input stream reader file get contents 2048 offset 0 catch core exception e let plugin log istatus error e
set the active file
public ientity get entity at offset int offset return get entity at offset offset false
search the entity at the given offset
public void set document idocument document set document document 0 document get length
create a new input provider for the given document which
public void set document idocument document int offset int length this document document assert offset length document get length this offset offset selected range new position offset length
create a new input provider for the given document which
public ientity get entity at or before offset int offset boolean include disabled return get environment at offset offset include disabled get children floor new search stub offset
search the entity at the given offset
public boolean perform ok iresource project iresource get element set error message null try project set persistent property new qualified name let plugin plugin id p mainfile editor get string value return true catch core exception e let plugin log istatus error e return false
checks whether the given value is in the project
public void set current parent outline node current parent this current parent current parent
set the current parent
public void run iaction action ieditor part editor window get active page get active editor dvibuilder builder new dvibuilder editor ifile output file builder build new let build file resource util get file editor get editor input let plugin get default get preference store get boolean builder preference constants p consoleoutput iviewer viewer builder get viewer if viewer null output file null viewer view output file
execute the action when the dvi button has been pressed
public ientity get entity at or before offset int offset return get environment at offset offset false get children floor new search stub offset
search the entity at the given offset
public void run iaction action ieditor part editor window get active page get active editor psbuilder ps new psbuilder editor ifile output file ps build new let build file resource util get file editor get editor input let plugin get default get preference store get boolean builder preference constants p consoleoutput iviewer viewer ps get viewer if viewer null output file null viewer view output file
create ps button has been pressed
private void add projection support projection viewer viewer projection viewer get source viewer projection support projectionsupport new projection support viewer get annotation access get shared colors projectionsupport install viewer do operation projection viewer toggle create folding structure viewer get projection annotation model
adds projection support to this editor
public iinput provide strategy get input provider string key iinput provide strategy factory factory null if input provide strategy factories contains key key factory input provide strategy factories get key else iconfiguration element extensions platform get extension registry get configuration elements for net sf let input provider for iconfiguration element element extensions if element get attribute name equals key try factory iinput provide strategy factory element create executable extension class input provide strategy factories put key factory catch core exception e let plugin log istatus error e if factory null return factory get new input provider strategy return null
get a new input provide strategy for the given key
public bibtex entry add bibtex entry bibtex entry entry if entry get key null return entries put entry get key get key entry return null
add a bibtex entry to the list
public ilex strategy get lexer string key iinput provide strategy input ilex strategy factory factory null if lex strategy factories contains key key factory lex strategy factories get key else iconfiguration element extensions platform get extension registry get configuration elements for net sf let lexer for iconfiguration element element extensions if element get attribute name equals key try factory ilex strategy factory element create executable extension class lex strategy factories put key factory catch core exception e let plugin log istatus error e if factory null return factory get new lexer strategy input return null
returns a new latex lex strategy for the given key and initializes
public bibtex entry add string bibtex entry bibtex entry entry list bibtex field fields entry get fields if fields size 1 fields get 0 get key null return string entries put fields get 0 get key get key entry return null
add a bibtex string entry to the list
public iparse strategy get parser string key ilex strategy lex iparse strategy factory factory null if lex strategy factories contains key key factory parse strategy factories get key else iconfiguration element extensions platform get extension registry get configuration elements for net sf let parser for iconfiguration element element extensions if element get attribute name equals key try factory iparse strategy factory element create executable extension class parse strategy factories put key factory catch core exception e let plugin log istatus error e if factory null return factory get new parse strategy lex return null
returns a new latex parser for the given key and initializes
public iresource environment set model iresource environment model iresource environment old model this model this model model return old model
set the main code iresource environment code namely the models top entity
private iresource process resource iproject project string line stack string stack defines the maximum amount of lines which should be taken care of when an error has occured int max lines 3 while max lines 0 ipath path new path line remove first segments project get location segment count if path is valid path line path segment count 0 return project get file path make relative else append the line before if path is not valid line stack pop line return null
extract the path to the file from the line
public void set current resource environment iresource environment current resource environment this current resource environment current resource environment
sets the active resource environment
protected void make bib tex let build file bf ipath command new path let plugin get default get preference store get string builder preference constants p miktexpath append miktex bin bibtex exe build job build job new build job get builder name command to osstring command bf get file null false build job set rule build lock manager part lock build job schedule
executes bibtex if enabled
protected void make index let build file bf ipath command new path let plugin get default get preference store get string builder preference constants p miktexpath append miktex bin makeindex exe build job make index job new build job get builder name command to osstring command bf get file null false make index job set rule build lock manager part lock make index job schedule
executes make index if enabled
protected void create console if console null iconsole manager con man console plugin get default get console manager iconsole existing con man get consoles console new message console console name null for int i 0 i existing length i if console name equals existing i get name console message console existing i con man add consoles new iconsole console console clear console
create console is used to create a new console page
public void initialize bib root iresource environment r env current root node new outline node bib r env get resource get name r env get root bibtex outline type 0 false page get visitor get root add child 0 current root node root nodes add current root node
initialize the bibtex root node
private icommand builder factory get command builder string key iconfiguration element extensions platform get extension registry get configuration elements for net sf let bibtex commandbuilder for iconfiguration element element extensions try if key equals ignore case element get attribute opcode return icommand builder factory element create executable extension class catch core exception e bibtex plugin log istatus error e return null
get the command builder factory
protected iopcode parse opcode ilex strategy lexer iopcode opcode null if lexer peek get kind bibtex token opcode token op lexer next token opcode new bibtex opcode op get offset op get length op get image return opcode
parse the opcode
private imandatory argument get first mandatory argument list iargument args for iargument argument args if argument instanceof imandatory argument return imandatory argument argument return null
search for the first mandatory argument
protected bibtex key parse bibtex key ilex strategy lexer string builder sb new string builder int offset lexer get offset while lexer peek get kind bibtex token eof lexer peek get kind bibtex token comma token token lexer next token switch token get kind case bibtex token word case bibtex token symbol sb append token get image default break return new bibtex key sb to string offset lexer get offset offset
parse the key of a bibtex entry
protected bibtex field key parse bibtex field key ilex strategy lexer string builder sb new string builder int offset lexer get offset token token while token lexer peek get kind bibtex token equals token get kind bibtex token eof lexer next token switch token get kind case bibtex token word case bibtex token symbol sb append token get image default break return new bibtex field key sb to string offset lexer get offset offset
parse a bibtex field key e
public string get replaced text return replaced text
returns the replaced text
public void run throws ioexception display display new display shell new shell display is the same font in latex font new font display courier new 10 swt none create contents display shell shell open while shell is disposed if display read and dispatch display sleep font dispose display dispose if printer null printer dispose
runs the application
private void create command annotations string opcode let document model document model iannotation model an model ienvironment env document model get current resource environment get root for ientity entity env if entity instanceof icommand icommand entity get opcode get opcode equals opcode iopcode matching opcode icommand entity get opcode annotation an new annotation tex occurrences updater command type true opcode an model add annotation an new position matching opcode get offset matching opcode get length
marks all occurrences of commands which have the same opcode
protected void update env sorted set ientity elements after change document event event int difference event get text length event get length stretch difference if elements after change null return for ientity entity elements after change entity move difference
update this environment will move all entities about the
protected int compute difference from comment idocument doc int offset int length string text int new length length if text contains try int comment offset text last index of offset int comment line doc get line of offset comment offset int comment line end offset doc get line offset comment line doc get line length comment line if comment line end offset offset length new length comment line end offset offset catch bad location exception e latex plugin log istatus error e return new length
if a comment is inserted this line must be parsed to the end
public void run throws ioexception display display new display shell new shell display choose a monospaced font font new font display courier new 10 swt none create contents display shell shell open while shell is disposed if display read and dispatch display sleep font dispose display dispose if printer null printer dispose
runs the application
private void initialize extensions cached extension processors new vector icontent assist processor iconfiguration element extensions platform get extension registry get configuration elements for net sf let latex content assist extension for iconfiguration element element extensions try cached extension processors add icontent assist processor element create executable extension class catch core exception e let plugin log istatus error e
initializes the other content assist processors
public ientity add refererence icommand ref command for iargument argument ref command get arguments if argument instanceof imandatory argument argument visitor visitor new argument visitor visitor visit argument get argument list argument visitor bean keys visitor get keys if keys is empty for argument visitor bean bean keys return references put bean get value ref command return null
add a reference command
public ientity add refererence string key ientity reference return references put key reference
add a reference command
public void add label icommand label command for iargument argument label command get arguments if argument instanceof imandatory argument argument visitor visitor new argument visitor visitor visit argument get argument list argument visitor bean keys visitor get keys if keys is empty string key keys get 0 get value labels put key label command
add a label command
private iaction do create action string name final string outline type string image descriptor iaction action new action name iaction as check box public void run filter set visible outline type is checked tree viewer refresh action set tool tip text name action set image descriptor latex plugin get image descriptor image descriptor return action
create a hide reveal action for the given
public void add label string key ientity entity labels put key entity
add a label command
private string get prefix itext viewer viewer int offset try idocument document viewer get document if document null offset document get length return null if offset 0 return int length 0 while offset 0 character is whitespace document get char offset document get char offset document get char offset document get char offset length return document get offset 1 length catch bad location exception e latex plugin log istatus error e return
returns the prefix for the current offset