input
stringlengths
10
828
output
stringlengths
5
107
private void visit association def association def association def iterator roles association def iterator connection while roles has next role def role role def roles next see transfer from uml metamodel visit role def switch role get aggregation case aggregation kind none out write break case aggregation kind aggregate out write break case aggregation kind composite out write break if role get multiplicity null multiplicity range card multiplicity range role get multiplicity iterator range next out write visit cardinality card if role contains participant classifier class def classifier role get participant out write class ref role get association class def
create sql relationships representing association defs by altering
private void initialize this set title test base frame this set default close operation javax swing jframe exit on close this set size 300 200 this set content pane get jcontent pane
this method initializes this
public string get boolean type return get text type 1
jomm special case
private void check ok get btn ok set enabled package element null ch softenvironment util string utils is null or empty get txt file get text
check wether input fields are ok to proceed further on
private void visit constraint ch ehi uml1 4 foundation core constraint constraint class def class def
create sql constraints such as unique indexes
public boolean get txa editor editable return get txa editor is editable
method generated to support the promotion of the txa editor editable attribute
private void choose file file chooser save dialog new file chooser get txt file get text save dialog set dialog title rsrc get string ctobjcat file selector save dialog add choosable file filter generic file filter create sql filter if save dialog show save dialog this file chooser approve option launcher view get settings set working directory save dialog get current directory get absolute path get txt file set text save dialog get selected file get absolute path check ok
determine output directory for sql schema
private void handle exception java lang throwable exception tracer get instance uncaught exception exception non nls 1
called whenever the part throws an exception
public string get comment on database string schema name string comment if string utils is null or empty comment return comment on database schema name is mask to target comment sql transformation model separator else return null
comment on database my db is my comment for e
protected string get add column string table name string fk attribute string type multiplicity child multiplicity return alter table table name add column fk attribute type multiplicity converter is mandatory child multiplicity sql transformation model not null sql transformation model separator
overwrite for non sql standard alter table table add column
private void initialize try this set size new dimension 586 498 this set content pane get pnl content pane this set title sql reverse engineering this add window listener new java awt event window adapter public void window closing java awt event window event e if server null server close catch java lang throwable e handle exception e
this method initializes this
protected void fire tbb copy action action performed java util event object new event if field tool bar listener event multicaster null return field tool bar listener event multicaster tbb copy action action performed new event
method to support listener events
public boolean has contents changed return has contents changed
check whether contents has changed
private void visit comment string comment if string utils is null or empty comment this comments add comment
add the given comment to the list of all comments
private jpanel get pnl content pane if pnl content pane null try pnl content pane new jpanel pnl content pane set layout new border layout pnl content pane add get pnl target border layout north pnl content pane add get pnl center border layout center pnl content pane add get pnl log border layout south catch java lang throwable e handle exception e return pnl content pane
this method initializes pnl content pane
protected void fire tbb cut action action performed java util event object new event if field tool bar listener event multicaster null return field tool bar listener event multicaster tbb cut action action performed new event
method to support listener events
private jpanel get pnl target if pnl target null try lbl target server new jlabel lbl target server set bounds new rectangle 19 5 130 15 lbl target server set text target server pnl target new jpanel pnl target set layout null pnl target set preferred size new dimension 0 30 pnl target add get btn login target null pnl target add get btn logout target null pnl target add lbl target server null catch java lang throwable e handle exception e return pnl target
this method initializes pnl target
private void initialize this set size new dimension 531 277 this set content pane get pnl content pane this set title java generator
this method initializes this
private jmenu find menu jmenu bar menu bar string name int mc menu bar get menu count for int i 0 i mc i jmenu m menu bar get menu i if m get name equals name return m return null
find a given menu in launcher of uml editor
private jtext field get txt package if txt package null txt package new jtext field txt package set bounds new rectangle 153 23 162 20 txt package set editable false return txt package
this method initializes txt package
private jbutton get btn choose package if btn choose package null btn choose package new jbutton btn choose package set bounds new rectangle 350 25 34 22 btn choose package set text btn choose package add action listener new java awt event action listener public void action performed java awt event action event e choose package return btn choose package
this method initializes btn choose package
protected void fire tbb delete action action performed java util event object new event if field tool bar listener event multicaster null return field tool bar listener event multicaster tbb delete action action performed new event
method to support listener events
private jbutton get btn ok if btn ok null btn ok new jbutton btn ok set bounds new rectangle 168 192 66 31 btn ok set text ok btn ok add action listener new java awt event action listener public void action performed java awt event action event e system out println action performed todo auto generated event stub action performed return btn ok
this method initializes btn ok
private void generate java package selection dialog dialog new package selection dialog launcher view get instance choose package true launcher view get instance get model uml to java gen new uml to java file path gen accept namespace dialog get selected package namespace dialog get selected package get def lang name launcher view get instance log soft environment tools uml to java transformed source code was generated in file path
entry point to start java generator
private void mni copy get txa editor copy
copy selection contents into clipboard
private void generate sql base dialog dialog new sqlgenerator dialog jframe null false dialog show launcher view get instance log soft environment tools uml to sql transformed schema code was generated
entry point to start sql generator
private file name panel get pnl output directory if pnl output directory null pnl output directory new file name panel pnl output directory set bounds new rectangle 184 94 178 29 return pnl output directory
this method initializes pnl output directory
private void analyze sql base dialog dialog new sqlreverse engineer dialog jframe null false dialog show launcher view get instance log soft environment tools sql to uml transformed schema code was reverse engineered
entry point to start sql reverse engineering
private jtext field get txt namespace if txt namespace null txt namespace new jtext field txt namespace set bounds new rectangle 184 140 318 20 return txt namespace
this method initializes txt namespace
private jtext area get txt schema if txt schema null try txt schema new jtext area txt schema set bounds new rectangle 219 20 329 17 txt schema set text txt schema set tool tip text define catalog schema if target allows multi database catch java lang throwable e handle exception e return txt schema
this method initializes txt schema
protected void fire tbb find action action performed java util event object new event if field tool bar listener event multicaster null return field tool bar listener event multicaster tbb find action action performed new event
method to support listener events
private jcheck box get chx jomm if chx jomm null chx jomm new jcheck box chx jomm set bounds new rectangle 301 181 201 21 chx jomm set text jomm persistency objects return chx jomm
this method initializes chx jomm
private void mni cut get txa editor cut set contents changed
cut selection contents into clipboard
private jcheck box get chx table if chx table null try chx table new jcheck box chx table set bounds new rectangle 218 48 110 21 chx table set selected true chx table set enabled false chx table set text table catch java lang throwable e handle exception e return chx table
this method initializes chx table
private void mni delete get txa editor replace selection set contents changed
remove the selected contents
private void initialize this set content pane get jcontent pane this set size 238 170 this set title uml2db
this method initializes this
protected void fire tbb new action action performed java util event object new event if field tool bar listener event multicaster null return field tool bar listener event multicaster tbb new action action performed new event
method to support listener events
private jcheck box get chx view if chx view null try chx view new jcheck box chx view set bounds new rectangle 217 92 51 23 chx view set enabled false chx view set text view catch java lang throwable e handle exception e return chx view
this method initializes chx view
private void mni paste get txa editor paste set contents changed
paste clipboard contents into text area
private simple editor panel get pnl log if pnl log null try pnl log new simple editor panel pnl log set preferred size new dimension 578 230 pnl log set editable false catch java lang throwable e handle exception e return pnl log
this method initializes pnl log
private int ind 0 public int get ind return ind
current indentation level
private void shuffle drop string preceding table string other table todo move method to list utils todo correctness of algorithm not yet perfect string stmt tm get drop table preceding table drops remove stmt int index drops index of tm get drop table other table if index 1 drops add stmt else drops add index stmt
make sure preceding table will be droped before other table
protected void fire tbb open action action performed java util event object new event if field tool bar listener event multicaster null return field tool bar listener event multicaster tbb open action action performed new event
method to support listener events
private jbutton get btn logout target if btn logout target null try btn logout target new jbutton btn logout target set bounds new rectangle 364 1 129 23 btn logout target set enabled false btn logout target set text logout btn logout target add action listener new java awt event action listener public void action performed java awt event action event e if server null server close server null btn login target set enabled true btn logout target set enabled false check ok catch java lang throwable e handle exception e return btn logout target
this method initializes btn logout target
protected void fire tbb paste action action performed java util event object new event if field tool bar listener event multicaster null return field tool bar listener event multicaster tbb paste action action performed new event
method to support listener events
private jtext field get txt package if txt package null try txt package new jtext field txt package set bounds new rectangle 222 119 290 20 txt package set editable false txt package set name txt package catch java lang throwable e handle exception e return txt package
this method initializes txt package
protected void fire tbb print action action performed java util event object new event if field tool bar listener event multicaster null return field tool bar listener event multicaster tbb print action action performed new event
method to support listener events
protected void fire tbb redo action action performed java util event object new event if field tool bar listener event multicaster null return field tool bar listener event multicaster tbb redo action action performed new event
method to support listener events
protected void fire tbb save action action performed java util event object new event if field tool bar listener event multicaster null return field tool bar listener event multicaster tbb save action action performed new event
method to support listener events
private jcombo box get cbx product if cbx product null cbx product new jcombo box cbx product set bounds new rectangle 602 37 192 25 return cbx product
this method initializes cbx product
private jcheck box get chx relation if chx relation null try chx relation new jcheck box chx relation set bounds new rectangle 216 71 144 23 chx relation set text asscociation chx relation set enabled false chx relation set selected true catch java lang throwable e handle exception e return chx relation
this method initializes chx relation
protected void fire tbb undo action action performed java util event object new event if field tool bar listener event multicaster null return field tool bar listener event multicaster tbb undo action action performed new event
method to support listener events
private jradio button get rbt jomm if rbt jomm null rbt jomm new jradio button rbt jomm set bounds new rectangle 193 191 99 21 rbt jomm set selected true rbt jomm set text jomm rbt jomm add item listener new java awt event item listener public void item state changed java awt event item event e set tech fields return rbt jomm
this method initializes rbt jomm
public object get first if browser is scroll first allowed browser get first else throw new index out of bounds exception no first object return get current object
return the first of all objects
public object get last if browser is scroll last allowed browser get last else throw new index out of bounds exception no last object return get current object
return the last of all objects
private jradio button get rbt other if rbt other null rbt other new jradio button rbt other set bounds new rectangle 299 192 200 21 rbt other set enabled false rbt other set text andere rbt other add item listener new java awt event item listener public void item state changed java awt event item event e set tech fields return rbt other
this method initializes rbt other
public object get next if browser is scroll next allowed browser get next else throw new index out of bounds exception no next object return get current object
set next object as current object
private jtext field get txt version if txt version null try txt version new jtext field txt version set bounds new rectangle 202 337 124 20 txt version set name txt user id txt version set tool tip text vorschlag des feldnamens txt version set text t version txt version set enabled true catch java lang throwable e todo something return txt version
this method initializes txt version
private string linecmt return
get start of a line comment
public object get previous if browser is scroll previous allowed browser get previous else throw new index out of bounds exception no previous object return get current object
set previous object as current object
private jtext field get txt inheritance type if txt inheritance type null try txt inheritance type new jtext field txt inheritance type set bounds new rectangle 501 250 127 20 txt inheritance type set name txt user id txt inheritance type set tool tip text vorschlag des feldnamens txt inheritance type set text t type txt inheritance type set enabled true catch java lang throwable e todo something return txt inheritance type
this method initializes txt inheritance type
private jcheck box get chx identity if chx identity null try chx identity new jcheck box chx identity set bounds new rectangle 377 224 160 21 chx identity set text identity auto increment catch java lang throwable e todo something return chx identity
this method initializes chx identity
public boolean get tbb copy enabled return get tbb copy is enabled
method generated to support the promotion of the tbb copy enabled attribute
public boolean get tbb cut enabled return get tbb cut is enabled
method generated to support the promotion of the tbb cut enabled attribute
public boolean get tbb delete enabled return get tbb remove enabled
method generated to support the promotion of the tbb delete enabled attribute
public boolean get tbb find enabled return get tbb find is enabled
method generated to support the promotion of the tbb find enabled attribute
public boolean get tbb new enabled return get tbb new is enabled
method generated to support the promotion of the tbb new enabled attribute
private string get java func name string name string buffer ret new string buffer name ret set char at 0 character to upper case ret char at 0 return ret to string
gets the function name according to java conventions
public boolean get tbb open enabled return get tbb change enabled
method generated to support the promotion of the tbb open enabled attribute
private string get java class name string name string buffer ret new string buffer name ret set char at 0 character to upper case ret char at 0 return ret to string
gets the class name according to java conventions
private string get java bean prop name string name string buffer ret new string buffer name ret set char at 0 character to lower case ret char at 0 return ret to string
gets the bean property name according to java conventions
public boolean get tbb paste enabled return get tbb paste is enabled
method generated to support the promotion of the tbb paste enabled attribute
public boolean get tbb print enabled return get tbb print is enabled
method generated to support the promotion of the tbb print enabled attribute
private string get java arg name string name string buffer ret new string buffer name ret set char at 0 character to lower case ret char at 0 return ret to string
gets the formal argument name according to java conventions
public boolean get tbb redo enabled return get tbb redo is enabled
method generated to support the promotion of the tbb redo enabled attribute
private string get java name model element ele string name ele get def lang name remove illegal characters string buffer ret new string buffer name length for int i 0 i name length i char c name char at i if c continue ret append c if ret to string equals abstract ret to string equals abstract return aabstract if ret to string equals class ret to string equals class return aclass if ret to string equals descriptor ret to string equals descriptor return adescriptor return ret to string
gets the java name of a model element
public boolean get tbb save enabled return get tbb save is enabled
method generated to support the promotion of the tbb save enabled attribute
public boolean get tbb undo enabled return get tbb undo is enabled
method generated to support the promotion of the tbb undo enabled attribute
private void handle exception java lang throwable exception base dialog show error this null exception to string exception ch softenvironment util tracer get instance uncaught exception exception non nls 1
called whenever the part throws an exception
public void set items java util vector items get cbx items set visible items null items size 0 get cbx items set model new javax swing default combo box model items
show a list of inconsistencies in a combo box
public void set objects java util list objects browser set objects objects if objects null objects size 1 suppress browsing completely get tbb first set visible false get tbb previous set visible false get tbb next set visible false get tbb last set visible false get lbl selector set visible false else get tbb first set visible true get tbb previous set visible true get tbb next set visible true get tbb last set visible true get lbl selector set visible true
set the list of objects to handle scroll by toolbar
public void set tbb copy enabled boolean arg1 get tbb copy set enabled arg1
method generated to support the promotion of the tbb copy enabled attribute
public void set tbb cut enabled boolean arg1 get tbb cut set enabled arg1
method generated to support the promotion of the tbb cut enabled attribute
public void set tbb delete enabled boolean arg1 set tbb remove enabled arg1
method generated to support the promotion of the tbb delete enabled attribute
public void set tbb remove enabled boolean enabled get tbb delete set enabled enabled
set status of button remove
public void set tbb find enabled boolean arg1 get tbb find set enabled arg1
method generated to support the promotion of the tbb find enabled attribute
public long get minimum return min
returns the minimum possible number of instances considered
public long get maximum return max
returns the maximum possible number of instances considered
public void set tbb new enabled boolean arg1 get tbb new set enabled arg1
method generated to support the promotion of the tbb new enabled attribute
public string to string if min 0 max unbound return 0 else if min max return make string min else return make string min make string max
creates a string object designating this cardinality
public void set tbb open enabled boolean arg1 set tbb change enabled arg1
method generated to support the promotion of the tbb open enabled attribute
public void set tbb change enabled boolean enabled get tbb open set enabled enabled
set status of button change
public void set tbb paste enabled boolean arg1 get tbb paste set enabled arg1
method generated to support the promotion of the tbb paste enabled attribute
public formal argument get argument string name for int argi 0 argi arguments length argi if arguments argi get name equals name return arguments argi return null
finds a formal argument
public void set tbb print enabled boolean arg1 get tbb print set enabled arg1
method generated to support the promotion of the tbb print enabled attribute
public boolean is abstract for int i 0 i dimensions length i if dimensions i is abstract return true return false
an abstract type is one that does describe sufficiently
public void set tbb redo enabled boolean arg1 get tbb redo set enabled arg1
method generated to support the promotion of the tbb redo enabled attribute
public void set extended boolean extended if is alias table get real set extended extended return else this extended extended
to distinguish between extends and extended
public boolean is extending element extendee if is alias return extendable container get real is extending extendee else for extendable container parent this parent null parent parent extending if parent extendee return true return false
determines whether or not code this code is extending
public void set tbb save enabled boolean arg1 get tbb save set enabled arg1
method generated to support the promotion of the tbb save enabled attribute