input
stringlengths
10
828
output
stringlengths
5
107
public void write new file from method long begin offset long old end offset string file name extended text area eta boolean new method string indent string for int i 0 i how much times indent i indent string which type of indent this insert string into file begin offset old end offset file name eta get text indent string new method
writes the method into the file
public void tree list left selected text area get document remove undoable edit listener undo el bottom shows nothing selected method null this show methods this update frame title text area set editable false this update line number this update indent label text area get document add undoable edit listener undo el undo vector remove all elements m edit undo set enabled false am idirty false
the left tree list was selected
private void init commands first cmd current cmd new clear command add command new change dir command add command new exit command add command new file command add command new home command add command new http command add command new help command add command new list command add command new pwd command add command new run command
description of the method
public void run try buffered reader in new buffered reader new input stream reader process get input stream string line while line in read line null output line in close int exit code process wait for object args process name new integer exit code append n system get property application language dictionary console exited args info color thread sleep 500 process destroy process name null process null display prompt catch ioexception io catch interrupted exception ie catch null pointer exception npe
main processing method for the stdout thread object
public void run try if process null return buffered reader in new buffered reader new input stream reader process get error stream string line while line in read line null append n line error color in close catch ioexception io catch null pointer exception npe
main processing method for the stderr thread object
public void save browser variables to stream buffered writer b w try if selected class null b w write string default mutable tree node left get selection path get last path component get user object else b w write b w new line if selected method null b w write selected method get title else b w write b w new line b w write end of browser b w new line catch ioexception e
generic browser typical variables are saved to a buffered writer
public void update line number if bottom shows equals class selected class null line no label set text string value of text area get caret line selected class get begin line else if bottom shows equals method selected method null line no label set text string value of text area get caret line selected method get begin line else if bottom shows equals nothing line no label set text 0
shows the actual linenumber of the file
public void update frame title
overwritten by subclass
public boolean dirty stuff right if am idirty int result joption pane show confirm dialog this system get property application language dictionary it is dirty do you want to save it joption pane yes no cancel option if result joption pane yes option this save text return true else if result joption pane no option am idirty false return true else am idirty false right set selected index actual selected index right am idirty true return false else return true
look for some dirty stuff in the right list
public void write new file from class long begin offset long old end offset string file name extended text area eta boolean new class this insert string into file begin offset old end offset file name eta get text new class
description of the method
public void open file in editor if text area is editable return exe command exe c new exe command application get preference default editor selected class get file name null true null
ctrl f12 launch the default editor with actual file
public string remove package name from title string title if title last index of 1 return title substring title last index of 1 title length else return title
description of the method
public void apply pretty printer on current editor string belongs to if dirty stuff this show class in bottom jooda pretty printer jpp new jooda pretty printer text area jpp pretty print current window
description of the method
private void add window adapter add window listener new window adapter description of the method param event description of parameter public void window closing window event event close frame
adds a feature to the window adapter attribute of the ideproject browser
public void set languages string language string parameters set new parameter language prefix language string
set the comma seperated list of preferred languages
public void set languages list string languages if null languages return string language string for string language languages language string language if languages size 1 strip last language string language string substring language string last index of set languages language string
set the list of preferred languages
private void init attributes for default attribute default attribute default attribute values this attribute service save attribute default attribute get name default attribute get description default attribute get uri
initialize the default e id attributes
private string get unique id string user id rpentity rp string unique id user id byte hmac secret get identifier secret rp if null hmac secret mac mac try mac crypto util get mac hmac secret catch invalid key exception e throw new runtime exception invalid key e mac update unique id get bytes byte result hmac mac do final unique id new string hex encode hex result hmac to upper case return unique id
optionally encrypt the user id
public void set logging boolean logging if logging register soap handler new logging soap handler else remove soap handler logging soap handler class
enables disables logging of all soap requests responses
public void set proxy string location string proxy host int proxy port string hostname try hostname new url location get host catch malformed urlexception e throw new runtime exception url error e get message e if null proxy host log debug removing proxy for hostname this proxies remove hostname else log debug setting proxy for hostname this proxies put hostname new proxy proxy type http new inet socket address proxy host proxy port
sets the proxy for a certain location url
public void set proxy string proxy host int proxy port artifact service client proxy selector set proxy this location proxy host proxy port
proxy configuration setting both http as https
public void set active identity string name throws key store load exception log debug set active identity name id pidentity config id pidentity config find identity config name if null id pidentity config throw new key store load exception identity config name not found this configuration set value config property active identity name this identity load identity id pidentity config this identity config id pidentity config log debug private key entry reloaded
set new active identity
public void reload identity throws key store load exception id pidentity config id pidentity config find identity config find active identity name this identity load identity id pidentity config this identity config id pidentity config log debug private key entry reloaded
reload current active identity
public id pidentity load identity string name throws key store load exception id pidentity config id pidentity config find identity config name return load identity id pidentity config
load identity keystore with specified name
public void remove identity config string name log debug remove identity name string active identity find active identity name if null active identity active identity equals name this configuration remove value config property active identity this identity null this configuration remove value config property key store type name this configuration remove value config property key store path name this configuration remove value config property key store secret name this configuration remove value config property key entry secret name this configuration remove value config property key entry alias name
remove identity configuration
public object get selected item object value selection index holder get value return value
returns the selected object
public void set selected item object new selection object if old selection object new selection object return old selection object new selection object selection index holder set value new selection object fire contents changed this 1 1
sets a new selected object
public void property change property change event evt object values values holder get value int size get size if size last size fire contents changed this min max else if size last size fire contents changed this min max else fire contents changed this min max last size size
the selection index has been changed
public void property change property change event evt fire table structure changed
the selection index has been changed
protected void log string message log debug message
log a message to the writer that has been configured for our use
protected void log string message throwable throwable log debug message throwable
log a message and exception to the writer that has been configured
public double get answer return answer
method used to retrieve the answer for the model
public double get first operand return value1
method to retrieve the first operand
public double get second operand return value2
method to retrieve the second operand
public void set first operand double value value1 value
method to set the first operand
public void set second operand double value value2 value
method to set the second operand
public void set operator short op if op no op op subtract operator no op else operator op
method to set the operator
public void set answer double answer this answer answer
method used to set the answer for the model
public boolean is members return is p2 p
method to check to see if the skill is members only or not
public url get url if url null try return url to url catch malformed urlexception ex safe to ignore return null
method to retrieve the code url code of the link
public string get server return smtp server
method used to retrieve the smtp server name
public int get port return smtp port
method to retrieve the port number of the smtp server
public void set tasks skill model group group list skill model task tasks task map put group tasks
method to set a list of tasks for a particular skill group
public void set url url url try this url url to uri catch urisyntax exception ex this url null
method to set the code url code of the link
public string get player name return this player name
method used to retrieve the runescape players name
public string get reply to address return reply to address
method to retrieve the i reply to i address for the email sender
public void set skill string name int rank short level long xp try boolean is p2 p free skills contains name high score model skill skill detail new high score model skill name rank level xp is p2 p add the skill to our map skills put name skill detail catch number format exception ex log error error while setting the skill name ex
method used to set a particular skill for this runescape player
public boolean use authentication return use authentication
method used to retrieve the flag indicating whether or not the smtp
private long get combat xp long total get skill constants attack get xp total get skill constants strength get xp total get skill constants defence get xp total get skill constants hitpoints get xp total get skill constants prayer get xp return total
method to calculate the combat experience points of the player
public void set server string name smtp server name
method used to set the smtp server name
public void set port int port smtp port port
method to set the port number of the smtp server
public void set email address string email email address email
method to set the email address used for sending emails
public void set reply to address string email reply to address email
method to set the i reply to i address for the email sender
public string get rank str number format formatter number format get instance return rank 0 formatter format rank
method used to return a code string code representation of the
public void set use authentication boolean flag use authentication flag
method used to set the flag indicating whether or not the smtp server
public void set username string name username name
method to set the username used to authenticate against the smtp server
public double get level return level
method to return the level in the skill
public void set use ssl boolean flag this use ssl flag
method used to set the flag indicating whether or not the smtp server
public string get level str number format formatter number format get instance formatter set minimum fraction digits 0 formatter set maximum fraction digits 2 return level 0 formatter format level
method used to return a code string code representation of the
public long get xp return xp
method to retrieve the xp for the skill
public string get xpstr number format formatter number format get instance return xp 0 formatter format xp 0
method used to return a code string code representation of the
public float get xp return xp
method to retrieve the xp earned for successfully completing the
public short get player count return this count
method used to retrieve the player count of the world
public int get bottom divider position return bottom divider position
method to get the bottom splitter position for the
public short get start level return start level
method to retrieve the initial starting level of the skill
public short get target level return target level
method to retrieve the target level of the skill
public string get count str number format formatter number format get instance return formatter format count
method to retrieve a localized code string code representation of
public short get points return points
method to retrieve the number of quest points earned after completing the
public email model get email model return email model
method to retrieve the code email model code used for emailing image
public string get image save directory return images dir
method to retrieve the name of the base directory where to save image
public string get default player name return default player
method to retrieve the runescape player name used in the player
public filter model get default quest filter return default quest filter
method to retrieve the default code filter model code to use for
public skin model get default skin return default skin
method to retrieve the default skin used by metis
public boolean get enable timer sound return enable timer sound
method used to retrieve the flag indicating if a sound should be played
public point get frame position return frame position
method used to retrieve the last known position of the metis window on
private void init components set light weight popup enabled false close tab menu item new jmenu item rb get string close lbl add close tab menu item
helper method used to initialize the ui components
private void init listeners close tab menu item add action listener new action listener public void action performed action event e if close idx 1 close the tab tabbed pane remove tab at close idx close idx 1 add the mouse listener to the jtabbed pane tabbed pane add mouse listener new mouse adapter public void mouse pressed mouse event e maybe show popup e public void mouse released mouse event e maybe show popup e
helper method used to initialize the listeners for the ui components
public dimension get frame size return frame size
method used to retrieve the size of the main metis window
private void maybe show popup mouse event e close idx tabbed pane index at location e get x e get y if e is popup trigger close idx 1 if ignored tabs contains close idx show tabbed pane e get x e get y
helper method to show the popup menu if right clicked on a tab
public void set time int mins int secs this mins mins this secs secs
method used to set the initial time for this timmer
public string get imageshack pin return imageshack pin
method used to retrieve the pin for a
protected void cancel pressed
method called when the cancel button is pressed
protected void ok pressed
method called when the ok button is pressed
public boolean get mute loading music return mute loading music
method for retrieving the flag indicating whether or not the loading
protected void init components get content pane set layout new border layout setup the button panel button panel new jpanel cancel button new jbutton rb get string cancel ok button new jbutton rb get string ok button panel set layout new flow layout flow layout right 1 1 button panel add ok button button panel add cancel button get content pane add button panel border layout south
method to create and initialize all the swing components
protected void init listeners cancel button add action listener new action listener public void action performed action event e cancel pressed is cancelled true set visible false dispose ok button add action listener new action listener public void action performed action event e ok pressed is cancelled false set visible false dispose
method to create and add the various listeners for the swing components
private void init components set light weight popup enabled false edit link menu item new jmenu item rb get string edit lbl delete link menu item new jmenu item rb get string delete lbl add edit link menu item add delete link menu item
helper method used to initialize the ui components
private void init components string notes set layout new border layout notes area new jtext area notes 50 60 save button new jbutton rb get string save lbl jscroll pane scroll pane new jscroll pane notes area jscroll pane vertical scrollbar always jscroll pane horizontal scrollbar never jpanel button panel new jpanel button panel set layout new flow layout flow layout right 2 2 button panel add save button add scroll pane border layout center add button panel border layout south
helper method used to initialize the swing gui components
private void init listeners save button add action listener new action listener public void action performed action event e save notes
helper method used to initialize the listeners for the components
public string get photobucket pin return photobucket pin
method to retrieve the pin for a
public boolean get prompt on exit return prompt on exit
method to retrieve the flag indicating whether or not to prompt the user
private void init components set layout new border layout cards new jpanel cards set layout new card layout server panel new ircbase panel this tabbed pane new irctabbed pane jtabbed pane top jtabbed pane scroll tab layout tabbed pane add rb get string server tab lbl server panel add a tab popup menu but keep the server tab safe tab popup menu add tab popup menu tabbed pane 0 add the cards to our card layout cards add new ircconnection panel this connectionpanel cards add tabbed pane clientpanel add cards border layout center
helper method used to initialize the swing gui components
private void init listeners tabbed pane add change listener new change listener public void state changed change event e int idx tabbed pane get selected index tabbed pane set icon at idx null
helper method used to initialize the listeners for the components
public boolean get save open links return save open links
method to retrieve the flag indicating whether or not to save the open
public boolean get show bottom panel return show bottom panel
method to retrieve the flag indicating whether or not to display the
public boolean get show side panel return show side panel
method to retrieve the flag indicating whether or not to display the side
public int get side divider position return side divider position
method to get the side splitter position for the code jsplit pane code
protected void init components set layout new border layout output area new jtext pane input field new jtext field doc new default styled document output area set editable false output area set document doc jscroll pane scroll pane new jscroll pane output area jscroll pane vertical scrollbar always jscroll pane horizontal scrollbar never add scroll pane border layout center add input field border layout south input field request focus
helper method used to initialize the swing gui components
protected void send text string msg do nothing by default
method used to send the text to the irc server
private void update look and feel skin model skin model try string lnf class if skin model is system default lnf class uimanager get system look and feel class name else lnf class skin model get class name uimanager set look and feel lnf class swing utilities update component tree ui this swing utilities update component tree ui owner owner repaint repack to make sure the dialog looks good as well pack catch exception ex log error failed to load the look and feel ex
helper method used to update the current swing look and feel