input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
protected void fire change event synchronized m listeners for int i 0 i m listeners size i m listeners get i run
|
fires a change event
|
protected void store collapsible states string state string string buffer buffer new string buffer hdl document doc get hdl document if doc null return check for non workspace file ifile file doc get file if file null return for collapsible collapsible m collapsible elements key set to array new collapsible 0 if m collapsible elements get collapsible is collapsed buffer append collapsible hash code buffer append state string buffer to string try file set persistent property verilog plugin get collapsible id state string catch core exception e todo auto generated catch block e print stack trace
|
saves the state of collapsed items
|
protected void update markers for error handler error error parser get error handler get errors verilog plugin set error marker m file error get line error get message for error handler error error parser get error handler get warnings verilog plugin set error marker m file error get line error get message
|
updates the error and warning markers
|
public void scan project if verilog plugin get preference boolean scan project enable vector ifile files get project files m project verilog plugin delete markers m project if m scan state scan state in progress scan project job job new scan project job files m scan state scan state in progress not a critical job job set priority job decorate job schedule
|
public access to scan function
|
public void add child outline element element element m parent this m children add element
|
adds an element to the child list
|
protected string get task token string comment string msg for pattern pattern task token pattern matcher matcher pattern matcher comment if matcher find msg 0 matcher group 1 matcher group 2 return matcher group 1 if we get here no task was found return null
|
checks to see if a comment starts with one of the task tokens
|
public boolean is achild of outline element child both modules must live in the same file if m file equals child get file return false return false
|
determines if an element is child of another
|
public void scan tree ifile file if verilog plugin get preference boolean scan project enable false if m scan state scan state in progress scan tree job job new scan tree job file m scan state scan state in progress not a critical job job set priority job decorate job schedule
|
public access to scan function
|
protected void add task to line string type string msg int line the first marker is considered high priority if type starts with task comment tokens 0 verilog plugin set task marker m file line msg imarker priority high else verilog plugin set task marker m file line msg imarker priority normal
|
adds a task to the given line based on the comment token
|
public outline element find definition outline element instance if instance instanceof verilog instance element string types instance get type split outline element element find top level elements types 1 true if element length 0 return null else return element 0 todo vhdl module must be found return null
|
search definition from instance
|
protected void add collapsible collapsible collapsible array list position positions hdl document doc get hdl document int start end try start doc get line offset collapsible start line 1 end doc get line offset collapsible end line positions add new position start end start catch bad location exception e e print stack trace
|
adds an element to the list of collapsible positions
|
private ifile find file icontainer root string file name try iresource members members root members for int i 0 i members length i if members i instanceof icontainer ifile file find file icontainer members i file name if file null return file if members i instanceof ifile ifile file ifile members i if file name equals file get name return file catch core exception e return null
|
searches file for name in the project
|
public string get module type if m type parts length 1 return m type parts 1 else return
|
returns the type of this module instantiation
|
protected void remove task from line int line verilog plugin clear auto task marker m file line
|
removes a task from the given line
|
private void scan file ifile file try parser reader reader new parser reader file get contents iparser parser null if file get name ends with v parser parser factory create verilog parser reader m project file else if file get name ends with vhd parser parser factory create vhdl parser reader m project file do we have parser if parser null parser parse catch core exception e catch hdl parser exception e
|
scans a single file and adds its contents to the database
|
protected string get line indent int offset string buffer indent new string buffer idocument doc get document try iregion line region int line num doc get line of offset offset line region doc get line information line num string line doc get line region get offset line region get length for int i 0 i line length i character c line char at i if character is space char c false c t break indent append c catch bad location exception e e print stack trace return indent to string
|
returns the indent string of a line number
|
protected void clear auto tasks verilog plugin clear all auto task markers m file
|
removes all the auto generated tasks from the file
|
protected void parse token message string msg do the easy part m message msg get the line from the message pattern pattern pattern compile token mgr error pattern matcher m pattern matcher msg if m matches m group count 1 string segments new string m group 1 m group 2 m start line integer parse int segments 0 m column integer parse int segments 1 else m start line 0 m column 0
|
attempts to parse a token error message
|
public void resource changed iresource change event event switch event get type case iresource change event pre close break case iresource change event pre delete break case iresource change event post change try event get delta accept new delta printer catch core exception e todo auto generated catch block e print stack trace break case iresource change event pre build break case iresource change event post build break
|
called when a resource is changed
|
protected projection annotation model get annotation projection viewer viewer projection viewer get source viewer return viewer get projection annotation model
|
gets a reference to the documents current annotation model
|
private void coalesce comments int line contiguous blocks if m last comment line 1 line grow the block m end comment block line else if starting a new block if m end comment block m start comment block 1 comment line group add collapsible m start comment block m end comment block m start comment block line m end comment block line m last comment line line
|
this function keeps track of contiguous comment blocks and
|
protected int examine architecture astarchitecture body arch body string buffer name string buffer type get the name name append arch body get identifier get the entity name type append architecture arch body get entity name return 2
|
breaks out an architecture body
|
protected int examine package decl astpackage declaration package decl string buffer name string buffer type get the name name append package decl get identifier type append package decl return 1
|
breaks out a package decl
|
protected int examine package body astpackage body package body string buffer name string buffer type get the name name append package body get identifier type append package body return 1
|
breaks out a package body
|
protected int examine process astprocess statement process statement string buffer name string buffer type int results 0 get the name if process statement get identifier null name append unknown else name append process statement get identifier results type append process return results
|
breaks out a process
|
protected int examine component decl astcomponent declaration component decl string buffer name string buffer type name append component decl get identifier type append component decl return 0
|
breaks out a component declaration
|
protected int examine component inst astcomponent instantiation statement component inst string buffer name string buffer type astinstantiated unit instantiated unit component inst get instatiated unit string instant type instantiated unit get type name append component inst get identifier if instant type equals ignore case entity type append entity inst type append instantiated unit get name type append type append instantiated unit getidentifier else if instant type equals ignore case configuration type append configuration inst type append instantiated unit get name else type append component inst type append instantiated unit get name return 1
|
breaks out a component entity and configuration instantiation
|
protected int examine entity decl astentity declaration entity decl string buffer name string buffer type name append entity decl get identifier type append entity decl return 0
|
breaks out a component declaration
|
protected int examine alias astalias declaration alias string name alias get identifier string type alias alias get name begin outline element alias get first token begin line alias get first token begin column name type end outline element alias get last token end line alias get last token end column name type return 1
|
breaks out an alias declaration
|
protected int examine sub program spec astsubprogram specification spec string buffer name string buffer type string sub type spec get type to lower case name append spec get identifier if sub type contains function type append function decl else if sub type contains procedure type append procedure decl else if sub type contains record type append record decl astformal parameter list paramters spec get parameters examine parameter list paramters type return 1
|
examines a subprogram specification
|
protected int examine sub program body astsubprogram body body string buffer name string buffer type astsubprogram specification spec body get specification string sub type spec get type to lower case name append spec get identifier if sub type contains function type append function else if sub type contains procedure type append procedure else if sub type contains record type append record astformal parameter list paramters spec get parameters examine parameter list paramters type return 1
|
examines a subprogram specification
|
override protected void startup show new iguiview this
|
at startup create and show the main frame of the application
|
private void get app settings throws record store exception app settings remove all elements record enumeration rec enum record store enumerate records null null false while rec enum has next element true int setting id rec enum next record id byte data record store get record setting id app setting setting app setting deserialize data if setting null app settings add element setting rec enum destroy
|
reads settings from record store and adds it to array of settings
|
public void delete all settings throws record store exception record store close record store record store delete record store record store name open record store
|
deletes record store and creates it again
|
private void show alert string title string message displayable next disp alert new alert title alert set string message alert set timeout alert forever display display display get display this if next disp null display set current alert next disp else display set current alert alert set command listener this
|
shows alert with specified title and text
|
public void clear from field set string null api id field set string null username field set string null password field set string null
|
clears entered values in text fields of form
|
public string get from return from field get string
|
gets from name text field name of new setting and returns it
|
public void record changed record store store int record id no implementation required
|
from record listener
|
public string get apiid return api id field get string
|
gets from name text field name of new setting and returns it
|
public void record deleted record store store int record id no implementation required
|
from record listener
|
public string get username return username field get string
|
gets from value text field value of new setting and returns it
|
public string get password return password field get string
|
gets from value text field value of new setting and returns it
|
private void define message text string text throws messaging exception if message format message html this message set content text text html charset this charset else this message set text text this charset
|
set the text contents of the email were sending
|
public string get selected string string result if get selected index 1 result get string get selected index return result
|
a convenience method for getting the selected option item
|
public void clear while size 0 delete the first most element until there is no first most element delete 0
|
a convenience method for removing all items from the list
|
public void command action command command displayable displayable if command cancel command detecting the soft key press display get display z xing midlet set current z xing midlet get video form get vid form else if command barcode command command select command if get selected index 1 z xing midlet item request
|
command listener required implementation for capturing soft key presses
|
public void run synchronized this try repaint wait tout let s wake up catch interrupted exception ie will not occur in midp no thread interrupt method z xing midlet splash done
|
thread implementation required
|
public void stop invoke the notify method of the splash object and the correct thread just happens to be arbitrarily chosen as the thread to be awakened and thus dismiss the splash screen the current implementation only uses a single thread so invoking the notify method should work however the implementation may change in the future thus lets make use of the notify all method of the splash object synchronized this notify all wake everyone up
|
allows early dismissal of the splash screen for example when all background
|
public void paint graphics g int width get width int height get height g set color 0x00 ffffff g fill rect 0 0 width height if image null g draw image image width 2 height 2 graphics vcenter graphics hcenter font f font get font font face system font style bold font size small g set font f g set color 0x00000000 string vendor z xing midlet get app property midlet description if vendor null g draw string vendor width 2 height height 8 graphics bottom graphics hcenter
|
must provide this implementation used to paint the canvas
|
private void get stock units try units midlet get service get all stock units for int i 0 i units length i stock units append units i get name null catch remote exception e e print stack trace
|
get all stock units from the server
|
public void command action command command displayable displayable abstract command abstract command abstract command command abstract command execute
|
command listener of the cakis midlet class
|
public void set ip address string address service stub set property stub endpoint address property http address 8080 cakis server service cakis client service
|
set ip address of the web service
|
public void get product try product service get product product result get product id product exist form product exist form new product exist form this product false catch remote exception e e print stack trace catch product not found exception pe product not exist form product not exist form new product not exist form this product result get product id false pe print stack trace catch stock unit not found exception se se print stack trace
|
get the scanned product from the server
|
public void handle resume command display vid form get vid form
|
resume to the video form
|
public offline barcode handler get offline handler return offline handler
|
get the offline barcode handler object
|
public void get scanned barcodes form vid form get scanned form run
|
return to the list of all offline scanned barcodes
|
public cakis client service port type get service return service
|
get the cakis client service object
|
public video form get video form return vid form
|
get video form object
|
public void display displayable displayable display get display this set current displayable
|
set current display to the displayable object
|
public string get string if is datagram packet return new string my data else return my string
|
get the data the message as string
|
public int protocol return my protocol
|
get the protocol type the message was sent over
|
public int port return my port
|
get the port the net message was received at
|
public string address return host address
|
returns the remote ip address as string
|
public int port return port
|
returns the remote port number
|
public boolean isvalid return is valid
|
check if the net address is valid
|
public void add listener net listener the listener my net plug add listener the listener
|
add a listener to the udp server
|
public datagram socket socket return my datagram socket
|
get the datagram socket of the udp server
|
protected string unique string source string result for int k 0 k source length k if result index of source char at k 1 result source char at k return result
|
a utility method to remove duplicate characters from a string
|
public void send string the string send the string get bytes
|
send a string using udp to an already specified remote address
|
public void send byte the bytes if my net address isvalid send the bytes my net address else logger print warning udp client send no inet address and port has been set packet has not been sent
|
send a byte array using udp to an already specified remote address
|
public void dispose is running false my thread null if my datagram socket null if my datagram socket is connected logger print debug udp server dispose disconnect my datagram socket disconnect logger print debug udp server dispose close my datagram socket close my datagram socket null logger print debug udp server dispose closing unicast datagram socket
|
stop the udp server clean up and delete its reference
|
public void send byte the bytes if is socket send the bytes my inet address my port else logger print warning udp client send no inet address and port has been set packet has not been sent
|
send a byte array to a previously defined remote address
|
public void send byte the bytes string the address int the port try inet address my inet address inet address get by name the address send the bytes my inet address the port catch unknown host exception e logger print error udp client send while sending to the address e
|
send a byte array to a dedicated remote address
|
public void ban string the ip my ban list add the ip for int i my tcp clients size 1 i 0 i if tcp client my tcp clients get i net address address equals the ip tcp client my tcp clients get i dispose
|
ban an ip address from the server
|
public void un ban string the ip my ban list remove the ip
|
remove the ban for an ip address
|
public void send byte the bytes inet address the address int the port if is socket try datagram packet my packet new datagram packet the bytes the bytes length the address the port send my packet catch null pointer exception npe logger print error udp server send a nullpointer exception occured npe else logger print warning udp server send datagram socket is not running packet has not been sent
|
send a byte array to a dedicated remote address
|
public void reconnect try thread sleep 1000 catch final exception e start socket
|
when a tcp connection is lost reconnect to the server with reconnect
|
public multicast socket socket return my multicast socket
|
get the running multicast socket
|
public void set terminator final char the terminator terminator the terminator
|
to parse an incomming tcp message a terminator character is required to
|
public void set datagram size int the datagram size my datagram size the datagram size
|
set the buffer size of the datagrams received by the multicast socket
|
public void dispose try my thread null if my tcp clients null enumeration en my tcp clients elements while en has more elements remove tcp client en next element my tcp clients null if my server socket null my server socket close my server socket null catch ioexception e logger print error tcp server dispose ioexception e
|
kill the server
|
public void dispose try do io streams need to be closed first if my input null my input close if my output null my output close catch final exception e e print stack trace my input null my output null try if my socket null my socket close catch final exception e e print stack trace if my thread null return my socket null my thread null handle status net status connection closed logger print process tcp client dispose tcp client closed
|
stop and dispose a tcp client
|
public int size return my tcp clients size
|
get the number of connected clients
|
public void dispose close
|
dispose the multicast socket
|
public tcp client get client final int the index return tcp client my tcp clients element at the index
|
get a client at a specific position the client list
|
public boolean set time to live int the ttl try my multicast socket set time to live the ttl return true catch ioexception ioe logger print error udp server set time to live ioe catch illegal argument exception iae logger print error udp server set time to live iae return false
|
set the default time to live for multicast packets
|
public void remove abstract tcp client the tcp client if my tcp packet listener null my tcp packet listener equals this my tcp packet listener remove the tcp client the tcp client dispose my tcp clients remove element the tcp client logger print process tcp server removing tcp client
|
remove a tcp client from the servers client list
|
public int time to live try return my multicast socket get time to live catch ioexception ioe logger print error multicast get time to live ioe return 1
|
get the current time to live value
|
public void set loopback boolean the flag try my multicast socket set loopback mode the flag catch socket exception se logger print error multicast set loopback se
|
disable enable local loopback of multicast datagrams
|
public int serverport return my server port
|
get the server port
|
public boolean loopback try return my multicast socket get loopback mode catch socket exception se logger print error multicast loopback se return false
|
get the current loopback mode
|
public void set remote address final string the host address final int the port my remote address new net address the host address the port my send status my remote address isvalid
|
set the remote host address
|
public socket socket return my socket
|
get the instance of the socket
|
public void set remote address net address the net address my remote address the net address my send status my remote address isvalid
|
set the remote host address
|
public int mode return my mode
|
get the mode of the terminator
|
public void send byte the bytes if is running try datagram packet my packet new datagram packet the bytes the bytes length my net address inetaddress my net address port send my packet catch null pointer exception npe logger print error multicast send a nullpointer exception occured npe else logger print warning multicast send datagram socket is not running packet has not been sent
|
send a byte array to the mulitcast address
|
public void set listening port final int the port my listening port the port
|
set port number you are listening for incoming osc packets
|
public void add osc message the osc message messages add new osc message the osc message my message size messages size
|
add an osc message to the osc bundle
|
public void set datagram size final int the size if is locked my datagram size the size else logger print warning osc properties set datagram size datagram size can only be set before initializing osc p5 ncurrent datagram size is my datagram size
|
set the size of the datagrampacket byte buffer
|
public void clear messages new array list osc message
|
clear and reset the osc bundle for reusing
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.