input
stringlengths
10
828
output
stringlengths
5
107
protected void handle variables
this is not necessary declarations are handled explicitly on exit
public void user make sequence make sequence
user request to put the nodes of the current action into sequence
public void user make parallel make parallel
user request to put the nodes of the current action in parallel
public void set info object object if object null set text else string text if object instanceof llist text llist object element at 0 to string else if object instanceof node spec text node spec object get id to string else if object instanceof uirefinement text self named object get name set text text
sets the cell text to the node number
public void set info object object if object null set text else issue issue issue object name name issue get id llist pattern issue get pattern string text for iterator i pattern iterator i has next text text i next to string text name to string text set text text
sets the cell text to the node number and name e
public void set info object object set text make text object
sets the cell text to the node name e
public void set info object object if object null set text else string name llist pattern lisp nil if object instanceof node spec name node spec object get id to string pattern node spec object get pattern else if object instanceof uirefinement name self pattern new cons uirefinement object get name pattern string text for iterator i pattern iterator i has next object o i next if o null text text o to string text name to string text set text text
sets the cell text to the node number and name e
public void set construct ixobject construct set uiconstruct get uidomain get uiobject ixobject construct
sets the given construct as the current one and displays it for editing
public void add user parent object object object parent if object instanceof uiobject class parent instanceof uiobject class if parent null uiobject class object add parent uiobject class parent else debug noteln octree mod cannot only add parents with uiobject classes debug noteln found object get class and parent get class
can only deal with uiobject class arguments
public void set uiconstruct uiobject construct find a suitable panel for the object and set it if construct instanceof uirefinement set current panel action panel else if construct instanceof uidomain set current panel domain panel else if construct instanceof uiobject class set current panel aro panel set the construct in the current panel aconstruct frame panel panel aconstruct frame panel get current panel if panel null panel set uiconstruct uiobject construct
sets the given uiobject as the current one and displays it for editing
public void note text nodes debug noteln noting nodes from text jtext area nt jtext area nodes text panel get item component list nodes uirefinement parse nodes get uidomain nt get text ui construct update nodes nodes not set nodes keep old ids for orderings if is sequence set make sequence
parse the nodes from the text area and store them in the current
protected void init from object throws null pointer exception type field set text rel field set text statement set text type field request focus
sets the refinement whose components children are to be realted
protected void init from object throws null pointer exception statement set text cond but set selected true uirefinement refinement uirefinement current object if refinement null return list children new linked list refinement get nodes children add 0 refinement debug noteln children are children make act list children to array act list clear selection act list set selected index 0 children remove 0 statement request focus get focus component request focus
sets the refinement whose components children are to be related
protected void init from object throws null pointer exception uirefinement refinement uirefinement current object if refinement null return list children refinement get nodes debug noteln children are children if children is empty debug noteln empty string message the refinement refinement get name has no children to relate throw new null pointer exception message else this make act list this act list a children to array this make act list this act list b children to array
sets the refinement whose components children are to be realted
protected void set domain domain domain if adjusting domain return adjusting domain true debug noteln de f setting domain domain to string if domain equals get domain get uidomain set domain domain uidomain new uid get uidomain set domain domain debug noteln set ui domain new uid print set uidomain new uid populate edit menu done by set uidomain adjusting domain false
sets the given domain as current both in this frame and the domain
public void set uidomain uidomain ui domain if get uidomain equals ui domain return set uidomain listeners ui domain global editing panel is added during init of global frame panel ui domain fire domain set ui domain get domain populate edit menu domain set event ui domain fire domain set ui domain get domain
sets the given uidomain as current both in this frame and the domain
public void init generic constraints generic constraints clear add generic constraint symbol intern type symbol intern relation parameters symbol type symbol intern world state string form pattern value add generic constraint type symbol intern condition form add generic constraint type symbol intern effect form add generic constraint symbol intern temporal symbol intern before node end node end add generic constraint symbol intern compute symbol intern null form add generic constraint symbol intern compute symbol intern multiple answer form
this should really come from a file
public list get all constraint patterns uidomain ui domain load generic constraints ui domain return new linked list generic constraints values
gets the list of allowed constraint patterns
public list get constraint patterns return new linked list generic constraints values
gets the list of allowed constraint patterns
protected void ensure uidomain listeners uidomain ui domain uidomain current uid get uidomain if current uid equals ui domain return ui domain set uidomain listeners current uid get uidomain listeners ui domain add uidomain listener this ui domain add uidomain listener grammar panel ui domain add uidomain listener action panel ui domain add uidomain listener aro panel
transfer listeners and tell them things have changed
public void undo set value string field object value get model set value field value
sets the given field to the given value in the editor
protected void set uidomain listeners uidomain ui domain uidomain current uid get uidomain ui domain set uidomain listeners current uid get uidomain listeners ui domain add uidomain listener this ui domain add uidomain listener grammar panel ui domain add uidomain listener action panel ui domain add uidomain listener aro panel
transfer listeners and tell them things have changed
public object undo get value string field return get model get value field
gets the given field to the given value in the editor
public ixtree table node make ixtree table node object the node tree node t node null if the node null if tree node class is instance the node t node tree node the node else if ixobject class is instance the node t node tree node ui domain get uiobject ixobject the node else debug noteln aro cttm trying to make tree node from null if t node null return null else make a new e node using the t node return new ixtntree table node this t node
makes an ixtree table node from the given object
public void update current panel aconstruct frame panel panel super update current panel panel debug noteln de current panel is now get acurrent panel get name debug noteln de populating edit menu populate edit menu activate undo needed
sets the current panel and sets the domain in the panel
public void set default sequence boolean on if def sequence mi null def sequence mi set state on this action panel set default sequence on
sets the toggle for default sub activity sequencing behaviour
public string get name string tree node node ixtntree table node i node ixtntree table node node list props get properties i node string name string named i node node get name uiutil list to display pattern string name string named i node node get name uiutil show props return name string
gets the name string for the given row object
protected void user clear domain int y joption pane yes option if get uidomain is empty string message this will clear all constructs in the draft are you sure you want to do this y joption pane show confirm dialog this message confirm joption pane yes no option if y joption pane yes option get uidomain clear draft this clear panels do this listenening to domain should be a domain event global form panel domain panel form panel domain cleared this set uidomain get uidomain make changes take effect
clears the current domain
public void reload data debug noteln aroe ctm reload data new throwable print stack trace list constructs ui domain get all object classes debug noteln aroe ctm classes uiutil list to display constructs constructs list ivutil sort named collection new array list constructs debug noteln after sort uiutil list to display constructs list data new array list constructs debug noteln aroe ctm as array list uiutil list to display data update data data
looks up all object classes and updates the tree model from
public boolean set value string field object value try debug noteln uioc value class for field value get class debug noteln value is value if field null return false else if field equals name set name string value else if field equals super class names set super class names list value else if field equals object properties set object properties list value else return false return true catch exception e debug note exception e return false
edits the aro type
public boolean same value string field object value object other value if field null return false if value null return uiutil is empty thing other value if other value null return false if field equals name ivutil same symbol value other value if field equals name field equals comments field equals annotations return value equals other value if field equals super class names field equals object properties return ivutil same set collection value collection other value return false safe exit
determines whether the two given values of the given field differ
private void update data if saving is visible return closed or i m updating ignore debug noteln dec ed updating object data string message the domain changed reloading information note you will lose changes you made in this editor joption pane show message dialog this message init from object
called when changes may have been made to the refinements in the
public boolean is empty return is undefined object properties null object properties is empty sub class names null sub class names is empty annotations null annotations is empty
if the specifications are empty we dont care about the parents
protected void user insert domain get uidomain insert domain this set domain ui domain get domain
gets a domain file name and reads it
public boolean is empty object class oc return oc null oc get name oc get name equals undefined oc get name equals undefined oc get object properties null oc get object properties is empty oc get super class names null oc get super class names is empty oc get annotations null oc get annotations is empty
if the original specifications are empty
public boolean delete constraint constraint c list constraints get constraints if constraints contains c return false constraints remove c return true
removes the given constraint
public void add parents list parents make a list of symbols add them all at once then fire linked list of symbol new names collect class names parents list old names new linked list of symbol get super class names new names remove all old names don t add things that are already there old names add all new names set super class names old names
adds a list of uiobject class to super classes
public void construct added uidomain event event
called when a ui construct is added
public boolean is undefined if name null name equals name equals undefined name equals undefined ref set editor null ref set editor is empty class set editor null class set editor is empty get comments null get comments equals get annotations null get annotations is empty uiutil is empty thing get annotations values debug noteln uidomain is empty return true debug noteln refinement is not empty return false
a refinement is undefined if all its data fields are empty except
public list get variable constraints item var var if var null return null set vars get variables used if vars null vars contains var return null var not used given var used so find it in constraints list constraints get constraints all constraints list v constraints filter for variable var constraints var now we have a list of all constraints that mention the var return v constraints
find all world state constraints that have the given variable in them
public void set variable constraints item var var list var constrs if var null return list old all get constraints all constraints list old var cs filter for variable var old all var list new all if old all null new all new array list else new all new array list old all original to update if old var cs null new all remove all old var cs remove old class constraints new all add all var constrs add new class constraints set constraints new all fire data change constraints old all this constraints
replace all find all previous world state constraints that have
public void add children list children make a list of symbols add them all at once then fire linked list of symbol new names collect class names children list old names new linked list of symbol get sub class names new names remove all old names don t add things that are already there old names add all new names set sub class names old names
adds a list of uiobject class to sub classes
public list collect changes return collect changes domain get base object draft
collects the differences between this object and the base one draft
public list collect changes from original return collect changes public domain published
collects the differences between this object and the published one
public boolean has changed return has changed draft domain
finds out whether the domain has changed from the draft
public boolean has changed from original return has changed public domain
finds out whether the domain has changed from the published original one
public void more init from object throws null pointer exception
set up the editor to specify more of the same add more button
protected void init from object throws null pointer exception is adjusting true super more but set enabled false set property mode all uirefinement refinement uirefinement current object if refinement null return old constraints refinement get constraints debug noteln oce noted old constraints list children new linked list refinement get nodes children add 0 refinement debug noteln children are children make act list children to array variable null debug noteln oce done children update classes act list clear selection act list set selected index 0 children remove 0 statement request focus is adjusting false focus
sets the refinement whose objects are to be constrained
public void set object object o clear if o instanceof uiobject set domain uiobject o get uidomain super set object o
set the object uirefinement whose objects are to be constrained
public void save to domain if public domain null public domain domain make base object if draft domain null draft domain clone domain domain public domain draft domain save to domain draft domain
save the objects own info into its base object
private void update properties object current class class ed get selected object debug noteln oce updating props for current class if current class instanceof uiobject class debug noteln oce selected object class current class table model set object class uiobject class current class else debug noteln selected object class of type current class get class table model set object class current class
make the table take account of the currently selected uiobject class
public void load from domain load from domain draft domain
load the objects own information name from the original domain
public void action performed action event ae give the method above a chance to recognise the event if frame action performed ae return string command ae get action command debug noteln action editor panel got action command command if command equals add node user add child else if command equals delete node user delete child else if command equals add ordering user add ordering else if command equals delete ordering user delete ordering else if button action performed ae return else debug noteln action editor panel cannot recognise command command
wakes up the action listener with a user action
protected object collect constraint update refinement return null
normally reads the constraint and updates the current object
private int get properties mode try object o prop mode pan get data boolean data false false if o instanceof boolean boolean d boolean o data 0 d 0 boolean value data 1 d 1 boolean value else data boolean o int mode 0 if data length 2 if data 0 mode own if data 1 mode ancestor debug noteln oce property mode is mode else debug noteln ob ce wrong prop mode data length data length if mode 0 return all else return mode catch exception e debug note exception e return all
get the current selections of the properties toggles own ancestors
public void save to domain if base object null base object object class make base object debug noteln uir save to domain base object to string save to domain base object old name name debug noteln nodes now uiutil list to display base object get nodes
saves this object into a suitable base object
private void set property mode int mode boolean data new boolean false new boolean false if mode 1 mode 3 data 0 new boolean true if mode 2 mode 3 data 1 new boolean true prop mode pan set data data
set the selections of the properties toggles own ancestors to the
public void load from domain if base object null base object object class make base object name symbol intern base object get name set super class names base object get super class names update super classes set object properties base object get object properties set annotations base object get annotations fire data change all null null
loads this object from its base object
public boolean has changed all return has changed all draft domain
finds out whether the domain and its constructs have changed from the
public void save to domain if base object null base object refinement make base object debug noteln uir save to domain base object to string save to domain base object debug noteln nodes now uiutil list to display base object get nodes
saves this object into a suitable base object
private list get object classes if ui domain null return ui domain get object class tree else return new linked list
find all object classes in the domain
public boolean has changed all from original return has changed all public domain
finds out whether the domain and its constructs have changed from the
public object get data button model bm group get selection string command bm get action command return command
gets the current data of a text component
public void set data object data parallel b set enabled true sequence b set enabled true other b set enabled false if o none equals data last b set selected true else if o parallel equals data parallel b set selected true else if o sequence equals data sequence b set selected true else other b set enabled true other b set selected true
sets the current data of a text component
public void remove data debug noteln mini cp removing data default b set selected true other b set enabled false
removes all text from the component
public boolean has changed constructs from original return ref set editor has changed constructs refinements changed class set editor has changed constructs classes changed
finds out whether the domain and its constructs have changed from the
public named get any named object string name if name return null named object named find own object name if object null return object else find an original that has not changed debug noteln auiset ed looking in originals for name object get string original name if is current named object object name equals object get name object null debug noteln found object return object
finds an object whose name matches the given string
public named get named object string name if name return null named object named find own object name if object null return object else find an original that has not changed debug noteln auiset ed looking in originals for name new throwable print stack trace object get string original name if is current named object object name equals object get name object null debug noteln found object return object
finds an object whose name matches the given string
public boolean has original named object if object instanceof uiobject return uiobject object has original else return false
checks whether the given object has an original base object
public boolean is empty object object if object instanceof uiobject return uiobject object is empty else return false
checks whether the given object is empty
public void note change debug noteln uioc noting change for this if is empty has original ui domain remove construct this empty with no original get rid of it else if old name null name has changed old name to string debug noteln uioc got name change tidy parents old name name tidy children old name name old name name save to domain ui domain update construct this else if has changed saving so update the base object save to domain debug noteln uioc noting change ui domain update construct this
get the uidomain to note the change of this object
public list collect construct changes list changes new array list if has changed constructs changes add changes in label if added is empty changes add added ivutil named list to display added if removed is empty changes add removed ivutil named list to display removed if edited is empty changes add edited ivutil named list to display edited return changes
collects descriptions of any changes in constructs in the set
public void send object object destination object contents super send object destination contents
sends an object to a named agent
public boolean has changed all domain domain return has changed domain domain itself changed ref set editor has changed constructs refinements changed class set editor has changed constructs classes changed
finds out whether anything in the domain inc
public list collect changes return collect changes object class get base object draft
collects the differences between this object and the base one
public list collect changes from original return collect changes object class get original published
collects the differences between this object and the base one
public list collect all changes return collect all changes public domain
collects the differences between this object and the published one
public list collect changes object class original return collect changes original old
collects the differences between this object and the given one
protected void process command line arguments super process command line arguments
command line argument processing used by all versions of i test
public jpanel make logo panel jpanel image panel new jpanel image icon icon new image icon images un sec gen office jpg image panel add new jlabel icon return image panel
constructs a panel containing a nice un related picture
public void startup super startup
completes setup and initialization
protected void add test menu items super add test menu items frame add test issue priority high consider example frame add test issue priority high note example add a note issue
called to add items to the main frame menu bars test menu
public void set name object id this id id
sets a object indentification to the image
public object get name return id
returns the image object indentification
public int get text lat return get height 2 3
sets a object indentification to the image
public void add pattern value llist pattern object value llist property llist pattern clone delete pattern get 1 if world contains key pattern get 1 if hashtable world get pattern get 1 contains key property hashtable world get pattern get 1 put property value if lisp elements to string property equals latitude lisp elements to string property equals longitude load object image pattern get 1 hashtable world get pattern get 1 else hashtable wo new hashtable wo put property value world put pattern get 1 wo
adds a pattern value pair
public void reset w layer reset enumeration en layers elements object temp while en has more elements temp en next element if temp instanceof ix router layer ix router layer temp reset
method called by the ip2 agent
public void add pattern value llist pattern object value w layer add pattern value pattern value
method called by the ip2 agent
public void projection changed com bbn openmap event projection event pe projection proj set projection pe projection old proj proj proj set projection pe if proj null get list generate proj repaint else proj old proj fire status update layer status event finish working
method from the projection listener interface
public void change pattern value llist pattern object value w layer change pattern value pattern value
method called by the ip2 agent
public omgraphic list get list omgraphic list list super get list if list null list new omgraphic list super set list list return list
overriding the omgraphic handler method creating a list if its null
public void delete pattern value llist pattern object value w layer delete pattern value pattern value
method called by the ip2 agent
private boolean has position hashtable wo if wo contains key lisp elements from string latitude wo contains key lisp elements from string longitude return true else return false
returns true if a object has latitude and longitude
protected layer get layer string name layer l for int i 1 i l length i if l i get property prefix equals name return l i return null
returns a layers whose name is specified in the input attributes
public omgraphic list get rectangle projection p omgraphic list list omgraphic list get list list clear if image null load map p iterator it tiles iterator while it has next omscaling raster tile omscaling raster it next if tile is on map p tile generate p list add tile repaint return list
implements the abstract get rectangle method of the abstract plug in class
protected void load map projection p int image count 0 if jpg path null media tracker tracker new media tracker component create a media tracker image icon ii new image icon jpg path image ii get image try tracker add image image image count tracker wait for id image count catch exception e catch errors if calcule calculate image parameters p ii omscaling raster omsr new omscaling raster lat left sup lon left sup lat right inf lon right inf image tiles add omsr image count
loads the jpg image whose path is specified in the
public void set center view mouse event e lat lon point ll map get coordinates e map center new center event this ll get latitude ll get longitude
centralises the view around the position where the mouse was clicked
public component get view panel frame frame return svt get view frame
returns a component that represents a state table
public void send constraint pattern assignment pa vector v new vector v add pa constraint c new constraint symbol intern world state symbol intern effect v ip2 model manager ip2 get model manager add constraint c
sends a constraint to agent
public void reset svt reset map tool reset
sets the viewer back to something approximating its initial state