input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void set elements list elements boolean refilter we copy the list since we sort it if elements null f elements new object 0 else f elements elements to array f filtered elements new int f elements length 1 f rendered strings render strings if refilter filter true
|
sets the list of elements presented in the widget
|
public void set filter string pattern boolean refilter f text set text pattern if refilter filter true
|
sets the filter pattern
|
protected void set selection int selection f list set selection selection
|
selects the elements in the list determined by the given
|
public control get separator composite parent if f separator null assert composite not null parent f separator new label parent f style return f separator
|
creates or returns the created separator
|
public boolean is selected int index if index 0 index f buttons selected length return f buttons selected index return false
|
returns the selection state of a button contained in the group
|
public void set selection int index boolean selected if index 0 index f buttons selected length if f buttons selected index selected f buttons selected index selected if f buttons null button button f buttons index if is ok to use button button set selection selected
|
sets the selection state of a button contained in the group
|
public void enable selection button int index boolean enable if index 0 index f buttons enabled length f buttons enabled index enable if f buttons null button button f buttons index if is ok to use button button set enabled is enabled enable
|
sets the enable state of a button contained in the group
|
public void set status string status if is ok to use f status label control f status label control set text status f status status
|
sets the status string
|
public void set status image image if is ok to use f status label control if image null f status label control set image null else f status label control set image image f status image
|
sets the status image
|
public void set status width hint string width hint string f width hint string width hint string f width hint 1
|
sets the staus string hint of the status label
|
public int get flags return f flags
|
gets the combo flags
|
public void set status width hint int width hint f width hint width hint f width hint string null
|
sets the width hint of the status label
|
public void set items string items f items items if is ok to use f combo control f combo control set items items dialog field changed
|
sets the combo items
|
public label get status label control composite parent if f status label control null assert composite not null parent f status label control new label parent swt left f status label control set font parent get font f status label control set enabled is enabled if f status instanceof image f status label control set image image f status else if f status instanceof string f status label control set text string f status else must be null return f status label control
|
creates or returns the created status label widget
|
public void set text string text f text text if is ok to use f combo control f combo control set text text else dialog field changed
|
sets the text
|
public void select item int index if is ok to use f combo control f combo control select index else if index 0 index f items length f text f items index f selection index index dialog field changed
|
selects an item
|
public void set text without update string text f text text if is ok to use f combo control f combo control remove modify listener f modify listener f combo control set text text f combo control add modify listener f modify listener
|
sets the text without triggering a dialog changed event
|
public list get checked elements return new array list f check elements
|
gets the checked elements
|
public boolean is checked object obj return f check elements contains obj
|
returns true if the element is checked
|
public void set checked elements list list f check elements new array list list if f table null checkbox table viewer f table set checked elements list to array check state changed
|
sets the checked elements
|
public void set checked object object boolean state set checked without update object state check state changed
|
sets the checked state of an element
|
public void set checked without update object object boolean state if f check elements contains object f check elements add object if f table null checkbox table viewer f table set checked object state
|
sets the checked state of an element
|
public void check all boolean state if state f check elements get elements else f check elements clear if f table null checkbox table viewer f table set all checked state check state changed
|
sets the check state of all elements
|
public text get text control composite parent if f text control null assert composite not null parent f modify listener new modify listener public void modify text modify event e do modify text e f text control new text parent swt single swt border moved up due to 1 geunw2 f text control set text f text f text control set font parent get font f text control add modify listener f modify listener f text control set enabled is enabled return f text control
|
creates or returns the created text control
|
public void set text string text f text text if is ok to use f text control f text control set text text else dialog field changed
|
sets the text
|
public void set text without update string text f text text if is ok to use f text control f text control remove modify listener f modify listener f text control set text text f text control add modify listener f modify listener
|
sets the text without triggering a dialog changed event
|
protected void initialize viewer colors isource viewer viewer ipreference store store f overlay store if store null styled text styled text viewer get text widget background color color color store get boolean ceditor preference color background system default null create color store ceditor preference color background styled text get display styled text set background color if f background color null f background color dispose f background color color
|
initializes the given viewers colors
|
public void content updated if f input null try f input update catch core exception e harbour uiplugin log e get status f input null return final tree viewer tree viewer get tree viewer if tree viewer null tree viewer get control is disposed tree viewer get control get display async exec new runnable public void run if tree viewer get control is disposed iselection sel tree viewer get selection tree viewer get control set redraw false tree viewer refresh tree viewer set selection update selection sel tree viewer get control set redraw true
|
called by the editor to signal that the content has updated
|
protected void context menu about to show imenu manager menu if open include action can action be added get selection menu add f open include action if search for references action can action be added get selection menu add f search for references action
|
called to create the context menu of the outline
|
protected void fire selection changed iselection selection create an event selection changed event event new selection changed event this selection fire the event object listeners selection changed listeners get listeners for int i 0 i listeners length i iselection changed listener listeners i selection changed event
|
fires a selection changed event
|
protected void handle dispose if f text viewer null f text viewer remove text listener f internal listener f text viewer null if f model null f model remove annotation model listener f internal listener if f buffer null f buffer dispose f buffer null if f hit detection cursor null f hit detection cursor dispose f hit detection cursor null
|
disposes the rulers resources
|
protected void double buffer paint gc dest point size f canvas get size if size x 0 size y 0 return if f buffer null rectangle r f buffer get bounds if r width size x r height size y f buffer dispose f buffer null if f buffer null f buffer new image f canvas get display size x size y gc gc new gc f buffer try gc set background f canvas get background gc fill rectangle 0 0 size x size y do paint gc finally gc dispose dest draw image f buffer 0 0
|
double buffer drawing
|
public void update if f canvas null f canvas is disposed display d f canvas get display if d null d async exec new runnable public void run redraw
|
thread safe implementation
|
protected void redraw if f canvas null f canvas is disposed gc gc new gc f canvas double buffer paint gc gc dispose
|
redraws the overview ruler
|
public void set annotation model iannotation model model if f annotation model null f annotation model remove annotation model listener this if model null if f label provider null f label provider new harbour element label provider harbour element image provider small icons harbour element label provider get adornment providers true null f annotation model model f annotation model add annotation model listener this model changed f annotation model else if f label provider null f label provider dispose f label provider null f annotation model null
|
defines the annotation model to listen to
|
protected void add annotation annotation annotation position position boolean fire model changed if f annotations contains key annotation this is an unfortunate hack because we cannot override add annotation marker and if we update a marker position there s no way to update the annotation if annotation instanceof cmarker annotation int start cmarker annotation annotation get error start if start 1 start position get offset position set offset start position set length cmarker annotation annotation get error length f annotations put annotation position add position f document position if fire model changed fire model changed
|
adds the given annotation to this model
|
public void set margin ruler color color color f color color
|
must be called before code paint code is called the first time
|
public void intialize compute widget x f text widget redraw
|
must be called explicitly when font of text widget changes
|
protected void oopen on selection action string label this super label
|
creates a new action without label
|
protected void open itag entry element throws harbour model exception part init exception ieditor part part editor utility open in editor element get ifile int line element get line number if line 0 line if part instanceof ceditor ceditor ed ceditor part try idocument document ed get document provider get document ed get editor input if line 3 ed select and reveal document get line offset line 3 0 ed select and reveal document get line offset line 0 catch bad location exception e
|
opens the editor on the given element and subsequently selects it
|
public void update if f input null final tree viewer tree viewer get tree viewer if tree viewer null tree viewer get control is disposed tree viewer get control get display async exec new runnable public void run if tree viewer get control is disposed iselection sel tree viewer get selection tree viewer get control set redraw false tree viewer refresh tree viewer set selection sel tree viewer get control set redraw true
|
updates the outline page
|
protected list filter resolve results itag entry code resolve results list list int n results code resolve results length list refs list for int i 0 i n results i if code resolve results i get kind tag flags t prototype refs add code resolve results i return refs
|
filters out source references from the given code resolve results
|
private boolean ends with delimiter idocument d string txt string delimiters d get legal line delimiters for int i 0 i delimiters length i if txt ends with delimiters i return true return false
|
returns whether the text ends with one of the given search strings
|
public itoken next token f token offset position if position end size end position position end return f default return token else return token eof
|
returns the next token in the document
|
public void set context information icontext information context information f context information context information f context information position f context information null f cursor position 1
|
sets the context information
|
public void set trigger characters char trigger characters f trigger characters trigger characters
|
sets the trigger characters
|
public void set cursor position int cursor position assert is true cursor position 0 f cursor position cursor position f context information position f context information null f cursor position 1
|
sets the cursor position relative to the insertion offset
|
public int get replacement offset return f replacement offset
|
gets the replacement offset
|
public void set replacement offset int replacement offset assert is true replacement offset 0 f replacement offset replacement offset
|
sets the replacement offset
|
public int get replacement length return f replacement length
|
gets the replacement length
|
public void set replacement length int replacement length assert is true replacement length 0 f replacement length replacement length
|
sets the replacement length
|
public string get replacement string return f replacement string
|
gets the replacement string
|
public void set replacement string string replacement string f replacement string replacement string
|
sets the replacement string
|
public void set image image image f image image
|
sets the image
|
public void set final caret offset int offset f final caret offset offset
|
sets the final position of the caret when the linked mode is exited
|
public ccontent outline page get outline page if f outline page null f outline page new ccontent outline page this f outline page add selection changed listener this return f outline page
|
gets the outline page of the c editor
|
public void set cancel listener exit listener listener f exit listener listener
|
sets a code cancel listener code which is notified if the linked mode
|
public int get relevance return f relevance
|
gets the proposals relevance
|
public void set relevance int relevance f relevance relevance
|
sets the proposals relevance
|
public void set linked position listener linked position listener listener f listener listener
|
sets a listener to notify changes of current linked position
|
public iregion get selected region if f frame position null return new region f final caret offset 0 else return new region f frame position get offset f frame position get length
|
returns the cursor selection after having entered the linked mode
|
public void uninstall boolean success f document remove document listener this try position positions get positions f document if success positions null restore for int i 0 i positions length i typed position position typed position positions i f document replace position get offset position get length position get type f document remove position category linked position catch bad location exception e harbour uiplugin log e assert is true false catch bad position category exception e harbour uiplugin log e assert is true false finally f document remove position updater this fg active managers remove f document
|
leaves the linked mode
|
public position get first position return get next position 1
|
returns the first linked position
|
public position get next position int offset position positions get positions f document return find next position positions offset
|
returns the next linked position with an offset greater than code offset code
|
public position get previous position int offset position positions get positions f document if positions null return null position last position null position position get first position while position null position get offset offset last position position position find next position positions position get offset return last position
|
returns the position with the greatest offset smaller than code offset code
|
protected reader get reader return f reader
|
returns the internal reader
|
protected int next char throws ioexception f read from buffer f buffer length 0 if f read from buffer char ch f buffer char at f index if f index f buffer length f buffer set length 0 f index 0 return ch else int ch f char after white space if ch 1 ch f reader read if character is whitespace char ch do ch f reader read while character is whitespace char ch if ch 1 f char after white space ch return else f char after white space 1 return ch
|
returns the next character
|
public boolean any position includes int offset int length position positions get positions f document position position find current editable position positions offset if position null return false return includes position offset length
|
test if ok to modify through ui
|
public void set context type context type context type f context type context type
|
sets the context type
|
public void reset f proposals clear
|
empties the collector
|
protected int compare ruler line position position idocument document int line if position get offset 1 position get length 1 try int marker line document get line of offset position get offset if line marker line return 1 if marker line line line document get line of offset position get offset position get length return 2 catch bad location exception x return 0
|
returns the distance to the ruler line
|
protected list get markers for line isource viewer viewer int line idocument document viewer get document iannotation model model viewer get annotation model if model null return null list exact new array list list including new array list iterator e model get annotation iterator while e has next object o e next if o instanceof marker annotation marker annotation a marker annotation o switch compare ruler line model get position a document line case 1 exact add a get marker break case 2 including add a get marker break return select exact including
|
returns one marker which includes the rulers line of activity
|
public void dispose f code scanner null f partition scanner null f multiline comment scanner null f singleline comment scanner null f string scanner null if f color manager null f color manager dispose f color manager null if f preference store null f preference store remove property change listener f preference listener f preference store null f preference listener null
|
disposes all members of this tools collection
|
public ccolor manager get color manager return f color manager
|
gets the color manager
|
public rule based scanner get ccode scanner return f code scanner
|
gets the code scanner used
|
public ipartition token scanner get partition scanner return f partition scanner
|
returns a scanner which is configured to scan
|
public idocument partitioner create document partitioner string types new string cpartition scanner harbour doc cpartition scanner c multiline comment cpartition scanner c single line comment cpartition scanner c string return new default partitioner get partition scanner types
|
gets the document provider used
|
public rule based scanner get multiline comment scanner return f multiline comment scanner
|
returns a scanner which is configured to scan java multiline comments
|
public rule based scanner get singleline comment scanner return f singleline comment scanner
|
returns a scanner which is configured to scan java singleline comments
|
public rule based scanner get string scanner return f string scanner
|
returns a scanner which is configured to scan java strings
|
protected text attribute get token text attribute itoken token object data token get data if data instanceof text attribute return text attribute data return f default text attribute
|
returns a text attribute encoded in the given token
|
protected void initialize f scanner set range f document 0 f document get length try itoken token f scanner next token while token is eof string content type get token content type token if is supported content type content type typed position p new typed position f scanner get token offset f scanner get token length content type f document add position content types category p token f scanner next token catch bad location exception x cannot happen as offsets come from scanner catch bad position category exception x cannot happen if document has been connected before
|
performs the initial partitioning of the partitioners document
|
protected typed position find closest position int offset try int index f document compute index in category content types category offset position category f document get positions content types category if category length 0 return null if index category length if offset category index offset return typed position category index if index 0 index return typed position category index catch bad position category exception x catch bad location exception x return null
|
returns the position in the partitoners position category which is
|
protected boolean sequence detected icharacter scanner scanner char sequence boolean eof allowed for int i 1 i sequence length i int c scanner read if c icharacter scanner eof eof allowed return true else if c sequence i non matching character detected rewind the scanner back to the start scanner unread for int j i 1 j 0 j scanner unread return false return true
|
returns whether the next characters to be read by the character scanner
|
protected boolean is supported content type string content type if content type null for int i 0 i f legal content types length i if f legal content types i equals content type return true return false
|
returns whether the given type is one of the legal content types
|
public abstract cscanner icolor manager manager ipreference store store super f color manager manager f preference store store
|
creates an abstract java scanner
|
public void allow adding includes boolean allow adding includes f allow add includes allow adding includes
|
tells this processor to add include statement for proposals that have
|
public itoken next token itoken token while true f token offset f offset f column undefined for int i 0 i f rules length i token f rules i evaluate this if token is undefined return token if read eof return token eof else return f default token
|
returns the next token in the document
|
public void reset throws core exception clear add from file get template file
|
resets the template set
|
public void restore defaults throws core exception clear add from stream get defaults as stream
|
resets the template set with the default templates
|
public void set description string description f description description
|
sets the description of the template
|
public string get description return f description
|
returns the description of the template
|
public void set pattern string pattern f pattern pattern
|
sets the pattern of the template
|
public string get pattern return f pattern
|
returns the template pattern
|
public void set enabled boolean enable f enabled enable
|
sets the enable state of the template
|
public boolean is enabled return f enabled
|
returns code true code if template is enabled code false code otherwise
|
public boolean matches string prefix string context type name return f enabled f context type name equals context type name prefix length 0 f name to lower case starts with prefix to lower case
|
returns code true code if template matches the prefix and context
|
public context type get context type return f context type
|
returns the context type of this context
|
public void set read only boolean read only f read only read only
|
sets or clears the read only flag
|
public boolean is read only return f read only
|
returns code true code if context is read only code false code otherwise
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.