input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public string read field descriptor char buffer buffer return read field type buffer | reads a field descriptor from code buffer code and sets buffers current |
public string read field type signature char buffer buffer switch buffer char at 0 case l return read class type signature buffer case return read array type signature buffer case t return read type variable signature buffer default return | reads a field type signature from code buffer code and sets buffers |
public void set is class boolean is class this is class is class | sets whether this represent a class |
private void ignore field data input in throws ioexception in read int attribute reader ignore attributes in | helper function which reads field info data ignoring it |
protected string read component type char buffer buffer return read field type buffer | reads a component type from code buffer code and sets buffers current |
public void ignore attributes data input in throws ioexception int attributes count in read unsigned short for int i 0 i attributes count i in read unsigned short int max in read int for int j 0 j max j in read byte | reads through attribute info structures ignoring them |
public int read signature index data input in object pool throws ioexception int signature index 1 int attributes count in read unsigned short for int i 0 i attributes count i int idx in read unsigned short boolean signature pool idx null pool idx instanceof string pool idx equals signature if signature in read int signature index in read unsigned short else int max in read int for int j 0 j max j in read byte return signature index | reads attributes info and returns an index into the constant pool at |
protected string read base type char buffer buffer char c buffer get switch c case b return byte case c return char case d return double case f return float case i return int case j return long case s return string case z return boolean default return | reads a base type from code buffer code and sets buffers current |
public int get height return line height strings size | returns total height of all lines of text |
protected string read array type char buffer buffer the first character must be if buffer get return return read component type buffer | reads an array type from code buffer code and sets buffers current |
public void add string string str strings add str | adds specified string to list of strings displayed by this object |
public void draw at graphics g int x int y g set font font g set color color black int count 0 iterator string it strings iterator while it has next g draw string it next x padding y count line height ascent count | draws all strings one per line |
protected string read type signature char buffer buffer char c buffer char at 0 if c l c c t return read field type signature buffer else return descriptor reader read base type buffer | reads a type signature from code buffer code and sets buffers current |
public void draw centered at graphics g int x int y int width font metrics fm g set font font g set color color black int count 0 iterator string it strings iterator while it has next string str it next g draw string str width fm string width str 2 y count line height ascent count | draws all strings one per line |
protected string read object type char buffer buffer the first character must be l if buffer get l return start from 0 because char at takes index relative to current position and now char at 0 is char right after l int i 0 while buffer char at i i char tab new char i buffer get tab buffer get read string str new string tab return str replace | reads an object type from code buffer code and sets buffers current |
public void set is enum boolean is enum this is enum is enum | sets whether this represent an enum |
protected string read field type char buffer buffer char c buffer char at 0 switch c case l return read object type buffer case return read array type buffer default return read base type buffer | reads a field type from code buffer code and sets buffers current |
public void add vector2 d v x v get x y v get y | increases coordinates of this vector by coordinates of vector code v |
protected string read void descriptor char buffer buffer buffer get read a v return void | reads a void descriptor from code buffer code and sets buffers current |
public point to point return new point int x int y | returns a point which has the same coordinates as this vector rounded |
protected string read array type signature char buffer buffer if buffer get return return read type signature buffer | reads an array type signature from code buffer code and sets buffers |
public void mouse dragged mouse event e if c is enabled return int old x c get x int old y c get y c set location math max 0 math min c get parent get width c get width c get x e get x click x math max 0 math min c get parent get height c get height c get y e get y click y c get parent set component zorder c 0 | invoked when a mouse button is pressed on a component and then |
protected string read return descriptor char buffer buffer char c buffer char at 0 switch c case v return read void descriptor buffer default return read field type buffer | reads return descriptor from code buffer code and sets buffers current |
public void mouse released mouse event e c remove mouse motion listener this | invoked when a mouse button has been released on a component |
public void mouse pressed mouse event e if e get button e button1 c is enabled click x e get x click y e get y c add mouse motion listener this | invoked when a mouse button has been pressed on a component |
protected string read parameter descriptor char buffer buffer return read field type buffer | reads a parameter descriptor from code buffer code and sets buffers current |
public void set is partial boolean is partial this is partial is partial | sets whether this represent a partial definition of a class |
protected string read wildcard indicator char buffer buffer char c buffer get if c return extends else if c return super else return | reads a wildcard indicator from code buffer code and sets buffers |
public void add row unit info unit super add row new object unit get simple name unit get simple name contains | adds specified unit info to the table |
public void merge unit info arg throws illegal argument exception unsupported operation exception if this is partial throw new unsupported operation exception if arg is partial this name equals arg get name throw new illegal argument exception methods add all arg get methods fields add all arg get fields enum values add all arg get enum values | merges two partial class definitions into one |
private void set tree selected check tree node root boolean selected root set selected selected if root is leaf for int i 0 i root get child count i check tree node node check tree node root get child at i selection is propagated only to those nodes which don t have character in their name deselection is always propagated if selected node get user object to string contains set tree selected node selected | sets selection state of given node to specified value and propagates its |
public void update observable o object arg if o controller arg instanceof object object tab object arg if integer tab 0 controller names result set bgthread working false | enables button on this panel when controller finishes processing files |
private void set bgthread working final boolean b java awt event queue invoke later new runnable public void run save progress bar set visible b previous button set enabled b save image button set enabled b graph panel set enabled b for component comp graph panel get components comp set enabled b | enables and disable graphical components on this panel when the |
private void set bgthread working final boolean b java awt event queue invoke later new runnable public void run j progress bar set visible b add button set enabled b remove button set enabled b next button set enabled b | enables and disables graphical components on this panel when the |
protected string read type argument char buffer buffer string result char c buffer char at 0 if c buffer get don t forget about setting buffer s current position return if c c result read wildcard indicator buffer return result read field type signature buffer | reads a type argument from code buffer code and sets buffers current |
public void update observable o object arg if o controller arg instanceof object object tab object arg if integer tab 0 controller graph result set bgthread working false if integer tab 0 controller units result set as selected units collection unit info tab 1 | enables button on this panel when controller finishes processing |
protected string read type arguments char buffer buffer if buffer get return string builder builder new string builder builder append builder append read type argument buffer there is always at least one while buffer char at 0 builder append builder append read type argument buffer buffer get read to leave correct buffer s current position builder append return builder to string | reads type arguments from code buffer code and sets buffers current |
private void load settings file file new file settings file name if file exists object input stream in null try in new object input stream new file input stream file object obj in read object if obj instanceof construction hints init from hints construction hints obj catch ioexception ex ex print stack trace catch class not found exception ex ex print stack trace finally if in null try in close catch ioexception ex ex print stack trace | loads a construction hints object from file |
private void set as selected java awt event queue invoke later new runnable public void run jtabbed pane parent jtabbed pane get parent parent set selected component self | sets this panel as active tabbed pane |
protected string read identifier char buffer buffer int i 0 while identifier terminating char contains buffer char at i i char tab new char i buffer get tab return new string tab | reads an identifier from code buffer code and sets buffers current |
private preview panel self return this | helper method for inner class |
protected string read type variable signature char buffer buffer if buffer get t return string result read identifier buffer buffer get read a to leave correct buffer s current position return result | reads a type variable signature from code buffer code and sets buffers |
private settings panel self return this | helper function for inner class |
protected string read simple class type signature char buffer buffer string result read identifier buffer if buffer char at 0 result read type arguments buffer return result | reads a simple class type signature from code buffer code and sets |
private void save settings construction hints hints object output stream out null try out new object output stream new file output stream settings file name out write object hints catch ioexception ex ex print stack trace finally if out null try out close catch ioexception ex ex print stack trace | saves a construction hints object to file |
protected string read class type signature suffix char buffer buffer if buffer get return dots in signatures must be converted to characters the class file format 4 4 4 signatures return read simple class type signature buffer | reads a class type signature suffix from code buffer code and sets |
private void set tree selected check tree node root boolean selected root set selected selected if root is leaf for int i 0 i root get child count i set tree selected check tree node root get child at i selected | sets selection state of given node to specified value and propagates its |
public void update observable o object arg if o controller arg instanceof object object tab object arg int n integer tab 0 if n controller graph result set graph graph tab 1 set as selected else if o controller arg instanceof integer if integer arg controller save result set bgthread working false | retrieves graph representing uml diagram from the controller when it |
public font get selected font return preview label get font | returns font selected by the user in this dialog |
public boolean is font chosen return font chosen | returns true if the user has selected a font false |
private void set bgthread working final boolean b java awt event queue invoke later new runnable public void run j progress bar set visible b previous button set enabled b font button set enabled b color button set enabled b next button set enabled b | enables and disable graphical components on this panel when the |
protected string read superinterface signature char buffer buffer return read class type signature buffer | reads a superinterface signature from code buffer code and sets |
public void update observable o object arg if o controller arg instanceof object object tab object arg int n integer tab 0 if n controller names result init check tree collection string tab 1 set as selected else if n controller units result set bgthread working false | retrieves unit infos from controller when it reads them from files |
protected string read superclass signature char buffer buffer return read class type signature buffer | reads a superclass signature from code buffer code and sets buffers |
protected string read interface bound char buffer buffer if buffer get return return read field type signature buffer | reads an interface bound from code buffer code and sets buffers |
private void set bgthread working final boolean b java awt event queue invoke later new runnable public void run j progress bar1 set visible b next button set enabled b previous button set enabled b | enables and disable graphical components on this panel when the |
protected string read class bound char buffer buffer if buffer get return return read field type signature buffer | reads a class bound from code buffer code and sets buffers current |
private units panel self return this | helper method for inner class |
protected string read formal type parameter char buffer buffer string builder builder new string builder builder append read identifier buffer builder append builder append read class bound buffer while buffer char at 0 builder append builder append read interface bound buffer return builder to string | reads a formal type parameter from code buffer code and sets buffers |
protected string read formal type parameters char buffer buffer if buffer get return string builder builder new string builder builder append read formal type parameter buffer while buffer char at 0 builder append builder append read formal type parameter buffer buffer get builder append return builder to string | reads formal type parameters from code buffer code and sets buffers |
public string read class signature char buffer buffer string builder builder new string builder if buffer char at 0 builder append read formal type parameters buffer builder append builder append read superclass signature buffer while buffer char at 0 l builder append builder append read superinterface signature buffer return builder to string | reads a class signature from code buffer code and sets buffers current |
public void process files collection string file paths jprogress bar progress process files file paths null progress | gets definitions of classes interfaces enums from given files |
protected string read return type char buffer buffer if buffer char at 0 v return descriptor reader read void descriptor buffer else return read type signature buffer | reads a return type from code buffer code and sets buffers current |
public void save image component comp string file path final jprogress bar progress swing worker worker new image worker comp file path worker add property change listener new property change listener public void property change property change event evt string name evt get property name if name equals progress progress data data progress data evt get new value set progress progress int data get progress saving else if name equals state evt get new value state value done set changed notify observers controller save result clear changed worker execute | saves contents of component comp to file file path |
protected string read throws signature char buffer buffer if buffer get return if buffer char at 0 l return read class type signature buffer else return read type variable signature buffer | reads a throws signature from code buffer code and sets buffers |
protected void update size string str int w fm string width str if w max str width max str width w set size max str width 2 node component padding get height fm get height | updates size of node after adding given string |
public void add to name string str update size str section 0 add string str | add specified string to name section |
public void add to enum string str update size str section 1 add string str | add specified string to enum section |
public void add to field string str update size str section 2 add string str | add specified string to fields section |
public void add to method string str update size str section 3 add string str | add specified string to methods section |
private void set progress final jprogress bar progress final int value final string str if progress null return java awt event queue invoke later new runnable public void run progress set value value if str null progress set string str | helper function which displays progress of an operation ordered by |
public node component get from return from | returns the tail node of this edge |
public void set from node component from if this from null this from remove component listener this this from from from add component listener this | sets the tail node of this edge |
public node component get to return to | returns the head node of this edge |
public int compare node component o1 node component o2 if o1 get x o2 get x o1 get y o2 get y return 0 if o1 get x o2 get x o1 get x o2 get x o1 get y o2 get y return 1 else return 1 | compares its two arguments for order |
public void set to node component to if this to null this to remove component listener this this to to this to add component listener this | sets the head node of this edge |
public point get middle return new point get x get width 2 get y get height 2 | returns coordinates of point in the middle of this node |
public edge type get type return type | returns the type of relation between nodes |
public point get top middle return new point get x get width 2 get y point padding | returns coordinates of point in the middle of top edge of this node |
public void set type edge type type this type type | sets the type of relation between nodes |
public point get bottom middle return new point get x get width 2 get y get height point padding | returns coordinates of point in the middle of bottom edge of this node |
public point get left middle return new point get x point padding get y get height 2 | returns coordinates of point in the middle of left edge of this node |
public point get right middle return new point get x get width point padding get y get height 2 | returns coordinates of point in the middle of right edge of this node |
public void set unit name string name this unit name name | sets qualified name of class interface enum represented by this node |
public void component resized component event e update | invoked when the components size changes |
public void add edge edge component edge edges add edge edge get to get in edges add edge | adds a new edge that starts in this node |
public void component moved component event e update | invoked when the components position changes |
public void add to name string str update size str name section add string str info add to name str | adds general information to name section of this node and its helper |
public int get width int result 0 for node component node nodes int x node get x node get width if x result result x return result | returns width of this graph |
public int get height int result 0 for node component node nodes int y node get y node get height if y result result y return result | returns height of this graph |
public void add to enum string str info add to enum str | add specified string to enum section of helper basic node component |
protected graph do in background throws exception constructor add observer this return constructor construct units g hints | creates a graph f classes interfaces emums and relationships between them |
public void add to field string str info add to field str | add specified string to fields section of helper basic node component |
public void update observable observable object object if observable constructor notify count fire property change count notify count notify count 1 fire property change progress null object | called when underlying graph constructor creates a node or chooses |
public void add to method string str info add to method str | add specified string to methods section of helper basic node component |
public node component create graphics g construction hints hints string name hints get node name if name equals info node component return new info node component g get font metrics hints get font hints get back color true else if name equals basic node component return new basic node component g get font metrics hints get font hints get back color true else return new basic node component g get font metrics hints get font hints get back color true | returns requested subtype of node component |
public graph layout get layout string name graph layout layout layouts get name if layout null return default layout else return layout | returns requested graph layout |
protected void layout collection connected component components int nodes count 0 laidout count 0 for connected component comp components nodes count comp get nodes size for connected component comp components layout layout comp laidout count comp get nodes size set changed notify observers new progress data 100 0 laidout count nodes count clear changed | lays out code components code using force based layout algorithm |
private void add to component connected component component node component node if component get nodes contains node return component add node node for edge component e node get in edges add to component component e get from for edge component e node get out edges add to component component e get to | adds code node code and all nodes which are conntected with it to |
private connected component create component node component node connected component result new connected component padding add to component result node return result | creates a connected component which contains node code node code and |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.