input
stringlengths
10
828
output
stringlengths
5
107
public void set default encoding string item this default encoding item
sets the default encoding for this bookmark
public void set prompt for password boolean b prompt for password b
sets if this bookmark must prompt the user for a password when connecting
public schema get default schema throws not connected exception sqlexception if this default schema null string username get database get username string actual get adapter get default schema username this default schema new schema actual username true return this default schema
returns the default schema for a database
public string get connect return this connection url
returns the jdbc url
public string get password if this prompt for password return null else return this password
returns the password
public void set connect string connection url if connection url null connection url non nls 1 this connection url connection url
sets the connect
public void set password string password if password null password non nls 1 this password password
sets the password
public void set username string username if username null username non nls 1 this username username
sets the username
public void set name string name if name null name non nls 1 if name equals this name string old name this name this name name this property change support fire property change iquantum constants name property old name this name this changed true
sets the name
public meta result for schema string schema this schema schema return this
sets the schema to restrict actions to that schema only
public meta result get tables throws not connected exception sqlexception if there is anything in our list they should be schemas we store them list schema schema list list utils get filtered list this schema class clear if schema list size 0 for schema schema schema list add tables schema get name else add tables schema return this
gets all the tables for the current bookmark as a chained meta result
public meta result get views throws not connected exception sqlexception if there is anything in our list they should be schemas we store them list schema schema list list utils get filtered list this schema class clear if schema list size 0 for schema schema schema list add views schema get name else add views schema return this
gets all the tables for the current bookmark as a chained meta result
public meta result start with string prefix todo this is probably slower than making a copy of the object and returning it for iterator imetadata iter this iterator iter has next imetadata element iter next if element get name starts with prefix iter remove return this
leaves in the current metaresult just the elements whose name starts with prefix
public string get query string query if widget get selection text length 0 query widget get selection text else query widget get text return query
returns the query to be executed
public void refresh tree viewer refresh
refreshes the displayed tree with the possible changes to the underlying data
public int get widget offset point pt int offset 1 try offset widget get offset at location pt catch illegal argument exception e icheck if the cursor is past the end of the line point start pt new point 0 pt y return get line start start pt return offset
gets the character offset of the point in widget co ordinates
protected void fire property change property change event event tree node parent get parent if parent null this disposed parent fire property change event
default implementation of fire property change for the tree node family
public void reload throws not connected exception sqlexception if is initialized initialize children for tree node node this children node reload
recursively walks the tree from this node downwards re initializing the children of
public sqlresult set results get selected result set result set viewer viewer get selected result set viewer return viewer null null viewer get result set
return selected active resultset from the itable view
public void do sort int column table viewer viewer if column this column same column as last sort toggle the direction direction direction ascending descending ascending else new column do an ascending sort this column column direction ascending viewer get table set sort direction direction
does the sort
public void fill context menu imenu manager menu menu add this execute action menu add this format action menu add this explain action menu add new separator menu add this cut action menu add this copy action menu add this paste action menu add this select all action
add all the appropriate actions to the popup menu
public boolean is result set return true
returns the result set
public boolean is meta data return false
returns the result set
public char get next char ret val offset value length value offset 0 offset return ret val
returns the next character
public char peek char ret val offset value length value offset 0 return ret val
returns the next character without advancing the pointer
public void mark mark offset
marks a poing of the stream to come back later using reset
public void reset offset mark
returns to a previously marked with mark place
protected void update status line string message this view get view site get action bars get status line manager set message message
updates the message shown in the status line
private void set property defaults database adapter adapter adapter factory get instance get adapter get driver get type map string string properties adapter null new hash map string string adapter get default connection parameters for string key properties key set put property key string properties get key
gets the possible default values for the properties for example the port
protected table create table page composite composite int style swt single swt border swt h scroll swt v scroll swt full selection swt hide selection table table new table composite style table set header visible true table set lines visible true table set layout data new grid data swt fill swt fill true true return table
creates a standard itable ui for wizard implementation
protected void create table column table table string col name int style int pos int width table column column new table column table style pos column set text col name column set width width
creates a standard table column ui for wizard implementation
protected grid data create grid data int horz span int vert span int alignment grid data grid data new grid data grid data horizontal span horz span grid data vertical span vert span grid data horizontal alignment alignment grid data vertical alignment alignment return grid data
creates a standard grid data ui for wizard implementation
public void set file string file super set file get translated file name file if this state location null check number of files file
sets the file name
public void stop bundle context context throws exception synchronized this log managers for plugin log manager log manager this log managers log manager internal shutdown this log managers clear super stop context
iterates over the list of active log managers and shutdowns each one
public boolean un hook plugin string id synchronized this hooked plugins if id null this hooked plugins contains key id return false plugin log listener listener this hooked plugins get id listener dispose this hooked plugins remove id return true
unhooks a plug in from this plugin log manager
public boolean perform finish object file this output page create output file if file null file instanceof ifile versioning helper open editor get shell ifile file return true
this method is called when finish button is pressed in
private void join clusters if clusters size 1 node source node null node target node null add an edge from each successive cluster to next for iterator cluster iter clusters iterator iter has next cluster cluster iter next if source node null use first node in set as target node target node node cluster set get 0 new dummy edge source node target node set up source node for the next iteration using last node in set source node node cluster set get cluster set size 1
joins the clusters together
public void set diagram entity relation diagram diagram this diagram diagram
sets the parent activity diagram
public void run execute get command
performs the delete action on the selected objects
protected property sheet page get property sheet page if null undoable property sheet page undoable property sheet page new property sheet page undoable property sheet page set root entry new undoable property sheet entry get command stack return undoable property sheet page
returns the undoable code property sheet page code for this editor
private edit part get part for element object model element if model element instanceof entity relation diagram return new entity relation diagram edit part else if model element instanceof table return new table part else if model element instanceof relationship return new relationship part else if model element instanceof column return new column part throw new runtime exception can t create part for model element model element null model element get class get name null
maps an object to an edit part
protected void create actions add stack action new undo action this add stack action new redo action this add edit part action new delete action iworkbench part this add edit part action new mark for output action iworkbench part this add editor action new save action this add editor action new print action this add retarget action new zoom in retarget action add retarget action new zoom out retarget action
creates actions and registers them to the action registry
protected void handle bounds change property change event evt
handles change in bounds to be overridden by subclass
public void test db interface instantiation throws exception non threaded new connect runnable testmode good run threaded for int i 0 i 100 i new thread new connect runnable testmode good start wrong jar leads to npe new connect runnable testmode wrongjar run wrong path leads to npe new connect runnable testmode wrongpath run
test db interface instantiation
public string get table query string table if logger null logger null logger is debug enabled logger debug get table query string value of table return select from table non nls 1
returns the sql query to access all the columns of a table select
public string get next value string sequence string owner if logger null logger null logger is debug enabled logger debug get next value string value of sequence string value of owner returns null return null
gets the sql query to get the next value of a sequence incrementing
public string get prev value string sequence string owner if logger null logger null logger is debug enabled logger debug get prev value string value of sequence string value of owner returns null return null
gets the sql query to get the actual value previously used of a
public string get remarks query string table name string column name if logger null logger null logger is debug enabled logger debug get remarks query string value of table name string value of column name returns null return null
returns a query to get the comments on the columns of a table
public boolean is explainable string sql statement return true
oracle explains mostly everything
public string get count query string table name string result select count from table name if logger null logger null logger is debug enabled logger debug get count query string value of table name returns result return result
returns a query to get the number of registers from a table
public string get schema name string qualified name string tokenizer st new string tokenizer qualified name non nls 1 if st count tokens 1 return st next token else return
gets the first string in a string with the structure xxxx
public string get table name string qualified name string tokenizer st new string tokenizer qualified name non nls 1 if st count tokens 1 st next token return st next token else return qualified name
gets the second string in a string with the structure xxxx
public string quote value ientity entity string column name string value try if entity null entity get column column name null icolumn column entity get column column name return quote value column get type catch not connected exception e idiom utils unexpected exception e catch sqlexception e idiom utils unexpected exception e return value
quotes the value of an ientity column
public string build prepared insert ientity entity string matrix columns throws not connected exception sqlexception return build generic insert entity columns true null
generates a prepared insert sql instruction using only the names in the
private boolean compare binary web file previous content web file new content byte p content previous content get content byte n content new content get content if p content length n content length system out println p content length n content length different lengths return true for int i 0 i p content length i if p content i n content i system out println int p content i int n content i difference in byte i return true return false
compare a couple of buffers byte to byte
private void check supported throws unsupported operation exception if is supported throw new unsupported operation exception tray icon is not supported by the window manager
checks wether tray icon is supported in the system
private void fire click for tray action listener listener action listeners listener click
fire a click event to all action listeners
private void fire about for tray action listener listener action listeners listener about
fire an about event to all action listeners
private void fire exit for tray action listener listener action listeners listener exit
fire an exit event to all action listeners
private void fire show for tray action listener listener action listeners listener show
fire a show event to all action listeners
public void show tray info string warning message string title if tray manager is supported tray manager show info title warning message
show a tray icon info message
public void show warning string warning message string title string warning icon path net sourceforge autofeed gui warning png noi18 n image icon warning icon new image icon get class get resource warning icon path joption pane show message dialog this warning message title joption pane warning message warning icon
show a modal warning dialog
public void show tray warning string warning message string title if tray manager is supported tray manager show warning title warning message
show a tray icon warning message
public void show error string error message show error error message auto feed error
show a modal error dialog
public void show error string error message string title string error icon path net sourceforge autofeed gui error png noi18 n image icon error icon new image icon get class get resource error icon path joption pane show message dialog this error message title joption pane error message error icon
show a modal error dialog
public void show tray error string warning message string title if tray manager is supported tray manager show error title warning message
show a tray icon error message
private void set global buttons enabled boolean flag for component c global buttons panel get components c set enabled flag
enable or disable the global action buttons mark all delete all
private void set selection buttons enabled boolean flag for component c selection buttons panel get components c set enabled flag
enable or disable the selection action buttons mark feed delete feed
private void check valid url add feed button set enabled validity checker is valid get current url
enable or disable add feed button based on url input text validity
protected void show about dialog about dialog about dialog new about dialog new jframe true about dialog set visible true
show a modal about dialog window
public void build and show gui constraint gridx 0 description lbl new jlabel html h2 server is running h2 html main panel add description lbl constraint constraint insets new insets 20 20 20 20 stop btn new jbutton stop stop btn add action listener new action listener public void action performed action event e system exit 0 main panel add stop btn constraint frame pack frame set visible true
creates the gui for the user to interact with
public void close gui frame dispose
closes the view and releases of all the components from memory
public void start server throws remote exception impl new server impl port server interface stub server interface unicast remote object export object impl 0 registry registry locate registry create registry port registry rebind urly server stub system out println server running on port port
starts the application running in server mode
public void load db file string db location throws file not found exception file file new file db location raf new random access file file rw
reads in the new database file into a code random access file code
public void book btn click string cust num string name string location throws record not found exception ioexception int matching record data find new string name location data set requesting name name data set requesting location location string field new string cust num data update matching record 0 field
the actions to perform when the book button is clicked
public string get smoking return smoking
gets the smoking status of the code room code
public void set smoking string smoking this smoking smoking
sets the smoking status of the code room code to the parameter specified
public string get rate return rate
gets the rate of the code room code
public void set rate string rate this rate rate
sets the rate of the code room code to the parameter specified
public string get name return name txt get text
gets the name text value from the name txt code jtext field code
public string get location return location txt get text
gets the location value from the location txt code jtext field code
private void initialize this set size 675 421 this set content pane get jcontent pane this set title signatura properties get property signpdf
this method initializes this
private jpanel get jcontent pane if j content pane null j content pane new jpanel j content pane set layout new border layout j content pane add get jtool bar border layout north j content pane add get jpanel border layout center return j content pane
this method initializes j content pane
private jtool bar get jtool bar if j tool bar null j tool bar new jtool bar j tool bar add get jbutton help return j tool bar
this method initializes j tool bar
private jbutton get jbutton help if j button help null j button help new jbutton j button help set tool tip text about j button help set text sobre j button help add mouse listener new java awt event mouse adapter public void mouse clicked mouse event e j button help mouse clicked e return j button help
this method initializes j button help
private jbutton get jbutton open input file if j button open input file null j button open input file new jbutton image open new image icon signatura frame sign class get resource openfile gif j button open input file set icon image open j button open input file set bounds new rectangle 597 165 47 21 j button open input file add mouse listener new java awt event mouse adapter public void mouse clicked mouse event e j button open input file mouse clicked e return j button open input file
this method initializes j button open input file
private jtext field get jtext field url if j text field url null j text field url new jtext field j text field url set bounds new rectangle 13 255 576 20 return j text field url
this method initializes j text field url
private jtext field get jtext field input path if j text field input path null j text field input path new jtext field j text field input path set bounds new rectangle 14 166 574 20 return j text field input path
this method initializes j text field input path
private jscroll pane get jscroll pane cert list if j scroll pane cert list null j scroll pane cert list new jscroll pane j scroll pane cert list set bounds new rectangle 15 30 436 61 j scroll pane cert list set viewport view get jlist cert list return j scroll pane cert list
this method initializes j scroll pane cert list
private jlist get jlist cert list if j list cert list null j list cert list new jlist return j list cert list
this method initializes j list cert list
private jtext field getj password field cert passwd if j password field cert passwd null j password field cert passwd new jpassword field j password field cert passwd set bounds new rectangle 15 120 219 20 return j password field cert passwd
this method initializes j password field cert passwd
private jcombo box get jcombo box position if j combo box position null string positions list signatura properties get property position top signatura properties get property position bottom signatura properties get property position right signatura properties get property position left j combo box position new jcombo box positions list j combo box position set bounds new rectangle 391 285 197 17 return j combo box position
this method initializes j combo box position
private jbutton get jbutton sign pdf if j button sign pdf null j button sign pdf new jbutton j button sign pdf set bounds new rectangle 240 312 153 24 j button sign pdf set text firmar y estampar j button sign pdf add mouse listener new mouse adapter public void mouse clicked mouse event e j button sign pdf mouse clicked e return j button sign pdf
this method initializes j button sign pdf
private void initialize this set size 511 310 this set content pane get jcontent pane this set title signatura properties get property signsmime
this method initializes this
private jpanel get jcontent pane if j content pane null j content pane new jpanel j content pane set layout new border layout j content pane add get jtool bar border layout north j content pane add get jpanel up border layout center return j content pane
this method initializes j content pane
private jtext field get jtext field output path if j text field output path null j text field output path new jtext field j text field output path set bounds new rectangle 14 211 574 20 return j text field output path
this method initializes j text field output path
private jbutton get jbutton open output file if j button open output file null j button open output file new jbutton image open new image icon signatura frame sign class get resource openfile gif j button open output file set icon image open j button open output file set bounds new rectangle 599 210 48 20 j button open output file add mouse listener new java awt event mouse adapter public void mouse clicked mouse event e j button open output file mouse clicked e return j button open output file
this method initializes j button open output file
private jtool bar get jtool bar if j tool bar null j tool bar new jtool bar j tool bar add get button help return j tool bar
this method initializes j tool bar
private jtext field get jtext field input path if j text field input path null j text field input path new jtext field j text field input path set bounds new rectangle 13 18 394 19 return j text field input path
this method initializes j text field input path
private jbutton get jbutton open file if j button open file null j button open file new jbutton j button open file set bounds new rectangle 419 16 63 20 j button open file set text open j button open file set icon image open j button open file add mouse listener new mouse adapter public void mouse clicked mouse event e button open file mouse clicked e return j button open file
this method initializes j button open file