input
stringlengths
10
828
output
stringlengths
5
107
protected column viewer editor create viewer editor return null
this implementation of
protected int do get column count return 0
returns the number of columns of this viewer
protected void build label viewer label update label object element or path object element if element or path instanceof tree path tree path path tree path element or path ibase label provider provider get label provider if provider instanceof itree path label provider itree path label provider pprov itree path label provider provider build label update label path pprov return element path get last segment else element element or path super build label update label element
this implementation of build label handles tree paths as well as elements
private void create support area composite parent error support provider provider policy get error support provider if provider null return composite support area new composite parent swt none provider create support area support area status grid data support data new grid data swt fill swt fill true true support data vertical span 4 support area set layout data support data if support area get layout null grid layout layout new grid layout layout margin width 0 layout margin height 0 support area set layout layout give it a default layout if one isn t set
create the area for extra error support information
protected int get input text style return swt single swt border
returns the style bits that should be used for the input text field
private void toggle details area point window size get shell get size point old size get shell compute size swt default swt default if list created list dispose list created false details button set text idialog constants show details label else list create drop down list composite get contents details button set text idialog constants hide details label get contents get shell layout point new size get shell compute size swt default swt default get shell set size new point window size x window size y new size y old size y
toggles the unfolding of the details area
public void set selection iselection s selection s
sets the transfer data for local use
public long get selection set time return selection set time
returns the time when the selection operation
public void set selection set time long time selection set time time
sets the time when the selection operation this
public void set data string key object value if data null data new hash map data put key value
restore arbitary data under the given key
public object get data string key if data null return data get key return null
get the data restored under the key
public void set shift point p x shift p x y shift p y
set the shift from the mouse position triggered the event used to
public void activate deactivate control add listener swt dispose listener control add listener swt mouse hover listener control add listener swt mouse move listener control add listener swt mouse exit listener control add listener swt mouse down listener
activate tooltip support for this control
public void deactivate control remove listener swt dispose listener control remove listener swt mouse hover listener control remove listener swt mouse move listener control remove listener swt mouse exit listener control remove listener swt mouse down listener
deactivate tooltip support for the underlying control
public boolean is respect display bounds return respect display bounds
return whther the tooltip respects bounds of the display
public void set respect display bounds boolean respect display bounds this respect display bounds respect display bounds
set to code false code if display bounds should not be respected or
public boolean is respect monitor bounds return respect monitor bounds
return whther the tooltip respects bounds of the monitor
public void set respect monitor bounds boolean respect monitor bounds this respect monitor bounds respect monitor bounds
set to code false code if monitor bounds should not be respected or
protected boolean should create tool tip event event if style no recreate 0 object tmp get tool tip area event no new area close the current tooltip if tmp null hide return false boolean rv tmp equals current area return rv return true
should the tooltip displayed because of the given event
private boolean should hide tool tip event event if event null event type swt mouse move style no recreate 0 object tmp get tool tip area event no new area close the current tooltip if tmp null hide return false boolean rv tmp equals current area return rv return true
this method is called before the tooltip is hidden
protected object get tool tip area event event return control
this method is called to check for which area the tooltip is
public void show point location event event new event event x location x event y location y event widget control tool tip create event
start up the tooltip programmatically
private static class default exception handler implements iexception handler non javadoc see org eclipse jface window window iexception handler handle exception java lang throwable public void handle exception throwable t if t instanceof thread death don t catch thread death as this is a normal occurrence when the thread dies throw thread death t try to keep running t print stack trace
defines a default exception handler
public point get location point tip size event event return control to display event x x shift event y y shift
get the display relative location where the tooltip is displayed
public boolean close stop listening for font changes if font change listener null jface resources get font registry remove listener font change listener font change listener null remove this window from a window manager if it has one if window manager null window manager remove this window manager null if shell null shell is disposed return true if we close the shell recursion will occur instead we need to dispose the shell to remove it from the display shell dispose shell null contents null return true
closes this window disposes its shell and removes this window from its
protected void after hide tool tip event event
this method is called after a tooltip is hidden
public void set hide delay int hide delay this hide delay hide delay
set the hide delay
public void set popup delay int popup delay this popup delay popup delay
set the popup delay
public boolean is hide on mouse down return hide on mouse down
return if hiding on mouse down is set
public void hide tool tip hide current tooltip null
hide the currently active tool tip
protected int get style event event return style
the style used to create the
protected string get text event event return text
the text displayed in the
public void print stack trace print stream output synchronized output super print stack trace output if status get exception null output print get class get name status get code non nls 1 non nls 2 status get exception print stack trace output
prints a stack trace out for the exception and
public void print stack trace print writer output synchronized output super print stack trace output if status get exception null output print get class get name status get code non nls 1 non nls 2 status get exception print stack trace output
prints a stack trace out for the exception and
protected idialog settings get dialog bounds settings return null
gets the dialog settings that should be used for remembering the bounds of
protected int get dialog bounds strategy return dialog persistlocation dialog persistsize
get the integer constant that describes the strategy for persisting the
public control get layout control return form
get the control that represents the decorated field
protected boolean is resizable return false
returns a boolean indicating whether the dialog should be
private void add control listeners control add dispose listener new dispose listener public void widget disposed dispose event event if hover null hover dispose control add focus listener new focus listener public void focus gained focus event event control focus gained public void focus lost focus event event control focus lost
add any listeners needed on the target control
private void run event loop shell loop shell use the display provided by the shell if possible display display if shell null display display get current else display loop shell get display while loop shell null loop shell is disposed try if display read and dispatch display sleep catch throwable e exception handler handle exception e if display is disposed display update
runs the event loop for the given shell
public void add menu detect listener menu detect listener listener menu detect listeners add listener
adds the listener to the collection of listeners who will be notified
public void remove menu detect listener menu detect listener listener menu detect listeners remove listener
removes the listener from the collection of listeners who will be
public void dispose if control null return if hover null hover dispose hover null remove control listeners control null
dispose this control decoration
public void hide hover if hover null hover set visible false
hide any hover popups that are currently showing on the control
public void set proposals string items this proposals items content proposals null
set the strings to be used as content proposals
public void set filtering boolean filter proposals this filter proposals filter proposals clear any cached proposals content proposals null
set the boolean that controls whether proposals are filtered according to
public int get maximum decoration width return max decoration width
get the maximum width in pixels of any decoration retrieved so far in
public int get maximum decoration height return max decoration height
get the maximum height in pixels of any decoration retrieved so far in
public void show decoration field decoration decoration field decoration data data get decoration data decoration if data null return record the fact that client would like it to be visible data visible true even if it is supposed to be shown if the field does not have focus do not show it yet if data show on focus control is focus control set visible data true
show the specified decoration
public void unregister field decoration string id decorations remove id recompute maximums
unregisters the field decoration with the specified id
public field decoration get field decoration string id object entry decorations get id if entry null return null return entry entry get decoration
returns the field decoration registered by the specified id
public void hide decoration field decoration decoration field decoration data data get decoration data decoration if data null return store the desired visibility in the dec data we remember the client s instructions so that changes in visibility caused by field focus changes won t violate the client s visibility setting data visible false set visible data false
hide the specified decoration
public void set proposals string proposals proposal provider set proposals proposals
set the strings to be used as content proposals
public void update decoration field decoration decoration field decoration data data get decoration data decoration if data null return if data label null data label set image decoration get image if the decoration is being shown and a hover is active update the hover text to display the new description if data label get visible true hover null show hover text decoration get description data label
update the specified decoration
public icontent proposal provider get content proposal provider return proposal provider
return the proposal provider that provides content proposals given the
public void set auto activation characters char auto activation characters if auto activation characters null this auto activate string null else this auto activate string new string auto activation characters
set the array of characters that will trigger autoactivation of the
public void set use maximum decoration width boolean use maximum width use max decoration width use maximum width
set a boolean that indicates whether the receiver should use the
public int get proposal acceptance style return proposal acceptance style
get the integer style that indicates how an accepted proposal affects the
public void set proposal acceptance style int acceptance proposal acceptance style acceptance
set the integer style that indicates how an accepted proposal affects the
public int get filter style return filter style
return the integer style that indicates how keystrokes affect the content
public void set filter style int filter style this filter style filter style
set the integer style that indicates how keystrokes affect the content of
public boolean get propagate keys return propagate keys
get the boolean that indicates whether key events including
public void set propagate keys boolean propagate keys this propagate keys propagate keys
set the boolean that indicates whether key events including
public icontrol content adapter get control content adapter return control content adapter
return the content adapter that can get or retrieve the text contents
public void set enabled boolean enabled if we are disabling it while it s proposing content close the content proposal popup is enabled enabled
set the boolean flag that determines whether the adapter is enabled
public void add content proposal listener icontent proposal listener listener proposal listeners add listener
add the specified listener to the list of content proposal listeners that
public void remove content proposal listener icontent proposal listener listener proposal listeners remove listener
removes the specified listener from the list of content proposal
public void add content proposal listener icontent proposal listener2 listener proposal listeners2 add listener
add the specified listener to the list of content proposal listeners that
public void remove content proposal listener icontent proposal listener2 listener proposal listeners2 remove listener
remove the specified listener from the list of content proposal listeners
public void show if visible visible true update
show the control decoration
public void hide if visible visible false update
hide the control decoration
private void dump string who event e string buffer sb new string buffer content proposal adapter n non nls 1 sb append who sb append e key code e key code hex e key code non nls 1 sb append character e character hex e character non nls 1 sb append state mask e state mask hex e state mask non nls 1 sb append doit e doit non nls 1 sb append detail e detail hex e detail non nls 1 sb append widget e widget non nls 1 system out println sb
dump the given events to standard output
public string get description text return description text
get the description text that may be shown in a hover for this
public void set description text string text this description text text update
set the image shown in this control decoration
public void set image image image this image image update
set the image shown in this control decoration
public boolean get show only on focus return show only on focus
get the boolean that controls whether the decoration is shown only when
public void set show only on focus boolean show only on focus this show only on focus show only on focus update
set the boolean that controls whether the decoration is shown only when
public boolean get show hover return show hover
get the boolean that controls whether the decorations description text
public void set show hover boolean show hover this show hover show hover update
set the boolean that controls whether the decorations description text
public void set margin width int margin width this margin width margin width update
set the margin width in pixels that should be used between the decorator
protected void update if control null control is disposed return rectangle rect get decoration rectangle control get shell redraw this rectangle in all children control get shell redraw rect x rect y rect width rect height true control get shell update if hover null get description text null hover set text get description text get decoration rectangle control get parent control
something has changed requiring redraw
public void start bundle context context throws exception super start context uiplugin get default get preference store set value iworkbench preference constants enable new min max false
this method is called upon plug in activation
public resource bundle get resource bundle try if resource bundle null resource bundle resource bundle get bundle net sf vspresentation vspresentation plugin resources non nls 1 catch missing resource exception x resource bundle null return resource bundle
returns the plugins resource bundle
public ctab folder create tab folder composite parent int style ctab folder tab folder new ctab folder parent style return tab folder
creates the tab folder as a part of the form
public ctab item create tab item ctab folder tab folder int style ctab item tab item new ctab item tab folder style return tab item
creates the tab item as a part of the tab folder
public list create list composite parent int style list list new org eclipse swt widgets list parent style return list
creates the list as a part of the form
public composite create plain composite composite parent int style composite c super create composite parent style c set background parent get background paint borders for c return c
creates a plain composite as a part of the form
public scrolled composite create scrolled composite composite parent int style scrolled composite scrolled composite new scrolled composite parent style return scrolled composite
creates a scrolled composite as a part of the form
public ccombo create ccombo composite parent int combo style ccombo combo new ccombo parent combo style swt flat combo set visible item count 20 adapt combo true false return combo
creates a combo box as a part of the form
public ccombo create ccombo composite parent return create ccombo parent swt flat swt read only
creates a combo box as a part of the form
public group create group composite parent string text group group new group parent swt shadow none group set text text group set background get colors get background group set foreground get colors get foreground return group
creates a group as a part of the form
public composite create flat form composite composite parent composite composite create composite parent form layout layout new form layout layout margin width itabbed property constants hspace 2 layout margin height itabbed property constants vspace layout spacing itabbed property constants vmargin 1 composite set layout layout return composite
creates a flat form composite as a part of the form
public clabel create clabel composite parent string text return create clabel parent text swt none
creates a label as a part of the form
public clabel create clabel composite parent string text int style final clabel label new clabel parent style label set background parent get background label set text text return label
creates a label as a part of the form
public void set title string text image image this text text this image image if text null label set text text else label set text blank label set image image redraw
set the text label
public void set image data image data data if source image null source image dispose source image null if data null source image new image get display data redraw
reset the image data and update the image
public void clear if source image null source image dispose source image null gc clear gc new gc this paint clear gc clear gc dispose
clear the canvas
private void populate from central directory throws ioexception position at central directory
reads the central directory of the given archive and populates the
protected void write central directory end throws ioexception write out eocd sig 4 disk numbers write out zero 2 write out zero 2 number of entries byte num zip short get bytes entries size write out num 2 write out num 2 length and location of cd write out zip long get bytes cd length 4 write out zip long get bytes cd offset 4 zip file comment byte data get bytes comment write out zip short get bytes data length 2 write out data
writes the quot end of central dir record quot
public int set long at int offset int value throws native exception throw new null pointer exception this pointer is null
method set long at