input
stringlengths
10
828
output
stringlengths
5
107
public void update action update action current action
updates the current action from the graph
public void update action uirefinement uir update nodes and links uir
updates the given action from the graph
public void save construct uiutil not implemented this saving grammars
save a construct of the panels type into the draft domain
protected uiobject note construct return null
notes the content of the editing panel into the current new uiobject
public boolean check construct uiutil not implemented this checking grammars return true
check a construct of the panels type for errors and inconsistencies
public hash map read canvas points debug noteln ig getting points from graph hash map points new hash map iterator m nodes nodes iterator while m nodes has next try graph node component m node graph node component m nodes next point position get position m node name id m node base node get id if id null position null points put id point to list position catch exception e return points
getting and noting canvas point information from the graph
public boolean lists as text return lists as text
check whether lists are to be displayed as texts
protected node component find node object o iterator nodes this get nodes while nodes has next object n nodes next node component node node component n if current action is ref node o return node return null
finds the node component referenced by the given object
public void undo set value string field object value debug noteln undo set field field value value if field null return else if field equals name name field set text value to string else if field equals pattern string pat if value null pat uiutil list to display llist value pattern field set text pat else if field equals graph debug noteln graph value class value get class get model set value field value
sets the given field to the given value in the editor
public object undo get value string field debug noteln undo get field field return get model get value field return null
gets the given field to the given value in the editor
public void set uiconstruct uiobject construct set uiconstruct only construct
sets the current ui construct
public void set uiconstruct only uiobject construct uiobject old get uiconstruct if construct equals ui construct return set action uirefinement construct parent fire construct changed old construct this
sets the current ui construct
public void save to object editable object object uirefinement uir uirefinement object save to given object uir
save the data from the panel into the given object
public void undo set value string field object value debug noteln afp got undo set for field field val value get model set value field value
sets the given field to the given value in the editor
public void action performed action event ae string command ae get action command debug noteln grammar editor got action command command
wakes up the action listener with a user action
public object undo get value string field debug noteln afp got undo get for field field return get model get value field
gets the given field to the given value in the editor
public object add new node string pattern joption pane show input dialog please enter the sub node s pattern if pattern null return null count node component node new node component editor get uidomain name value of count pattern current action add node node components new cons node components fire node added node return node
called when a node is added by the user
public void load from object uirefinement uir uirefinement get uiconstruct name field set text pattern field set text this model set action uir if uir null name field set text uir get name pattern field set text uiutil list to display uir get pattern igraph graph uir get graph if graph null layout from graph graph else auto auto layout graph view
load the data for the panel from the current object
public void set construct ixobject construct set uiconstruct get uidomain get uiobject construct
sets the current construct
protected void update toolbar boolean show debug noteln ide updating toolbar if show button texts show show button texts show for int i 0 i show buttons length i try ixtool item item ixtool item show buttons i if item null item show button text show catch class cast exception e only interested in ixtool items if action panel null action panel update toolbar show
updates the toolbar buttons with text shown or not according
public void set list data collection data debug noteln dec e setting list data uiutil list to display data var list set text string text for iterator i data iterator i has next object next i next if next instanceof variable declaration next variable declaration next get name variable declaration dec variable declaration i next item var var item var next if text text text var to string else text text uiutil line separator var to string var list set text text
handles lists of item var or variable declaration one for variables used
public boolean is undoing return undoing
checks if the manager is currently undoing a change
protected void handle variables if var decs null debug noteln dec ed got null var decs else debug noteln ce got var decs var decs try uirefinement ui ref uirefinement current object if var decs null ui ref set variable declarations new array list var decs var decs clear else ui ref set variable declarations null catch exception e debug note exception e
note any variable declarations set in this editor
protected component make rels jtext field spec field new jtext field ivutil enable vars this spec field spec ed new thing editor panel null spec field return spec ed
makes all items on the relations panel just a text field
protected void init from object set text spec ed get item component request focus jcomponent c spec ed get item component get focus component request focus
nothing to do to initialise the editor from an object
protected void set from object object original llist pattern lisp nil if issue class is instance original pattern issue original get pattern else if node spec class is instance original pattern node spec original get pattern set text uiutil list to display pattern spec ed get item component request focus get focus component request focus
nothing to do to initialise the editor from an object
protected void set construct fields
sets the constructs fields in their respective panels fills the panels
protected void clear panels domain panel clear action panel clear grammar panel clear test panel clear if use aro aro panel clear lexicon panel clear
clears all panels of the frame
protected boolean close panels debug noteln ide f closing panels if domain panel before closing if action panel before closing if grammar panel before closing if use aro aro panel before closing test panel before closing lexicon panel before closing return true else debug noteln object panel not closing else debug noteln grammar panel not closing else debug noteln action panel not closing else debug noteln domain panel not closing return false
closes all panels of the frame
public void undo set value string field object value if main panel instanceof undo editing undo editing main panel undo set value field value else debug noteln afp got undo set for field field val value debug noteln panel main panel get name cannot undo edit
sets the given field to the given value in the editor
public void revert construct uidomain uid parent get uidomain uid load from domain set uiconstruct uid
user request to revert an action to when it was last saved in
protected boolean current panel changing jpanel old panel jpanel new panel if old panel null return aconstruct frame panel new panel before opening do nothing but make sure the panel is changed to important for cancel if old panel equals new panel return true debug noteln de current panel changing aconstruct frame panel old acfp aconstruct frame panel old panel aconstruct frame panel new acfp aconstruct frame panel new panel if old acfp before closing if new acfp before opening debug noteln de current panel changing done return true debug noteln de cancel current panel changing return false
changing current panel from old to new
public object undo get value string field if main panel instanceof undo editing return undo editing main panel undo get value field else debug noteln afp got undo get for field field return null
gets the given field to the given value in the editor
public void revert oconstruct uidomain uid parent get uidomain uid load from original set uiconstruct uid
user request to revert an action to when it was last saved in
protected void setup editor setup outer panel main panel setup main panel scroll pane get viewport add main panel main panel
sets the panels layout and dimensions and the main panels layout
public void set editable boolean editable debug noteln ide f editor is always editable setting ignored is editable editable
changes the flat that toggles i de viewer only viewer editor mode
public void delete construct get uidomain remove construct get uiconstruct new construct
user request to delete the current action
public void copy construct uiobject ui construct get uiconstruct if ui construct is empty before switching uiobject copy clone construct ui construct if copy null uiutil not implemented this copying this kind of construct else string answer joption pane show input dialog null please enter the new name ui construct get name copy set name answer debug noteln acfp copy is copy print copy save to domain get uidomain add construct copy set uiconstruct panel copy after switching
user request to copy the current action
public void action performed action event ae string command ae get action command debug noteln global domain panel got action command command if frame action performed ae return else if button action performed ae return else debug noteln global frame panel cannot recognise command command
wakes up the action listener with a user action
public void set uiconstruct panel uiobject construct set uiconstruct construct
overwrite this to not call before after switching
public void view changes from original uiobject ui construct get uiconstruct if ui construct null joption pane show message dialog this no construct to check else list changes ui construct collect changes from original if changes null changes size 0 joption pane show message dialog this no changes found else text area frame taf new text area frame changes for ui construct get name for iterator i changes iterator i has next taf append line string i next taf set visible true
user request to view the changes from the original
public void set default sequence boolean new sequence if new sequence sequence return else sequence new sequence
sets the flag to put nodes in sequence true or in parallel false
public void save construct uiobject ui construct note construct set uiconstruct panel ui construct ui construct save to domain
user request to save a construct into the draft domain
public uiobject make new construct return uiobject new uiobject class get uidomain
make a new construct of the panels type
public void revert construct uiobject ui construct get uiconstruct ui construct load from domain current panel set uiconstruct ui construct set uiconstruct panel ui construct
user request to revert an action to when it was last saved in
public void save construct note construct set uiconstruct panel get uiconstruct
save a construct of the panels type into the draft domain
public void revert oconstruct uiobject ui construct get uiconstruct ui construct load from original current panel set uiconstruct ui construct set uiconstruct panel ui construct ui construct save to domain
user request to revert an action to when it was last saved in
public uiobject note construct make sure there is a current construct uiobject ui construct get uiconstruct if ui construct null ui construct uiobject class make new construct form panel save to object ui construct ui construct note change make sure the refinement is noted into the right domain if get uidomain equals ui construct get uidomain ui construct move to uidomain get uidomain get uidomain update construct ui construct debug noteln aep noted construct debug noteln ui construct print set uiconstruct ui construct return ui construct
note the contents of the panel into the current object
public void set construct ixobject object debug noteln acfp setting construct in this uiobject uio get uiconstruct get current one construct editing main panel set construct object uiobject new uio get uiconstruct if uio null uio equals new uio fired in construct editing fire construct changed uio new uio
sets the given construct to be viewed edited
public void make sequence make all current sub nodes sequential try ui construct set orderings make sequence ui construct get nodes this set orderings catch exception e debug note exception e
puts the nodes of the current refinement into sequence
public named get named construct string name if get uidomain null return null object c get uidomain get named object class name if c null c instanceof uiobject return named c else return get uidomain new uiobject ixobject c
get a named construct of the panels type from the domain
public void set list data uirefinement refinement collection data debug noteln dec e setting list data uiutil list to display data var ed remove data load the object constraints into the editor and save them for cancel load object constraints refinement note the values if data null var ed set data refinement data
sets the data in the variable type table
public void make parallel clear orderings
puts the nodes of the current refinement in parallel
public boolean check construct uiutil not implemented this checking object classes return true
check a construct of the panels type for errors and inconsistencies
public uiobject get uiconstruct return construct editing main panel get uiconstruct
looks up the current construct in the main panel
protected void load var type uirefinement uir item var var if var null uir null return debug noteln dec ed loading var type var constraint c ivutil find class constraint var uir get constraints if c null debug noteln type constraint c object type ivutil extract type c uir get uidomain debug noteln type class type get class if type null type to string equals var type map put var type var type constraints put var c
looks up the type constraint of the given var in the given refinement
protected void save var type uirefinement uir item var var if var null return make constraint constraint c get var type constraint var if c null c make type constraint var delete previous constraint checking for var name change item var old var get old var var if old var null uir set type constraint old var null remove set constraint uir set type constraint var c replaces old with same var
saves the var type class in the var type map into the refinement
protected void note var type item var var uiobject class type if var null return if type null type add data change listener this var type map put var type reload var constraints var prop table model set constraints var type get var constraints var prop constraint ed set label property constraints for variable var to string
notes the given type for the given variable in the var type map
public void set uiconstruct panel uiobject object uiobject old get uiconstruct ui construct uiobject class object set the object in the actual panel construct editing form panel set uiconstruct object update tree selection fire current class changed old ui construct done in set uiconstruct only
do we really need this
public void construct added uidomain event event update tree
called when a ui construct is added
public void construct edited uidomain event event update tree
called when a ui construct is edited
protected void load var constraints uirefinement uir item var var uiobject class var type get var type var list vcs uir get variable constraints var hash map prop const map constraints to property var var type vcs debug noteln var constraints uiutil show prop const map get values if vcs null vcs is empty note var constraints var prop const map
loads the constraints of the refinement into the var const map
public void make file menu exits file menu add separator if stand alone exit item show item else close item show item
makes default close exit menu options and and toolbar buttons
protected void reload all var constraints collection vars var const map key set for iterator i vars iterator i has next reload var constraints item var i next
checks applicability of editor constraints and no ob cons for all vars
protected void note var constraints item var var hash map prop consts debug noteln dec ed noting constraints for var var debug noteln prop consts new throwable print stack trace if var null var const map put var prop consts debug noteln var const map now var const map
notes the given constraints for the given variable in the var const map
public void after switching if undo manager null undo manager fire undo change
ensures that displays are updated for new view construct
protected hash map get var constraints item var var if var null return null return hash map var const map get var
looks up the constraints for the given variable in the var const map
protected void note draft construct uiobject uio uio note change make sure the construct is noted into the right domain if get uidomain equals uio get uidomain uio move to uidomain get uidomain get uidomain update construct uio construct editing main panel set uiconstruct only uio debug noteln acfp noted construct debug noteln uio print
note the uiobject in the right draft domain
protected boolean remove constraint constraint c if c null return false return remove constraint ivutil variable from constraint c c
remove the constraint
public void set uiconstruct panel uiobject object uirefinement old ui construct set uiconstruct only object set the object in the actual panel current panel set uiconstruct ui construct fire construct changed old ui construct panel fires this fire current action changed old ui construct
sets the given ui construct in this editor and in the current panel
public void make tools menu tools menu make menu parent menu tools check item show item check item set enabled false tools menu add separator make preferences
makes a tools menu and toolbar buttons
protected boolean remove constraint item var var constraint c if var null return remove constraint var get var type var c else look in all variables find it perhaps assume current var debug noteln dec ed remove constraint no var in c return false
remove the constraint
public void set uiconstruct only uiobject object ui construct uirefinement object update tree selection
sets the given ui construct to be viewed edited without noting the
public void clear uiconstruct ui construct uirefinement make new construct set the object in the actual panel set uiconstruct panel ui construct construct editing graph panel set uiconstruct ui construct construct editing form panel set uiconstruct ui construct
clears the current construct and the panel
public list get vars to offer try uirefinement ui ref uirefinement get uiconstruct return ui ref get variable declarations catch exception e debug describe exception e return null
offers the declared variables if any for completion splices in
private item var get old var item var var return item var old vars get var
not used yet
public void new construct set uiconstruct make new construct
makes a new construct of the panels type and get ready to edit
protected uiobject note construct make sure there is a current construct if ui construct null ui construct uirefinement make new construct current panel save to object ui construct ui construct note change make sure the refinement is noted into the right domain if get uidomain equals ui construct get uidomain ui construct move to uidomain get uidomain get uidomain update construct ui construct debug noteln aep noted construct debug noteln ui construct print return ui construct
note the settings in the editor in a uiobject
private void note no object constraint item var var constraint constr if var null constr null return object note no ob const map get var set no set new hash set if note null note instanceof set no set set note no set add constr no ob const map put var no set
note those variable constraints that do not fit the object system
private boolean reacting action change false public void reacting action change boolean flag reacting action change flag
do not fire change when someone else is making the change
public void delete construct delete construct ixnode get uiconstruct
deletes the construct then sets its parent
protected boolean process constraint debug noteln ce processing constraint object constraint collect constraint if constraint null return false constraint not specified debug noteln ce made constraint constraint handle variables debug noteln original is original object new value note new value constraint if this constraint listeners null return true for int i 0 i this constraint listeners size i jconstraint listener l jconstraint listener this constraint listeners get i l got constraint this this current object new value return true
reads the selected relation and let interested parties know
protected void handle variables if var decs null var decs size 0 debug noteln ce got var decs var decs try uirefinement ui ref uirefinement current object list vars new array list list current decs ui ref get variable declarations if current decs null vars add all current decs if vars null vars new array list for iterator i var decs iterator i has next variable declaration dec variable declaration i next vars add dec ui ref set variable declarations vars var decs clear catch exception e debug note exception e
pass on declared variables to the object specification
public void save construct uiutil not implemented this saving a construct
save a construct of the panels type into the draft domain
public uiobject note construct uiutil not implemented this noting panel changes return null
note the contents of the panel into the current object
public named get named construct string name return null
get a named construct of the panels type from the domain
public boolean check construct uiutil not implemented this checking construct return true
check a construct of the panels type for errors and inconsistencies
public void action performed action event ae string command ae get action command debug noteln sep got action command command
wakes up the action listener with a user action
protected void reset uiconstruct uiobject object if current view equals view minimal mini constraint panel mcp mini constraint panel form panel get field bit mini constraints abstract button last b mcp get last set uiconstruct object form panel set field data mini constraints last b get text else set uiconstruct object
same as set uiconstruct but remembers the setting of the mini constraints
protected void load object constraints uirefinement refinement var const map clear var type map clear var type constraints clear get all variables used set vars refinement get variables used if vars null return no vars so done for each variable for iterator i vars iterator i has next item var var item var i next find out the variable type and constraints and note them all load var type refinement var load var constraints refinement var get the table to note it
gets variable type and property constraints from the given refinement
public boolean check construct try if ui construct null ui construct check consistency return true catch syntax exception se joption pane show message dialog this se get message return false
user request to check the refinement not implemented
public object get cell value at object o int column index return null
gets the cell value for normal cells only one the pattern
public string get name string tree node node debug noteln sattm working in model this ix ttnlist to string nodes ixtntree table node i node ixtntree table node node llist pattern get pattern 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 pattern to string return name string
gets the name string for the given row object
public void action performed action event ae string command ae get action command debug noteln aro editor got action command command if frame action performed ae return else if button action performed ae return else debug noteln aroeditor panel cannot recognise command command
wakes up the action listener with a user action
public ixtree table node make ixtree table node object the node tree node t node ixtree table node ixt node null if the node null t node null else if the node instanceof tree node t node tree node the node else if the node instanceof ixobject t node tree node ui domain get uiobject ixobject the node else t node null if t node null ixt node null else make a new e node using the t node ixt node new ixtntree table node this t node return ixt node
makes an ixtree table node from the given object
public object get cell value at object o int column index ixtntree table node i node ixtntree table node o if column index pattern col llist pattern get pattern i node return uiutil list to display pattern else return null
gets the cell value for normal cells only one the pattern
public string get name string tree node node ixtntree table node i node ixtntree table node node return named i node node get name
gets the name string for the given row object
public void reload data debug noteln ac ttm reload data new throwable print stack trace list constructs ui domain get all refinements debug noteln act ttm refinements uiutil list to display constructs if sort constructs list ivutil sort named collection new array list constructs debug noteln after sort uiutil list to display constructs list data new linked list constructs debug noteln attm as array list uiutil list to display data update data data
looks up all refinements and updates the tree model from
public void reset data reload data
looks up all refinements and builds the tree model from them
public uiobject make new construct return new uirefinement get uidomain
user request to make a new action